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/nir/nir_clone.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/nir/nir_clone.c')
-rw-r--r-- | src/compiler/nir/nir_clone.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/nir/nir_clone.c b/src/compiler/nir/nir_clone.c index 0e397b03821..f23fabc7015 100644 --- a/src/compiler/nir/nir_clone.c +++ b/src/compiler/nir/nir_clone.c @@ -682,7 +682,7 @@ nir_shader_clone(void *mem_ctx, const nir_shader *s) clone_state state; init_clone_state(&state, true); - nir_shader *ns = nir_shader_create(mem_ctx, s->stage, s->options); + nir_shader *ns = nir_shader_create(mem_ctx, s->stage, s->options, NULL); state.ns = ns; clone_var_list(&state, &ns->uniforms, &s->uniforms); @@ -711,9 +711,9 @@ nir_shader_clone(void *mem_ctx, const nir_shader *s) ns->reg_alloc = s->reg_alloc; ns->info = s->info; - ns->info.name = ralloc_strdup(ns, ns->info.name); - if (ns->info.label) - ns->info.label = ralloc_strdup(ns, ns->info.label); + ns->info->name = ralloc_strdup(ns, ns->info->name); + if (ns->info->label) + ns->info->label = ralloc_strdup(ns, ns->info->label); ns->num_inputs = s->num_inputs; ns->num_uniforms = s->num_uniforms; |