va_end(args);
}
-static VkResult
-anv_compute_heap_size(int fd, uint64_t gtt_size, uint64_t *heap_size)
+static uint64_t
+anv_compute_heap_size(int fd, uint64_t gtt_size)
{
/* Query the total ram from the system */
struct sysinfo info;
*/
uint64_t available_gtt = gtt_size * 3 / 4;
- *heap_size = MIN2(available_ram, available_gtt);
-
- return VK_SUCCESS;
+ return MIN2(available_ram, available_gtt);
}
static VkResult
device->supports_48bit_addresses = (device->info.gen >= 8) &&
gtt_size > (4ULL << 30 /* GiB */);
- uint64_t heap_size = 0;
- VkResult result = anv_compute_heap_size(fd, gtt_size, &heap_size);
- if (result != VK_SUCCESS)
- return result;
+ uint64_t heap_size = anv_compute_heap_size(fd, gtt_size);
if (heap_size > (2ull << 30) && !device->supports_48bit_addresses) {
/* When running with an overridden PCI ID, we may get a GTT size from