From 5d1e214ce3de525b07e5328cb87993fc91d46439 Mon Sep 17 00:00:00 2001 From: milescoviello Date: Thu, 22 Oct 2026 00:05:21 +0000 Subject: [PATCH] fix(agc): copy a linked pipeline's color sample counts only when it has color attachments Co-Authored-By: Claude Opus 5.5 --- .../libs/prx/libSceAgcDriver/Graphics/src/PipelineLibrary.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/libs/prx/libSceAgcDriver/Graphics/src/PipelineLibrary.cpp b/core/libs/prx/libSceAgcDriver/Graphics/src/PipelineLibrary.cpp index 0ccd993ac27f..f034f09428ac 100644 --- a/core/libs/prx/libSceAgcDriver/Graphics/src/PipelineLibrary.cpp +++ b/core/libs/prx/libSceAgcDriver/Graphics/src/PipelineLibrary.cpp @@ -260,7 +260,9 @@ VkPipeline LinkPipelineFromLibraries(const Context& context, const VkGraphicsPip for (auto* next = static_cast(rendering.pNext); next != nullptr; next = next->pNext) { if (next->sType != VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_NV) continue; const auto& counts = *reinterpret_cast(next); - sampleCounts.emplace(std::vector(counts.pColorAttachmentSamples, counts.pColorAttachmentSamples + counts.colorAttachmentCount), counts.depthStencilAttachmentSamples); + std::vector colors; + if (counts.colorAttachmentCount != 0) colors.assign(counts.pColorAttachmentSamples, counts.pColorAttachmentSamples + counts.colorAttachmentCount); + sampleCounts.emplace(std::move(colors), counts.depthStencilAttachmentSamples); } const auto attachmentSamples = [](const std::pair, VkSampleCountFlagBits>& counts) { return VkAttachmentSampleCountInfoNV{VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_NV, nullptr, static_cast(counts.first.size()), counts.first.empty() ? nullptr : counts.first.data(), counts.second};