r300_fragprog: Remove dead declarations, move NOP declarations into source
authorNicolai Haehnle <nhaehnle@gmail.com>
Fri, 13 Jun 2008 20:03:26 +0000 (22:03 +0200)
committerNicolai Haehnle <nhaehnle@gmail.com>
Sat, 14 Jun 2008 02:11:13 +0000 (04:11 +0200)
src/mesa/drivers/dri/r300/r300_fragprog.c
src/mesa/drivers/dri/r300/r300_fragprog.h

index ba88b88f4515a88bafa4a4164c7eb687d997e33e..819615c141b3cdedd705f4a4db8ec883b02ab865 100644 (file)
@@ -245,6 +245,26 @@ struct r300_pfs_compile_state {
 #define REG_NEGS(reg)                                                  \
        reg = (reg | REG_NEGS_MASK)
 
+#define NOP_INST0 (                                             \
+               (R300_ALU_OUTC_MAD) |                            \
+               (R300_ALU_ARGC_ZERO << R300_ALU_ARG0C_SHIFT) | \
+               (R300_ALU_ARGC_ZERO << R300_ALU_ARG1C_SHIFT) | \
+               (R300_ALU_ARGC_ZERO << R300_ALU_ARG2C_SHIFT))
+#define NOP_INST1 (                                         \
+               ((0 | SRC_CONST) << R300_ALU_SRC0C_SHIFT) | \
+               ((0 | SRC_CONST) << R300_ALU_SRC1C_SHIFT) | \
+               ((0 | SRC_CONST) << R300_ALU_SRC2C_SHIFT))
+#define NOP_INST2 ( \
+               (R300_ALU_OUTA_MAD) |                            \
+               (R300_ALU_ARGA_ZERO << R300_ALU_ARG0A_SHIFT) | \
+               (R300_ALU_ARGA_ZERO << R300_ALU_ARG1A_SHIFT) | \
+               (R300_ALU_ARGA_ZERO << R300_ALU_ARG2A_SHIFT))
+#define NOP_INST3 (                                         \
+               ((0 | SRC_CONST) << R300_ALU_SRC0A_SHIFT) | \
+               ((0 | SRC_CONST) << R300_ALU_SRC1A_SHIFT) | \
+               ((0 | SRC_CONST) << R300_ALU_SRC2A_SHIFT))
+
+
 /*
  * Datas structures for fragment program generation
  */
index 573aacf19a12628afbe3e637f95c57f4527457c4..561d7c6423a3e388b2f4976c4075b20e7845a2ea 100644 (file)
 
 #include "r300_context.h"
 
-typedef struct r300_fragment_program_swizzle {
-       GLuint length;
-       GLuint src[4];
-       GLuint inst[8];
-} r300_fragment_program_swizzle_t;
-
 /* supported hw opcodes */
 #define PFS_OP_MAD 0
 #define PFS_OP_DP3 1
@@ -74,25 +68,6 @@ typedef struct r300_fragment_program_swizzle {
 #define SRC_MASK               (63 << 0)
 #define SRC_STRIDE             6
 
-#define NOP_INST0 (                                             \
-               (R300_ALU_OUTC_MAD) |                            \
-               (R300_ALU_ARGC_ZERO << R300_ALU_ARG0C_SHIFT) | \
-               (R300_ALU_ARGC_ZERO << R300_ALU_ARG1C_SHIFT) | \
-               (R300_ALU_ARGC_ZERO << R300_ALU_ARG2C_SHIFT))
-#define NOP_INST1 (                                         \
-               ((0 | SRC_CONST) << R300_ALU_SRC0C_SHIFT) | \
-               ((0 | SRC_CONST) << R300_ALU_SRC1C_SHIFT) | \
-               ((0 | SRC_CONST) << R300_ALU_SRC2C_SHIFT))
-#define NOP_INST2 ( \
-               (R300_ALU_OUTA_MAD) |                            \
-               (R300_ALU_ARGA_ZERO << R300_ALU_ARG0A_SHIFT) | \
-               (R300_ALU_ARGA_ZERO << R300_ALU_ARG1A_SHIFT) | \
-               (R300_ALU_ARGA_ZERO << R300_ALU_ARG2A_SHIFT))
-#define NOP_INST3 (                                         \
-               ((0 | SRC_CONST) << R300_ALU_SRC0A_SHIFT) | \
-               ((0 | SRC_CONST) << R300_ALU_SRC1A_SHIFT) | \
-               ((0 | SRC_CONST) << R300_ALU_SRC2A_SHIFT))
-
 #define DRI_CONF_FP_OPTIMIZATION_SPEED   0
 #define DRI_CONF_FP_OPTIMIZATION_QUALITY 1