From 40e77d6f7e184ab2473191b77d6c827184cb1b63 Mon Sep 17 00:00:00 2001 From: Reid Yeager Date: Wed, 1 Feb 2023 21:33:04 +0000 Subject: [PATCH] Fix for api.buffer_marker memory map failure Fixes the VK_ERROR_MEMORY_MAP_FAILED error when constructing a HostPtr in some api.buffer_marker cases No longer passing whole-buffer size to memory map with offset Affects: dEQP-VK.api.buffer_marker.* VK-GL-CTS issue: 4264 Components: Vulkan Change-Id: I56faa6e44acb3e55932bbb3f8e74109b177d17f4 --- external/vulkancts/framework/vulkan/vkMemUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/vulkancts/framework/vulkan/vkMemUtil.cpp b/external/vulkancts/framework/vulkan/vkMemUtil.cpp index d20bcc1..8560036 100644 --- a/external/vulkancts/framework/vulkan/vkMemUtil.cpp +++ b/external/vulkancts/framework/vulkan/vkMemUtil.cpp @@ -247,7 +247,7 @@ MovePtr SimpleAllocator::allocate (const VkMemoryRequirements& memRe if (requirement & MemoryRequirement::HostVisible) { DE_ASSERT(isHostVisibleMemory(m_memProps, allocInfo.memoryTypeIndex)); - hostPtr = MovePtr(new HostPtr(m_vk, m_device, *mem, offset, allocInfo.allocationSize, 0u)); + hostPtr = MovePtr(new HostPtr(m_vk, m_device, *mem, offset, memReqs.size, 0u)); } return MovePtr(new SimpleAllocation(mem, hostPtr, offset)); -- 2.7.4