mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
zink: disable queries for clear_texture()
this otherwise can do weird things
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21628>
(cherry picked from commit f7d1fff23f)
This commit is contained in:
parent
3fb500f802
commit
87fe5d26e3
2 changed files with 5 additions and 1 deletions
|
|
@ -3910,7 +3910,7 @@
|
|||
"description": "zink: disable queries for clear_texture()",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -455,8 +455,10 @@ zink_clear_texture(struct pipe_context *pctx,
|
|||
util_blitter_save_framebuffer(ctx->blitter, &ctx->fb_state);
|
||||
set_clear_fb(pctx, surf, NULL);
|
||||
ctx->blitting = true;
|
||||
ctx->queries_disabled = true;
|
||||
pctx->clear(pctx, PIPE_CLEAR_COLOR0, &scissor, &color, 0, 0);
|
||||
util_blitter_restore_fb_state(ctx->blitter);
|
||||
ctx->queries_disabled = false;
|
||||
ctx->blitting = false;
|
||||
} else {
|
||||
float depth = 0.0;
|
||||
|
|
@ -477,8 +479,10 @@ zink_clear_texture(struct pipe_context *pctx,
|
|||
util_blitter_save_framebuffer(ctx->blitter, &ctx->fb_state);
|
||||
ctx->blitting = true;
|
||||
set_clear_fb(pctx, NULL, surf);
|
||||
ctx->queries_disabled = true;
|
||||
pctx->clear(pctx, flags, &scissor, NULL, depth, stencil);
|
||||
util_blitter_restore_fb_state(ctx->blitter);
|
||||
ctx->queries_disabled = false;
|
||||
ctx->blitting = false;
|
||||
}
|
||||
/* this will never destroy the surface */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue