compiler: add SYSTEM_VALUE_VARYING_COORD
authorRob Clark <robdclark@gmail.com>
Fri, 10 Aug 2018 13:13:47 +0000 (09:13 -0400)
committerRob Clark <robdclark@gmail.com>
Tue, 14 Aug 2018 21:59:02 +0000 (17:59 -0400)
Used internally in freedreno/ir3 for the vec2 value that hw passes to
shader to use as coordinate for bary.f (varying fetch) instruction.
This is not the same as SYSTEM_VALUE_FRAG_COORD.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/compiler/shader_enums.c
src/compiler/shader_enums.h
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index a874083a0b702400750fb2870d82bb7798eec928..0210b503d3f0102b3d6e447dd3918c184d2ee946 100644 (file)
@@ -244,6 +244,7 @@ gl_system_value_name(gl_system_value sysval)
      ENUM(SYSTEM_VALUE_DEVICE_INDEX),
      ENUM(SYSTEM_VALUE_VIEW_INDEX),
      ENUM(SYSTEM_VALUE_VERTEX_CNT),
+     ENUM(SYSTEM_VALUE_VARYING_COORD),
    };
    STATIC_ASSERT(ARRAY_SIZE(names) == SYSTEM_VALUE_MAX);
    return NAME(sysval);
index f8e22925f354753a57058973d4ed65da351ab020..5c36f55283c1f7c46b5ff6a3e2bd38d7b996b781 100644 (file)
@@ -601,6 +601,12 @@ typedef enum
     */
    SYSTEM_VALUE_VERTEX_CNT,
 
+   /**
+    * Driver internal varying-coord, used for varying-fetch instructions.
+    * Not externally visible.
+    */
+   SYSTEM_VALUE_VARYING_COORD,
+
    SYSTEM_VALUE_MAX             /**< Number of values */
 } gl_system_value;
 
index 2b9183abbb8392ffd70971b7fea193d2e1512431..988f3ca83ee216b3f99c2dad3899f0f36b47af6c 100644 (file)
@@ -5792,6 +5792,7 @@ _mesa_sysval_to_semantic(unsigned sysval)
    case SYSTEM_VALUE_LOCAL_INVOCATION_INDEX:
    case SYSTEM_VALUE_GLOBAL_INVOCATION_ID:
    case SYSTEM_VALUE_VERTEX_CNT:
+   case SYSTEM_VALUE_VARYING_COORD:
    default:
       assert(!"Unexpected SYSTEM_VALUE_ enum");
       return TGSI_SEMANTIC_COUNT;