Re: [Mesa-dev] [PATCH 3/3] glsl: Mark gl_GlobalInvocationID dependencies as used

2015-08-06 Thread Ilia Mirkin
By the way, there are a number of these derived system values... instead of creating lowering for all of them, have you considered just starting out *every* CS with the instructions to compute them and then not having any lowering at all? The dead code elim should take care of removing any that are

Re: [Mesa-dev] [PATCH 3/3] glsl: Mark gl_GlobalInvocationID dependencies as used

2015-08-06 Thread Ilia Mirkin
Why doesn't the lowering pass do that? Do you need to call it earlier? Or does it rely on some information that only becomes available later? On Thu, Aug 6, 2015 at 2:01 PM, Jordan Justen wrote: > gl_GlobalInvocationID = > gl_WorkGroupID * gl_WorkGroupSize + gl_LocalInvocationID > > Therefore,

[Mesa-dev] [PATCH 3/3] glsl: Mark gl_GlobalInvocationID dependencies as used

2015-08-06 Thread Jordan Justen
gl_GlobalInvocationID = gl_WorkGroupID * gl_WorkGroupSize + gl_LocalInvocationID Therefore, if gl_GlobalInvocationID is used, then we mark these other variables as being used. This prevents them from being considered dead variables and being removed. Signed-off-by: Jordan Justen --- src/glsl/