From: Bas Nieuwenhuizen Date: Thu, 20 Dec 2018 23:54:15 +0000 (+0100) Subject: turnip: Fix memory mapping. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=603354cffa8d98c049ff20567164061e8a4fec17;p=mesa.git turnip: Fix memory mapping. --- 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;