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:
@@ -845,6 +845,7 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir,
|
||||
.lower_txs_lod = true, /* Wa_14012320009 */
|
||||
.lower_offset_filter =
|
||||
devinfo->verx10 >= 125 ? lower_xehp_tg4_offset_filter : NULL,
|
||||
.lower_invalid_implicit_lod = true,
|
||||
};
|
||||
|
||||
OPT(nir_lower_tex, &tex_options);
|
||||
@@ -1308,6 +1309,7 @@ brw_nir_apply_sampler_key(nir_shader *nir,
|
||||
nir_lower_tex_options tex_options = {
|
||||
.lower_txd_clamp_bindless_sampler = true,
|
||||
.lower_txd_clamp_if_sampler_index_not_lt_16 = true,
|
||||
.lower_invalid_implicit_lod = true,
|
||||
};
|
||||
|
||||
/* Iron Lake and prior require lowering of all rectangle textures */
|
||||
|
Reference in New Issue
Block a user