From a6cd0c211086e2b1acce0d0197833806df1d57eb Mon Sep 17 00:00:00 2001 From: Erik Abair Date: Wed, 6 Apr 2022 16:07:58 -0700 Subject: [PATCH] nv2a: Prevent GPU download after blit operation --- hw/xbox/nv2a/pgraph.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/xbox/nv2a/pgraph.c b/hw/xbox/nv2a/pgraph.c index f4d07f7ef11..bac7151e9b8 100644 --- a/hw/xbox/nv2a/pgraph.c +++ b/hw/xbox/nv2a/pgraph.c @@ -872,6 +872,11 @@ static void pgraph_image_blit(NV2AState *d) if (image_blit->height < surf_dest->height || image_blit->width < surf_dest->width) { pgraph_download_surface_data_if_dirty(d, surf_dest); + } else { + // The blit will completely replace the surface so any pending + // download should be discarded. + surf_dest->download_pending = false; + surf_dest->draw_dirty = false; } surf_dest->upload_pending = true; }