Reviewed-by: Dave Airlie <airl...@redhat.com>
---
 src/compiler/spirv/vtn_variables.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/compiler/spirv/vtn_variables.c 
b/src/compiler/spirv/vtn_variables.c
index 4432e72e54a..599b9b11a59 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1061,19 +1061,15 @@ vtn_get_builtin_location(struct vtn_builder *b,
       *location = VARYING_SLOT_LAYER;
       if (b->shader->stage == MESA_SHADER_FRAGMENT)
          *mode = nir_var_shader_in;
-      else if (b->shader->stage == MESA_SHADER_GEOMETRY)
-         *mode = nir_var_shader_out;
       else
-         unreachable("invalid stage for SpvBuiltInLayer");
+         *mode = nir_var_shader_out;
       break;
    case SpvBuiltInViewportIndex:
       *location = VARYING_SLOT_VIEWPORT;
-      if (b->shader->stage == MESA_SHADER_GEOMETRY)
-         *mode = nir_var_shader_out;
-      else if (b->shader->stage == MESA_SHADER_FRAGMENT)
+      if (b->shader->stage == MESA_SHADER_FRAGMENT)
          *mode = nir_var_shader_in;
       else
-         unreachable("invalid stage for SpvBuiltInViewportIndex");
+         *mode = nir_var_shader_out;
       break;
    case SpvBuiltInTessLevelOuter:
       *location = VARYING_SLOT_TESS_LEVEL_OUTER;
-- 
2.14.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to