zink: add renderpass bits for color/depth r/w

these are different renderpasses according to compatibility rules

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16621>
This commit is contained in:
Mike Blumenkrantz 2022-05-19 19:40:07 -04:00 committed by Marge Bot
parent f4aa727e44
commit 8fef8ed1b0
2 changed files with 10 additions and 1 deletions

View file

@ -155,6 +155,12 @@ create_render_pass2(struct zink_screen *screen, struct zink_render_pass_state *s
}
pstate->num_attachments++;
}
if (dep_access & VK_ACCESS_COLOR_ATTACHMENT_READ_BIT)
pstate->color_read = true;
if (dep_access & VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT)
pstate->depth_read = true;
if (dep_access & VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT)
pstate->depth_write = true;
if (!screen->info.have_KHR_synchronization2)
dep_pipeline = MAX2(dep_pipeline, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT);

View file

@ -65,8 +65,11 @@ struct zink_pipeline_rt {
};
struct zink_render_pass_pipeline_state {
uint32_t num_attachments:25;
uint32_t num_attachments:22;
uint32_t fbfetch:1;
uint32_t color_read:1;
uint32_t depth_read:1;
uint32_t depth_write:1;
uint32_t num_cresolves:4;
uint32_t num_zsresolves:1;
bool samples:1; //for fs samplemask