From e6fd2e1613788b3c787cba309fa15820432fb5b7 Mon Sep 17 00:00:00 2001 From: Bo Hu Date: Wed, 4 Dec 2024 19:15:11 -0800 Subject: [PATCH] gfxstream-guest: update offset to correct value In CoherentMemory::subAllocate function, we should also update offset to the correct values. Test: boot with skiavk enabled and the textures should not be corrupted Reviewed-by: Marcin Radomski Part-of: --- .../guest/vulkan_enc/HostVisibleMemoryVirtualization.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gfxstream/guest/vulkan_enc/HostVisibleMemoryVirtualization.cpp b/src/gfxstream/guest/vulkan_enc/HostVisibleMemoryVirtualization.cpp index a54d7971018..c56489980d7 100644 --- a/src/gfxstream/guest/vulkan_enc/HostVisibleMemoryVirtualization.cpp +++ b/src/gfxstream/guest/vulkan_enc/HostVisibleMemoryVirtualization.cpp @@ -43,6 +43,7 @@ bool CoherentMemory::subAllocate(uint64_t size, uint8_t** ptr, uint64_t& offset) if (!block) return false; *ptr = mBaseAddr + block->ofs; + offset = block->ofs; return true; }