nvk: Don't advertise BAR memory for Kepler cards

Previously the driver would advertize the memory heap for BAR memory,
but no memory type to use it. This would cause a lot of crashes for
programs using the driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35151>
This commit is contained in:
Lorenzo Rossi 2025-05-25 12:19:12 +02:00 committed by Marge Bot
parent b519cb80a6
commit a427f540e5

View file

@ -1422,7 +1422,8 @@ nvk_create_drm_physical_device(struct vk_instance *_instance,
};
if (pdev->info.bar_size_B > 0 &&
pdev->info.bar_size_B < pdev->info.vram_size_B) {
pdev->info.bar_size_B < pdev->info.vram_size_B &&
pdev->info.cls_eng3d >= MAXWELL_A) {
bar_heap_idx = pdev->mem_heap_count++;
pdev->mem_heaps[bar_heap_idx] = (struct nvk_memory_heap) {
.size = pdev->info.bar_size_B,