Revert "nir: Support sysval tess levels in SPIR-V to NIR"
authorJonathan Marek <jonathan@marek.ca>
Sat, 4 Jul 2020 02:11:16 +0000 (22:11 -0400)
committerJonathan Marek <jonathan@marek.ca>
Mon, 6 Jul 2020 12:48:10 +0000 (08:48 -0400)
This reverts commit d2d4677b56efa0003065b61e39c1ef977c83f7da.

The option is not used by any driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5744>

src/compiler/spirv/nir_spirv.h
src/compiler/spirv/vtn_variables.c

index acfcc084f417d33b6b43d1e987ae5b7ef8ad337d..3d6f74e43ca9337952a7f9743c0d999cb805e6ed 100644 (file)
@@ -64,11 +64,6 @@ struct spirv_to_nir_options {
     */
    bool frag_coord_is_sysval;
 
-   /* Whether to lower TessLevelInner and TessLevelOuter to system values.
-    * This is the inverse of GLSLTessLevelsAsInputs in GLSL.
-    */
-   bool tess_levels_are_sysvals;
-
    struct spirv_supported_capabilities caps;
 
    /* Address format for various kinds of pointers. */
index 837a0abaadd391577a2786fc278e3dbff1a0de1a..504f5c742d687dde56b797a6f8d037b47643f5bc 100644 (file)
@@ -1354,22 +1354,10 @@ vtn_get_builtin_location(struct vtn_builder *b,
          vtn_fail("invalid stage for SpvBuiltInViewportIndex");
       break;
    case SpvBuiltInTessLevelOuter:
-      if (b->options && b->options->tess_levels_are_sysvals &&
-          *mode == nir_var_shader_in) {
-         *location = SYSTEM_VALUE_TESS_LEVEL_OUTER;
-         set_mode_system_value(b, mode);
-      } else {
-         *location = VARYING_SLOT_TESS_LEVEL_OUTER;
-      }
+      *location = VARYING_SLOT_TESS_LEVEL_OUTER;
       break;
    case SpvBuiltInTessLevelInner:
-      if (b->options && b->options->tess_levels_are_sysvals &&
-          *mode == nir_var_shader_in) {
-         *location = SYSTEM_VALUE_TESS_LEVEL_INNER;
-         set_mode_system_value(b, mode);
-      } else {
-         *location = VARYING_SLOT_TESS_LEVEL_INNER;
-      }
+      *location = VARYING_SLOT_TESS_LEVEL_INNER;
       break;
    case SpvBuiltInTessCoord:
       *location = SYSTEM_VALUE_TESS_COORD;