From e1af20f18a86f52a9640faf2d4ff8a71b0a4fa9b Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 13 Oct 2016 11:41:23 +1100 Subject: 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 --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index ddb3f65ecf7..3f05acde4ce 100644 --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c @@ -371,7 +371,7 @@ ttn_emit_declaration(struct ttn_compile *c) exec_list_push_tail(&b->shader->inputs, &var->node); for (int i = 0; i < array_size; i++) - b->shader->info.inputs_read |= 1 << (var->data.location + i); + b->shader->info->inputs_read |= 1 << (var->data.location + i); break; case TGSI_FILE_OUTPUT: { @@ -437,7 +437,7 @@ ttn_emit_declaration(struct ttn_compile *c) exec_list_push_tail(&b->shader->outputs, &var->node); for (int i = 0; i < array_size; i++) - b->shader->info.outputs_written |= 1 << (var->data.location + i); + b->shader->info->outputs_written |= 1 << (var->data.location + i); } break; case TGSI_FILE_CONSTANT: @@ -584,7 +584,7 @@ ttn_src_for_file_and_index(struct ttn_compile *c, unsigned file, unsigned index, src = nir_src_for_ssa(&load->dest.ssa); - b->shader->info.system_values_read |= + b->shader->info->system_values_read |= (1 << nir_system_value_from_intrinsic(op)); break; @@ -1071,7 +1071,7 @@ ttn_kill(nir_builder *b, nir_op op, nir_alu_dest dest, nir_ssa_def **src) nir_intrinsic_instr *discard = nir_intrinsic_instr_create(b->shader, nir_intrinsic_discard); nir_builder_instr_insert(b, &discard->instr); - b->shader->info.fs.uses_discard = true; + b->shader->info->fs.uses_discard = true; } static void @@ -1084,7 +1084,7 @@ ttn_kill_if(nir_builder *b, nir_op op, nir_alu_dest dest, nir_ssa_def **src) nir_intrinsic_instr_create(b->shader, nir_intrinsic_discard_if); discard->src[0] = nir_src_for_ssa(cmp); nir_builder_instr_insert(b, &discard->instr); - b->shader->info.fs.uses_discard = true; + b->shader->info->fs.uses_discard = true; } static void -- cgit v1.2.3