mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-09 23:08:18 +02:00
r600: update muladd support configuration
This change updates the configuration to fix some
regressions with the fpu64 emulation.
Note: The r600 has a single precision fma op code which
breaks the fpu64 emulation if used as nir_op_ffma (It
likely returns a double).
This change was tested on palm and barts.
Fixes: aeea2e7c1f ("nir: add fmad_or_ffma helpers and use it in lower_double_ops")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41781>
This commit is contained in:
parent
19d786ae6a
commit
fa5ce01ea3
1 changed files with 4 additions and 2 deletions
|
|
@ -1083,10 +1083,12 @@ bool r600_common_screen_init(struct r600_common_screen *rscreen,
|
|||
printf("max_alignment = %u\n", (unsigned)rscreen->info.max_alignment);
|
||||
}
|
||||
|
||||
const bool fp64_emulation = rscreen->info.gfx_level < CAYMAN;
|
||||
|
||||
const struct nir_shader_compiler_options nir_options = {
|
||||
.float_mul_add16 = nir_float_muladd_support_has_fmad | nir_float_muladd_support_fuse,
|
||||
.float_mul_add32 = nir_float_muladd_support_has_fmad | nir_float_muladd_support_fuse,
|
||||
.float_mul_add64 = nir_float_muladd_support_has_ffma | nir_float_muladd_support_fuse,
|
||||
.float_mul_add64 = fp64_emulation ? 0 : nir_float_muladd_support_has_ffma | nir_float_muladd_support_fuse,
|
||||
.lower_flrp32 = true,
|
||||
.lower_flrp64 = true,
|
||||
.lower_fdiv = true,
|
||||
|
|
@ -1152,7 +1154,7 @@ bool r600_common_screen_init(struct r600_common_screen *rscreen,
|
|||
rscreen->nir_options.lower_bitfield_reverse = true;
|
||||
}
|
||||
|
||||
if (rscreen->info.gfx_level < CAYMAN) {
|
||||
if (fp64_emulation) {
|
||||
rscreen->nir_options.lower_atomic_offset_to_range_base = true;
|
||||
|
||||
rscreen->nir_options.lower_doubles_options =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue