Module: Mesa
Branch: main
Commit: 739bf4d0beb55af3d6813b6ca9edc447a2383725
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=739bf4d0beb55af3d6813b6ca9edc447a2383725

Author: Timur Kristóf <[email protected]>
Date:   Thu Dec 16 18:46:40 2021 +0100

spirv: Allow VRS with mesh shaders.

Signed-off-by: Timur Kristóf <[email protected]>
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14291>

---

 src/compiler/spirv/vtn_variables.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/spirv/vtn_variables.c 
b/src/compiler/spirv/vtn_variables.c
index 102f06dfea6..a34debfb8b1 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1119,7 +1119,8 @@ vtn_get_builtin_location(struct vtn_builder *b,
       break;
    case SpvBuiltInPrimitiveShadingRateKHR:
       if (b->shader->info.stage == MESA_SHADER_VERTEX ||
-          b->shader->info.stage == MESA_SHADER_GEOMETRY) {
+          b->shader->info.stage == MESA_SHADER_GEOMETRY ||
+          b->shader->info.stage == MESA_SHADER_MESH) {
          *location = VARYING_SLOT_PRIMITIVE_SHADING_RATE;
          *mode = nir_var_shader_out;
       } else {

Reply via email to