aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_system_values.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-10-13 11:41:23 +1100
committerTimothy Arceri <[email protected]>2016-10-26 14:29:36 +1100
commite1af20f18a86f52a9640faf2d4ff8a71b0a4fa9b (patch)
tree32b4e9dbc9c03aa7733e1e32721d92c3c54571e0 /src/compiler/nir/nir_lower_system_values.c
parent094fe3a9591ce200162d955635eee577c13f9324 (diff)
nir/i965/anv/radv/gallium: make shader info a pointer
When restoring something from shader cache we won't have and don't want to create a nir_shader this change detaches the two. There are other advantages such as being able to reuse the shader info populated by GLSL IR. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_lower_system_values.c')
-rw-r--r--src/compiler/nir/nir_lower_system_values.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/compiler/nir/nir_lower_system_values.c b/src/compiler/nir/nir_lower_system_values.c
index 9747ac473d3..6ad5ad6940d 100644
--- a/src/compiler/nir/nir_lower_system_values.c
+++ b/src/compiler/nir/nir_lower_system_values.c
@@ -58,9 +58,9 @@ convert_block(nir_block *block, nir_builder *b)
*/
nir_const_value local_size;
- local_size.u32[0] = b->shader->info.cs.local_size[0];
- local_size.u32[1] = b->shader->info.cs.local_size[1];
- local_size.u32[2] = b->shader->info.cs.local_size[2];
+ local_size.u32[0] = b->shader->info->cs.local_size[0];
+ local_size.u32[1] = b->shader->info->cs.local_size[1];
+ local_size.u32[2] = b->shader->info->cs.local_size[2];
nir_ssa_def *group_id = nir_load_work_group_id(b);
nir_ssa_def *local_id = nir_load_local_invocation_id(b);
@@ -87,8 +87,10 @@ convert_block(nir_block *block, nir_builder *b)
*/
nir_ssa_def *local_id = nir_load_local_invocation_id(b);
- nir_ssa_def *size_x = nir_imm_int(b, b->shader->info.cs.local_size[0]);
- nir_ssa_def *size_y = nir_imm_int(b, b->shader->info.cs.local_size[1]);
+ nir_ssa_def *size_x =
+ nir_imm_int(b, b->shader->info->cs.local_size[0]);
+ nir_ssa_def *size_y =
+ nir_imm_int(b, b->shader->info->cs.local_size[1]);
sysval = nir_imul(b, nir_channel(b, local_id, 2),
nir_imul(b, size_x, size_y));