From 99c226b8337b8e13530f0321065d9f16406f65f4 Mon Sep 17 00:00:00 2001 From: Mary Guillemard Date: Sat, 4 Oct 2025 12:18:35 +0200 Subject: [PATCH] nvk: Set VAF eviction policy to nornmal NVIDIA proprietary driver does that, we were missing this and possibly making the VAF (Vertex Attribute Fetch) unit evict the first entry instead if nothing was setting it. The golden ctx already set it for us at least on Ada but for consistency let's make sure it's set here in case this is different on other generations. Signed-off-by: Mary Guillemard Reviewed-by: Mel Henning Tested-by: Thomas H.P. Andersen Part-of: --- src/nouveau/vulkan/nvk_cmd_draw.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nouveau/vulkan/nvk_cmd_draw.c b/src/nouveau/vulkan/nvk_cmd_draw.c index 331cb61d3ae..44ad89f917f 100644 --- a/src/nouveau/vulkan/nvk_cmd_draw.c +++ b/src/nouveau/vulkan/nvk_cmd_draw.c @@ -330,6 +330,10 @@ nvk_push_draw_state_init(struct nvk_queue *queue, struct nv_push *p) if (pdev->info.cls_eng3d < MAXWELL_A) P_IMMD(p, NV9097, SET_SHADER_SCHEDULING, MODE_OLDEST_THREAD_FIRST); + P_IMMD(p, NV9097, SET_L2_CACHE_CONTROL_FOR_VAF_REQUESTS, { + .system_memory_volatile = false, + .policy = POLICY_EVICT_NORMAL, + }); P_IMMD(p, NV9097, SET_L2_CACHE_CONTROL_FOR_ROP_PREFETCH_READ_REQUESTS, POLICY_EVICT_NORMAL); P_IMMD(p, NV9097, SET_L2_CACHE_CONTROL_FOR_ROP_NONINTERLOCKED_READ_REQUESTS,