nvk: Allocate the correct VAB size on Kepler

We were allocating 128 KiB but claimed 256 KiB.  Allocate the right size
and assert that the size matches.

Fixes: 970bd70584 ("nvk: allocate VAB memory area")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35172>
(cherry picked from commit 9fe2a21e93)
This commit is contained in:
Faith Ekstrand 2025-05-26 21:59:31 -04:00 committed by Eric Engestrom
parent a110ef1391
commit 5c56ee02a8
3 changed files with 3 additions and 2 deletions

View file

@ -954,7 +954,7 @@
"description": "nvk: Allocate the correct VAB size on Kepler",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "970bd70584610b26198af9736e3b1a30b1373366",
"notes": null

View file

@ -530,6 +530,7 @@ nvk_push_draw_state_init(struct nvk_queue *queue, struct nv_push *p)
P_MTHD(p, NV9097, SET_VAB_MEMORY_AREA_A);
P_NV9097_SET_VAB_MEMORY_AREA_A(p, vab_addr >> 32);
P_NV9097_SET_VAB_MEMORY_AREA_B(p, vab_addr);
assert(dev->vab_memory->va->size_B == 256 * 1024);
P_NV9097_SET_VAB_MEMORY_AREA_C(p, SIZE_BYTES_256K);
}

View file

@ -234,7 +234,7 @@ nvk_CreateDevice(VkPhysicalDevice physicalDevice,
pdev->info.cls_eng3d < MAXWELL_A) {
/* max size is 256k */
result = nvkmd_dev_alloc_mem(dev->nvkmd, &pdev->vk.base,
1 << 17, 1 << 20, NVKMD_MEM_LOCAL,
256 * 1024, 0, NVKMD_MEM_LOCAL,
&dev->vab_memory);
if (result != VK_SUCCESS)
goto fail_slm;