Mesa (staging/21.3): zink: always set VkPipelineMultisampleStateCreateInfo::pSampleMask
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Feb 20 21:32:06 UTC 2022
Module: Mesa
Branch: staging/21.3
Commit: a06f0231435ca843f9f2fbfb593bb15de085751c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a06f0231435ca843f9f2fbfb593bb15de085751c
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Wed Feb 9 16:13:29 2022 -0500
zink: always set VkPipelineMultisampleStateCreateInfo::pSampleMask
by initializing this on context creation, we can ensure that the correct
value is always here
cc: mesa-stable
fixes:
dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_and_sample_coverage
dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_and_sample_coverage_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_only
dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_and_sample_coverage
dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_and_sample_coverage_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_only
dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_and_sample_coverage
dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_and_sample_coverage_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_only
dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_and_sample_coverage
dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_and_sample_coverage_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_only
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14974>
(cherry picked from commit 8ff96efcfde15d5e8b83ce3b0b95a73254e98b69)
---
.pick_status.json | 2 +-
src/gallium/drivers/zink/zink_context.c | 1 +
src/gallium/drivers/zink/zink_pipeline.c | 8 +++++++-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index aaa69cb61a5..33b7252647c 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -2524,7 +2524,7 @@
"description": "zink: always set VkPipelineMultisampleStateCreateInfo::pSampleMask",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index f7ebf827056..8adcf3c9dac 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -4067,6 +4067,7 @@ zink_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
ctx->base.set_patch_vertices = zink_set_patch_vertices;
ctx->base.set_sample_mask = zink_set_sample_mask;
+ ctx->gfx_pipeline_state.sample_mask = UINT32_MAX;
ctx->base.clear = zink_clear;
ctx->base.clear_texture = zink_clear_texture;
diff --git a/src/gallium/drivers/zink/zink_pipeline.c b/src/gallium/drivers/zink/zink_pipeline.c
index 6a5b583cac7..42468f95015 100644
--- a/src/gallium/drivers/zink/zink_pipeline.c
+++ b/src/gallium/drivers/zink/zink_pipeline.c
@@ -124,7 +124,13 @@ zink_create_gfx_pipeline(struct zink_screen *screen,
warn_missing_feature("alphaToOne");
ms_state.alphaToOneEnable = state->blend_state->alpha_to_one;
}
- ms_state.pSampleMask = state->sample_mask ? &state->sample_mask : NULL;
+ /* "If pSampleMask is NULL, it is treated as if the mask has all bits set to 1."
+ * - Chapter 27. Rasterization
+ *
+ * thus it never makes sense to leave this as NULL since gallium will provide correct
+ * data here as long as sample_mask is initialized on context creation
+ */
+ ms_state.pSampleMask = &state->sample_mask;
if (hw_rast_state->force_persample_interp) {
ms_state.sampleShadingEnable = VK_TRUE;
ms_state.minSampleShading = 1.0;
More information about the mesa-commit
mailing list