Enable sample rate shader when SampleRateShading cap found IIUC, per https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#_capability the appearance of the capability implies that the shader Uses per-sample rate shading. Bug: b/358602678 Test: dEQP-VK.draw.dynamic_rendering.complete_secondary_cmd_buff.implicit_sample_shading#sample_id_static_use Test: dEQP-VK.draw.dynamic_rendering.complete_secondary_cmd_buff.implicit_sample_shading#sample_position_static_use Test: dEQP-VK.draw.dynamic_rendering.partial_secondary_cmd_buff.implicit_sample_shading#sample_id_static_use Test: dEQP-VK.draw.dynamic_rendering.partial_secondary_cmd_buff.implicit_sample_shading#sample_position_static_use Test: dEQP-VK.draw.dynamic_rendering.primary_cmd_buff.implicit_sample_shading#sample_id_static_use Test: dEQP-VK.draw.dynamic_rendering.primary_cmd_buff.implicit_sample_shading#sample_position_static_use Test: dEQP-VK.draw.renderpass.implicit_sample_shading#sample_id_static_use Test: dEQP-VK.draw.renderpass.implicit_sample_shading#sample_position_static_use Change-Id: Icc573964ad00577bd4e2e42bdaad2acf0d6b449c Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/73949 Reviewed-by: Chris Forbes <chrisforbes@google.com> Tested-by: Jason Macnak <natsu@google.com> Presubmit-Ready: Jason Macnak <natsu@google.com> Commit-Queue: Jason Macnak <natsu@google.com>
diff --git a/src/Pipeline/PixelRoutine.cpp b/src/Pipeline/PixelRoutine.cpp index d2e69dc..c7058ac 100644 --- a/src/Pipeline/PixelRoutine.cpp +++ b/src/Pipeline/PixelRoutine.cpp
@@ -41,6 +41,11 @@ return true; } + if(spirvShader->getUsedCapabilities().SampleRateShading) + { + return true; + } + if(spirvShader->getAnalysis().ContainsSampleQualifier) { return true;