diff options
author | Christoph Bumiller <[email protected]> | 2011-01-08 15:40:14 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2011-01-08 15:40:14 +0100 |
commit | 90e29afcb62411b69d57dac76fe89c69c9936ed6 (patch) | |
tree | 9227f27fe7eb8eaab17344243df5b00cae2ba59b /src/gallium/drivers/nv50 | |
parent | 703f3597ad0e2b7134d4ea0fc2194eb67161910a (diff) |
nvfx,nv50: pipe_reference the constant buffers
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_state.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c index d97566ed7cf..b4eda0f617d 100644 --- a/src/gallium/drivers/nv50/nv50_state.c +++ b/src/gallium/drivers/nv50/nv50_state.c @@ -721,17 +721,16 @@ nv50_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index, struct nv50_context *nv50 = nv50_context(pipe); if (shader == PIPE_SHADER_VERTEX) { - nv50->constbuf[PIPE_SHADER_VERTEX] = buf; nv50->dirty |= NV50_NEW_VERTPROG_CB; } else if (shader == PIPE_SHADER_FRAGMENT) { - nv50->constbuf[PIPE_SHADER_FRAGMENT] = buf; nv50->dirty |= NV50_NEW_FRAGPROG_CB; - } else - if (shader == PIPE_SHADER_GEOMETRY) { - nv50->constbuf[PIPE_SHADER_GEOMETRY] = buf; + } else { + assert(shader == PIPE_SHADER_GEOMETRY); nv50->dirty |= NV50_NEW_GEOMPROG_CB; } + + pipe_resource_reference(&nv50->constbuf[shader], buf); } static void |