This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error while compiling a Compute Shader on Nexus 10

I'm trying to compile a compute shader that starts with :

#version 310 es

layout (local_size_x = 1) in;

layout (local_size_y = 1) in;

layout (local_size_z = 1) in;

and I get the following error :

0:3: L0001: local_size_x qualifier was not set in the first declaraton or had a different value

I'm a bit baffled by this as the first declaration needs to be the shader version, does it not ? The same code on Desktop GL 4.4 seems to work though.

UPDATE : I now tried writing

layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

and it compiles.

My CS particle updates are now running flawless which is good news. However I had a hard time with compile errors saying that integers like 10 or 20 were not uints but ints and had to write

uint Index = uint(10);

instead of my original

uint Index = 10;

0