ttn: lower rectangle textures if not supported

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898>
This commit is contained in:
Christian Gmeiner 2021-02-19 09:52:31 +01:00 committed by Marge Bot
parent 08e072015a
commit 7c40e9a322
1 changed files with 5 additions and 0 deletions

View File

@ -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);