Browse Source

[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.
pull/218/head
wildcard 7 months ago
committed by crueter
parent
commit
39d1c16bc8
  1. 2
      src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp

2
src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp

@ -743,7 +743,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,

Loading…
Cancel
Save