v3dv/pipeline: use new helper vk_shader_module_to_nir
authorAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 17 Mar 2022 13:34:53 +0000 (14:34 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 18 Mar 2022 11:05:11 +0000 (11:05 +0000)
commite3d905ec3972af3a2acb6ac921c5111ab6ba0873
treedc624aac485f3b73737deebcd0e738843c3523a5
parent8b71118aa066ab125b7440912ed1e14da79c9451
v3dv/pipeline: use new helper vk_shader_module_to_nir

In addition to use the helper, we also remove some of the lowering we
had at preprocess_nir, as they are called now by the helper.

As we are here we also move the call to nir_lower_sysvals_to_varyings,
that for some reason we were calling it before preprocess_nir.

It is worth to note that with this change we lose the ability to debug
the NIR just after spirv_to_nir using V3D_DEBUG, as now this is done
on vk_spirv_to_nir, and as mentioned that includes several lowerings
now. The workaround to that is to use NIR_DEBUG.

We also needed to change how to check the entrypoint on the broadcom
compiler, checking just if it is an entrypoint, instead of assuming
that the name will be "main".

v2: tweak comment, squash v3dv and compiler change (Iago)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15449>
src/broadcom/compiler/nir_to_vir.c
src/broadcom/vulkan/v3dv_pipeline.c