From a03c30bd8dd4393fe76671f342f7802fa23f6845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Fri, 21 Jan 2022 19:38:13 +0100 Subject: [PATCH] spirv: Support the CullPrimitiveEXT mesh shader built-in. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a per-primitive builtin output which indicates that a primitive should be culled (deleted) from the output. Signed-off-by: Timur Kristóf Reviewed-by: Jason Ekstrand Reviewed-by: Caio Oliveira Part-of: --- src/compiler/spirv/vtn_variables.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 196f1a09d07..1326a925a64 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1162,6 +1162,9 @@ vtn_get_builtin_location(struct vtn_builder *b, *location = SYSTEM_VALUE_MESH_VIEW_INDICES; set_mode_system_value(b, mode); break; + case SpvBuiltInCullPrimitiveEXT: + *location = VARYING_SLOT_CULL_PRIMITIVE; + break; default: vtn_fail("Unsupported builtin: %s (%u)", spirv_builtin_to_string(builtin), builtin);