Surprisingly small fails. [----------] 14 tests from nir_loop_unroll_test [ RUN ] nir_loop_unroll_test.iadd [ OK ] nir_loop_unroll_test.iadd (0 ms) [ RUN ] nir_loop_unroll_test.iadd_rev [ OK ] nir_loop_unroll_test.iadd_rev (0 ms) [ RUN ] nir_loop_unroll_test.fadd ../mesa-23.3.1/src/compiler/nir/tests/loop_unroll_tests.cpp:148: Failure Value of: nir_opt_loop_unroll(bld.shader) Actual: false Expected: true ../mesa-23.3.1/src/compiler/nir/tests/loop_unroll_tests.cpp:148: Failure Expected equality of these values: 6 count_instr(nir_op_fadd) Which is: 1 ../mesa-23.3.1/src/compiler/nir/tests/loop_unroll_tests.cpp:148: Failure Expected equality of these values: 0 count_loops() Which is: 1 [ FAILED ] nir_loop_unroll_test.fadd (0 ms) [ RUN ] nir_loop_unroll_test.fadd_rev ../mesa-23.3.1/src/compiler/nir/tests/loop_unroll_tests.cpp:150: Failure Value of: nir_opt_loop_unroll(bld.shader) Actual: false Expected: true ../mesa-23.3.1/src/compiler/nir/tests/loop_unroll_tests.cpp:150: Failure Expected equality of these values: 7 count_instr(nir_op_fadd) Which is: 1 ../mesa-23.3.1/src/compiler/nir/tests/loop_unroll_tests.cpp:150: Failure Expected equality of these values: 0 count_loops() Which is: 1 [ FAILED ] nir_loop_unroll_test.fadd_rev (0 ms) [ RUN ] nir_loop_unroll_test.imul [ OK ] nir_loop_unroll_test.imul (0 ms) [ RUN ] nir_loop_unroll_test.imul_rev [ OK ] nir_loop_unroll_test.imul_rev (0 ms) [ RUN ] nir_loop_unroll_test.ishl [ OK ] nir_loop_unroll_test.ishl (0 ms) [ RUN ] nir_loop_unroll_test.ishl_rev [ OK ] nir_loop_unroll_test.ishl_rev (0 ms) [ RUN ] nir_loop_unroll_test.ishr [ OK ] nir_loop_unroll_test.ishr (0 ms) [ RUN ] nir_loop_unroll_test.ishr_rev [ OK ] nir_loop_unroll_test.ishr_rev (0 ms) [ RUN ] nir_loop_unroll_test.ushr [ OK ] nir_loop_unroll_test.ushr (0 ms) [ RUN ] nir_loop_unroll_test.ushr_rev [ OK ] nir_loop_unroll_test.ushr_rev (0 ms) [ RUN ] nir_loop_unroll_test.lshl_neg [ OK ] nir_loop_unroll_test.lshl_neg (0 ms) [ RUN ] nir_loop_unroll_test.lshl_neg_rev [ OK ] nir_loop_unroll_test.lshl_neg_rev (0 ms) [----------] 14 tests from nir_loop_unroll_test (3 ms total) Reproducible: Always
Is this a regression?
Created attachment 881376 [details] build.log and emerge --info
(In reply to Matt Turner from comment #1) > Is this a regression? Not a regression from 23.1.9. But I also just reproduced the same issue on ppc64, so it appears to be a generic BE issue.
(In reply to matoro from comment #3) > (In reply to Matt Turner from comment #1) > > Is this a regression? > > Not a regression from 23.1.9. But I also just reproduced the same issue on > ppc64, so it appears to be a generic BE issue. Thanks. Let's not block stabilization in that case. Hopefully I can find time to investigate soon.
I've spent some time investigating tonight on sparc64. The two tests that fail were known to fail on s390 (also big endian) at the time they were added. See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3445 The loop unrolling code correctly identifies the initial value, step value, and limit value. But calculate_iterations() fails and returns -1. Debugging further, the problem occurs here: > uint64_t iter_u64 = nir_const_value_as_uint(iter, bit_size); > return iter_u64 > INT_MAX ? -1 : (int)iter_u64; At the end of get_iteration(). iter is an i64 nir value, but we're asking it to be interpreted as a 32-bit integer, so nir_const_value_as_uint() returns 0 instead of 6.
Give $URL a try.
(In reply to Matt Turner from comment #6) > Give $URL a try. Works perfect here, thanks!
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93b9d9dc97403326a984a056615295a163e259fa commit 93b9d9dc97403326a984a056615295a163e259fa Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2024-01-10 21:34:47 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2024-01-11 04:41:51 +0000 media-libs/mesa: Version bump to 23.3.3 Bug: https://bugs.gentoo.org/908079 Closes: https://bugs.gentoo.org/921297 Signed-off-by: Matt Turner <mattst88@gentoo.org> media-libs/mesa/Manifest | 1 + media-libs/mesa/files/23.3.3-big-endian.patch | 84 ++++ ...3-symbols-check-Add-_GLOBAL_OFFSET_TABLE_.patch | 31 ++ media-libs/mesa/mesa-23.3.3.ebuild | 450 +++++++++++++++++++++ 4 files changed, 566 insertions(+)