These are for implementing various texture queries.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25000>
case nir_texop_sampler_descriptor_amd:
return 4;
+ case nir_texop_hdr_dim_nv:
+ case nir_texop_tex_type_nv:
+ return 4;
+
default:
if (instr->is_shadow && instr->is_new_style_shadow)
return 1;
nir_texop_descriptor_amd, /**< Returns a buffer or image descriptor. */
nir_texop_sampler_descriptor_amd, /**< Returns a sampler descriptor. */
nir_texop_lod_bias_agx, /**< Returns the sampler's LOD bias */
+ nir_texop_hdr_dim_nv, /**< Maps to TXQ.DIMENSION */
+ nir_texop_tex_type_nv, /**< Maps to TXQ.TEXTURE_TYPE */
} nir_texop;
/** Represents a texture instruction */
case nir_texop_lod_bias_agx:
fprintf(fp, "lod_bias_agx ");
break;
+ case nir_texop_hdr_dim_nv:
+ fprintf(fp, "hdr_dim_nv ");
+ break;
+ case nir_texop_tex_type_nv:
+ fprintf(fp, "tex_type_nv ");
+ break;
default:
unreachable("Invalid texture operation");
break;
case nir_texop_lod_bias_agx:
vtn_fail("unexpected nir_texop_lod_bias_agx");
break;
+ case nir_texop_hdr_dim_nv:
+ case nir_texop_tex_type_nv:
+ vtn_fail("unexpected nir_texop_*_nv");
+ break;
}
unsigned idx = 4;