tu: Don't use rasterizationSamples when enabling sample shading
authorConnor Abbott <cwabbott0@gmail.com>
Thu, 29 Sep 2022 15:58:59 +0000 (17:58 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 3 Nov 2022 21:59:42 +0000 (21:59 +0000)
From the spec language, it seems like this change wasn't strictly
required and is just an optimization for when minSampleShading would
be small enough to allow one sample per pixel. However
rasterizationSamples will soon possibly be dynamic, and I don't think we
should keep this around.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18912>

src/freedreno/vulkan/tu_pipeline.c

index e041e6c64b7d9d20ad64d7f5bf86687cb63c474c..93ebbf046beb3b1472e066cf3134278a3e073ea4 100644 (file)
@@ -2629,8 +2629,7 @@ tu_pipeline_shader_key_init(struct ir3_shader_key *key,
     * just checked in tu6_emit_fs_inputs.  We will also copy the value to
     * tu_shader_key::force_sample_interp in a bit.
     */
-   if (msaa_info && msaa_info->sampleShadingEnable &&
-       (msaa_info->minSampleShading * msaa_info->rasterizationSamples) > 1.0f)
+   if (msaa_info && msaa_info->sampleShadingEnable)
       key->sample_shading = true;
 }