Skip to content

asahi/compiler/test: order nir_load_global_constant designators for C++20 - #1249

Merged
RyanTheTide merged 1 commit into
aurora-wipfrom
fix/agx3-test-cpp20-designator-order
Nov 27, 2026
Merged

RyanTheTide merged 1 commit into
aurora-wipfrom
fix/agx3-test-cpp20-designator-order

Conversation

@DjDeveloperr

Copy link
Copy Markdown

What

Follow-up to #1246 fixing a strict GCC C++20 build failure in src/asahi/compiler/test/test-agx3-feature-matching-opts.cpp.

src/compiler/nir/nir_intrinsics.py:1434 declares load("global_constant", [1], [ACCESS, ALIGN_MUL, ALIGN_OFFSET], ...), so the generated _nir_load_global_constant_indices struct places access before align_mul. Seven new nir_load_global_constant(...) calls added in #1246 passed .align_mul before .access, which Clang accepts as an extension but GCC rejects under C++20 (designator order for field '_nir_load_global_constant_indices::access' does not match declaration order).

This commit reorders .access ahead of .align_mul at all 7 call sites in test-agx3-feature-matching-opts.cpp. No driver or compiler runtime code is modified.

Tested

  • Verified all 7 nir_load_global_constant call sites in src/asahi/compiler/test/test-agx3-feature-matching-opts.cpp match the [ACCESS, ALIGN_MUL, ALIGN_OFFSET] declaration order in src/compiler/nir/nir_intrinsics.py:1434 (e60578317ec47f18ff8db716dc9e39dfef549db0).
  • Local fedora-mesaci.sh (20261127-131705-e60578317ec4) and GitHub Actions asahi CI queued on e60578317ec4.

Risk

Test-only designated-initializer argument reorder in one C++ unit-test file (test-agx3-feature-matching-opts.cpp). Zero impact on generated driver code or runtime behavior.

Not yet

  • Waiting for GitHub Actions asahi CI and fedora-mesaci.sh (20261127-131705-e60578317ec4) to finish on e60578317ec4, plus GCC C++20 compile confirmation on a GCC host.

…++20

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 27, 2026 18:24
@RyanTheTide

Copy link
Copy Markdown

e60578317ec4 J316s (Apple M1 Pro, aarch64, gcc/g++ 16.2.1 Red Hat 16.2.1-3, 7.3.0-aurora-fleet89) PASS: test-agx3-feature-matching-opts.cpp compiles cleanly under GCC 16 C++20 (all 2,055 asahi test targets built); agx_tests --gtest_filter="*FeatureMatching*" 19/19 PASS; meson test --suite asahi --no-rebuild 215/215 PASS (0 FAIL); Enforcing, 0 failed units.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at e60578317ec4

Blockers: none

Checked:

  • Test-only: one file, src/asahi/compiler/test/test-agx3-feature-matching-opts.cpp. No driver or compiler code changes, so no hardware row is needed.
  • Every nir_load_global_constant() call in the file now names .access before .align_mul, matching the generated _nir_load_global_constant_indices order (nir_intrinsics.py: ACCESS, ALIGN_MUL, ALIGN_OFFSET). The tip has 7 of 8 calls in the reversed order that GCC rejects in C++20; this head has 0. Each call keeps its values.
  • Head merged into aurora-wip 51b18ab1: local drm-shim gate (clang) 338 Ok / 0 Fail, the same as the tip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants