v3d/compiler: request fragment shader clip lowering to be vulkan compatible.
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 22 Jul 2020 06:15:10 +0000 (08:15 +0200)
committerIago Toral Quiroga <itoral@igalia.com>
Mon, 27 Jul 2020 06:25:57 +0000 (08:25 +0200)
commitd1677c8f8cdb11cf55db81a511b8bf8802fa2c19
tree262eff20bf65adc4cfa2f9df626f577459a4f645
parent71d5c19241876e899d37dfe23efd25b23553d5e0
v3d/compiler: request fragment shader clip lowering to be vulkan compatible.

Vulkan allows fragment shaders to read gl_ClipDistance[], in which case
the SPIR-V compiler will inject a compact array variable at
VARYING_SLOT_CLIP_DIST0. Request the lowering to always work in terms
of a compact array variable so we don't have to care about the API
in use.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6022>
src/broadcom/compiler/vir.c