mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 11:10:10 +01:00
nir/lower_tex: remove unused options
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:
parent
a49cf90e14
commit
0922a0dd50
2 changed files with 0 additions and 51 deletions
|
|
@ -5766,36 +5766,12 @@ typedef struct nir_lower_tex_options {
|
|||
*/
|
||||
bool lower_txb_shadow_clamp;
|
||||
|
||||
/**
|
||||
* If true, lower nir_texop_txd on shadow samplers when it uses min_lod
|
||||
* with nir_texop_txl. This includes cube maps.
|
||||
*/
|
||||
bool lower_txd_shadow_clamp;
|
||||
|
||||
/**
|
||||
* If true, lower nir_texop_txd on when it uses both offset and min_lod
|
||||
* with nir_texop_txl. This includes cube maps.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
bool lower_txd_clamp_bindless_sampler;
|
||||
|
||||
/**
|
||||
* If true, lower nir_texop_txd with min_lod to a nir_texop_txl if the
|
||||
* sampler index is not statically determinable to be less than 16.
|
||||
*/
|
||||
bool lower_txd_clamp_if_sampler_index_not_lt_16;
|
||||
|
||||
/**
|
||||
* If true, lower nir_texop_txs with a non-0-lod into nir_texop_txs with
|
||||
* 0-lod followed by a nir_ishr.
|
||||
|
|
|
|||
|
|
@ -1229,25 +1229,6 @@ lower_tex_packing(nir_builder *b, nir_tex_instr *tex,
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
sampler_index_lt(nir_tex_instr *tex, unsigned max)
|
||||
{
|
||||
assert(nir_tex_instr_src_index(tex, nir_tex_src_sampler_deref) == -1);
|
||||
|
||||
unsigned sampler_index = tex->sampler_index;
|
||||
|
||||
int sampler_offset_idx =
|
||||
nir_tex_instr_src_index(tex, nir_tex_src_sampler_offset);
|
||||
if (sampler_offset_idx >= 0) {
|
||||
if (!nir_src_is_const(tex->src[sampler_offset_idx].src))
|
||||
return false;
|
||||
|
||||
sampler_index += nir_src_as_uint(tex->src[sampler_offset_idx].src);
|
||||
}
|
||||
|
||||
return sampler_index < max;
|
||||
}
|
||||
|
||||
static bool
|
||||
lower_tg4_offsets(nir_builder *b, nir_tex_instr *tex)
|
||||
{
|
||||
|
|
@ -1715,8 +1696,6 @@ nir_lower_tex_block(nir_block *block, nir_builder *b,
|
|||
|
||||
const bool has_min_lod =
|
||||
nir_tex_instr_src_index(tex, nir_tex_src_min_lod) >= 0;
|
||||
const bool has_offset =
|
||||
nir_tex_instr_src_index(tex, nir_tex_src_offset) >= 0;
|
||||
|
||||
if (tex->op == nir_texop_txb && tex->is_shadow && has_min_lod &&
|
||||
options->lower_txb_shadow_clamp) {
|
||||
|
|
@ -1742,12 +1721,6 @@ nir_lower_tex_block(nir_block *block, nir_builder *b,
|
|||
(options->lower_txd ||
|
||||
(options->lower_txd_clamp && has_min_lod) ||
|
||||
(options->lower_txd_shadow && tex->is_shadow) ||
|
||||
(options->lower_txd_shadow_clamp && tex->is_shadow && has_min_lod) ||
|
||||
(options->lower_txd_offset_clamp && has_offset && has_min_lod) ||
|
||||
(options->lower_txd_clamp_bindless_sampler && has_min_lod &&
|
||||
nir_tex_instr_src_index(tex, nir_tex_src_sampler_handle) != -1) ||
|
||||
(options->lower_txd_clamp_if_sampler_index_not_lt_16 &&
|
||||
has_min_lod && !sampler_index_lt(tex, 16)) ||
|
||||
(options->lower_txd_cube_map &&
|
||||
tex->sampler_dim == GLSL_SAMPLER_DIM_CUBE) ||
|
||||
(options->lower_txd_3d &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue