summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-10-28 15:57:14 +0200
committerLucas Stach <l.stach@pengutronix.de>2017-11-02 11:03:30 +0100
commit0ba4320d94f23da45525699c1a3a947f2c598c3e (patch)
tree360658b0b98b9a7457273396a22ecff51b2703d5
parentbc71c318426b2939aae839a356f1ab4aef1e5ada (diff)
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>
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_state.c b/src/gallium/drivers/etnaviv/etnaviv_state.c
index 34bcb19069..ba62c5f194 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_state.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_state.c
@@ -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 */