tgsi: remove some unused OPCODE macros
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 17 May 2017 08:27:33 +0000 (10:27 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 18 May 2017 19:48:16 +0000 (21:48 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
src/gallium/auxiliary/tgsi/tgsi_ureg.h

index ab73fabacab46650b4240168b8d861b10fffc460..96ac4803a7b3e230efa5ac9cd7f7ac660ceb9d0e 100644 (file)
 #define OP12_TEX(a) OP12(a)
 #endif
 
-#ifndef OP14_TEX
-#define OP14_TEX(a) OP14(a)
-#endif
-
-#ifndef OP12_SAMPLE
-#define OP12_SAMPLE(a) OP12(a)
-#endif
-
-#ifndef OP13_SAMPLE
-#define OP13_SAMPLE(a) OP13(a)
-#endif
-
-#ifndef OP14_SAMPLE
-#define OP14_SAMPLE(a) OP14(a)
-#endif
-
-#ifndef OP15_SAMPLE
-#define OP15_SAMPLE(a) OP15(a)
-#endif
-
 #ifndef OP00_LBL
 #define OP00_LBL(a) OP00(a)
 #endif
@@ -178,15 +158,6 @@ OP01(CASE)
 OP00(DEFAULT)
 OP00(ENDSWITCH)
 
-OP13_SAMPLE(SAMPLE)
-OP12_SAMPLE(SAMPLE_I)
-OP13_SAMPLE(SAMPLE_I_MS)
-OP14_SAMPLE(SAMPLE_B)
-OP14_SAMPLE(SAMPLE_C)
-OP14_SAMPLE(SAMPLE_C_LZ)
-OP15_SAMPLE(SAMPLE_D)
-OP14_SAMPLE(SAMPLE_L)
-OP13_SAMPLE(GATHER4)
 OP12(SVIEWINFO)
 OP13(SAMPLE_POS)
 OP12(SAMPLE_INFO)
@@ -206,21 +177,8 @@ OP12(UMUL_HI)
 #undef OP12
 #undef OP13
 
-#ifdef OP14
-#undef OP14
-#endif
-
-#ifdef OP15
-#undef OP15
-#endif
-
 #undef OP00_LBL
 #undef OP01_LBL
 
 #undef OP12_TEX
 #undef OP14_TEX
-
-#undef OP12_SAMPLE
-#undef OP13_SAMPLE
-#undef OP14_SAMPLE
-#undef OP15_SAMPLE
index d301915948eb5cd65d6dc3a245f76d144aa25760..6d2f5c0e998e1e9499e45c564093c17f9aa9c4c7 100644 (file)
@@ -763,29 +763,6 @@ static inline void ureg_##op( struct ureg_program *ureg,                \
    ureg_fixup_insn_size( ureg, insn.insn_token );                       \
 }
 
-#define OP12_SAMPLE( op )                                               \
-static inline void ureg_##op( struct ureg_program *ureg,                \
-                              struct ureg_dst dst,                      \
-                              struct ureg_src src0,                     \
-                              struct ureg_src src1 )                    \
-{                                                                       \
-   unsigned opcode = TGSI_OPCODE_##op;                                  \
-   unsigned target = TGSI_TEXTURE_UNKNOWN;                              \
-   struct ureg_emit_insn_result insn;                                   \
-   if (ureg_dst_is_empty(dst))                                          \
-      return;                                                           \
-   insn = ureg_emit_insn(ureg,                                          \
-                         opcode,                                        \
-                         dst.Saturate,                                  \
-                         1,                                             \
-                         2);                                            \
-   ureg_emit_texture( ureg, insn.extended_token, target, 0 );           \
-   ureg_emit_dst( ureg, dst );                                          \
-   ureg_emit_src( ureg, src0 );                                         \
-   ureg_emit_src( ureg, src1 );                                         \
-   ureg_fixup_insn_size( ureg, insn.insn_token );                       \
-}
-
 #define OP13( op )                                                      \
 static inline void ureg_##op( struct ureg_program *ureg,                \
                               struct ureg_dst dst,                      \
@@ -809,31 +786,6 @@ static inline void ureg_##op( struct ureg_program *ureg,                \
    ureg_fixup_insn_size( ureg, insn.insn_token );                       \
 }
 
-#define OP13_SAMPLE( op )                                               \
-static inline void ureg_##op( struct ureg_program *ureg,                \
-                              struct ureg_dst dst,                      \
-                              struct ureg_src src0,                     \
-                              struct ureg_src src1,                     \
-                              struct ureg_src src2 )                    \
-{                                                                       \
-   unsigned opcode = TGSI_OPCODE_##op;                                  \
-   unsigned target = TGSI_TEXTURE_UNKNOWN;                              \
-   struct ureg_emit_insn_result insn;                                   \
-   if (ureg_dst_is_empty(dst))                                          \
-      return;                                                           \
-   insn = ureg_emit_insn(ureg,                                          \
-                         opcode,                                        \
-                         dst.Saturate,                                  \
-                         1,                                             \
-                         3);                                            \
-   ureg_emit_texture( ureg, insn.extended_token, target, 0 );           \
-   ureg_emit_dst( ureg, dst );                                          \
-   ureg_emit_src( ureg, src0 );                                         \
-   ureg_emit_src( ureg, src1 );                                         \
-   ureg_emit_src( ureg, src2 );                                         \
-   ureg_fixup_insn_size( ureg, insn.insn_token );                       \
-}
-
 #define OP14_TEX( op )                                                  \
 static inline void ureg_##op( struct ureg_program *ureg,                \
                               struct ureg_dst dst,                      \
@@ -861,116 +813,6 @@ static inline void ureg_##op( struct ureg_program *ureg,                \
    ureg_fixup_insn_size( ureg, insn.insn_token );                       \
 }
 
-#define OP14_SAMPLE( op )                                               \
-static inline void ureg_##op( struct ureg_program *ureg,                \
-                              struct ureg_dst dst,                      \
-                              struct ureg_src src0,                     \
-                              struct ureg_src src1,                     \
-                              struct ureg_src src2,                     \
-                              struct ureg_src src3 )                    \
-{                                                                       \
-   unsigned opcode = TGSI_OPCODE_##op;                                  \
-   unsigned target = TGSI_TEXTURE_UNKNOWN;                              \
-   struct ureg_emit_insn_result insn;                                   \
-   if (ureg_dst_is_empty(dst))                                          \
-      return;                                                           \
-   insn = ureg_emit_insn(ureg,                                          \
-                         opcode,                                        \
-                         dst.Saturate,                                  \
-                         1,                                             \
-                         4);                                            \
-   ureg_emit_texture( ureg, insn.extended_token, target, 0 );           \
-   ureg_emit_dst( ureg, dst );                                          \
-   ureg_emit_src( ureg, src0 );                                         \
-   ureg_emit_src( ureg, src1 );                                         \
-   ureg_emit_src( ureg, src2 );                                         \
-   ureg_emit_src( ureg, src3 );                                         \
-   ureg_fixup_insn_size( ureg, insn.insn_token );                       \
-}
-
-
-#define OP14( op )                                                      \
-static inline void ureg_##op( struct ureg_program *ureg,                \
-                              struct ureg_dst dst,                      \
-                              struct ureg_src src0,                     \
-                              struct ureg_src src1,                     \
-                              struct ureg_src src2,                     \
-                              struct ureg_src src3 )                    \
-{                                                                       \
-   unsigned opcode = TGSI_OPCODE_##op;                                  \
-   struct ureg_emit_insn_result insn;                                   \
-   if (ureg_dst_is_empty(dst))                                          \
-      return;                                                           \
-   insn = ureg_emit_insn(ureg,                                          \
-                         opcode,                                        \
-                         dst.Saturate,                                  \
-                         1,                                             \
-                         4);                                            \
-   ureg_emit_dst( ureg, dst );                                          \
-   ureg_emit_src( ureg, src0 );                                         \
-   ureg_emit_src( ureg, src1 );                                         \
-   ureg_emit_src( ureg, src2 );                                         \
-   ureg_emit_src( ureg, src3 );                                         \
-   ureg_fixup_insn_size( ureg, insn.insn_token );                       \
-}
-
-
-#define OP15( op )                                                      \
-static inline void ureg_##op( struct ureg_program *ureg,                \
-                              struct ureg_dst dst,                      \
-                              struct ureg_src src0,                     \
-                              struct ureg_src src1,                     \
-                              struct ureg_src src2,                     \
-                              struct ureg_src src3,                     \
-                              struct ureg_src src4 )                    \
-{                                                                       \
-   unsigned opcode = TGSI_OPCODE_##op;                                  \
-   struct ureg_emit_insn_result insn;                                   \
-   if (ureg_dst_is_empty(dst))                                          \
-      return;                                                           \
-   insn = ureg_emit_insn(ureg,                                          \
-                         opcode,                                        \
-                         dst.Saturate,                                  \
-                         1,                                             \
-                         5);                                            \
-   ureg_emit_dst( ureg, dst );                                          \
-   ureg_emit_src( ureg, src0 );                                         \
-   ureg_emit_src( ureg, src1 );                                         \
-   ureg_emit_src( ureg, src2 );                                         \
-   ureg_emit_src( ureg, src3 );                                         \
-   ureg_emit_src( ureg, src4 );                                         \
-   ureg_fixup_insn_size( ureg, insn.insn_token );                       \
-}
-
-#define OP15_SAMPLE( op )                                               \
-static inline void ureg_##op( struct ureg_program *ureg,                \
-                              struct ureg_dst dst,                      \
-                              struct ureg_src src0,                     \
-                              struct ureg_src src1,                     \
-                              struct ureg_src src2,                     \
-                              struct ureg_src src3,                     \
-                              struct ureg_src src4 )                    \
-{                                                                       \
-   unsigned opcode = TGSI_OPCODE_##op;                                  \
-   unsigned target = TGSI_TEXTURE_UNKNOWN;                              \
-   struct ureg_emit_insn_result insn;                                   \
-   if (ureg_dst_is_empty(dst))                                          \
-      return;                                                           \
-   insn = ureg_emit_insn(ureg,                                          \
-                         opcode,                                        \
-                         dst.Saturate,                                  \
-                         1,                                             \
-                         5);                                            \
-   ureg_emit_texture( ureg, insn.extended_token, target, 0 );           \
-   ureg_emit_dst( ureg, dst );                                          \
-   ureg_emit_src( ureg, src0 );                                         \
-   ureg_emit_src( ureg, src1 );                                         \
-   ureg_emit_src( ureg, src2 );                                         \
-   ureg_emit_src( ureg, src3 );                                         \
-   ureg_emit_src( ureg, src4 );                                         \
-   ureg_fixup_insn_size( ureg, insn.insn_token );                       \
-}
-
 /* Use a template include to generate a correctly-typed ureg_OP()
  * function for each TGSI opcode:
  */