OSDN Git Service

gallium: Drop unused BRA opcode.
authorEric Anholt <eric@anholt.net>
Wed, 12 Nov 2014 22:51:22 +0000 (14:51 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 24 Nov 2014 22:56:22 +0000 (14:56 -0800)
Never generated, and implemented in only nvfx vertprog.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 files changed:
src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
src/gallium/auxiliary/tgsi/tgsi_exec.c
src/gallium/auxiliary/tgsi/tgsi_info.c
src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
src/gallium/docs/source/tgsi.rst
src/gallium/drivers/ilo/shader/toy_tgsi.c
src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c
src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c
src/gallium/drivers/r300/r300_tgsi_to_rc.c
src/gallium/drivers/r600/r600_shader.c
src/gallium/include/pipe/p_shader_tokens.h

index c5d3679..e391d8a 100644 (file)
@@ -211,7 +211,6 @@ lp_build_tgsi_inst_llvm(
    case TGSI_OPCODE_UP2US:
    case TGSI_OPCODE_UP4B:
    case TGSI_OPCODE_UP4UB:
-   case TGSI_OPCODE_BRA:
    case TGSI_OPCODE_PUSHA:
    case TGSI_OPCODE_POPA:
    case TGSI_OPCODE_SAD:
index aacbeff..9e468f9 100644 (file)
@@ -786,12 +786,6 @@ lp_emit_instruction_aos(
       dst0 = lp_build_round(&bld->bld_base.base, src0);
       break;
 
-   case TGSI_OPCODE_BRA:
-      /* deprecated */
-      assert(0);
-      return FALSE;
-      break;
-
    case TGSI_OPCODE_CAL:
       return FALSE;
 
index 03cb277..ec1374a 100644 (file)
@@ -3768,10 +3768,6 @@ exec_instruction(
       exec_vector_unary(mach, inst, micro_arr, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_FLOAT);
       break;
 
-   case TGSI_OPCODE_BRA:
-      assert (0);
-      break;
-
    case TGSI_OPCODE_CAL:
       /* skip the call if no execution channels are enabled */
       if (mach->ExecMask) {
index e546816..2ec2853 100644 (file)
@@ -99,7 +99,7 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
    { 0, 1, 0, 0, 0, 1, NONE, "", 59 },      /* removed */
    { 0, 1, 0, 0, 0, 1, NONE, "", 60 },      /* removed */
    { 1, 1, 0, 0, 0, 0, COMP, "ARR", TGSI_OPCODE_ARR },
-   { 0, 1, 0, 0, 0, 0, NONE, "BRA", TGSI_OPCODE_BRA },
+   { 0, 1, 0, 0, 0, 1, NONE, "", 62 },      /* removed */
    { 0, 0, 0, 1, 0, 0, NONE, "CAL", TGSI_OPCODE_CAL },
    { 0, 0, 0, 0, 0, 0, NONE, "RET", TGSI_OPCODE_RET },
    { 1, 1, 0, 0, 0, 0, COMP, "SSG", TGSI_OPCODE_SSG },
index bfa78fc..b8bdba9 100644 (file)
@@ -109,7 +109,6 @@ OP11(UP2US)
 OP11(UP4B)
 OP11(UP4UB)
 OP11(ARR)
-OP01(BRA)
 OP00_LBL(CAL)
 OP00(RET)
 OP11(SSG)
index 5145332..d4bf9cc 100644 (file)
@@ -868,15 +868,6 @@ This instruction replicates its result.
    Considered for removal.
 
 
-.. opcode:: BRA - Branch
-
-  pc = target
-
-.. note::
-
-   Considered for removal.
-
-
 .. opcode:: CALLNZ - Subroutine Call If Not Zero
 
    TBD
index 5989fc4..5938de4 100644 (file)
@@ -829,7 +829,6 @@ static const toy_tgsi_translate aos_translate_table[TGSI_OPCODE_LAST] = {
    [TGSI_OPCODE_UP4B]         = aos_unsupported,
    [TGSI_OPCODE_UP4UB]        = aos_unsupported,
    [TGSI_OPCODE_ARR]          = aos_simple,
-   [TGSI_OPCODE_BRA]          = aos_unsupported,
    [TGSI_OPCODE_CAL]          = aos_unsupported,
    [TGSI_OPCODE_RET]          = aos_unsupported,
    [TGSI_OPCODE_SSG]          = aos_set_sign,
@@ -1374,7 +1373,6 @@ static const toy_tgsi_translate soa_translate_table[TGSI_OPCODE_LAST] = {
    [TGSI_OPCODE_UP4B]         = soa_unsupported,
    [TGSI_OPCODE_UP4UB]        = soa_unsupported,
    [TGSI_OPCODE_ARR]          = soa_per_channel,
-   [TGSI_OPCODE_BRA]          = soa_unsupported,
    [TGSI_OPCODE_CAL]          = soa_unsupported,
    [TGSI_OPCODE_RET]          = soa_unsupported,
    [TGSI_OPCODE_SSG]          = soa_per_channel,
index 0fdaa2b..6600997 100644 (file)
@@ -821,13 +821,6 @@ nvfx_fragprog_parse_instruction(struct nvfx_fpc *fpc,
       break;
    }
 
-   case TGSI_OPCODE_BRA:
-      /* This can in limited cases be implemented with an IF with the else and endif labels pointing to the target */
-      /* no state tracker uses this, so don't implement this for now */
-      assert(0);
-      nv40_fp_bra(fpc, finst->Label.Label);
-      break;
-
    case TGSI_OPCODE_BGNSUB:
    case TGSI_OPCODE_ENDSUB:
       /* nothing to do here */
index e880810..51e1fb6 100644 (file)
@@ -712,7 +712,6 @@ nvfx_vertprog_parse_instruction(struct nvfx_vpc *vpc,
       nvfx_vp_emit(vpc, insn);
       break;
    case TGSI_OPCODE_ELSE:
-   case TGSI_OPCODE_BRA:
    case TGSI_OPCODE_CAL:
       reloc.location = vpc->vp->nr_insns;
       reloc.target = finst->Label.Label;
index d9067fa..a7a741e 100644 (file)
@@ -84,7 +84,6 @@ static unsigned translate_opcode(unsigned opcode)
      /* case TGSI_OPCODE_UP4B: return RC_OPCODE_UP4B; */
      /* case TGSI_OPCODE_UP4UB: return RC_OPCODE_UP4UB; */
      /* case TGSI_OPCODE_ARR: return RC_OPCODE_ARR; */
-     /* case TGSI_OPCODE_BRA: return RC_OPCODE_BRA; */
      /* case TGSI_OPCODE_CAL: return RC_OPCODE_CAL; */
      /* case TGSI_OPCODE_RET: return RC_OPCODE_RET; */
         case TGSI_OPCODE_SSG: return RC_OPCODE_SSG;
index 24fed84..2e74d59 100644 (file)
@@ -7250,7 +7250,7 @@ static struct r600_shader_tgsi_instruction r600_shader_tgsi_instruction[] = {
        {59,                    0, ALU_OP0_NOP, tgsi_unsupported},
        {60,                    0, ALU_OP0_NOP, tgsi_unsupported},
        {TGSI_OPCODE_ARR,       0, ALU_OP0_NOP, tgsi_r600_arl},
-       {TGSI_OPCODE_BRA,       0, ALU_OP0_NOP, tgsi_unsupported},
+       {62,                    0, ALU_OP0_NOP, tgsi_unsupported},
        {TGSI_OPCODE_CAL,       0, ALU_OP0_NOP, tgsi_unsupported},
        {TGSI_OPCODE_RET,       0, ALU_OP0_NOP, tgsi_unsupported},
        {TGSI_OPCODE_SSG,       0, ALU_OP0_NOP, tgsi_ssg},
@@ -7449,7 +7449,7 @@ static struct r600_shader_tgsi_instruction eg_shader_tgsi_instruction[] = {
        {59,                    0, ALU_OP0_NOP, tgsi_unsupported},
        {60,                    0, ALU_OP0_NOP, tgsi_unsupported},
        {TGSI_OPCODE_ARR,       0, ALU_OP0_NOP, tgsi_eg_arl},
-       {TGSI_OPCODE_BRA,       0, ALU_OP0_NOP, tgsi_unsupported},
+       {62,                    0, ALU_OP0_NOP, tgsi_unsupported},
        {TGSI_OPCODE_CAL,       0, ALU_OP0_NOP, tgsi_unsupported},
        {TGSI_OPCODE_RET,       0, ALU_OP0_NOP, tgsi_unsupported},
        {TGSI_OPCODE_SSG,       0, ALU_OP0_NOP, tgsi_ssg},
@@ -7648,7 +7648,7 @@ static struct r600_shader_tgsi_instruction cm_shader_tgsi_instruction[] = {
        {59,                    0, ALU_OP0_NOP, tgsi_unsupported},
        {60,                    0, ALU_OP0_NOP, tgsi_unsupported},
        {TGSI_OPCODE_ARR,       0, ALU_OP0_NOP, tgsi_eg_arl},
-       {TGSI_OPCODE_BRA,       0, ALU_OP0_NOP, tgsi_unsupported},
+       {62,                    0, ALU_OP0_NOP, tgsi_unsupported},
        {TGSI_OPCODE_CAL,       0, ALU_OP0_NOP, tgsi_unsupported},
        {TGSI_OPCODE_RET,       0, ALU_OP0_NOP, tgsi_unsupported},
        {TGSI_OPCODE_SSG,       0, ALU_OP0_NOP, tgsi_ssg},
index 9bf5543..52a4216 100644 (file)
@@ -344,7 +344,7 @@ struct tgsi_property_data {
 #define TGSI_OPCODE_UP4UB               58
                                 /* gap */
 #define TGSI_OPCODE_ARR                 61
-#define TGSI_OPCODE_BRA                 62
+                                /* gap */
 #define TGSI_OPCODE_CAL                 63
 #define TGSI_OPCODE_RET                 64
 #define TGSI_OPCODE_SSG                 65 /* SGN */