aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2020-04-08 09:04:50 +1000
committerDave Airlie <[email protected]>2020-04-15 14:26:08 +1000
commite20b3b37202eb775009c7a62d98515f49cda6e61 (patch)
treeaa0a8313ce5679724c38c15729ddda76c7f45498 /src
parentc494ed0467573b992252fab3217ec158d5b7ccb3 (diff)
gallivm/nir: lower implicit lod to tex.
Fixes some sampling issues in vertex shaders Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4560>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_nir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c
index b0ab9265157..8336d7b2c99 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c
@@ -1875,6 +1875,9 @@ void lp_build_opt_nir(struct nir_shader *nir)
NIR_PASS_V(nir, nir_opt_constant_folding);
NIR_PASS_V(nir, nir_opt_algebraic);
NIR_PASS_V(nir, nir_lower_pack);
+
+ nir_lower_tex_options options = { .lower_tex_without_implicit_lod = true };
+ NIR_PASS_V(nir, nir_lower_tex, &options);
} while (progress);
nir_lower_bool_to_int32(nir);
}