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:
committed by
Marge Bot
parent
919cbc190d
commit
1e63b24f88
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user