diff options
author | Corbin Simpson <[email protected]> | 2009-05-17 21:40:16 -0700 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2009-05-17 21:40:16 -0700 |
commit | 9569221563fd0e9fba564126d61bf3786cf74715 (patch) | |
tree | d74f1fd50a49bf736960444773e3234b8de84ce9 /src/gallium | |
parent | 0036f2ccba6720e06a578333f04086d100d188b1 (diff) |
r300-gallium: r500-fs: DDX and DDY support.
Oh, look, GLSL instructions. I wonder what I'll do next.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r300/r300_state_shader.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_state_shader.c b/src/gallium/drivers/r300/r300_state_shader.c index 0871aed2b48..ed99c76c158 100644 --- a/src/gallium/drivers/r300/r300_state_shader.c +++ b/src/gallium/drivers/r300/r300_state_shader.c @@ -215,6 +215,10 @@ static INLINE uint32_t r500_rgba_op(unsigned op) case TGSI_OPCODE_RSQ: case TGSI_OPCODE_SIN: return R500_ALU_RGBA_OP_SOP; + case TGSI_OPCODE_DDX: + return R500_ALU_RGBA_OP_MDH; + case TGSI_OPCODE_DDY: + return R500_ALU_RGBA_OP_MDV; case TGSI_OPCODE_FRC: return R500_ALU_RGBA_OP_FRC; case TGSI_OPCODE_DP3: @@ -254,6 +258,10 @@ static INLINE uint32_t r500_alpha_op(unsigned op) return R500_ALPHA_OP_FRC; case TGSI_OPCODE_SIN: return R500_ALPHA_OP_SIN; + case TGSI_OPCODE_DDX: + return R500_ALPHA_OP_MDH; + case TGSI_OPCODE_DDY: + return R500_ALPHA_OP_MDV; case TGSI_OPCODE_DP3: case TGSI_OPCODE_DP4: case TGSI_OPCODE_DPH: @@ -480,6 +488,8 @@ static void r500_fs_instruction(struct r500_fragment_shader* fs, inst->FullSrcRegisters[0].SrcRegister.SwizzleW = inst->FullSrcRegisters[0].SrcRegister.SwizzleX; /* Fall through */ + case TGSI_OPCODE_DDX: + case TGSI_OPCODE_DDY: case TGSI_OPCODE_FRC: r500_emit_maths(fs, assembler, inst->FullSrcRegisters, &inst->FullDstRegisters[0], inst->Instruction.Opcode, 1); |