Mesa (master): panfrost: Do per-sample shading when outputs are read
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jul 17 14:49:38 UTC 2020
Module: Mesa
Branch: master
Commit: 2a6db94b05cadb9bcd7a3b28f9fe60c7905fb21e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2a6db94b05cadb9bcd7a3b28f9fe60c7905fb21e
Author: Icecream95 <ixn at keemail.me>
Date: Thu Jul 16 14:22:38 2020 +1200
panfrost: Do per-sample shading when outputs are read
Fixes dEQP-GLES31.functional.blend_equation_advanced.msaa.*
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5930>
---
src/gallium/drivers/panfrost/pan_cmdstream.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index dbfe1f4461b..10a6f4c9e98 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -554,8 +554,13 @@ panfrost_frag_meta_rasterizer_update(struct panfrost_context *ctx,
SET_BIT(fragmeta->unknown2_3, MALI_HAS_MSAA, msaa);
SET_BIT(fragmeta->unknown2_4, MALI_NO_MSAA, !msaa);
- SET_BIT(fragmeta->unknown2_3, MALI_PER_SAMPLE,
- msaa && ctx->min_samples > 1);
+ struct panfrost_shader_state *fs;
+ fs = panfrost_get_shader_state(ctx, PIPE_SHADER_FRAGMENT);
+
+ /* EXT_shader_framebuffer_fetch requires the shader to be run
+ * per-sample when outputs are read. */
+ bool per_sample = ctx->min_samples > 1 || fs->outputs_read;
+ SET_BIT(fragmeta->unknown2_3, MALI_PER_SAMPLE, msaa && per_sample);
fragmeta->depth_units = rast->offset_units * 2.0f;
fragmeta->depth_factor = rast->offset_scale;
More information about the mesa-commit
mailing list