Mesa (master): zink: use samples from state
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon May 25 20:33:45 UTC 2020
Module: Mesa
Branch: master
Commit: e38513e828df239b4ea06f50af9cecf78305eb37
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e38513e828df239b4ea06f50af9cecf78305eb37
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Wed May 20 14:39:35 2020 +0200
zink: use samples from state
There's no reason to compute this, when it's already passed in.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5141>
---
src/gallium/drivers/zink/zink_context.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 323f87e27ac..c5137b1dec8 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -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);
More information about the mesa-commit
mailing list