From aec2883c6b239cb4725d38d02f85e92df6598b67 Mon Sep 17 00:00:00 2001 From: Erik Abair Date: Tue, 10 May 2022 17:56:58 -0700 Subject: [PATCH] nv2a: Process pending surface uploads before render to texture --- hw/xbox/nv2a/pgraph.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/xbox/nv2a/pgraph.c b/hw/xbox/nv2a/pgraph.c index 8b5b6c3e6b..f4d07f7ef1 100644 --- a/hw/xbox/nv2a/pgraph.c +++ b/hw/xbox/nv2a/pgraph.c @@ -6327,7 +6327,11 @@ static void pgraph_bind_textures(NV2AState *d) SurfaceBinding *surface = pgraph_surface_get(d, texture_vram_offset); if (surface != NULL) { surf_to_tex = pgraph_check_surface_to_texture_compatibility( - surface, &state); + surface, &state); + + if (surf_to_tex && surface->upload_pending) { + pgraph_upload_surface_data(d, surface, false); + } } if (!surf_to_tex) {