tgsi_to_nir: call nir_lower_int64 when required

Use case: radeonsi will generate internal tgsi shader
with 64bit udiv instruction, and we want all 64bit udiv
to be lowered in nir by lower_int64_options.

For GLSL shaders, this is done in glsl to nir, so we do
the same for tgsi here.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22573>
This commit is contained in:
Qiang Yu 2023-05-09 17:01:19 +08:00 committed by Marge Bot
parent 636f628206
commit 5fa06828b4

View file

@ -2663,6 +2663,9 @@ ttn_finalize_nir(struct ttn_compile *c, struct pipe_screen *screen)
if (nir->options->lower_uniforms_to_ubo)
NIR_PASS_V(nir, nir_lower_uniforms_to_ubo, false, !c->cap_integers);
if (nir->options->lower_int64_options)
NIR_PASS_V(nir, nir_lower_int64);
if (!c->cap_samplers_as_deref)
NIR_PASS_V(nir, nir_lower_samplers);