From e4fea486da6ee2964ae15380bcdc8676dcc2a515 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 5 Aug 2015 17:14:59 -0700 Subject: nir: Add a a nir_shader_info struct This commit also adds code to glsl_to_nir and prog_to_nir to fill it out. Reviewed-by: Kenneth Graunke --- src/mesa/program/prog_to_nir.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/mesa/program') diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c index 1bd735a47bb..fc00534028f 100644 --- a/src/mesa/program/prog_to_nir.c +++ b/src/mesa/program/prog_to_nir.c @@ -1122,6 +1122,19 @@ 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 = _mesa_fls(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; + fail: if (c->error) { ralloc_free(s); -- cgit v1.2.3