Skip to content

Register OpenGL buffer for interoperability? #90

Description

@TomClabault

How can I register an OpenGL buffer for use in my CUDA/HIP kernel?

oroGraphicsMapResources(int count, oroGraphicsResource_t * resources, oroStream_t stream) expects a registered resource as its second parameter but there is no oroGraphicsRegisterX functions (although oroGraphicsUnregisterResource exists). I would expect the oroGraphicsGLRegisterBuffer and oroGraphicsGLRegisterImage functions to be present in Orochi API but there are no such functions.

The DX12 example of this repo doesn't really help as it uses a sharedHandle created specifically with the DX12 API:

oroExternalMemoryHandleDesc externalMemoryHandleDesc;
externalMemoryHandleDesc.type = oroExternalMemoryHandleTypeD3D12Resource;
externalMemoryHandleDesc.handle.win32.handle = sharedHandle;
externalMemoryHandleDesc.size = actualSize;
externalMemoryHandleDesc.flags = ORO_EXTERNAL_MEMORY_DEDICATED;

oroImportExternalMemory(&gOroExtMem, &externalMemoryHandleDesc);

Is it somehow possible to adapt this example for OpenGL buffers or is there something simpler I missed in Orochi's API?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions