anv: Silence warning about heap_size.
authorEric Anholt <eric@anholt.net>
Sat, 10 Feb 2018 11:25:48 +0000 (11:25 +0000)
committerEric Anholt <eric@anholt.net>
Fri, 16 Mar 2018 22:10:05 +0000 (15:10 -0700)
We only get VK_SUCCESS if it was initialized, but apparently my compiler
doesn't track that far.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_device.c

index 82b237e76d8f83b82bc67e5859435329b34d2f66..4cacba93430bb971c6bd22a840dad4e948405924 100644 (file)
@@ -110,7 +110,7 @@ anv_physical_device_init_heaps(struct anv_physical_device *device, int fd)
    device->supports_48bit_addresses =
       (device->info.gen >= 8) && anv_gem_supports_48b_addresses(fd);
 
-   uint64_t heap_size;
+   uint64_t heap_size = 0;
    VkResult result = anv_compute_heap_size(fd, &heap_size);
    if (result != VK_SUCCESS)
       return result;