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>
This commit is contained in:

committed by
Marge Bot

parent
4ab38112f3
commit
b8c472c111
@@ -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,
|
||||
@@ -2747,6 +2752,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