summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorHenri Verbeet <[email protected]>2010-06-08 15:29:04 -0400
committerAlex Deucher <[email protected]>2010-06-08 15:40:25 -0400
commit1bf75a921bcd11dfdc389f490081d83ab536fc58 (patch)
treef00af252a591e2b33b5ee5c665311ed28ee8beef /src/mesa
parent1ec492a366e236569dc68f4de32e641c88cbcd63 (diff)
r600: Assert output registers have a valid export index.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r600/r700_assembler.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c
index 2e64a5778c9..652fd65995c 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.c
+++ b/src/mesa/drivers/dri/r600/r700_assembler.c
@@ -2609,6 +2609,8 @@ GLboolean next_ins(r700_AssemblerBase *pAsm)
if(pAsm->D.dst.rtype == DST_REG_OUT)
{
+ assert(pAsm->D.dst.reg >= pAsm->starting_export_register_number);
+
if(pAsm->D.dst.op3)
{
// There is no mask for OP3 instructions, so all channels are written
@@ -6347,6 +6349,8 @@ GLboolean Process_Export(r700_AssemblerBase* pAsm,
if (export_count == 1)
{
+ assert(starting_register_number >= pAsm->starting_export_register_number);
+
ucWriteMask = pAsm->pucOutMask[starting_register_number - pAsm->starting_export_register_number];
/* exports Z as a float into Red channel */
if (GL_TRUE == is_depth_export)