diff --git a/hw/xbox/nv2a/pgraph/pgraph.h b/hw/xbox/nv2a/pgraph/pgraph.h index 634f15c8ad..64b671e71d 100644 --- a/hw/xbox/nv2a/pgraph/pgraph.h +++ b/hw/xbox/nv2a/pgraph/pgraph.h @@ -224,7 +224,7 @@ typedef struct PGRAPHState { uint32_t regs_[0x2000]; DECLARE_BITMAP(regs_dirty, 0x2000 / sizeof(uint32_t)); - bool clearing; + bool clearing; // FIXME: Internal bool waiting_for_nop; bool waiting_for_flip; bool waiting_for_context_switch; diff --git a/hw/xbox/nv2a/pgraph/vk/draw.c b/hw/xbox/nv2a/pgraph/vk/draw.c index 1fa5fba82c..1edcf94680 100644 --- a/hw/xbox/nv2a/pgraph/vk/draw.c +++ b/hw/xbox/nv2a/pgraph/vk/draw.c @@ -1673,16 +1673,18 @@ void pgraph_vk_clear_surface(NV2AState *d, uint32_t parameter) bool write_zeta = (parameter & (NV097_CLEAR_SURFACE_Z | NV097_CLEAR_SURFACE_STENCIL)); + pg->clearing = true; + // FIXME: If doing a full surface clear, mark the surface for full clear // and we can just do the clear as part of the surface load. pgraph_vk_surface_update(d, true, write_color, write_zeta); if (!(r->color_binding || r->zeta_binding)) { /* Nothing bound to clear */ + pg->clearing = false; return; } - pg->clearing = true; r->clear_parameter = parameter; unsigned int xmin =