lavapipe: Lower more texture OPs

Tries to reduce the number of textures we need to pre-compile.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828>
This commit is contained in:
Konstantin Seurer
2023-04-16 21:14:44 +02:00
committed by Marge Bot
parent a8adbaf965
commit 001a3769a6

View File

@@ -524,6 +524,14 @@ lvp_shader_lower(struct lvp_device *pdevice, nir_shader *nir, struct lvp_shader
};
NIR_PASS_V(nir, nir_fold_16bit_tex_image, &fold_16bit_options);
/* Lower texture OPs llvmpipe supports to reduce the amount of sample
* functions that need to be pre-compiled.
*/
const nir_lower_tex_options tex_options = {
.lower_txd = true,
};
NIR_PASS(_, nir, nir_lower_tex, &tex_options);
lvp_shader_optimize(nir);
if (nir->info.stage != MESA_SHADER_VERTEX)