Module: Mesa Branch: staging/22.2 Commit: f0193e09e16eedd5ea1685203bd71c7aa7354eed URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f0193e09e16eedd5ea1685203bd71c7aa7354eed
Author: Jason Ekstrand <[email protected]> Date: Sat Aug 20 12:57:06 2022 -0500 vulkan: Dirty VP_VIEWPORTS/SCISSORS when copying viewports/scissors The only reason why we didn't notice before is because ANV always re-emits all scissors and viewports if the count changes. Fixes: fcedb1250bb8 ("vulkan: Add a common data structure for dynamic states") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18160> (cherry picked from commit 6ffbb1abdb26faf341383cbc6bd337a04151711e) --- .pick_status.json | 2 +- src/vulkan/runtime/vk_graphics_state.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index bab2e0e3772..a910fd8c063 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4576,7 +4576,7 @@ "description": "vulkan: Dirty VP_VIEWPORTS/SCISSORS when copying viewports/scissors", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "fcedb1250bb8f05ef047b8b477169d70af9ef27d" }, diff --git a/src/vulkan/runtime/vk_graphics_state.c b/src/vulkan/runtime/vk_graphics_state.c index 2ca8dfced50..0def23628eb 100644 --- a/src/vulkan/runtime/vk_graphics_state.c +++ b/src/vulkan/runtime/vk_graphics_state.c @@ -1546,13 +1546,13 @@ vk_dynamic_graphics_state_copy(struct vk_dynamic_graphics_state *dst, COPY_IF_SET(VP_VIEWPORT_COUNT, vp.viewport_count); if (IS_SET_IN_SRC(VP_VIEWPORTS)) { assert(IS_SET_IN_SRC(VP_VIEWPORT_COUNT)); - COPY_ARRAY(VP_VIEWPORT_COUNT, vp.viewports, src->vp.viewport_count); + COPY_ARRAY(VP_VIEWPORTS, vp.viewports, src->vp.viewport_count); } COPY_IF_SET(VP_SCISSOR_COUNT, vp.scissor_count); if (IS_SET_IN_SRC(VP_SCISSORS)) { assert(IS_SET_IN_SRC(VP_SCISSOR_COUNT)); - COPY_ARRAY(VP_SCISSOR_COUNT, vp.scissors, src->vp.scissor_count); + COPY_ARRAY(VP_SCISSORS, vp.scissors, src->vp.scissor_count); } if (IS_SET_IN_SRC(DR_RECTANGLES)) {
