From f65fdfcca86acb0d64a5016d4fc922405720b45a Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Wed, 26 Jul 2023 14:22:58 -0500 Subject: [PATCH] Revert "vulkan: Allow scissors or viewports to be set without counts" This reverts commit b551f26a0caad52de620222e2df8416e80332943. Part-of: --- src/vulkan/runtime/vk_graphics_state.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/vulkan/runtime/vk_graphics_state.c b/src/vulkan/runtime/vk_graphics_state.c index 1074fce..04114fe 100644 --- a/src/vulkan/runtime/vk_graphics_state.c +++ b/src/vulkan/runtime/vk_graphics_state.c @@ -1882,18 +1882,14 @@ 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)) { - if (likely(IS_SET_IN_SRC(VP_VIEWPORT_COUNT))) - COPY_ARRAY(VP_VIEWPORTS, vp.viewports, src->vp.viewport_count); - else - COPY_ARRAY(VP_VIEWPORTS, vp.viewports, MESA_VK_MAX_VIEWPORTS); + assert(IS_SET_IN_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)) { - if (likely(IS_SET_IN_SRC(VP_SCISSOR_COUNT))) - COPY_ARRAY(VP_SCISSORS, vp.scissors, src->vp.scissor_count); - else - COPY_ARRAY(VP_SCISSORS, vp.scissors, MESA_VK_MAX_SCISSORS); + assert(IS_SET_IN_SRC(VP_SCISSOR_COUNT)); + COPY_ARRAY(VP_SCISSORS, vp.scissors, src->vp.scissor_count); } COPY_IF_SET(VP_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE, -- 2.7.4