Mesa (master): zink: use correct value for color buffer sample count when creating renderpass
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Sep 24 20:39:47 UTC 2020
Module: Mesa
Branch: master
Commit: f6c87216d3190bef3c5cbe66a934d0f72fb2fd64
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f6c87216d3190bef3c5cbe66a934d0f72fb2fd64
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Sun Jun 14 00:31:37 2020 -0400
zink: use correct value for color buffer sample count when creating renderpass
nr_samples is valid on the texture pipe_resource, not the surface
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 7d397a1dc60..3f7d4abc87e 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -444,7 +444,7 @@ get_render_pass(struct zink_context *ctx)
struct pipe_surface *surf = fb->cbufs[i];
if (surf) {
state.rts[i].format = zink_get_format(screen, surf->format);
- state.rts[i].samples = surf->nr_samples > 0 ? surf->nr_samples :
+ state.rts[i].samples = surf->texture->nr_samples > 0 ? surf->texture->nr_samples :
VK_SAMPLE_COUNT_1_BIT;
} else {
state.rts[i].format = VK_FORMAT_R8_UINT;
More information about the mesa-commit
mailing list