diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2021-11-18 12:19:53 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2021-11-30 15:10:39 +0000 |
commit | 8f00f19da5b019b12396d2736c27a159d3eb1b21 (patch) | |
tree | f69c3af7bbf64eb27f47abe9b5be65d44f17f2c2 | |
parent | 18cd0a5409e619a5aa245c023941fc5894a9747f (diff) |
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@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13856>
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 8f9f771dee8..5ce3356fb57 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -5477,14 +5477,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++) { |