Mesa (master): radeonsi: fix crash while binding a NULL constant buffer
Marek Olšák
mareko at kemper.freedesktop.org
Tue Mar 26 02:19:40 UTC 2013
Module: Mesa
Branch: master
Commit: 35c522dce461a7d18a471e681413781da702d4b0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=35c522dce461a7d18a471e681413781da702d4b0
Author: Marek Olšák <maraeo at gmail.com>
Date: Thu Mar 21 19:29:29 2013 +0100
radeonsi: fix crash while binding a NULL constant buffer
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/gallium/drivers/radeonsi/si_state.c | 2 +-
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 7eac477..bdd41b4 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);
More information about the mesa-commit
mailing list