mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 22:20:09 +01:00
nir/fold_16bit_sampler_conversions: Fix dest type mismatches.
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5996
Fixes: fb29cef8dd ("nir: add many passes that lower and optimize 16-bit input/outputs and samplers")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14895>
This commit is contained in:
parent
798e47be51
commit
88ec73e5e8
1 changed files with 3 additions and 2 deletions
|
|
@ -517,8 +517,9 @@ nir_fold_16bit_sampler_conversions(nir_shader *nir,
|
|||
}
|
||||
|
||||
/* Optimize the destination. */
|
||||
bool is_f32_to_f16 = true;
|
||||
bool is_i32_to_i16 = true; /* same behavior for int and uint */
|
||||
bool is_f32_to_f16 = tex->dest_type & nir_type_float;
|
||||
/* same behavior for int and uint */
|
||||
bool is_i32_to_i16 = tex->dest_type & (nir_type_int | nir_type_uint);
|
||||
|
||||
nir_foreach_use(use, &tex->dest.ssa) {
|
||||
is_f32_to_f16 &= is_f32_to_f16_conversion(use->parent_instr);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue