[Mesa-dev] [PATCH 1/2] gallium: Eliminate TGSI_OPCODE_IFC.

jfonseca at vmware.com jfonseca at vmware.com
Sun Apr 14 01:12:30 PDT 2013


From: José Fonseca <jfonseca at vmware.com>

Never used or implemented.
---
 src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c |    1 -
 src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c  |    1 -
 src/gallium/auxiliary/tgsi/tgsi_info.c           |    2 +-
 src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h     |    1 -
 src/gallium/docs/source/tgsi.rst                 |    5 -----
 src/gallium/drivers/r300/r300_tgsi_to_rc.c       |    1 -
 src/gallium/drivers/r600/r600_shader.c           |    9 ++++++---
 src/gallium/include/pipe/p_shader_tokens.h       |    2 +-
 8 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c
index a4caf78..3c79abf 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c
@@ -389,7 +389,6 @@ analyse_instruction(struct analysis_context *ctx,
 
    switch (inst->Instruction.Opcode) {
    case TGSI_OPCODE_IF:
-   case TGSI_OPCODE_IFC:
    case TGSI_OPCODE_ELSE:
    case TGSI_OPCODE_ENDIF:
    case TGSI_OPCODE_BGNLOOP:
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index 853de09..239530d 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -1732,7 +1732,6 @@ near_end_of_shader(struct lp_build_tgsi_soa_context *bld,
 	  opcode == TGSI_OPCODE_CAL ||
 	  opcode == TGSI_OPCODE_CALLNZ ||
 	  opcode == TGSI_OPCODE_IF ||
-	  opcode == TGSI_OPCODE_IFC ||
 	  opcode == TGSI_OPCODE_BGNLOOP ||
 	  opcode == TGSI_OPCODE_SWITCH)
 	 return FALSE;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c
index 1fadfec..716b16b 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
@@ -151,7 +151,7 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
    { 0, 0, 0, 0, 0, 0, NONE, "", 111 },     /* removed */
    { 1, 1, 0, 0, 0, 0, REPL, "NRM4", TGSI_OPCODE_NRM4 },
    { 0, 1, 0, 0, 0, 0, NONE, "CALLNZ", TGSI_OPCODE_CALLNZ },
-   { 0, 1, 0, 0, 0, 0, NONE, "IFC", TGSI_OPCODE_IFC },
+   { 0, 1, 0, 0, 0, 0, NONE, "", 114 },     /* removed */
    { 0, 1, 0, 0, 0, 0, NONE, "BREAKC", TGSI_OPCODE_BREAKC },
    { 0, 1, 0, 0, 0, 0, NONE, "KIL", TGSI_OPCODE_KIL },
    { 0, 0, 0, 0, 0, 0, NONE, "END", TGSI_OPCODE_END },
diff --git a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
index fa30352..b8519c6 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
@@ -154,7 +154,6 @@ OP00(ENDSUB)
 OP00(NOP)
 OP11(NRM4)
 OP01(CALLNZ)
-OP01(IFC)
 OP01(BREAKC)
 OP01(KIL)
 OP00(END)
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
index 28308cb..0002626 100644
--- a/src/gallium/docs/source/tgsi.rst
+++ b/src/gallium/docs/source/tgsi.rst
@@ -1198,11 +1198,6 @@ XXX wait what
   TBD
 
 
-.. opcode:: IFC - If
-
-  TBD
-
-
 .. opcode:: BREAKC - Break Conditional
 
   TBD
diff --git a/src/gallium/drivers/r300/r300_tgsi_to_rc.c b/src/gallium/drivers/r300/r300_tgsi_to_rc.c
index a0587b4..5e60e6c 100644
--- a/src/gallium/drivers/r300/r300_tgsi_to_rc.c
+++ b/src/gallium/drivers/r300/r300_tgsi_to_rc.c
@@ -135,7 +135,6 @@ static unsigned translate_opcode(unsigned opcode)
                                         /* gap */
      /* case TGSI_OPCODE_NRM4: return RC_OPCODE_NRM4; */
      /* case TGSI_OPCODE_CALLNZ: return RC_OPCODE_CALLNZ; */
-     /* case TGSI_OPCODE_IFC: return RC_OPCODE_IFC; */
      /* case TGSI_OPCODE_BREAKC: return RC_OPCODE_BREAKC; */
         case TGSI_OPCODE_KIL: return RC_OPCODE_KIL;
     }
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 6dbca50..44b5ce5 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -6035,7 +6035,8 @@ static struct r600_shader_tgsi_instruction r600_shader_tgsi_instruction[] = {
 	{111,			0, ALU_OP0_NOP, tgsi_unsupported},
 	{TGSI_OPCODE_NRM4,	0, ALU_OP0_NOP, tgsi_unsupported},
 	{TGSI_OPCODE_CALLNZ,	0, ALU_OP0_NOP, tgsi_unsupported},
-	{TGSI_OPCODE_IFC,	0, ALU_OP0_NOP, tgsi_unsupported},
+	/* gap */
+	{114,			0, ALU_OP0_NOP, tgsi_unsupported},
 	{TGSI_OPCODE_BREAKC,	0, ALU_OP0_NOP, tgsi_unsupported},
 	{TGSI_OPCODE_KIL,	0, ALU_OP2_KILLGT, tgsi_kill},  /* conditional kill */
 	{TGSI_OPCODE_END,	0, ALU_OP0_NOP, tgsi_end},  /* aka HALT */
@@ -6228,7 +6229,8 @@ static struct r600_shader_tgsi_instruction eg_shader_tgsi_instruction[] = {
 	{111,			0, ALU_OP0_NOP, tgsi_unsupported},
 	{TGSI_OPCODE_NRM4,	0, ALU_OP0_NOP, tgsi_unsupported},
 	{TGSI_OPCODE_CALLNZ,	0, ALU_OP0_NOP, tgsi_unsupported},
-	{TGSI_OPCODE_IFC,	0, ALU_OP0_NOP, tgsi_unsupported},
+	/* gap */
+	{114,			0, ALU_OP0_NOP, tgsi_unsupported},
 	{TGSI_OPCODE_BREAKC,	0, ALU_OP0_NOP, tgsi_unsupported},
 	{TGSI_OPCODE_KIL,	0, ALU_OP2_KILLGT, tgsi_kill},  /* conditional kill */
 	{TGSI_OPCODE_END,	0, ALU_OP0_NOP, tgsi_end},  /* aka HALT */
@@ -6421,7 +6423,8 @@ static struct r600_shader_tgsi_instruction cm_shader_tgsi_instruction[] = {
 	{111,			0, ALU_OP0_NOP, tgsi_unsupported},
 	{TGSI_OPCODE_NRM4,	0, ALU_OP0_NOP, tgsi_unsupported},
 	{TGSI_OPCODE_CALLNZ,	0, ALU_OP0_NOP, tgsi_unsupported},
-	{TGSI_OPCODE_IFC,	0, ALU_OP0_NOP, tgsi_unsupported},
+	/* gap */
+	{114,			0, ALU_OP0_NOP, tgsi_unsupported},
 	{TGSI_OPCODE_BREAKC,	0, ALU_OP0_NOP, tgsi_unsupported},
 	{TGSI_OPCODE_KIL,	0, ALU_OP2_KILLGT, tgsi_kill},  /* conditional kill */
 	{TGSI_OPCODE_END,	0, ALU_OP0_NOP, tgsi_end},  /* aka HALT */
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index 478ce25..6fcd151 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -367,7 +367,7 @@ struct tgsi_property_data {
                                 /* gap */
 #define TGSI_OPCODE_NRM4                112
 #define TGSI_OPCODE_CALLNZ              113
-#define TGSI_OPCODE_IFC                 114
+                                /* gap */
 #define TGSI_OPCODE_BREAKC              115
 #define TGSI_OPCODE_KIL                 116  /* conditional kill */
 #define TGSI_OPCODE_END                 117  /* aka HALT */
-- 
1.7.10.4



More information about the mesa-dev mailing list