summaryrefslogtreecommitdiffstats
path: root/src/freedreno/vulkan/tu_device.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2018-12-20 22:57:07 +0100
committerChia-I Wu <[email protected]>2019-03-11 10:01:41 -0700
commit426f6e46a80a12fdb47ab04cd657ddc28bf1d60d (patch)
tree58804d5ad621e990961a26e2e4bc04cdadbe2b0d /src/freedreno/vulkan/tu_device.c
parentf0a24e123faf3e3ad9db1146b2fc2082072030c8 (diff)
turnip: Fix bo allocation after we stopped using libdrm_freedreno ...
Al this figuring out new errors is why I don't like reinventing the wheel.
Diffstat (limited to 'src/freedreno/vulkan/tu_device.c')
-rw-r--r--src/freedreno/vulkan/tu_device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c
index 588f2e83f91..4d676d9147a 100644
--- a/src/freedreno/vulkan/tu_device.c
+++ b/src/freedreno/vulkan/tu_device.c
@@ -89,11 +89,11 @@ tu_bo_init_new(struct tu_device *dev, struct tu_bo *bo, uint64_t size)
*/
/* TODO: Do we need 'offset' if we have 'iova'? */
- uint64_t offset = tu_gem_info_offset(dev, bo->gem_handle);
+ uint64_t offset = tu_gem_info_offset(dev, gem_handle);
if (!offset)
goto fail_info;
- uint64_t iova = tu_gem_info_iova(dev, bo->gem_handle);
+ uint64_t iova = tu_gem_info_iova(dev, gem_handle);
if (!iova)
goto fail_info;
@@ -1312,7 +1312,7 @@ tu_alloc_memory(struct tu_device *device,
return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY);
result = tu_bo_init_new(device, &mem->bo, pAllocateInfo->allocationSize);
- if (!result) {
+ if (result != VK_SUCCESS) {
vk_free2(&device->alloc, pAllocator, mem);
return result;
}