diff options
author | Eric Anholt <eric@anholt.net> | 2009-01-08 19:00:10 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-01-21 14:03:56 -0800 |
commit | 046e88fc0be37d5a3dfbfa9fb8033b549604c74c (patch) | |
tree | faa1803b33c4c3a8604d5a516e1d7deca766454b | |
parent | 194d039f1efee0e666c2d1b1116fd5adea8cb942 (diff) |
i965: Use _mesa_num_inst_src_regs() instead of keeping a copy of its contents.
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 54 |
1 files changed, 6 insertions, 48 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 5b4ee20ecb..b8fbc8cdff 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -40,62 +40,20 @@ GLuint brw_wm_nr_args( GLuint opcode ) { switch (opcode) { - case WM_PIXELXY: - case OPCODE_ABS: - case OPCODE_FLR: - case OPCODE_FRC: - case OPCODE_SWZ: - case OPCODE_MOV: - case OPCODE_COS: - case OPCODE_EX2: - case OPCODE_LG2: - case OPCODE_RCP: - case OPCODE_RSQ: - case OPCODE_SIN: - case OPCODE_SCS: - case OPCODE_TEX: - case OPCODE_TXB: - case OPCODE_TXP: - case OPCODE_KIL: - case OPCODE_LIT: - case OPCODE_NRM3: - case OPCODE_NRM4: - case WM_CINTERP: - case WM_WPOSXY: + case WM_CINTERP: + case WM_WPOSXY: return 1; - - case OPCODE_POW: - case OPCODE_SUB: - case OPCODE_SGE: - case OPCODE_SGT: - case OPCODE_SLE: - case OPCODE_SLT: - case OPCODE_SEQ: - case OPCODE_SNE: - case OPCODE_ADD: - case OPCODE_MAX: - case OPCODE_MIN: - case OPCODE_MUL: - case OPCODE_XPD: - case OPCODE_DP3: - case OPCODE_DP4: - case OPCODE_DPH: - case OPCODE_DST: - case WM_LINTERP: + case WM_LINTERP: case WM_DELTAXY: case WM_PIXELW: return 2; - case WM_FB_WRITE: - case WM_PINTERP: - case OPCODE_MAD: - case OPCODE_CMP: - case OPCODE_LRP: + case WM_PINTERP: return 3; - default: - return 0; + assert(opcode < MAX_OPCODE); + return _mesa_num_inst_src_regs(opcode); } } |