From 4cd4153937978aa92c2a20a1a7f4461c1f0aed80 Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Thu, 14 Nov 2024 01:33:22 -0700 Subject: [PATCH] nv2a/vk: Move reg dirty clear into create_pipeline --- hw/xbox/nv2a/pgraph/vk/draw.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/xbox/nv2a/pgraph/vk/draw.c b/hw/xbox/nv2a/pgraph/vk/draw.c index 99e7f65e1b..ffc2c241c8 100644 --- a/hw/xbox/nv2a/pgraph/vk/draw.c +++ b/hw/xbox/nv2a/pgraph/vk/draw.c @@ -707,7 +707,12 @@ static void create_pipeline(PGRAPHState *pg) // FIXME: If nothing was dirty, don't even try creating the key or hashing. // Just use the same pipeline. - if (r->pipeline_binding && !check_pipeline_dirty(pg)) { + bool pipeline_dirty = check_pipeline_dirty(pg); + + pgraph_clear_dirty_reg_map(pg); + // FIXME: We could clear less + + if (r->pipeline_binding && !pipeline_dirty) { NV2A_VK_DPRINTF("Cache hit"); NV2A_VK_DGROUP_END(); return; @@ -1528,9 +1533,6 @@ static void end_draw(PGRAPHState *pg) } r->in_draw = false; - - // FIXME: We could clear less - pgraph_clear_dirty_reg_map(pg); } void pgraph_vk_draw_end(NV2AState *d)