summaryrefslogtreecommitdiffstats
path: root/src/mesa/program/prog_to_nir.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/mesa/program/prog_to_nir.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/mesa/program/prog_to_nir.c')
-rw-r--r--src/mesa/program/prog_to_nir.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index 8a4437a2cee..a65d4bf8182 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -1044,23 +1044,23 @@ prog_to_nir(const struct gl_program *prog,
ptn_add_output_stores(c);
- s->info.name = ralloc_asprintf(s, "ARB%d", prog->Id);
- s->info.num_textures = util_last_bit(prog->SamplersUsed);
- s->info.num_ubos = 0;
- s->info.num_abos = 0;
- s->info.num_ssbos = 0;
- s->info.num_images = 0;
- s->info.inputs_read = prog->InputsRead;
- s->info.outputs_written = prog->OutputsWritten;
- s->info.system_values_read = prog->SystemValuesRead;
- s->info.uses_texture_gather = false;
- s->info.uses_clip_distance_out = false;
- s->info.separate_shader = false;
+ s->info->name = ralloc_asprintf(s, "ARB%d", prog->Id);
+ s->info->num_textures = util_last_bit(prog->SamplersUsed);
+ s->info->num_ubos = 0;
+ s->info->num_abos = 0;
+ s->info->num_ssbos = 0;
+ s->info->num_images = 0;
+ s->info->inputs_read = prog->InputsRead;
+ s->info->outputs_written = prog->OutputsWritten;
+ s->info->system_values_read = prog->SystemValuesRead;
+ s->info->uses_texture_gather = false;
+ s->info->uses_clip_distance_out = false;
+ s->info->separate_shader = false;
if (stage == MESA_SHADER_FRAGMENT) {
struct gl_fragment_program *fp = (struct gl_fragment_program *)prog;
- s->info.fs.uses_discard = fp->UsesKill;
+ s->info->fs.uses_discard = fp->UsesKill;
}
fail: