From a8ffd6e72c0bf8d115212ce6d7b35f6acb56a0b6 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 21 Oct 2015 17:42:47 -0700 Subject: [PATCH] nir/gather_info: Add more info for geometry shaders --- src/glsl/nir/nir_gather_info.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/glsl/nir/nir_gather_info.c b/src/glsl/nir/nir_gather_info.c index 4893945c18b..c2413e3bbe2 100644 --- a/src/glsl/nir/nir_gather_info.c +++ b/src/glsl/nir/nir_gather_info.c @@ -48,6 +48,12 @@ gather_intrinsic_info(nir_intrinsic_instr *instr, nir_shader *shader) shader->info.system_values_read |= (1 << nir_system_value_from_intrinsic(instr->intrinsic)); break; + + case nir_intrinsic_end_primitive: + assert(shader->stage == MESA_SHADER_GEOMETRY); + shader->info.gs.uses_end_primitive = 1; + break; + default: break; } @@ -89,6 +95,7 @@ nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint) foreach_list_typed(nir_variable, var, node, &shader->inputs) shader->info.inputs_read |= (1ull << var->data.location); + /* TODO: Some day we may need to add stream support to NIR */ shader->info.outputs_written = 0; foreach_list_typed(nir_variable, var, node, &shader->outputs) shader->info.outputs_written |= (1ull << var->data.location); -- 2.30.2