summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorNeil Roberts <[email protected]>2018-01-17 16:37:35 +0100
committerAlejandro PiƱeiro <[email protected]>2018-07-31 13:18:28 +0200
commit1e3f61d1d54f16328d7b8c61cdb1938b5ce04d41 (patch)
tree74bf7fa700b6ae4df3f63a8dc9fe15ab38ae739a /src/compiler
parentb0af66bb172c803c08b73e705822c3d53f5191f5 (diff)
nir/gather_info: Set info.gs.uses_streams
Whenever a non-zero stream is written to it now sets uses_streams to true. This reflects the code in validate_geometry_shader_emissions for GLSL. v2: set uses_streams at gather_info instead that at spirv to nir (Jason Ekstrand) Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir/nir_gather_info.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c
index 2b431e343e9..d0b656ea741 100644
--- a/src/compiler/nir/nir_gather_info.c
+++ b/src/compiler/nir/nir_gather_info.c
@@ -288,6 +288,11 @@ gather_intrinsic_info(nir_intrinsic_instr *instr, nir_shader *shader,
case nir_intrinsic_end_primitive_with_counter:
assert(shader->info.stage == MESA_SHADER_GEOMETRY);
shader->info.gs.uses_end_primitive = 1;
+
+ case nir_intrinsic_emit_vertex:
+ if (nir_intrinsic_stream_id(instr) > 0)
+ shader->info.gs.uses_streams = true;
+
break;
default: