SWDEV-245531 - GLInterop - adding register image api (#2454)

Change-Id: Iff40f244f0d9c31b462c5878a8c8eed6f5292517

[ROCm/hip commit: b59522d188]
Bu işleme şunda yer alıyor:
pghafari
2022-01-11 03:19:31 -05:00
işlemeyi yapan: GitHub
ebeveyn 3ee377ecdc
işleme ca992e1dc3
+7
Dosyayı Görüntüle
@@ -5223,6 +5223,7 @@ hipError_t hipGraphExecEventWaitNodeSetEvent(hipGraphExec_t hGraphExec, hipGraph
* This section describes Stream Memory Wait and Write functions of HIP runtime API. * This section describes Stream Memory Wait and Write functions of HIP runtime API.
*/ */
typedef unsigned int GLuint; typedef unsigned int GLuint;
typedef unsigned int GLenum;
// Queries devices associated with GL Context. // Queries devices associated with GL Context.
hipError_t hipGLGetDevices(unsigned int* pHipDeviceCount, int* pHipDevices, hipError_t hipGLGetDevices(unsigned int* pHipDeviceCount, int* pHipDevices,
@@ -5230,9 +5231,15 @@ hipError_t hipGLGetDevices(unsigned int* pHipDeviceCount, int* pHipDevices,
// Registers a GL Buffer for interop and returns corresponding graphics resource. // Registers a GL Buffer for interop and returns corresponding graphics resource.
hipError_t hipGraphicsGLRegisterBuffer(hipGraphicsResource** resource, GLuint buffer, hipError_t hipGraphicsGLRegisterBuffer(hipGraphicsResource** resource, GLuint buffer,
unsigned int flags); unsigned int flags);
// Register a GL Image for interop and returns the corresponding graphic resource
hipError_t hipGraphicsGLRegisterImage(hipGraphicsResource** resource, GLuint image,
GLenum target, unsigned int flags);
// Maps a graphics resource for hip access. // Maps a graphics resource for hip access.
hipError_t hipGraphicsMapResources(int count, hipGraphicsResource_t* resources, hipError_t hipGraphicsMapResources(int count, hipGraphicsResource_t* resources,
hipStream_t stream __dparm(0) ); hipStream_t stream __dparm(0) );
// Get an array through which to access a subresource of a mapped graphics resource.
hipError_t hipGraphicsSubResourceGetMappedArray(hipArray_t* array, hipGraphicsResource_t resource,
unsigned int arrayIndex, unsigned int mipLevel);
// Gets device accessible address of a graphics resource. // Gets device accessible address of a graphics resource.
hipError_t hipGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, hipError_t hipGraphicsResourceGetMappedPointer(void** devPtr, size_t* size,
hipGraphicsResource_t resource); hipGraphicsResource_t resource);