cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

bubu
Adept II

OpenGL-OpenCL multigpu device id match

Hi,

 

Imagine I want to render to a texture using OpenGL... and then use that texture in OpenCL. Imagine also there are 3 GPUs present.

To avoid excesive PCI-express use, I should create one OpenGL+OpenCL context for each card... so I could render to texture and use that texture in OpenCL without having to use the PCI-express.

 

The questions are:

 

1.  Is there any ATI's equivalent to the NVIDIA's WGL_NV_gpu_affinity extension?

 

2. How can I be sure that the OpenGL GPU matches the OpenCL one? It's important that the same GPU that renders the texture could use it in OpenCL without using the PCI-express... so the OpenGL context and the OpenCL's one must be attached to the same GPU and not to different ones in differnet PCI slots! Have the GPUs some kind of GUID I could use, pls?

 

Thanks.

0 Likes
4 Replies
bubu
Adept II

Ok, I've seen the

http://www.opengl.org/registry/specs/AMD/wgl_gpu_association.txt

 

but... how can I match the OpenGL device ID with the OpenCL's one? I don't see there a GUID or something "unique" ! Just string names which are probably of type "Radeon 5870"... and if I have two "Radeon 5870" ... what?

 

 

0 Likes

While creating CL context, you are passing the GL context which contains the context and device info. 

 

0 Likes

Originally posted by: omkaranathan While creating CL context, you are passing the GL context which contains the context and device info.

 

Ooooh! Nice!

Just passing CL_GL_CONTEXT_KHR and CL_WGL_HDC_KHR in the clCreatecontext! The question is... can I create a CL context using a GL context from other GPU? It should fail ( I really want the CL and GL context in THE SAME gpu ).

 

Btw... is there an ARB or EXT extension to perform multivendo wgl_gpu_affinity/gpu_association??

0 Likes

not exactly. GL/CL interoperability is awailable for CPU device too. so i think it go throug host memory or DMA copy from device to device. so i think you must somewhat pair GL context with CL device.

0 Likes