aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_blit.c
diff options
context:
space:
mode:
authorJan Vesely <[email protected]>2018-04-05 16:34:00 -0400
committerJan Vesely <[email protected]>2018-04-05 17:11:18 -0400
commit2406e8848eb0bb7223763efeacbbc48ae8d2f251 (patch)
tree005c3f217e8aab44f7673354acc5c509f1f0e629 /src/gallium/drivers/radeonsi/si_blit.c
parentcc41603d6da4552f0aaf32325a8f019c44c3d9c8 (diff)
radeonsi: Reorder checks in si_check_render_feedback
si_get_total_colormask accesses NULL pointer on compute shaders Fixes crashes on clover Fixes: 0669dca9c00261849cee14d69fdea0a5e323c7f7 ("radeonsi: skip DCC render feedback checking if color writes are disabled") CC: Marek Olšák <[email protected]> Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_blit.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_blit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
index 40f512a682d..35506dd74b3 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -710,15 +710,15 @@ static void si_check_render_feedback_resident_images(struct si_context *sctx)
static void si_check_render_feedback(struct si_context *sctx)
{
+ if (!sctx->need_check_render_feedback)
+ return;
+
/* There is no render feedback if color writes are disabled.
* (e.g. a pixel shader with image stores)
*/
if (!si_get_total_colormask(sctx))
return;
- if (!sctx->need_check_render_feedback)
- return;
-
for (int i = 0; i < SI_NUM_SHADERS; ++i) {
si_check_render_feedback_images(sctx, &sctx->images[i]);
si_check_render_feedback_textures(sctx, &sctx->samplers[i]);