aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ruby <aruby@blackberry.com>2024-03-18 17:04:13 -0400
committerGurchetan Singh <gurchetansingh@google.com>2024-04-23 18:08:55 -0700
commitcb8e9da45bbcb045d8558d236baa6764e64f35f1 (patch)
treeee2377d4f9e24999b1f9683f75813309d93c3d2e
parent64a06812371ee187d87a47e36c10da5cbe889be2 (diff)
downloadgfxstream-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.cpp20
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());
+ }
}
}