etnaviv: Allow clearing constant buffer using buffer==NULL user_buffer==NULL
Prevents an assertion when using GALLIUM_HUD with ioquake3, when cso_restore_constant_buffer_slot0 restores an empty constant buffer in slot 0. Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
This commit is contained in:
parent
bc71c31842
commit
0ba4320d94
|
@ -89,7 +89,7 @@ etna_set_constant_buffer(struct pipe_context *pctx,
|
|||
|
||||
/* Note that the state tracker can unbind constant buffers by
|
||||
* passing NULL here. */
|
||||
if (unlikely(!cb))
|
||||
if (unlikely(!cb || (!cb->buffer && !cb->user_buffer)))
|
||||
return;
|
||||
|
||||
/* there is no support for ARB_uniform_buffer_object */
|
||||
|
|
Loading…
Reference in New Issue