anv: fix assert in memory budget code when extension is not supported
First we should only support the extension if we can support reporting on all the heaps. Second we should not run any query code if the extension is not supported. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Fixes:fae88d8791
("anv: make use of the new smallbar uAPI") Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18153> (cherry picked from commitb8c472c111
)
This commit is contained in:

committed by
Dylan Baker

parent
123ece43a4
commit
ec1d48938c
@@ -12001,7 +12001,7 @@
|
||||
"description": "anv: fix assert in memory budget code when extension is not supported",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "fae88d8791b2903771c85958903ee81080b66aec"
|
||||
},
|
||||
|
@@ -285,7 +285,12 @@ get_device_extensions(const struct anv_physical_device *device,
|
||||
.EXT_index_type_uint8 = true,
|
||||
.EXT_inline_uniform_block = true,
|
||||
.EXT_line_rasterization = true,
|
||||
.EXT_memory_budget = device->sys.available,
|
||||
/* Enable the extension only if we have support on both the local &
|
||||
* system memory
|
||||
*/
|
||||
.EXT_memory_budget = (!device->info.has_local_mem ||
|
||||
device->vram_mappable.available > 0) &&
|
||||
device->sys.available,
|
||||
.EXT_non_seamless_cube_map = true,
|
||||
.EXT_pci_bus_info = true,
|
||||
.EXT_physical_device_drm = true,
|
||||
@@ -2752,6 +2757,9 @@ anv_get_memory_budget(VkPhysicalDevice physicalDevice,
|
||||
{
|
||||
ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
|
||||
|
||||
if (!device->vk.supported_extensions.EXT_memory_budget)
|
||||
return;
|
||||
|
||||
anv_update_meminfo(device, device->local_fd);
|
||||
|
||||
VkDeviceSize total_sys_heaps_size = 0, total_vram_heaps_size = 0;
|
||||
|
Reference in New Issue
Block a user