docs: Update status of GL 3.x related extensions
[mesa.git] / src / gallium / drivers / nvfx / nvfx_shader.h
index fcf577ca74cc27e9006270a2133ec5261334a614..46406b27940740a4d8dc404d525207a967b5ff77 100644 (file)
@@ -1,6 +1,10 @@
 #ifndef __NVFX_SHADER_H__
 #define __NVFX_SHADER_H__
 
+#include <stdint.h>
+
+#include "pipe/p_compiler.h"
+
 #define NVFX_SWZ_IDENTITY ((3 << 6) | (2 << 4) | (1 << 2) | (0 << 0))
 
 /* this will resolve to either the NV30 or the NV40 version
 
 /* NV40 only fragment program opcodes */
 #define NVFX_FP_OP_OPCODE_TXL_NV40 0x2F
+#define NVFX_FP_OP_OPCODE_LITEX2_NV40 0x3C
 
 /* The use of these instructions appears to be indicated by bit 31 of DWORD 2.*/
 #define NV40_FP_OP_BRA_OPCODE_BRK                                    0x0
 #define NVFXSR_OUTPUT  1
 #define NVFXSR_INPUT   2
 #define NVFXSR_TEMP    3
-#define NVFXSR_CONST   4
-#define NVFXSR_RELOCATED       5
+#define NVFXSR_CONST   5
+#define NVFXSR_IMM     6
+#define NVFXSR_RELOCATED       7
 
 #define NVFX_COND_FL  0
 #define NVFX_COND_LT  1
 #define abs(s) nvfx_src_abs((s))
 
 struct nvfx_reg {
-       uint8_t type;
+       int8_t type;
        uint32_t index;
 };
 
 struct nvfx_src {
        struct nvfx_reg reg;
 
-       /* src only */
+       uint8_t indirect : 1;
+       uint8_t indirect_reg : 1;
+       uint8_t indirect_swz : 2;
        uint8_t negate : 1;
        uint8_t abs : 1;
        uint8_t swz[4];
@@ -479,6 +487,7 @@ nvfx_src(struct nvfx_reg reg)
                .abs = 0,
                .negate = 0,
                .swz = { 0, 1, 2, 3 },
+               .indirect = 0,
        };
        return temp;
 }
@@ -509,4 +518,9 @@ nvfx_src_abs(struct nvfx_src src)
        return src;
 }
 
+struct nvfx_relocation {
+        unsigned location;
+        unsigned target;
+};
+
 #endif