amd: don't use d16 for integer loads

D16 saturates to min/max instead of just truncating.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21404>
This commit is contained in:
Georg Lehmann
2023-02-18 13:38:46 +01:00
committed by Marge Bot
parent a00b50d820
commit 77252687fa
2 changed files with 4 additions and 4 deletions

View File

@@ -3296,8 +3296,8 @@ radv_postprocess_nir(struct radv_pipeline *pipeline,
}; };
struct nir_fold_16bit_tex_image_options fold_16bit_options = { struct nir_fold_16bit_tex_image_options fold_16bit_options = {
.rounding_mode = nir_rounding_mode_rtne, .rounding_mode = nir_rounding_mode_rtne,
.fold_tex_dest_types = nir_type_float | nir_type_uint | nir_type_int, .fold_tex_dest_types = nir_type_float,
.fold_image_dest_types = nir_type_float | nir_type_uint | nir_type_int, .fold_image_dest_types = nir_type_float,
.fold_image_store_data = true, .fold_image_store_data = true,
.fold_image_srcs = !radv_use_llvm_for_stage(device, stage->stage), .fold_image_srcs = !radv_use_llvm_for_stage(device, stage->stage),
.fold_srcs_options_count = separate_g16 ? 2 : 1, .fold_srcs_options_count = separate_g16 ? 2 : 1,

View File

@@ -197,8 +197,8 @@ static void si_late_optimize_16bit_samplers(struct si_screen *sscreen, nir_shade
}; };
struct nir_fold_16bit_tex_image_options fold_16bit_options = { struct nir_fold_16bit_tex_image_options fold_16bit_options = {
.rounding_mode = nir_rounding_mode_rtne, .rounding_mode = nir_rounding_mode_rtne,
.fold_tex_dest_types = nir_type_float | nir_type_uint | nir_type_int, .fold_tex_dest_types = nir_type_float,
.fold_image_dest_types = nir_type_float | nir_type_uint | nir_type_int, .fold_image_dest_types = nir_type_float,
.fold_image_store_data = true, .fold_image_store_data = true,
.fold_srcs_options_count = has_g16 ? 2 : 1, .fold_srcs_options_count = has_g16 ? 2 : 1,
.fold_srcs_options = fold_srcs_options, .fold_srcs_options = fold_srcs_options,