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>
This commit is contained in:
Faith Ekstrand
2025-05-26 21:59:31 -04:00
parent 4bab33db20
commit 9fe2a21e93
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -576,6 +576,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);
}
+1 -1
View File
@@ -243,7 +243,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;