anv: Stop doing too much per-sample shading
authorJason Ekstrand <jason@jlekstrand.net>
Thu, 2 Dec 2021 20:42:16 +0000 (14:42 -0600)
committerMarge Bot <emma+marge@anholt.net>
Sat, 11 Dec 2021 04:40:20 +0000 (04:40 +0000)
commit1f559930b6b7a633d93cd4e9cc4965b3f5e7c607
treea7be097ef381716a9a921adb3f9d4a6bdb3694a3
parent5197809302b183572a2b8380378dd266951e7726
anv: Stop doing too much per-sample shading

We were setting anv_pipeline::sample_shading_enable based on
sampleShadingEnable without looking at minSampleShading.  We would then
pass this value into nir_lower_wpos_center which would add sample_pos to
frag_coord.  Then the back-end compiler picks up on the existence of
sample_pos and forces persample dispatch.  This leads to doing
per-sample dispatch whenever sampleShadingEnable = VK_TRUE regardless of
the value of minSampleShading.  This is almost certainly costing us
perf somewhere.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14022>
src/intel/vulkan/anv_pipeline.c