zink: add some breadcrumbs for VK_EXT_multisampled_render_to_single_sampled

at some point someone should hook this extension up to simplify/optimize
the existing msrtt handling

see also #7559

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19307>
This commit is contained in:
Mike Blumenkrantz
2022-10-25 13:53:52 -04:00
committed by Marge Bot
parent 919cbc190d
commit 1e63b24f88
3 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -675,7 +675,7 @@ zink_begin_render_pass(struct zink_context *ctx)
setup_framebuffer(ctx);
if (ctx->batch.in_rp)
return 0;
/* TODO: need replicate EXT */
/* TODO: use VK_EXT_multisampled_render_to_single_sampled */
if (ctx->framebuffer->rp->state.msaa_expand_mask) {
uint32_t rp_state = ctx->gfx_pipeline_state.rp_state;
struct zink_render_pass *rp = ctx->gfx_pipeline_state.render_pass;
@@ -719,6 +719,7 @@ zink_end_render_pass(struct zink_context *ctx)
{
if (ctx->batch.in_rp) {
VKCTX(CmdEndRenderPass)(ctx->batch.state->cmdbuf);
/* TODO: use VK_EXT_multisampled_render_to_single_sampled */
for (unsigned i = 0; i < ctx->fb_state.nr_cbufs; i++) {
struct zink_ctx_surface *csurf = (struct zink_ctx_surface*)ctx->fb_state.cbufs[i];
if (csurf)
+1
View File
@@ -283,6 +283,7 @@ zink_create_surface(struct pipe_context *pctx,
struct zink_ctx_surface *csurf = (struct zink_ctx_surface*)wrap_surface(pctx, psurf);
/* TODO: use VK_EXT_multisampled_render_to_single_sampled and skip this entirely */
if (templ->nr_samples) {
/* transient fb attachment: not cached */
struct pipe_resource rtempl = *pres;
+3 -3
View File
@@ -1325,9 +1325,9 @@ struct zink_surface {
struct zink_ctx_surface {
struct pipe_surface base;
struct zink_surface *surf;
struct zink_ctx_surface *transient; //zink_ctx_surface
/* TODO: need replicate EXT */
bool transient_init;
/* TODO: use VK_EXT_multisampled_render_to_single_sampled */
struct zink_ctx_surface *transient; //for use with EXT_multisample_render_to_texture
bool transient_init; //whether the transient surface has data
};
/* use this cast for framebuffer surfaces */