zink: use samples from state
There's no reason to compute this, when it's already passed in. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5141>
This commit is contained in:

committed by
Marge Bot

parent
fcbc022787
commit
e38513e828
@@ -630,12 +630,6 @@ zink_set_framebuffer_state(struct pipe_context *pctx,
|
||||
struct zink_context *ctx = zink_context(pctx);
|
||||
struct zink_screen *screen = zink_screen(pctx->screen);
|
||||
|
||||
VkSampleCountFlagBits rast_samples = VK_SAMPLE_COUNT_1_BIT;
|
||||
for (int i = 0; i < state->nr_cbufs; i++)
|
||||
rast_samples = MAX2(rast_samples, state->cbufs[i]->texture->nr_samples);
|
||||
if (state->zsbuf && state->zsbuf->texture->nr_samples)
|
||||
rast_samples = MAX2(rast_samples, state->zsbuf->texture->nr_samples);
|
||||
|
||||
util_copy_framebuffer_state(&ctx->fb_state, state);
|
||||
|
||||
struct zink_framebuffer *fb = ctx->framebuffer;
|
||||
@@ -646,7 +640,7 @@ zink_set_framebuffer_state(struct pipe_context *pctx,
|
||||
zink_framebuffer_reference(screen, &ctx->framebuffer, fb);
|
||||
zink_render_pass_reference(screen, &ctx->gfx_pipeline_state.render_pass, fb->rp);
|
||||
|
||||
ctx->gfx_pipeline_state.rast_samples = rast_samples;
|
||||
ctx->gfx_pipeline_state.rast_samples = MAX2(state->samples, 1);
|
||||
ctx->gfx_pipeline_state.num_attachments = state->nr_cbufs;
|
||||
|
||||
struct zink_batch *batch = zink_batch_no_rp(ctx);
|
||||
|
Reference in New Issue
Block a user