Mesa (master): zink: use correct number of samples on framebuffer in set_framebuffer_state

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Sep 24 20:39:47 UTC 2020


Module: Mesa
Branch: master
Commit: e30367a27361bc561c2d1ab513f7d522ce9ada33
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e30367a27361bc561c2d1ab513f7d522ce9ada33

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Sun Jun 14 00:32:25 2020 -0400

zink: use correct number of samples on framebuffer in set_framebuffer_state

state->samples doesn't necessarily reflect the correct value here, so we need
to use the util function

Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6263>

---

 src/gallium/drivers/zink/zink_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 3f7d4abc87e..3bc79eea73f 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -611,7 +611,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 = MAX2(state->samples, 1);
+   ctx->gfx_pipeline_state.rast_samples = util_framebuffer_get_num_samples(state);
    ctx->gfx_pipeline_state.num_attachments = state->nr_cbufs;
    ctx->gfx_pipeline_state.hash = 0;
 



More information about the mesa-commit mailing list