summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Marek <jonathan@marek.ca>2020-07-09 14:22:12 -0400
committerMarge Bot <eric+marge@anholt.net>2020-09-15 16:18:45 +0000
commite732750b160f28270aaa86431d67fedccf1cfec6 (patch)
tree5e6f70ed0a92c13f9a55008e3e9338a45474595e
parent338745c6f4b7133d7b36f78562d46bc4e8d368f5 (diff)
freedreno/ir3: allow layer/viewport output for VS/GS/DS
With VK_EXT_shader_viewport_index_layer, these stages can all output the viewport or layer id, and not just GS anymore. Signed-off-by: Jonathan Marek <jonathan@marek.ca> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5832>
-rw-r--r--src/freedreno/ir3/ir3_compiler_nir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c
index 1438d31e74c..05613a8794f 100644
--- a/src/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/freedreno/ir3/ir3_compiler_nir.c
@@ -3140,7 +3140,6 @@ setup_output(struct ir3_context *ctx, nir_intrinsic_instr *intr)
so->writes_psize = true;
break;
case VARYING_SLOT_PRIMITIVE_ID:
- case VARYING_SLOT_LAYER:
case VARYING_SLOT_GS_VERTEX_FLAGS_IR3:
debug_assert(ctx->so->type == MESA_SHADER_GEOMETRY);
/* fall through */
@@ -3152,6 +3151,8 @@ setup_output(struct ir3_context *ctx, nir_intrinsic_instr *intr)
case VARYING_SLOT_CLIP_DIST0:
case VARYING_SLOT_CLIP_DIST1:
case VARYING_SLOT_CLIP_VERTEX:
+ case VARYING_SLOT_LAYER:
+ case VARYING_SLOT_VIEWPORT:
break;
default:
if (slot >= VARYING_SLOT_VAR0)