summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorMaciej Cencora <m.cencora@gmail.com>2010-03-21 12:12:05 +0100
committerMaciej Cencora <m.cencora@gmail.com>2010-03-24 20:08:09 +0100
commit88f785935e43701a1ac56dae3952a915a9dd201b (patch)
treeda62751a0d1f7b380a13350a11f4c5972ce435ee /src/mesa
parent7a77effb0b7eeefd5eb350aa9a487e10f62eb7ed (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/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.c2
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 53fe948ab9..a1fe378029 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);
}