Mesa (main): radeonsi: skip instance_count==0 draws on <= GFX9
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 18 07:35:04 UTC 2021
Module: Mesa
Branch: main
Commit: 66dbd16f38e6acccb9ba3ba02d0f9bbb18e4e3b1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=66dbd16f38e6acccb9ba3ba02d0f9bbb18e4e3b1
Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date: Mon Jun 14 09:53:45 2021 +0200
radeonsi: skip instance_count==0 draws on <= GFX9
This changes seems to prevent a hang, at least on Renoir chips.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4866
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11356>
---
src/gallium/drivers/radeonsi/si_state_draw.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp
index 59cd90d09ef..5e5387070c0 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.cpp
+++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp
@@ -1800,8 +1800,10 @@ static void si_draw_vbo(struct pipe_context *ctx,
/* GFX6-GFX7 treat instance_count==0 as instance_count==1. There is
* no workaround for indirect draws, but we can at least skip
* direct draws.
+ * 'instance_count == 0' seems to be problematic on Renoir chips (#4866),
+ * so simplify the condition and drop these draws for all <= GFX9 chips.
*/
- if (GFX_VERSION <= GFX7 && unlikely(!indirect && !instance_count))
+ if (GFX_VERSION <= GFX9 && unlikely(!indirect && !instance_count))
return;
struct si_shader_selector *vs = sctx->shader.vs.cso;
More information about the mesa-commit
mailing list