From 25b57a6a7501ed66dc55c93ecb8e9b9a18628381 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Wed, 17 Apr 2024 21:46:05 +0300 Subject: [PATCH] anv: track sample shading enable & min sample shading Signed-off-by: Lionel Landwerlin Reviewed-by: Ivan Briano Part-of: --- src/intel/vulkan/anv_pipeline.c | 5 +++++ src/intel/vulkan/anv_private.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 0ce8d4317d5..807d80a99bc 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -2925,6 +2925,11 @@ anv_graphics_pipeline_emit(struct anv_graphics_pipeline *pipeline, if (pipeline->base.shaders[MESA_SHADER_FRAGMENT]) { const struct brw_wm_prog_data *wm_prog_data = get_wm_prog_data(pipeline); + if (state->ms) { + pipeline->sample_shading_enable = state->ms->sample_shading_enable; + pipeline->min_sample_shading = state->ms->min_sample_shading; + } + if (wm_prog_data_dynamic(wm_prog_data)) { pipeline->fs_msaa_flags = INTEL_MSAA_FLAG_ENABLE_DYNAMIC; diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index bf14d24fc51..ec8db0f4e4c 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -4573,6 +4573,8 @@ struct anv_graphics_pipeline { bool kill_pixel; bool force_fragment_thread_dispatch; bool uses_xfb; + bool sample_shading_enable; + float min_sample_shading; /* Number of VERTEX_ELEMENT_STATE input elements used by the shader */ uint32_t vs_input_elements;