summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorAndre Maasikas <amaasikas@gmail.com>2009-12-14 10:48:36 +0200
committerAndre Maasikas <amaasikas@gmail.com>2009-12-15 09:46:34 +0200
commit0c046bec8f78f33e7530416e0faa4d127d08e641 (patch)
tree4d7771138bd3ea071a85bdd3fe4d682d71a47ab6 /src/mesa/drivers
parent18ebcfe39360dc0ef1e175fe6c39cbb857432ab4 (diff)
r600: add DDX DDY opcodes
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/r600/r700_assembler.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c
index d493d4e2b1..43dafd5b8a 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.c
+++ b/src/mesa/drivers/dri/r600/r700_assembler.c
@@ -546,7 +546,8 @@ int Init_r700_AssemblerBase(SHADER_PIPE_TYPE spt, r700_AssemblerBase* pAsm, R700
GLboolean IsTex(gl_inst_opcode Opcode)
{
- if( (OPCODE_TEX==Opcode) || (OPCODE_TXP==Opcode) || (OPCODE_TXB==Opcode) )
+ if( (OPCODE_TEX==Opcode) || (OPCODE_TXP==Opcode) || (OPCODE_TXB==Opcode) ||
+ (OPCODE_DDX==Opcode) || (OPCODE_DDY==Opcode) )
{
return GL_TRUE;
}
@@ -4363,13 +4364,20 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm)
}
- if(pAsm->pILInst[pAsm->uiCurInst].Opcode == OPCODE_TXB)
+ switch(pAsm->pILInst[pAsm->uiCurInst].Opcode)
{
- pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE_L;
- }
- else
- {
- pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE;
+ case OPCODE_DDX:
+ /* will these need WQM(1) on CF inst ? */
+ pAsm->D.dst.opcode = SQ_TEX_INST_GET_GRADIENTS_H;
+ break;
+ case OPCODE_DDY:
+ pAsm->D.dst.opcode = SQ_TEX_INST_GET_GRADIENTS_V;
+ break;
+ case OPCODE_TXB:
+ pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE_L;
+ break;
+ default:
+ pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE;
}
pAsm->is_tex = GL_TRUE;
@@ -5682,7 +5690,8 @@ GLboolean AssembleInstr(GLuint uiFirstInst,
}
}
break;
-
+ case OPCODE_DDX:
+ case OPCODE_DDY:
case OPCODE_TEX:
case OPCODE_TXB:
case OPCODE_TXP: