Sign in to follow this  
JoeJ

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this