diff options
author | Luca Barbieri <luca@luca-barbieri.com> | 2010-09-24 14:12:24 +0200 |
---|---|---|
committer | Luca Barbieri <luca@luca-barbieri.com> | 2010-09-24 15:12:19 +0200 |
commit | d0ee833deec843742f80dc1d42b4ecc03ada06e2 (patch) | |
tree | ba41f5fc6a70ac181f8a2e04a37f2738b6074190 /src/gallium | |
parent | 8b63ed4e6cb4ecea57e2bc622124056341844c56 (diff) |
nvfx: allow setting NULL constant buffers
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_state.c | 2 |
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; |