Mesa (staging/22.1): radv: fix vbo_bound_mask indexing

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 28 16:40:28 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: ca887b3175ac1da09b04e32c6ab539e271464b10
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ca887b3175ac1da09b04e32c6ab539e271464b10

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Wed Jul 13 16:33:04 2022 +0100

radv: fix vbo_bound_mask indexing

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6812
Fixes: 1b8bdecf6e0 ("radv: add a mask of bound descriptor buffers for dynamic vertex input")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17521>
(cherry picked from commit 1d019d2ab772ad72f4d3665e60f26de83f5cf29c)

Conflicts:
	src/amd/vulkan/radv_cmd_buffer.c

---

 .pick_status.json                | 2 +-
 src/amd/vulkan/radv_cmd_buffer.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 462882ac126..2e120ab9e25 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -4054,7 +4054,7 @@
         "description": "radv: fix vbo_bound_mask indexing",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "1b8bdecf6e071759f96cecc5662a3d4592491535"
     },
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 27a75896589..875f196f29c 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -5657,11 +5657,11 @@ radv_CmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingD
          unsigned bit = 1u << loc;
          if (binding->stride & format_align_req_minus_1) {
             state->misaligned_mask |= bit;
-            if (cmd_buffer->state.vbo_bound_mask & bit)
+            if (cmd_buffer->state.vbo_bound_mask & BITFIELD_BIT(attrib->binding))
                cmd_buffer->state.vbo_misaligned_mask |= bit;
          } else {
             state->possibly_misaligned_mask |= bit;
-            if (cmd_buffer->state.vbo_bound_mask & bit &&
+            if (cmd_buffer->state.vbo_bound_mask & BITFIELD_BIT(attrib->binding) &&
                 ((vb[attrib->binding].offset + state->offsets[loc]) & format_align_req_minus_1))
                cmd_buffer->state.vbo_misaligned_mask |= bit;
          }



More information about the mesa-commit mailing list