diff options
author | Aaron Ruby <aruby@blackberry.com> | 2024-03-18 17:04:13 -0400 |
---|---|---|
committer | Gurchetan Singh <gurchetansingh@google.com> | 2024-04-23 18:08:55 -0700 |
commit | cb8e9da45bbcb045d8558d236baa6764e64f35f1 (patch) | |
tree | ee2377d4f9e24999b1f9683f75813309d93c3d2e | |
parent | 64a06812371ee187d87a47e36c10da5cbe889be2 (diff) | |
download | gfxstream-cb8e9da45bbcb045d8558d236baa6764e64f35f1.tar.gz |
gfxstream: spec fix
pAttachments must be ignored if VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT
is included in flags.
BUG=287083974
TEST=compile
Change-Id: I53294a6a76057b008a4430962cd251b113c8d775
-rw-r--r-- | host/vulkan/VkDecoderGlobalState.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/host/vulkan/VkDecoderGlobalState.cpp b/host/vulkan/VkDecoderGlobalState.cpp index 87fbe3f3..3cadd61d 100644 --- a/host/vulkan/VkDecoderGlobalState.cpp +++ b/host/vulkan/VkDecoderGlobalState.cpp @@ -5353,15 +5353,17 @@ class VkDecoderGlobalState::Impl { auto& framebufferInfo = mFramebufferInfo[*pFramebuffer]; framebufferInfo.device = device; - // b/327522469 - // Track the Colorbuffers that would be written to. - // It might be better to check for VK_QUEUE_FAMILY_EXTERNAL in pipeline barrier. - // But the guest does not always add it to pipeline barrier. - for (int i = 0; i < pCreateInfo->attachmentCount; i++) { - auto* imageViewInfo = android::base::find(mImageViewInfo, pCreateInfo->pAttachments[i]); - if (imageViewInfo->boundColorBuffer.has_value()) { - framebufferInfo.attachedColorBuffers.push_back( - imageViewInfo->boundColorBuffer.value()); + if ((pCreateInfo->flags & VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT) == 0) { + // b/327522469 + // Track the Colorbuffers that would be written to. + // It might be better to check for VK_QUEUE_FAMILY_EXTERNAL in pipeline barrier. + // But the guest does not always add it to pipeline barrier. + for (int i = 0; i < pCreateInfo->attachmentCount; i++) { + auto* imageViewInfo = android::base::find(mImageViewInfo, pCreateInfo->pAttachments[i]); + if (imageViewInfo->boundColorBuffer.has_value()) { + framebufferInfo.attachedColorBuffers.push_back( + imageViewInfo->boundColorBuffer.value()); + } } } |