nir: add lod_bias_min_agx tex src

this lets nir_opt_preamble Just Do The Right thing, so model in NIR

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
This commit is contained in:
Alyssa Rosenzweig 2025-02-03 15:56:22 -05:00 committed by Marge Bot
parent c5de33e48e
commit 780b814354
3 changed files with 12 additions and 0 deletions

View file

@ -3338,6 +3338,7 @@ nir_tex_instr_src_type(const nir_tex_instr *instr, unsigned src)
case nir_tex_src_sampler_deref_intrinsic:
case nir_tex_src_texture_deref_intrinsic:
case nir_tex_src_ms_mcs_intel:
case nir_tex_src_lod_bias_min_agx:
case nir_tex_src_texture_deref:
case nir_tex_src_sampler_deref:
case nir_tex_src_texture_offset:

View file

@ -2233,6 +2233,14 @@ typedef enum nir_tex_src_type {
*/
nir_tex_src_min_lod,
/** LOD bias + min LOD packed together into 32-bits. This is the common case
* for texturing on Honeykrisp with DX12, where both LOD bias and min LOD are
* emulated and passed in a single hardware source together. So it's
* important to optimize so e.g. nir_opt_preamble can make good decisions
* that avoid extra moves.
*/
nir_tex_src_lod_bias_min_agx,
/** MSAA sample index */
nir_tex_src_ms_index,

View file

@ -1835,6 +1835,9 @@ print_tex_instr(nir_tex_instr *instr, print_state *state)
case nir_tex_src_ms_mcs_intel:
fprintf(fp, "(ms_mcs_intel)");
break;
case nir_tex_src_lod_bias_min_agx:
fprintf(fp, "(lod_bias_min_agx)");
break;
case nir_tex_src_ddx:
fprintf(fp, "(ddx)");
break;