diff options
author | Jason Ekstrand <jason@jlekstrand.net> | 2019-05-17 13:04:24 -0500 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-05-17 15:20:39 -0700 |
commit | 93d278a73ab7e634b6acf18b8cae78b9c975dd96 (patch) | |
tree | a98beeef62b0ccc5765555296a015390fc432c19 | |
parent | 7be21f6575a3af398296d40b142f9434d187940c (diff) |
anv: Only consider minSampleShading when sampleShadingEnable is set
From the Vulkan 1.1.107 spec:
Sample shading is enabled for a graphics pipeline:
- If the interface of the fragment shader entry point of the
graphics pipeline includes an input variable decorated with
SampleId or SamplePosition. In this case minSampleShadingFactor
takes the value 1.0.
- Else if the sampleShadingEnable member of the
VkPipelineMultisampleStateCreateInfo structure specified when
creating the graphics pipeline is set to VK_TRUE. In this case
minSampleShadingFactor takes the value of
VkPipelineMultisampleStateCreateInfo::minSampleShading.
Otherwise, sample shading is considered disabled.
In other words, if sampleShadingEnable is set to VK_FALSE, we should
ignore minSampleShading.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 1c92358bd89313b0cf7bf7b84992a28f11b2aa8f)
-rw-r--r-- | src/intel/vulkan/anv_pipeline.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index be869cfa061..1bdc896e708 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -377,12 +377,12 @@ populate_wm_prog_key(const struct gen_device_info *devinfo, * harmless to compute it and then let dead-code take care of it. */ if (ms_info->rasterizationSamples > 1) { - key->persample_interp = + key->persample_interp = ms_info->sampleShadingEnable && (ms_info->minSampleShading * ms_info->rasterizationSamples) > 1; key->multisample_fbo = true; } - key->frag_coord_adds_sample_pos = ms_info->sampleShadingEnable; + key->frag_coord_adds_sample_pos = key->persample_interp; } } |