radv,aco: optimize computing the sample mask for per-sample shading
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 29 Oct 2020 15:47:54 +0000 (16:47 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 2 Nov 2020 07:05:47 +0000 (08:05 +0100)
commit03f260cb272838b7bd2e65cff6bb50840db56679
treea0b7bb0f2f0e2ca84be2d035be0947197e13e9be
parentc63bcda22c8deaed063e0a950839012b97b041b2
radv,aco: optimize computing the sample mask for per-sample shading

I don't know why these values were introduced for but it seems like
we can optimize this by just doing:

gl_SampleMaskIn[0] = (SampleCoverage & (1 << gl_SampleID))

AMDGPU-PRO and AMDVLK apply the same formula to compute the
sample mask when per-sample shading is enabled.

No fossils-db changes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7377>
src/amd/compiler/aco_instruction_selection.cpp
src/amd/vulkan/radv_nir_to_llvm.c