pan/bi: Lower ffract in bifrost_nir_algebraic on v11+
On v11+, because FROUND.v2f16 is gone we end up with precision issues. We now lower ffract in bifrost_nir_algebraic instead of during common algebraic to ensure lower_bit_size has been performed. This fixes "dEQP-GLES3.functional.shaders.builtin_functions.common.fract.vec2_lowp_vertex" and "dEQP-GLES31.functional.shaders.builtin_functions.common.fract.vec2_lowp_compute". Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Backport-to: 25.1 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34970>
This commit is contained in:
committed by
Marge Bot
parent
5588ff49a7
commit
60b131a712
@@ -2,7 +2,3 @@
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread,Crash
|
||||
|
||||
dEQP-VK.glsl.loops.special.do_while_dynamic_iterations.dowhile_trap_vertex,Crash
|
||||
|
||||
# Seems to be a precision issues because of floor fp16 being dropped since v11 (and the conversion done as a result)
|
||||
dEQP-GLES3.functional.shaders.builtin_functions.common.fract.vec2_lowp_vertex,Fail
|
||||
dEQP-GLES31.functional.shaders.builtin_functions.common.fract.vec2_lowp_compute,Fail
|
||||
|
||||
@@ -1,6 +1,2 @@
|
||||
# uprev Piglit in Mesa
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread,Crash
|
||||
|
||||
# Seems to be a precision issues because of floor fp16 being dropped since v11 (and the conversion done as a result)
|
||||
dEQP-GLES3.functional.shaders.builtin_functions.common.fract.vec2_lowp_vertex,Fail
|
||||
dEQP-GLES31.functional.shaders.builtin_functions.common.fract.vec2_lowp_compute,Fail
|
||||
|
||||
@@ -5041,6 +5041,7 @@ bi_lower_bit_size(const nir_instr *instr, void *data)
|
||||
case nir_op_fround_even:
|
||||
case nir_op_fceil:
|
||||
case nir_op_ffloor:
|
||||
case nir_op_ffract:
|
||||
case nir_op_ftrunc:
|
||||
case nir_op_frexp_sig:
|
||||
case nir_op_frexp_exp:
|
||||
|
||||
@@ -94,7 +94,7 @@ void bifrost_compile_shader_nir(nir_shader *nir,
|
||||
.lower_flrp16 = true, \
|
||||
.lower_flrp32 = true, \
|
||||
.lower_flrp64 = true, \
|
||||
.lower_ffract = true, \
|
||||
.lower_ffract = arch < 11, \
|
||||
.lower_fmod = true, \
|
||||
.lower_fdiv = true, \
|
||||
.lower_isign = true, \
|
||||
|
||||
@@ -100,6 +100,10 @@ algebraic_late = [
|
||||
# On v11+, F16_TO_S32/F16_TO_U32 is gone but we still have F32_TO_S32/F32_TO_U32
|
||||
(('f2i32', 'a@16'), ('f2i32', ('f2f32', a)), 'gpu_arch >= 11'),
|
||||
(('f2u32', 'a@16'), ('f2u32', ('f2f32', a)), 'gpu_arch >= 11'),
|
||||
|
||||
# On v11+, because FROUND.v2f16 is gone we end up with precision issues.
|
||||
# We lower ffract here instead to ensure lower_bit_size has been performed.
|
||||
(('ffract', a), ('fadd', a, ('fneg', ('ffloor', a))), 'gpu_arch >= 11'),
|
||||
]
|
||||
|
||||
# On v11+, ICMP_OR.v4u8 was removed
|
||||
|
||||
Reference in New Issue
Block a user