summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-09-24 14:12:24 +0200
committerLuca Barbieri <luca@luca-barbieri.com>2010-09-24 15:12:19 +0200
commitd0ee833deec843742f80dc1d42b4ecc03ada06e2 (patch)
treeba41f5fc6a70ac181f8a2e04a37f2738b6074190 /src/gallium
parent8b63ed4e6cb4ecea57e2bc622124056341844c56 (diff)
nvfx: allow setting NULL constant buffers
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_state.c b/src/gallium/drivers/nvfx/nvfx_state.c
index b767846a99..54619037d8 100644
--- a/src/gallium/drivers/nvfx/nvfx_state.c
+++ b/src/gallium/drivers/nvfx/nvfx_state.c
@@ -305,7 +305,7 @@ nvfx_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
struct nvfx_context *nvfx = nvfx_context(pipe);
nvfx->constbuf[shader] = buf;
- nvfx->constbuf_nr[shader] = buf->width0 / (4 * sizeof(float));
+ nvfx->constbuf_nr[shader] = buf ? (buf->width0 / (4 * sizeof(float))) : 0;
if (shader == PIPE_SHADER_VERTEX) {
nvfx->dirty |= NVFX_NEW_VERTCONST;