From 191fe7e4c4a314f395de5723ddce10d835af275c Mon Sep 17 00:00:00 2001 From: Jason Macnak Date: Fri, 13 Jun 2025 15:17:31 -0700 Subject: [PATCH] gfxstream: Update snapshot decoder to handle imageless framebuffer When `VkFramebufferCreateInfo::flags` has `VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT`, `VkFramebufferCreateInfo::pAttachments` should be ignored. Test: cvd create \ --gpu_mode=gfxstream_guest_angle_host_swiftshader \ --gpu_renderer_features="VulkanSnapshots:enabled" Reviewed-by: Marcin Radomski Part-of: --- src/gfxstream/codegen/scripts/cereal/decodersnapshot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gfxstream/codegen/scripts/cereal/decodersnapshot.py b/src/gfxstream/codegen/scripts/cereal/decodersnapshot.py index 8a169049aaf..11ea77be780 100644 --- a/src/gfxstream/codegen/scripts/cereal/decodersnapshot.py +++ b/src/gfxstream/codegen/scripts/cereal/decodersnapshot.py @@ -226,10 +226,12 @@ def extract_deps_vkCreateGraphicsPipelines(param, access, lenExpr, api, cgen): def extract_deps_vkCreateFramebuffer(param, access, lenExpr, api, cgen): cgen.stmt("mReconstruction.addHandleDependency((const uint64_t*)%s, %s, (uint64_t)(uintptr_t)%s)" % \ (access, lenExpr, "unboxed_to_boxed_non_dispatchable_VkRenderPass(pCreateInfo->renderPass)")) + cgen.beginIf("(pCreateInfo->flags & VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT) == 0") cgen.beginFor("uint32_t i = 0", "i < pCreateInfo->attachmentCount" , "++i") cgen.stmt("mReconstruction.addHandleDependency((const uint64_t*)%s, %s, (uint64_t)(uintptr_t)%s)" % \ (access, lenExpr, "unboxed_to_boxed_non_dispatchable_VkImageView(pCreateInfo->pAttachments[i])")) cgen.endFor() + cgen.endIf(); def extract_deps_vkBindImageMemory(param, access, lenExpr, api, cgen): cgen.stmt("mReconstruction.addHandleDependency((const uint64_t*)%s, %s, (uint64_t)(uintptr_t)%s, VkReconstruction::BOUND_MEMORY)" % \