diff --git a/.pick_status.json b/.pick_status.json index aa6dcd0bf01..d48193f4ee1 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -464,7 +464,7 @@ "description": "anv: Don't report more memory available than the heap size", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 1b1c7fba3dc..e887e9e2f78 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -2760,7 +2760,7 @@ anv_get_memory_budget(VkPhysicalDevice physicalDevice, } } else { total_heaps_size = total_sys_heaps_size; - mem_available = device->sys.available; + mem_available = MIN2(device->sys.available, total_heaps_size); } double heap_proportion = (double) heap_size / total_heaps_size;