From 603354cffa8d98c049ff20567164061e8a4fec17 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Fri, 21 Dec 2018 00:54:15 +0100 Subject: [PATCH] turnip: Fix memory mapping. --- src/freedreno/vulkan/tu_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index 4d676d9147a..b5a8a6f13bc 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -124,6 +124,7 @@ tu_bo_map(struct tu_device *dev, struct tu_bo *bo) if (map == MAP_FAILED) return vk_error(dev->instance, VK_ERROR_MEMORY_MAP_FAILED); + bo->map = map; return VK_SUCCESS; } @@ -1376,7 +1377,7 @@ tu_MapMemory(VkDevice _device, result = tu_bo_map(device, &mem->bo); if (result != VK_SUCCESS) return result; - mem->map = mem->bo.map; + *ppData = mem->map = mem->bo.map; } else *ppData = mem->map; -- 2.30.2