diff --git a/hw/xbox/nv2a/pgraph.c b/hw/xbox/nv2a/pgraph.c index f556821110c..d4191f1d686 100644 --- a/hw/xbox/nv2a/pgraph.c +++ b/hw/xbox/nv2a/pgraph.c @@ -5990,9 +5990,9 @@ static void pgraph_update_surface(NV2AState *d, bool upload, pg->surface_shape.z_format = GET_MASK(pg->regs[NV_PGRAPH_SETUPRASTER], NV_PGRAPH_SETUPRASTER_Z_FORMAT); - /* FIXME: Does this apply to CLEARs too? */ - color_write = color_write && pgraph_color_write_enabled(pg); - zeta_write = zeta_write && pgraph_zeta_write_enabled(pg); + color_write = color_write && + (pg->clearing || pgraph_color_write_enabled(pg)); + zeta_write = zeta_write && (pg->clearing || pgraph_zeta_write_enabled(pg)); if (upload) { bool fb_dirty = pgraph_framebuffer_dirty(pg);