mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
zink: flush clears before toggling color write
ensure these sync up onto the expected buffers
Fixes: 3892c13381 ("zink: add an alternate path for EXT_color_write_enable usage")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15568>
This commit is contained in:
parent
4c6931fca9
commit
6980eb4be2
1 changed files with 3 additions and 0 deletions
|
|
@ -2577,6 +2577,9 @@ zink_set_color_write_enables(struct zink_context *ctx)
|
|||
bool disable_color_writes = ctx->rast_state && ctx->rast_state->base.rasterizer_discard && ctx->primitives_generated_active;
|
||||
if (ctx->disable_color_writes == disable_color_writes)
|
||||
return;
|
||||
/* flush all pending clears: these have already occurred */
|
||||
if (disable_color_writes && ctx->clears_enabled)
|
||||
zink_batch_rp(ctx);
|
||||
ctx->disable_color_writes = disable_color_writes;
|
||||
if (zink_screen(ctx->base.screen)->driver_workarounds.color_write_missing) {
|
||||
/* use dummy color buffers instead of the more sane option */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue