From afe6713d6b2009f82a9f1bc18bde8698bb6050b7 Mon Sep 17 00:00:00 2001 From: wildcard Date: Thu, 7 Aug 2025 19:14:30 +0200 Subject: [PATCH] [vk] Fix Sample Shading to ensure it is properly enabled Even when sample shading was enabled via settings, the pipeline was configured with minSampleShading = 0.0f, effectively disabling the feature. This patch sets minSampleShading = 1.0f when sample shading is enabled, ensuring that per-sample shading is actually used as intended. --- src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index 6c40ff1bab..559a29ef97 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -744,7 +744,7 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { .flags = 0, .rasterizationSamples = MaxwellToVK::MsaaMode(key.state.msaa_mode), .sampleShadingEnable = Settings::values.sample_shading.GetValue() ? VK_TRUE : VK_FALSE, - .minSampleShading = 0.0f, + .minSampleShading = Settings::values.sample_shading.GetValue() ? 1.0f : 0.0f, .pSampleMask = nullptr, .alphaToCoverageEnable = key.state.alpha_to_coverage_enabled != 0 ? VK_TRUE : VK_FALSE, .alphaToOneEnable = key.state.alpha_to_one_enabled != 0 ? VK_TRUE : VK_FALSE,