aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r600/r700_vertprog.c
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2009-06-02 19:20:24 -0400
committerAlex Deucher <[email protected]>2009-06-02 19:20:24 -0400
commitb55d0dd3baa16bebcbbb5629951098943f55fe74 (patch)
tree7e28dfa6cff03e56ca6bee499682d92ccc5110b4 /src/mesa/drivers/dri/r600/r700_vertprog.c
parent8e28d64e9c7cdc4d07ffe4a79c9ef9fff4a27df6 (diff)
fix an overflow in SPI_VS_OUT_CONFIG
VS must always export at least 1 param.
Diffstat (limited to 'src/mesa/drivers/dri/r600/r700_vertprog.c')
-rw-r--r--src/mesa/drivers/dri/r600/r700_vertprog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.c b/src/mesa/drivers/dri/r600/r700_vertprog.c
index a827de197be..ecb72549feb 100644
--- a/src/mesa/drivers/dri/r600/r700_vertprog.c
+++ b/src/mesa/drivers/dri/r600/r700_vertprog.c
@@ -383,7 +383,7 @@ GLboolean r700SetupVertexProgram(GLcontext * ctx)
STACK_SIZE_shift, STACK_SIZE_mask);
}
- SETfield(r700->SPI_VS_OUT_CONFIG.u32All, vp->r700Shader.nParamExports - 1,
+ SETfield(r700->SPI_VS_OUT_CONFIG.u32All, vp->r700Shader.nParamExports ? (vp->r700Shader.nParamExports - 1) : 0,
VS_EXPORT_COUNT_shift, VS_EXPORT_COUNT_mask);
SETfield(r700->SPI_PS_IN_CONTROL_0.u32All, vp->r700Shader.nParamExports,
NUM_INTERP_shift, NUM_INTERP_mask);