nvk: use 2k overallocation for shader heap.

NVIDIA has informed us via Arthur (and Ben) that 2K
is sufficient here, so move nvk to use that.

Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29746>
This commit is contained in:
Dave Airlie
2024-06-17 07:15:53 +10:00
parent c7c3942786
commit fcf5946828
+3 -3
View File
@@ -183,15 +183,15 @@ nvk_CreateDevice(VkPhysicalDevice physicalDevice,
/* If we have a full BAR, go ahead and do shader uploads on the CPU.
* Otherwise, we fall back to doing shader uploads via the upload queue.
*
* Also, the I-cache pre-fetches and we don't really know by how much.
* Over-allocating shader BOs by 4K ensures we don't run past.
* Also, the I-cache pre-fetches and NVIDIA has informed us
* overallocating shaders BOs by 2K is sufficient.
*/
enum nvkmd_mem_map_flags shader_map_flags = 0;
if (pdev->info.bar_size_B >= pdev->info.vram_size_B)
shader_map_flags = NVKMD_MEM_MAP_WR;
result = nvk_heap_init(dev, &dev->shader_heap,
NVKMD_MEM_LOCAL, shader_map_flags,
4096 /* overalloc */,
2048 /* overalloc */,
pdev->info.cls_eng3d < VOLTA_A);
if (result != VK_SUCCESS)
goto fail_samplers;