Module: Mesa Branch: master Commit: fd7d34f71676d58184ba841f73b816967ec63fef URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fd7d34f71676d58184ba841f73b816967ec63fef
Author: Tapani Pälli <[email protected]> Date: Sun Feb 14 17:49:35 2021 +0200 anv: toggle on sample shading if it is set in the shader Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4300 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9040> --- src/intel/vulkan/anv_pipeline.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 49e67b3002d..cfa95e02153 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -743,6 +743,13 @@ anv_pipeline_lower_nir(struct anv_pipeline *pipeline, nir_shader *nir = stage->nir; if (nir->info.stage == MESA_SHADER_FRAGMENT) { + /* Check if sample shading is enabled in the shader and toggle + * it on for the pipeline independent if sampleShadingEnable is set. + */ + nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir)); + if (nir->info.fs.uses_sample_shading) + anv_pipeline_to_graphics(pipeline)->sample_shading_enable = true; + NIR_PASS_V(nir, nir_lower_wpos_center, anv_pipeline_to_graphics(pipeline)->sample_shading_enable); NIR_PASS_V(nir, nir_lower_input_attachments, _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
