From: Jason Ekstrand Date: Thu, 22 Oct 2015 00:42:47 +0000 (-0700) Subject: nir/gather_info: Add more info for geometry shaders X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8ffd6e72c0bf8d115212ce6d7b35f6acb56a0b6;p=mesa.git nir/gather_info: Add more info for geometry shaders --- 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);