Skip to content

Commit

Permalink
nv2a: Ignore color/depth mask in CLEAR_SURFACE
Browse files Browse the repository at this point in the history
  • Loading branch information
abaire committed Feb 17, 2022
1 parent 75dba5c commit a16eea7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hw/xbox/nv2a/pgraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a16eea7

Please sign in to comment.