mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
zink: directly set batch->state->flush_res from flush_resource hook
there's no need to have an intermediate pointer here since that only
complicates keeping scanout synchronized
this also eliminates the pointer on the context since it isn't used anymore
Fixes: 104603fa76 ("zink: create separate linear tiling image for scanout")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>
This commit is contained in:
parent
7af40bb595
commit
be6532ecdf
2 changed files with 1 additions and 6 deletions
|
|
@ -1722,10 +1722,6 @@ zink_flush(struct pipe_context *pctx,
|
|||
/* start rp to do all the clears */
|
||||
zink_begin_render_pass(ctx, batch);
|
||||
zink_end_render_pass(ctx, batch);
|
||||
if (ctx->flush_res) {
|
||||
batch->state->flush_res = ctx->flush_res;
|
||||
ctx->flush_res = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (!batch->has_work) {
|
||||
|
|
@ -2071,7 +2067,7 @@ zink_flush_resource(struct pipe_context *pctx,
|
|||
* WSI support is added
|
||||
*/
|
||||
if (pres->bind & (PIPE_BIND_SHARED | PIPE_BIND_SCANOUT))
|
||||
ctx->flush_res = zink_resource(pres);
|
||||
ctx->batch.state->flush_res = zink_resource(pres);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -181,7 +181,6 @@ struct zink_context {
|
|||
|
||||
struct primconvert_context *primconvert;
|
||||
|
||||
struct zink_resource *flush_res;
|
||||
struct zink_framebuffer *framebuffer;
|
||||
struct zink_framebuffer_clear fb_clears[PIPE_MAX_COLOR_BUFS + 1];
|
||||
uint16_t clears_enabled;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue