svga: sync VGPU10ShaderTokens.h with upstream changes
authorBrian Paul <brianp@vmware.com>
Wed, 24 May 2017 13:38:48 +0000 (07:38 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 10 Sep 2018 19:07:30 +0000 (13:07 -0600)
This includes new DX 10.1 opcodes and tokens.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/drivers/svga/include/VGPU10ShaderTokens.h

index 1f9746e1cc6946bac001a7307334d7dbccd3e20c..7ffe58ef13384fbcb6d3a7c62496c65611cd4c7d 100644 (file)
@@ -175,6 +175,10 @@ typedef enum {
    VGPU10_OPCODE_DCL_INDEXABLE_TEMP                = 105,
    VGPU10_OPCODE_DCL_GLOBAL_FLAGS                  = 106,
    VGPU10_OPCODE_IDIV                              = 107,
+   VGPU10_OPCODE_LOD                               = 108,
+   VGPU10_OPCODE_GATHER4                           = 109,
+   VGPU10_OPCODE_SAMPLE_POS                        = 110,
+   VGPU10_OPCODE_SAMPLE_INFO                       = 111,
    VGPU10_NUM_OPCODES                  /* Should be the last entry. */
 } VGPU10_OPCODE_TYPE;
 
@@ -254,6 +258,12 @@ typedef enum {
    VGPU10_RESINFO_RETURN_UINT       = 2
 } VGPU10_RESINFO_RETURN_TYPE;
 
+
+typedef enum {
+   VGPU10_INSTRUCTION_RETURN_FLOAT  = 0,
+   VGPU10_INSTRUCTION_RETURN_UINT   = 1
+} VGPU10_INSTRUCTION_RETURN_TYPE;
+
 typedef union {
    struct {
       unsigned int opcodeType          : 11; /* VGPU10_OPCODE_TYPE */
@@ -298,6 +308,10 @@ typedef union {
       unsigned int                     : 11;
       unsigned int refactoringAllowed  : 1;
    };
+   struct {
+      unsigned int                     : 11;
+      unsigned int instReturnType      : 2;  /* VGPU10_INSTRUCTION_RETURN_TYPE */
+   };
    uint32 value;
 } VGPU10OpcodeToken0;
 
@@ -447,12 +461,14 @@ typedef union {
 
 
 typedef enum {
-   VGPU10_RETURN_TYPE_UNORM = 1,
-   VGPU10_RETURN_TYPE_SNORM = 2,
-   VGPU10_RETURN_TYPE_SINT = 3,
-   VGPU10_RETURN_TYPE_UINT = 4,
-   VGPU10_RETURN_TYPE_FLOAT = 5,
-   VGPU10_RETURN_TYPE_MIXED = 6
+   VGPU10_RETURN_TYPE_MIN     = 1,
+   VGPU10_RETURN_TYPE_UNORM   = 1,
+   VGPU10_RETURN_TYPE_SNORM   = 2,
+   VGPU10_RETURN_TYPE_SINT    = 3,
+   VGPU10_RETURN_TYPE_UINT    = 4,
+   VGPU10_RETURN_TYPE_FLOAT   = 5,
+   VGPU10_RETURN_TYPE_MIXED   = 6,
+   VGPU10_RETURN_TYPE_MAX     = 6
 } VGPU10_RESOURCE_RETURN_TYPE;
 
 typedef union {
@@ -467,17 +483,19 @@ typedef union {
 
 
 typedef enum {
-   VGPU10_NAME_UNDEFINED = 0,
-   VGPU10_NAME_POSITION = 1,
-   VGPU10_NAME_CLIP_DISTANCE = 2,
-   VGPU10_NAME_CULL_DISTANCE = 3,
-   VGPU10_NAME_RENDER_TARGET_ARRAY_INDEX = 4,
-   VGPU10_NAME_VIEWPORT_ARRAY_INDEX = 5,
-   VGPU10_NAME_VERTEX_ID = 6,
-   VGPU10_NAME_PRIMITIVE_ID = 7,
-   VGPU10_NAME_INSTANCE_ID = 8,
-   VGPU10_NAME_IS_FRONT_FACE = 9,
-   VGPU10_NAME_SAMPLE_INDEX = 10,
+   VGPU10_NAME_MIN                        = 0,
+   VGPU10_NAME_UNDEFINED                  = 0,
+   VGPU10_NAME_POSITION                   = 1,
+   VGPU10_NAME_CLIP_DISTANCE              = 2,
+   VGPU10_NAME_CULL_DISTANCE              = 3,
+   VGPU10_NAME_RENDER_TARGET_ARRAY_INDEX  = 4,
+   VGPU10_NAME_VIEWPORT_ARRAY_INDEX       = 5,
+   VGPU10_NAME_VERTEX_ID                  = 6,
+   VGPU10_NAME_PRIMITIVE_ID               = 7,
+   VGPU10_NAME_INSTANCE_ID                = 8,
+   VGPU10_NAME_IS_FRONT_FACE              = 9,
+   VGPU10_NAME_SAMPLE_INDEX               = 10,
+   VGPU10_NAME_MAX                        = 10
 } VGPU10_SYSTEM_NAME;
 
 typedef union {