diff --git a/src/panfrost/ci/panfrost-g720-fails.txt b/src/panfrost/ci/panfrost-g720-fails.txt index e2ddf9a46d9..1c602058c60 100644 --- a/src/panfrost/ci/panfrost-g720-fails.txt +++ b/src/panfrost/ci/panfrost-g720-fails.txt @@ -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 diff --git a/src/panfrost/ci/panfrost-g725-fails.txt b/src/panfrost/ci/panfrost-g725-fails.txt index 82d00f8aeee..41240417abb 100644 --- a/src/panfrost/ci/panfrost-g725-fails.txt +++ b/src/panfrost/ci/panfrost-g725-fails.txt @@ -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 diff --git a/src/panfrost/compiler/bifrost_compile.c b/src/panfrost/compiler/bifrost_compile.c index 5015ab4a020..5c434ffcf4d 100644 --- a/src/panfrost/compiler/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost_compile.c @@ -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: diff --git a/src/panfrost/compiler/bifrost_compile.h b/src/panfrost/compiler/bifrost_compile.h index bbc2659ab2f..f10faa95873 100644 --- a/src/panfrost/compiler/bifrost_compile.h +++ b/src/panfrost/compiler/bifrost_compile.h @@ -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, \ diff --git a/src/panfrost/compiler/bifrost_nir_algebraic.py b/src/panfrost/compiler/bifrost_nir_algebraic.py index 1d38ad43c2a..3fab360ec48 100644 --- a/src/panfrost/compiler/bifrost_nir_algebraic.py +++ b/src/panfrost/compiler/bifrost_nir_algebraic.py @@ -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