summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorAndre Maasikas <[email protected]>2009-12-21 11:47:12 +0200
committerAndre Maasikas <[email protected]>2009-12-21 15:23:27 +0200
commit69728a2ae28d11e48b87e51dc3ea2fcc040c40fb (patch)
tree0239f94c2b0af664a9c86978c2ebaa9fdac8541c /src/mesa/drivers/dri
parent3d3480abbc97a7fca67c0c1cd057ea0ff52cad70 (diff)
r600: disallow negative offsets for relative addressing for now
otherwise for example const[ADDR-3] gets us 253 - ALU_SRC_LITERAL which expects immediate floats to follow and hangs
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/r600/r700_assembler.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c
index e10b23b97f1..51692a11ffb 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.c
+++ b/src/mesa/drivers/dri/r600/r700_assembler.c
@@ -1262,7 +1262,15 @@ GLboolean assemble_src(r700_AssemblerBase *pAsm,
}
pAsm->S[fld].src.rtype = SRC_REG_CONSTANT;
- pAsm->S[fld].src.reg = pILInst->SrcReg[src].Index;
+ if(pILInst->SrcReg[src].Index < 0)
+ {
+ WARN_ONCE("Negative register offsets not supported yet!\n");
+ pAsm->S[fld].src.reg = 0;
+ }
+ else
+ {
+ pAsm->S[fld].src.reg = pILInst->SrcReg[src].Index;
+ }
break;
case PROGRAM_INPUT:
setaddrmode_PVSSRC(&(pAsm->S[fld].src), ADDR_ABSOLUTE);