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/compiler/spirv/vtn_variables.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/compiler/spirv/vtn_variables.c') diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 634058c0e06..c9744c4513d 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -933,9 +933,9 @@ apply_var_decoration(struct vtn_builder *b, nir_variable *nir_var, nir_var->data.read_only = true; nir_constant *c = rzalloc(nir_var, nir_constant); - c->value.u[0] = b->shader->info.cs.local_size[0]; - c->value.u[1] = b->shader->info.cs.local_size[1]; - c->value.u[2] = b->shader->info.cs.local_size[2]; + c->value.u[0] = b->shader->info->cs.local_size[0]; + c->value.u[1] = b->shader->info->cs.local_size[1]; + c->value.u[2] = b->shader->info->cs.local_size[2]; nir_var->constant_initializer = c; break; } @@ -1175,18 +1175,18 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode, case SpvStorageClassUniformConstant: if (without_array->block) { var->mode = vtn_variable_mode_ubo; - b->shader->info.num_ubos++; + b->shader->info->num_ubos++; } else if (without_array->buffer_block) { var->mode = vtn_variable_mode_ssbo; - b->shader->info.num_ssbos++; + b->shader->info->num_ssbos++; } else if (glsl_type_is_image(without_array->type)) { var->mode = vtn_variable_mode_image; nir_mode = nir_var_uniform; - b->shader->info.num_images++; + b->shader->info->num_images++; } else if (glsl_type_is_sampler(without_array->type)) { var->mode = vtn_variable_mode_sampler; nir_mode = nir_var_uniform; - b->shader->info.num_textures++; + b->shader->info->num_textures++; } else { assert(!"Invalid uniform variable type"); } -- cgit v1.2.3