mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
r600g: fix crash while binding a NULL constant buffer
This commit is contained in:
parent
53228fe2a8
commit
a2378daf83
1 changed files with 1 additions and 1 deletions
|
|
@ -926,7 +926,7 @@ static void r600_set_constant_buffer(struct pipe_context *ctx, uint shader, uint
|
|||
/* Note that the state tracker can unbind constant buffers by
|
||||
* passing NULL here.
|
||||
*/
|
||||
if (unlikely(!input)) {
|
||||
if (unlikely(!input || (!input->buffer && !input->user_buffer))) {
|
||||
state->enabled_mask &= ~(1 << index);
|
||||
state->dirty_mask &= ~(1 << index);
|
||||
pipe_resource_reference(&state->cb[index].buffer, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue