From fbd357d82c597c8efe70acc3d389977804261b6d Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Sun, 23 Nov 2025 21:24:22 -0400 Subject: [PATCH] [vk] Adjusting VIDS --- .../renderer_vulkan/vk_graphics_pipeline.cpp | 6 ++++-- src/video_core/vulkan_common/vulkan_device.cpp | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index cb9451ded9..14b05260db 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -857,13 +857,15 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { }; dynamic_states.insert(dynamic_states.end(), extended.begin(), extended.end()); - // VERTEX_INPUT_BINDING_STRIDE is part of EDS1, not VIDS + // VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT is part of EDS1 + // Only use it if VIDS is not active (VIDS replaces it with full vertex input control) if (!key.state.dynamic_vertex_input) { dynamic_states.push_back(VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT); } } - // Vertex Input Dynamic State (replaces VERTEX_INPUT_BINDING_STRIDE) + // VK_DYNAMIC_STATE_VERTEX_INPUT_EXT (VIDS) - Independent from EDS + // Provides full dynamic vertex input control, replaces VERTEX_INPUT_BINDING_STRIDE if (key.state.dynamic_vertex_input) { dynamic_states.push_back(VK_DYNAMIC_STATE_VERTEX_INPUT_EXT); } diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index e322ac97cb..8ef11ac6e7 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -707,10 +707,8 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR break; } - if (!extensions.extended_dynamic_state) { - Settings::values.vertex_input_dynamic_state.SetValue(false); - } - + // VK_EXT_vertex_input_dynamic_state is independent from EDS + // It can be enabled even without extended_dynamic_state if (!Settings::values.vertex_input_dynamic_state.GetValue()) { RemoveExtensionFeature(extensions.vertex_input_dynamic_state, features.vertex_input_dynamic_state, VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); } @@ -1188,7 +1186,9 @@ bool Device::GetSuitability(bool requires_swapchain) { if (version < VK_MAKE_API_VERSION(27, 20, 100, 0)) { LOG_WARNING(Render_Vulkan, "Intel Windows < 27.20.100.0: Disabling broken VK_EXT_vertex_input_dynamic_state"); - features.vertex_input_dynamic_state.vertexInputDynamicState = false; + RemoveExtensionFeature(extensions.vertex_input_dynamic_state, + features.vertex_input_dynamic_state, + VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); } }