nv2a: Ignore color/depth mask in CLEAR_SURFACE

This commit is contained in:
Erik Abair 2022-02-17 13:55:53 -08:00 committed by mborgerson
parent 6dbd51fbe1
commit 440f4c53ec
1 changed files with 3 additions and 3 deletions

View File

@ -5924,9 +5924,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);