Skip to content

Commit

Permalink
oroGraphicsGLRegister* on AMD.
Browse files Browse the repository at this point in the history
  • Loading branch information
takahiroharada committed Sep 26, 2024
1 parent 4cccc45 commit 3935b1b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Orochi/Orochi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1850,6 +1850,21 @@ oroError_t OROAPI oroGraphicsUnregisterResource(oroGraphicsResource_t resource)
hipGraphicsUnregisterResource(resource) );
return oroErrorUnknown;
}
oroError_t OROAPI oroGraphicsGLRegisterBuffer(oroGraphicsResource** resource, GLuint buffer, unsigned int flags)
{
// __ORO_FUNC( CU4ORO::hipGraphicsGLRegisterBuffer_cu4oro( __ORO_FORCE_CAST( CU4ORO::hipGraphicsResource_t, resource ), buffer, flags ),
if( s_api == ORO_API_HIP )
return hip2oro( hipGraphicsGLRegisterBuffer( resource, buffer, flags ) );
return oroErrorUnknown;
}
oroError_t OROAPI oroGraphicsGLRegisterImage(oroGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags)
{
// __ORO_FUNC( CU4ORO::hipGraphicsGLRegisterImage_cu4oro( __ORO_FORCE_CAST( CU4ORO::hipGraphicsResource_t, resource ), image, target, flags ),
if( s_api == ORO_API_HIP )
return hip2oro( hipGraphicsGLRegisterImage( resource, image, target, flags ) );
return oroErrorUnknown;
}

oroError_t OROAPI oroHostAlloc(void ** ptr, size_t size, unsigned int flags)
{
__ORO_FUNC(
Expand Down
2 changes: 2 additions & 0 deletions Orochi/Orochi.h
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,8 @@ oroError_t OROAPI oroGraphicsResourceGetMappedPointer(void ** devPtr, size_t * s
oroError_t OROAPI oroGraphicsSubResourceGetMappedArray(oroArray_t * array, oroGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel);
oroError_t OROAPI oroGraphicsUnmapResources(int count, oroGraphicsResource_t * resources, oroStream_t stream);
oroError_t OROAPI oroGraphicsUnregisterResource(oroGraphicsResource_t resource);
oroError_t OROAPI oroGraphicsGLRegisterBuffer( oroGraphicsResource** resource, GLuint buffer, unsigned int flags );
oroError_t OROAPI oroGraphicsGLRegisterImage( oroGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags );
oroError_t OROAPI oroHostAlloc(void ** ptr, size_t size, unsigned int flags);
oroError_t OROAPI oroHostFree(void * ptr);
oroError_t OROAPI oroHostGetDevicePointer(void ** devPtr, void * hstPtr, unsigned int flags);
Expand Down

0 comments on commit 3935b1b

Please sign in to comment.