diff --git a/core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp b/core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp index d4fbfec76..27bfd7ee9 100644 --- a/core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp +++ b/core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp @@ -186,6 +186,8 @@ bool libraryKeys(PipelineLibraryKeys& keys, const Context& context, const State& appendKey(keys.preRasterization, state.depth.has_value() && state.depthBias); appendKey(keys.preRasterization, state.stages.tessellation.has_value()); if (state.stages.tessellation) appendKey(keys.preRasterization, state.stages.tessellation->inputControlPoints); + appendKey(keys.fragmentShader, state.samples); + appendKey(keys.fragmentOutput, state.samples); for (const auto& blend : state.blends) appendKey(keys.fragmentOutput, blend); for (const auto value : state.blendConstants) appendKey(keys.fragmentOutput, value); appendKey(keys.renderPass, state.blends.size()); diff --git a/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp b/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp index 0c7912500..15f75e4de 100644 --- a/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp +++ b/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp @@ -5040,6 +5040,13 @@ void pipelineLibraryTests(const Device& device) { state.colors.front().format = VK_FORMAT_R16G16B16A16_SFLOAT; static_cast(lookup()); Require(counters().built == std::array{2, 2, 3, 3}, "another target format rebuilt more than the fragment output library"); + state.samples = 4; + state.colors.front().samples = 4; + const auto multisampled = lookup(); + Require(counters().built == std::array{2, 2, 4, 4}, "a 4x pipeline shared the 1x fragment shader or fragment output library"); + state.samples = 1; + state.colors.front().samples = 1; + Require(lookup() != multisampled && counters().built == std::array{2, 2, 4, 4}, "the 1x pipeline after a 4x one built its libraries again"); WaitForOptimizedPipelines(context.device); const auto lto = std::getenv("APS5_NO_PIPELINE_LTO") == nullptr && context.pipelineLinkTimeOptimization; Require(counters().optimized == (lto ? counters().linked : 0u), "a linked pipeline was not optimized in the background");