No driver doesn't use this option.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17757>
(1 << nir_tex_src_bias) | (1 << nir_tex_src_min_lod) |
(1 << nir_tex_src_ms_index) |
(separate_g16 ? 0 : (1 << nir_tex_src_ddx) | (1 << nir_tex_src_ddy)),
- .only_fold_all = true,
},
{
.sampler_dims = ~BITFIELD_BIT(GLSL_SAMPLER_DIM_CUBE),
.src_types = (1 << nir_tex_src_ddx) | (1 << nir_tex_src_ddy),
- .only_fold_all = true,
},
};
struct nir_fold_16bit_tex_image_options fold_16bit_options = {
struct nir_fold_tex_srcs_options {
unsigned sampler_dims;
unsigned src_types;
- bool only_fold_all; /* Only fold sources if all of them can be folded. */
};
struct nir_fold_16bit_tex_image_options {
* because it's out of bounds and the higher bits don't
* matter.
*/
- if (can_fold_16bit_src(src->ssa, src_type, false))
- fold_srcs |= (1 << i);
- else if (options->only_fold_all)
+ if (!can_fold_16bit_src(src->ssa, src_type, false))
return false;
+
+ fold_srcs |= (1 << i);
}
u_foreach_bit(i, fold_srcs) {
(1 << nir_tex_src_ms_index) |
(1 << nir_tex_src_ddx) |
(1 << nir_tex_src_ddy),
- .only_fold_all = true,
};
struct nir_fold_16bit_tex_image_options fold_16bit_options = {
.rounding_mode = nir_rounding_mode_rtz,
(1 << nir_tex_src_bias) | (1 << nir_tex_src_min_lod) |
(1 << nir_tex_src_ms_index) |
(has_g16 ? 0 : (1 << nir_tex_src_ddx) | (1 << nir_tex_src_ddy)),
- .only_fold_all = true,
},
{
.sampler_dims = ~BITFIELD_BIT(GLSL_SAMPLER_DIM_CUBE),
.src_types = (1 << nir_tex_src_ddx) | (1 << nir_tex_src_ddy),
- .only_fold_all = true,
},
};
struct nir_fold_16bit_tex_image_options fold_16bit_options = {