mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 03:00:24 +01:00
zink: simplify zink_framebuffer_clear_data union
no functional changes Acked-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
This commit is contained in:
parent
7754041ed6
commit
ac38139c34
4 changed files with 6 additions and 8 deletions
|
|
@ -243,7 +243,7 @@ zink_clear(struct pipe_context *pctx,
|
|||
if (scissor_state && needs_rp)
|
||||
clear->scissor = *scissor_state;
|
||||
for (unsigned i = 0; i < 4; i++)
|
||||
clamp_color(desc, &clear->color.color, pcolor, i);
|
||||
clamp_color(desc, &clear->color, pcolor, i);
|
||||
if (zink_fb_clear_first_needs_explicit(fb_clear))
|
||||
ctx->rp_clears_enabled &= ~(PIPE_CLEAR_COLOR0 << i);
|
||||
else
|
||||
|
|
@ -312,7 +312,7 @@ zink_clear_framebuffer(struct zink_context *ctx, unsigned clear_buffers)
|
|||
goto out;
|
||||
|
||||
/* colors don't match, fire this one off */
|
||||
if (!colors_equal(&a->color.color, &b->color.color))
|
||||
if (!colors_equal(&a->color, &b->color))
|
||||
goto out;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -356,7 +356,7 @@ out:
|
|||
}
|
||||
zink_clear(&ctx->base, clear_bits,
|
||||
clear->has_scissor ? &clear->scissor : NULL,
|
||||
&clear->color.color,
|
||||
&clear->color,
|
||||
zsclear ? zsclear->zs.depth : 0,
|
||||
zsclear ? zsclear->zs.stencil : 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,9 +34,7 @@ struct zink_resource;
|
|||
|
||||
struct zink_framebuffer_clear_data {
|
||||
union {
|
||||
struct {
|
||||
union pipe_color_union color;
|
||||
} color;
|
||||
union pipe_color_union color;
|
||||
struct {
|
||||
float depth;
|
||||
unsigned stencil;
|
||||
|
|
|
|||
|
|
@ -2240,7 +2240,7 @@ begin_rendering(struct zink_context *ctx)
|
|||
continue;
|
||||
}
|
||||
/* we now know there's one clear that can be done here */
|
||||
memcpy(&ctx->dynamic_fb.attachments[i].clearValue, &clear->color.color, sizeof(float) * 4);
|
||||
memcpy(&ctx->dynamic_fb.attachments[i].clearValue, &clear->color, sizeof(float) * 4);
|
||||
ctx->dynamic_fb.attachments[i].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
|
||||
}
|
||||
if (ctx->fb_state.zsbuf && zink_fb_clear_enabled(ctx, PIPE_MAX_COLOR_BUFS)) {
|
||||
|
|
|
|||
|
|
@ -528,7 +528,7 @@ begin_render_pass(struct zink_context *ctx)
|
|||
continue;
|
||||
}
|
||||
/* we now know there's one clear that can be done here */
|
||||
memcpy(&clears[i].color, &clear->color.color, sizeof(float) * 4);
|
||||
memcpy(&clears[i].color, &clear->color, sizeof(float) * 4);
|
||||
rpbi.clearValueCount = i + 1;
|
||||
clear_validate |= PIPE_CLEAR_COLOR0 << i;
|
||||
assert(ctx->framebuffer->rp->state.clears);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue