Jump to content
  • Advertisement
Sign in to follow this  

Can't use imageBuffer with integer data (Compute Shader)?

This topic is 1545 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there,


layout (binding = 3, rgba32f) uniform imageBuffer Tpos; // compiles ok
layout (binding = 4, rgba32ui) uniform imageBuffer TpackInt; // compiler error:


0(20) : error C1318: can't apply layout(rgba32ui) to image type "imageBuffer"



It seems i can use imageBuffer only with float formats,

but in the documentation there is no hint on that and rgba32ui is listed beside rgba32f.


Does that make any sense? Same error an all integer formats.

Maybe a driver bug (gtx480, gl 4.3)?




What alternatives of memory storage do i have for compute shader?


Initially i have used a struct (5 x vec4 and one ivec4) in a shader storage buffer.

That was terrible slow on random access (need to traverse trees).


Now i changed to store every vec in its own image and that's 10 times faster.

But this stupid error prevents me from doing the same on the traversal shader :(



Share this post

Link to post
Share on other sites

Ooops, solved:


layout (binding = 4, rgba32ui) uniform uimageBuffer TpackInt;


...i just forgot to add the u rolleyes.gif

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!