diff options
author | Timothy Arceri <[email protected]> | 2016-10-13 11:41:23 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-10-26 14:29:36 +1100 |
commit | e1af20f18a86f52a9640faf2d4ff8a71b0a4fa9b (patch) | |
tree | 32b4e9dbc9c03aa7733e1e32721d92c3c54571e0 /src/compiler/spirv/vtn_variables.c | |
parent | 094fe3a9591ce200162d955635eee577c13f9324 (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/spirv/vtn_variables.c')
-rw-r--r-- | src/compiler/spirv/vtn_variables.c | 14 |
1 files changed, 7 insertions, 7 deletions
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"); } |