nv2a/vk: Ensure pg->clearing set before pgraph_vk_surface_update

This commit is contained in:
Matt Borgerson 2024-07-27 14:29:38 -07:00 committed by mborgerson
parent 28092ad13b
commit 374eada8ef
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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 =