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:
Wladimir J. van der Laan 2017-10-28 15:57:14 +02:00 committed by Lucas Stach
parent bc71c31842
commit 0ba4320d94
1 changed files with 1 additions and 1 deletions

View File

@ -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 */