mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 21:40:20 +01:00
nvk: Use MEM_LOCAL for nvk_cmd_mem_create
It is safe to allocate command buffer memory as MEM_LOCAL (VRAM or GART) when we can map GPU memory (we trust NVKMD to force GART). This reduces latency on pyrowave for compute dispatch (~1.90ms -> ~1.48ms), likely as QMD and the root tables should not have been in GART in the first place. Signed-off-by: Mary Guillemard <mary@mary.zone> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36970>
This commit is contained in:
parent
5d77057ff6
commit
becccebd21
1 changed files with 3 additions and 3 deletions
|
|
@ -21,9 +21,9 @@ nvk_cmd_mem_create(struct nvk_cmd_pool *pool, bool force_gart, struct nvk_cmd_me
|
|||
if (mem == NULL)
|
||||
return vk_error(pool, VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||
|
||||
uint32_t flags = NVKMD_MEM_GART;
|
||||
if (force_gart)
|
||||
assert(flags & NVKMD_MEM_GART);
|
||||
const uint32_t flags = force_gart ? NVKMD_MEM_GART
|
||||
: NVKMD_MEM_LOCAL;
|
||||
|
||||
result = nvkmd_dev_alloc_mapped_mem(dev->nvkmd, &pool->vk.base,
|
||||
NVK_CMD_MEM_SIZE, 0,
|
||||
flags, NVKMD_MEM_MAP_WR,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue