zink: pass rt attrib to zink_render_pass_attachment_get_barrier_info()
no functional changes Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
This commit is contained in:
committed by
Marge Bot
parent
079b95fc6a
commit
69efe357b3
@@ -2032,8 +2032,8 @@ zink_prep_fb_attachment(struct zink_context *ctx, struct zink_surface *surf, uns
|
||||
if (!i)
|
||||
zink_update_fbfetch(ctx);
|
||||
}
|
||||
VkImageLayout layout = zink_render_pass_attachment_get_barrier_info(ctx->gfx_pipeline_state.render_pass,
|
||||
i, &pipeline, &access);
|
||||
VkImageLayout layout = zink_render_pass_attachment_get_barrier_info(&ctx->gfx_pipeline_state.render_pass->state.rts[i],
|
||||
i < ctx->fb_state.nr_cbufs, &pipeline, &access);
|
||||
zink_resource_image_barrier(ctx, res, layout, access, pipeline);
|
||||
if (i == ctx->fb_state.nr_cbufs && res->bind_count[0] && res->bind_count[0] != res->image_bind_count[0]) {
|
||||
unsigned find = res->bind_count[0] - res->image_bind_count[0];
|
||||
|
||||
@@ -242,13 +242,11 @@ zink_destroy_render_pass(struct zink_screen *screen,
|
||||
}
|
||||
|
||||
VkImageLayout
|
||||
zink_render_pass_attachment_get_barrier_info(const struct zink_render_pass *rp, unsigned idx,
|
||||
zink_render_pass_attachment_get_barrier_info(const struct zink_rt_attrib *rt, bool color,
|
||||
VkPipelineStageFlags *pipeline, VkAccessFlags *access)
|
||||
{
|
||||
*access = 0;
|
||||
assert(idx < rp->state.num_rts);
|
||||
const struct zink_rt_attrib *rt = &rp->state.rts[idx];
|
||||
if (idx < rp->state.num_cbufs) {
|
||||
if (color) {
|
||||
*pipeline = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
||||
*access |= VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
|
||||
if (!rt->clear_color && !rt->swapchain)
|
||||
@@ -256,7 +254,6 @@ zink_render_pass_attachment_get_barrier_info(const struct zink_render_pass *rp,
|
||||
return rt->fbfetch ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
||||
}
|
||||
|
||||
assert(rp->state.have_zsbuf);
|
||||
*pipeline = VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT;
|
||||
if (rt->mixed_zs) {
|
||||
*access |= VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
|
||||
|
||||
@@ -95,7 +95,7 @@ void
|
||||
zink_end_render_pass(struct zink_context *ctx);
|
||||
|
||||
VkImageLayout
|
||||
zink_render_pass_attachment_get_barrier_info(const struct zink_render_pass *rp, unsigned idx, VkPipelineStageFlags *pipeline, VkAccessFlags *access);
|
||||
zink_render_pass_attachment_get_barrier_info(const struct zink_rt_attrib *rt, bool color, VkPipelineStageFlags *pipeline, VkAccessFlags *access);
|
||||
|
||||
bool
|
||||
zink_init_render_pass(struct zink_context *ctx);
|
||||
|
||||
Reference in New Issue
Block a user