mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-13 09:00:35 +02:00
nvfx: allow setting NULL constant buffers
This commit is contained in:
parent
8b63ed4e6c
commit
d0ee833dee
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue