diff options
Diffstat (limited to 'src/mesa/pipe/i965simple/brw_vs_emit.c')
-rw-r--r-- | src/mesa/pipe/i965simple/brw_vs_emit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/pipe/i965simple/brw_vs_emit.c b/src/mesa/pipe/i965simple/brw_vs_emit.c index f3507f60f7..0cc0a437b0 100644 --- a/src/mesa/pipe/i965simple/brw_vs_emit.c +++ b/src/mesa/pipe/i965simple/brw_vs_emit.c @@ -630,6 +630,8 @@ static struct brw_reg get_reg( struct brw_vs_compile *c, assert(c->regs[file][index].nr != 0); return c->regs[file][index]; case TGSI_FILE_CONSTANT: + assert(c->regs[TGSI_FILE_CONSTANT][index + c->prog_data.num_consts].nr != 0); + return c->regs[TGSI_FILE_CONSTANT][index + c->prog_data.num_consts]; case TGSI_FILE_IMMEDIATE: assert(c->regs[TGSI_FILE_CONSTANT][index].nr != 0); return c->regs[TGSI_FILE_CONSTANT][index]; @@ -1317,6 +1319,7 @@ void brw_vs_emit(struct brw_vs_compile *c) /* first instruction (declerations finished). * now that we know what vars are being used allocate * registers for them.*/ + c->prog_data.num_consts = prog_info.num_consts; c->prog_data.max_const = prog_info.num_consts + c->prog_data.num_imm; brw_vs_alloc_regs(c, &prog_info); |