diff options
author | Maciej Cencora <[email protected]> | 2010-03-21 12:12:05 +0100 |
---|---|---|
committer | Maciej Cencora <[email protected]> | 2010-03-24 20:08:09 +0100 |
commit | 88f785935e43701a1ac56dae3952a915a9dd201b (patch) | |
tree | da62751a0d1f7b380a13350a11f4c5972ce435ee /src | |
parent | 7a77effb0b7eeefd5eb350aa9a487e10f62eb7ed (diff) |
r300: fix off by one
R300_PVS_MAX_CONST_ADDR field holds highest const addr, not
const count.
Fixes missing models and others rendering errors for vertex
program using 256 params.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_vertprog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c index 53fe948ab98..a1fe3780294 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertprog.c @@ -409,6 +409,6 @@ void r300SetupVertexProgram(r300ContextPtr rmesa) rmesa->hw.pvs.cmd[R300_PVS_CNTL_1] = (0 << R300_PVS_FIRST_INST_SHIFT) | (inst_count << R300_PVS_XYZW_VALID_INST_SHIFT) | (inst_count << R300_PVS_LAST_INST_SHIFT); - rmesa->hw.pvs.cmd[R300_PVS_CNTL_2] = (0 << R300_PVS_CONST_BASE_OFFSET_SHIFT) | (param_count << R300_PVS_MAX_CONST_ADDR_SHIFT); + rmesa->hw.pvs.cmd[R300_PVS_CNTL_2] = (0 << R300_PVS_CONST_BASE_OFFSET_SHIFT) | ((param_count - 1) << R300_PVS_MAX_CONST_ADDR_SHIFT); rmesa->hw.pvs.cmd[R300_PVS_CNTL_3] = (inst_count << R300_PVS_LAST_VTX_SRC_INST_SHIFT); } |