cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

tonyo_au
Journeyman III

OpenCL and multi-sampled textures

sequence probelm

Hi All,

I am looking for anyone who has experience with OpenCL and OpenGL textures.

I have a set of textures, some of which are multi-sampled textures and other that are not.

If I create all my texures prior to creating the OpenCL context, OpenCL gives me zero values for all texures I bind to it.

If I create all my textures after creating the OpenCL context, I get errors trying to create the multi-sampling textures (I know I cannot access these in OpenCL).

If I create mulisampling textures, then create the OpenCL context, then create the other texures all is good.

However whenever I want to change the size of a multi-sampled texture, I have to destroy the OpenCl context and all my other textures and re-create them which is painfully slow.

I am looking for help on a more efficeint way of doing this

Thanks

Tony

Tags (2)
0 Likes
4 Replies
nou
Exemplar

OpenCL and multi-sampled textures

there is requirement that you must create OpenCL context before cratating OpenGL resources which you want share.

 

0 Likes
tonyo_au
Journeyman III

OpenCL and multi-sampled textures

Thanks nou,

that explains why I have to create the shared textures after creating the OpenCL context; but do you have any idea why I get an error trying to create the mutli-sample texture after the OpenCL context has been created.

0 Likes
nou
Exemplar

OpenCL and multi-sampled textures

you got errors on which side? OpenGL or OpenCL? but it sound like bug to me.

0 Likes
tonyo_au
Journeyman III

OpenCL and multi-sampled textures

 The following call

glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 8, GL_RGBA, 8,8, GL_FALSE);

gives GL_OUT_OF_MEMORY error message if an OpenCL context is attached to the OpenGL context.

Interestingly internal format GL_DEPTH_COMPONENT24 does not give the error; but I don't think the multi-sampling is working on the the texture.

0 Likes