nir/lower_tex: add an callback to lower txd ops
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Alyssa Anne Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37692>
This commit is contained in:
committed by
Marge Bot
parent
1db77d08e2
commit
97dde5bc10
@@ -5778,6 +5778,12 @@ typedef struct nir_lower_tex_options {
|
||||
*/
|
||||
bool lower_txd_offset_clamp;
|
||||
|
||||
/**
|
||||
* A generic callback to nir_texop_txd.
|
||||
*/
|
||||
bool (*lower_txd_cb)(const nir_tex_instr *tex, const void *data);
|
||||
const void *lower_txd_data;
|
||||
|
||||
/**
|
||||
* If true, lower nir_texop_txd with min_lod to a nir_texop_txl if the
|
||||
* sampler is bindless.
|
||||
|
||||
@@ -1752,7 +1752,9 @@ nir_lower_tex_block(nir_block *block, nir_builder *b,
|
||||
tex->sampler_dim == GLSL_SAMPLER_DIM_CUBE) ||
|
||||
(options->lower_txd_3d &&
|
||||
tex->sampler_dim == GLSL_SAMPLER_DIM_3D) ||
|
||||
(options->lower_txd_array && tex->is_array))) {
|
||||
(options->lower_txd_array && tex->is_array) ||
|
||||
(options->lower_txd_cb &&
|
||||
options->lower_txd_cb(tex, options->lower_txd_data)))) {
|
||||
lower_gradient(b, tex);
|
||||
progress = true;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user