Kaynağa Gözat

gallium: remove noise opcodes

Provide a dummy implementation in the GL state tracker (move 0.5 to
the destination regs).

At some point, a motivated person could add a better
implementation of noise.  Currently not even the nvidia
binary drivers do anything more than this.  In any case, the
place to do this is in the GL state tracker, not the poor
driver.
tags/mesa_7_7_rc1
Keith Whitwell 16 yıl önce
ebeveyn
işleme
4e1d51786e

+ 0
- 16
src/gallium/auxiliary/tgsi/tgsi_exec.c Dosyayı Görüntüle

@@ -3223,22 +3223,6 @@ exec_instruction(
/* no-op */
break;

case TGSI_OPCODE_NOISE1:
assert( 0 );
break;

case TGSI_OPCODE_NOISE2:
assert( 0 );
break;

case TGSI_OPCODE_NOISE3:
assert( 0 );
break;

case TGSI_OPCODE_NOISE4:
assert( 0 );
break;

case TGSI_OPCODE_NOP:
break;


+ 4
- 4
src/gallium/auxiliary/tgsi/tgsi_info.c Dosyayı Görüntüle

@@ -134,10 +134,10 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
{ 0, 0, 0, 0, 0, 1, "BGNSUB", TGSI_OPCODE_BGNSUB },
{ 0, 0, 0, 1, 1, 0, "ENDLOOP", TGSI_OPCODE_ENDLOOP },
{ 0, 0, 0, 0, 1, 0, "ENDSUB", TGSI_OPCODE_ENDSUB },
{ 1, 1, 0, 0, 0, 0, "NOISE1", TGSI_OPCODE_NOISE1 },
{ 1, 1, 0, 0, 0, 0, "NOISE2", TGSI_OPCODE_NOISE2 },
{ 1, 1, 0, 0, 0, 0, "NOISE3", TGSI_OPCODE_NOISE3 },
{ 1, 1, 0, 0, 0, 0, "NOISE4", TGSI_OPCODE_NOISE4 },
{ 0, 0, 0, 0, 0, 0, "", 103 }, /* removed */
{ 0, 0, 0, 0, 0, 0, "", 104 }, /* removed */
{ 0, 0, 0, 0, 0, 0, "", 105 }, /* removed */
{ 0, 0, 0, 0, 0, 0, "", 106 }, /* removed */
{ 0, 0, 0, 0, 0, 0, "NOP", TGSI_OPCODE_NOP },
{ 0, 0, 0, 0, 0, 0, "", 108 }, /* removed */
{ 0, 0, 0, 0, 0, 0, "", 109 }, /* removed */

+ 0
- 4
src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h Dosyayı Görüntüle

@@ -139,10 +139,6 @@ OP00_LBL(BGNLOOP)
OP00(BGNSUB)
OP00_LBL(ENDLOOP)
OP00(ENDSUB)
OP11(NOISE1)
OP11(NOISE2)
OP11(NOISE3)
OP11(NOISE4)
OP00(NOP)
OP11(NRM4)
OP01(CALLNZ)

+ 0
- 16
src/gallium/drivers/cell/spu/spu_exec.c Dosyayı Görüntüle

@@ -1807,22 +1807,6 @@ exec_instruction(
/* no-op */
break;

case TGSI_OPCODE_NOISE1:
ASSERT( 0 );
break;

case TGSI_OPCODE_NOISE2:
ASSERT( 0 );
break;

case TGSI_OPCODE_NOISE3:
ASSERT( 0 );
break;

case TGSI_OPCODE_NOISE4:
ASSERT( 0 );
break;

case TGSI_OPCODE_NOP:
break;


+ 0
- 9
src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c Dosyayı Görüntüle

@@ -1386,15 +1386,6 @@ emit_instruction(
return 0;
break;

case TGSI_OPCODE_NOISE1:
case TGSI_OPCODE_NOISE2:
case TGSI_OPCODE_NOISE3:
case TGSI_OPCODE_NOISE4:
FOR_EACH_DST0_ENABLED_CHANNEL( inst, chan_index ) {
dst0[chan_index] = bld->base.zero;
}
break;

case TGSI_OPCODE_NOP:
break;


+ 0
- 6
src/gallium/drivers/nv30/nv30_fragprog.c Dosyayı Görüntüle

@@ -527,12 +527,6 @@ nv30_fragprog_parse_instruction(struct nv30_fpc *fpc,
case TGSI_OPCODE_MUL:
arith(fpc, sat, MUL, dst, mask, src[0], src[1], none);
break;
case TGSI_OPCODE_NOISE1:
case TGSI_OPCODE_NOISE2:
case TGSI_OPCODE_NOISE3:
case TGSI_OPCODE_NOISE4:
arith(fpc, sat, SFL, dst, mask, none, none, none);
break;
case TGSI_OPCODE_POW:
arith(fpc, sat, POW, dst, mask, src[0], src[1], none);
break;

+ 0
- 6
src/gallium/drivers/nv40/nv40_fragprog.c Dosyayı Görüntüle

@@ -568,12 +568,6 @@ nv40_fragprog_parse_instruction(struct nv40_fpc *fpc,
case TGSI_OPCODE_MUL:
arith(fpc, sat, MUL, dst, mask, src[0], src[1], none);
break;
case TGSI_OPCODE_NOISE1:
case TGSI_OPCODE_NOISE2:
case TGSI_OPCODE_NOISE3:
case TGSI_OPCODE_NOISE4:
arith(fpc, sat, SFL, dst, mask, none, none, none);
break;
case TGSI_OPCODE_POW:
tmp = temp(fpc);
arith(fpc, 0, LG2, tmp, MASK_X,

+ 0
- 4
src/gallium/drivers/r300/r300_tgsi_to_rc.c Dosyayı Görüntüle

@@ -135,10 +135,6 @@ static unsigned translate_opcode(unsigned opcode)
/* case TGSI_OPCODE_BGNSUB: return RC_OPCODE_BGNSUB; */
/* case TGSI_OPCODE_ENDLOOP2: return RC_OPCODE_ENDLOOP2; */
/* case TGSI_OPCODE_ENDSUB: return RC_OPCODE_ENDSUB; */
/* case TGSI_OPCODE_NOISE1: return RC_OPCODE_NOISE1; */
/* case TGSI_OPCODE_NOISE2: return RC_OPCODE_NOISE2; */
/* case TGSI_OPCODE_NOISE3: return RC_OPCODE_NOISE3; */
/* case TGSI_OPCODE_NOISE4: return RC_OPCODE_NOISE4; */
case TGSI_OPCODE_NOP: return RC_OPCODE_NOP;
/* gap */
/* case TGSI_OPCODE_NRM4: return RC_OPCODE_NRM4; */

+ 1
- 4
src/gallium/include/pipe/p_shader_tokens.h Dosyayı Görüntüle

@@ -266,10 +266,7 @@ union tgsi_immediate_data
#define TGSI_OPCODE_BGNSUB 100
#define TGSI_OPCODE_ENDLOOP 101
#define TGSI_OPCODE_ENDSUB 102
#define TGSI_OPCODE_NOISE1 103
#define TGSI_OPCODE_NOISE2 104
#define TGSI_OPCODE_NOISE3 105
#define TGSI_OPCODE_NOISE4 106
/* gap */
#define TGSI_OPCODE_NOP 107
/* gap */
#define TGSI_OPCODE_NRM4 112

+ 15
- 8
src/mesa/state_tracker/st_mesa_to_tgsi.c Dosyayı Görüntüle

@@ -481,14 +481,6 @@ translate_opcode( unsigned op )
return TGSI_OPCODE_MOV;
case OPCODE_MUL:
return TGSI_OPCODE_MUL;
case OPCODE_NOISE1:
return TGSI_OPCODE_NOISE1;
case OPCODE_NOISE2:
return TGSI_OPCODE_NOISE2;
case OPCODE_NOISE3:
return TGSI_OPCODE_NOISE3;
case OPCODE_NOISE4:
return TGSI_OPCODE_NOISE4;
case OPCODE_NOP:
return TGSI_OPCODE_NOP;
case OPCODE_NRM3:
@@ -616,6 +608,21 @@ compile_instruction(
src, num_src );
break;

case OPCODE_NOISE1:
case OPCODE_NOISE2:
case OPCODE_NOISE3:
case OPCODE_NOISE4:
/* At some point, a motivated person could add a better
* implementation of noise. Currently not even the nvidia
* binary drivers do anything more than this. In any case, the
* place to do this is in the GL state tracker, not the poor
* driver.
*/
ureg_MOV( ureg, dst[0], ureg_imm1f(ureg, 0.5) );
break;


default:
ureg_insn( ureg,
translate_opcode( inst->Opcode ),

Loading…
İptal
Kaydet