summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>2021-06-03 13:58:08 +0200
committerEric Engestrom <eric@engestrom.ch>2021-06-05 23:10:30 +0200
commitc5b2d57d33fdaac04f66a61c18858fe80ad50771 (patch)
treef6ddcc5aa5f432c601b0c57517e619180300c442
parent90bcb5a11a428583afaf7b2ded234f2c65636b6f (diff)
radeonsi: add a gfx10 bug workaround for NOT_EOP
This is a backport of d8fefb13228256601c3ae04331f1c05828143ed7. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4812
-rw-r--r--.pick_status.json2
-rw-r--r--src/gallium/drivers/radeonsi/si_state_draw.cpp10
2 files changed, 11 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 932beaa183c..07b850fa677 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -4855,7 +4855,7 @@
"description": "radeonsi: add a gfx10 bug workaround for NOT_EOP",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "cc24ec8c0772015d8ef0d10e646e89e9014e9e1d"
},
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp
index c54f14da805..806491b7ca4 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.cpp
+++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp
@@ -1192,6 +1192,16 @@ static void si_emit_draw_packets(struct si_context *sctx, const struct pipe_draw
return;
}
+ if (GFX_VERSION == GFX10) {
+ /* GFX10 has a bug that consecutive draw packets with NOT_EOP must not have
+ * count == 0 in the last draw (which doesn't set NOT_EOP).
+ *
+ * So remove all trailing draws with count == 0.
+ */
+ while (num_draws > 1 && !draws[num_draws - 1].count)
+ num_draws--;
+ }
+
for (unsigned i = 0; i < num_draws; i++) {
uint64_t va = index_va + draws[i].start * index_size;