diff options
author | Brian Paul <brianp@vmware.com> | 2009-03-13 09:17:08 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-03-13 09:23:43 -0600 |
commit | a10ec13143599344ecb4a486db1454b488cd9645 (patch) | |
tree | 5769d702ebe5f602b9f46ab0a59c82a7ed59686f /src/mesa | |
parent | 2cf296186e2a2a635a461b2498d4afa7762656f5 (diff) | |
download | external_mesa3d-a10ec13143599344ecb4a486db1454b488cd9645.zip external_mesa3d-a10ec13143599344ecb4a486db1454b488cd9645.tar.gz external_mesa3d-a10ec13143599344ecb4a486db1454b488cd9645.tar.bz2 |
i965: add some register number assertions
Haven't seen failures yet, but if/when there are, more investigation will
be done.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu_emit.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index bac7135..6dce1ca 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -55,6 +55,9 @@ static void guess_execution_size( struct brw_instruction *insn, static void brw_set_dest( struct brw_instruction *insn, struct brw_reg dest ) { + if (dest.type != BRW_ARCHITECTURE_REGISTER_FILE) + assert(dest.nr < 128); + insn->bits1.da1.dest_reg_file = dest.file; insn->bits1.da1.dest_reg_type = dest.type; insn->bits1.da1.dest_address_mode = dest.address_mode; @@ -100,6 +103,9 @@ static void brw_set_src0( struct brw_instruction *insn, { assert(reg.file != BRW_MESSAGE_REGISTER_FILE); + if (reg.type != BRW_ARCHITECTURE_REGISTER_FILE) + assert(reg.nr < 128); + insn->bits1.da1.src0_reg_file = reg.file; insn->bits1.da1.src0_reg_type = reg.type; insn->bits2.da1.src0_abs = reg.abs; @@ -173,6 +179,8 @@ void brw_set_src1( struct brw_instruction *insn, { assert(reg.file != BRW_MESSAGE_REGISTER_FILE); + assert(reg.nr < 128); + insn->bits1.da1.src1_reg_file = reg.file; insn->bits1.da1.src1_reg_type = reg.type; insn->bits3.da1.src1_abs = reg.abs; |