summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-03-21 19:29:29 +0100
committerMarek Olšák <[email protected]>2013-03-26 01:28:18 +0100
commit35c522dce461a7d18a471e681413781da702d4b0 (patch)
treec5bbcb17ec866278153a7eda6ea73c8d4f3bea76 /src/gallium
parenta2378daf8351d3330520edfe09c40928a8984a9b (diff)
radeonsi: fix crash while binding a NULL constant buffer
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 7eac477327a..bdd41b45534 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -2491,7 +2491,7 @@ static void si_set_constant_buffer(struct pipe_context *ctx, uint shader, uint i
/* Note that the state tracker can unbind constant buffers by
* passing NULL here.
*/
- if (cb == NULL)
+ if (cb == NULL || (!cb->buffer && !cb->user_buffer))
return;
pm4 = CALLOC_STRUCT(si_pm4_state);