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@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14974>
This commit is contained in:
Mike Blumenkrantz
2022-02-09 16:13:29 -05:00
committed by Marge Bot
parent da0e00e0b9
commit 8ff96efcfd
2 changed files with 8 additions and 1 deletions
+1
View File
@@ -4092,6 +4092,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;
+7 -1
View File
@@ -132,7 +132,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;