Re: [Mesa-dev] [PATCH 2/3] glsl/cs: Lower gl_GlobalInvocationID variable

2015-08-07 Thread Ilia Mirkin
On Fri, Aug 7, 2015 at 6:01 PM, Jason Ekstrand wrote: > On Fri, Aug 7, 2015 at 2:59 PM, Ilia Mirkin wrote: >> FWIW I would very much prefer that things like this stay at the GLSL >> IR level, otherwise we'll have to duplicate it in st/mesa (or do it at >> the GLSL IR level). > > That's why you sh

Re: [Mesa-dev] [PATCH 2/3] glsl/cs: Lower gl_GlobalInvocationID variable

2015-08-07 Thread Jason Ekstrand
On Fri, Aug 7, 2015 at 2:59 PM, Ilia Mirkin wrote: > FWIW I would very much prefer that things like this stay at the GLSL > IR level, otherwise we'll have to duplicate it in st/mesa (or do it at > the GLSL IR level). That's why you should start using nir_to_tgsi in st/mesa. :-P > On Fri, Aug 7,

Re: [Mesa-dev] [PATCH 2/3] glsl/cs: Lower gl_GlobalInvocationID variable

2015-08-07 Thread Ilia Mirkin
FWIW I would very much prefer that things like this stay at the GLSL IR level, otherwise we'll have to duplicate it in st/mesa (or do it at the GLSL IR level). On Fri, Aug 7, 2015 at 5:56 PM, Jason Ekstrand wrote: > Out of pure curiosity, why did you choose to do this at the GLSL IR > level? Why

Re: [Mesa-dev] [PATCH 2/3] glsl/cs: Lower gl_GlobalInvocationID variable

2015-08-07 Thread Jason Ekstrand
Out of pure curiosity, why did you choose to do this at the GLSL IR level? Why not pass it through to NIR and do the lowering there? Not that you *should* do it there, but I'm curious as to what motivated the choice. I'm honestly not sure which would have been easier. --Jason On Thu, Aug 6, 201

[Mesa-dev] [PATCH 2/3] glsl/cs: Lower gl_GlobalInvocationID variable

2015-08-06 Thread Jordan Justen
We lower this based on the extension spec formula: gl_GlobalInvocationID = gl_WorkGroupID * gl_WorkGroupSize + gl_LocalInvocationID Suggested-by: Kenneth Graunke Signed-off-by: Jordan Justen --- src/glsl/Makefile.sources | 1 + src/glsl/ir_optimization.h | 1 + src/gl