Mesa (staging/21.3): radv: fix resetting the entire vertex input dynamic state
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Dec 1 00:23:45 UTC 2021
Module: Mesa
Branch: staging/21.3
Commit: 4de5647246d5be1b68131c0653756052c84aa0b3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4de5647246d5be1b68131c0653756052c84aa0b3
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Thu Nov 18 12:19:53 2021 +0100
radv: fix resetting the entire vertex input dynamic state
If there is holes, eg. the application firsts set vertex attributes
0 and 1, then vertex attributes 0 and 7, the format of vertex attribute
1 is still the previous one, while it should be FORMAT_INVALID to avoid
a GPU hang.
This fixes a GPU hang with Yuzu.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5627
Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13856>
(cherry picked from commit 8f00f19da5b019b12396d2736c27a159d3eb1b21)
---
.pick_status.json | 2 +-
src/amd/vulkan/radv_cmd_buffer.c | 9 +--------
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 67561ce2603..58f380d4504 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -40,7 +40,7 @@
"description": "radv: fix resetting the entire vertex input dynamic state",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 8ab0cc6a9ec..4305aa4508f 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -5467,14 +5467,7 @@ radv_CmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingD
cmd_buffer->state.vbo_misaligned_mask = 0;
- state->attribute_mask = 0;
- state->misaligned_mask = 0;
- state->possibly_misaligned_mask = 0;
- state->instance_rate_inputs = 0;
- state->nontrivial_divisors = 0;
- state->post_shuffle = 0;
- state->alpha_adjust_lo = 0;
- state->alpha_adjust_hi = 0;
+ memset(state, 0, sizeof(*state));
enum chip_class chip = cmd_buffer->device->physical_device->rad_info.chip_class;
for (unsigned i = 0; i < vertexAttributeDescriptionCount; i++) {
More information about the mesa-commit
mailing list