nir/lower_tex: Make the adding a 0 LOD to nir_op_tex in the VS optional.
This controls the whole lowering of "make tex ops with implicit derivatives on non-implicit-derivative stages be tex ops with an explicit lod of 0 instead", but it's really hard to describe that in a git commit summary. All existing callers get it added except: - nir_to_tgsi which didn't want it. - nouveau, which didn't want it (fixes regressions in shadowcube and shadow2darray with NIR, since the shading languages don't expose txl of those sampler types and thus it's not supported in HW) - optional lowering passes in mesa/st (lower_rect, YUV lowering, etc) Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16156>
This commit is contained in:
@@ -718,7 +718,9 @@ spirv_to_dxil(const uint32_t *words, size_t word_count,
|
||||
}
|
||||
|
||||
NIR_PASS_V(nir, nir_lower_readonly_images_to_tex, true);
|
||||
nir_lower_tex_options lower_tex_options = {0};
|
||||
nir_lower_tex_options lower_tex_options = {
|
||||
.lower_invalid_implicit_lod = true,
|
||||
};
|
||||
NIR_PASS_V(nir, nir_lower_tex, &lower_tex_options);
|
||||
|
||||
NIR_PASS_V(nir, dxil_spirv_nir_fix_sample_mask_type);
|
||||
|
||||
Reference in New Issue
Block a user