From 7c40e9a3229e64f505ba2cf66f9b57369bdaedf5 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Fri, 19 Feb 2021 09:52:31 +0100 Subject: [PATCH] ttn: lower rectangle textures if not supported Signed-off-by: Christian Gmeiner Reviewed-by: Eric Anholt Part-of: --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index 0e42118..74a9454 100644 --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c @@ -2491,6 +2491,11 @@ ttn_finalize_nir(struct ttn_compile *c, struct pipe_screen *screen) NIR_PASS_V(nir, nir_lower_system_values); NIR_PASS_V(nir, nir_lower_compute_system_values, NULL); + if (!screen->get_param(screen, PIPE_CAP_TEXRECT)) { + const struct nir_lower_tex_options opts = { .lower_rect = true, }; + NIR_PASS_V(nir, nir_lower_tex, &opts); + } + if (nir->options->lower_uniforms_to_ubo) NIR_PASS_V(nir, nir_lower_uniforms_to_ubo, 16); -- 2.7.4