Repository navigation
agx: fix the -Werror build of the AGX drivers - #2
Merged
Merged
Conversation
Building with -Dwerror=true (as Mesa CI does) fails with both GCC and Clang: - agx3_copy_encode_reg_to_uniform() kept the composer field tables of the instruction it now writes byte by byte, so both arrays are unused. Keep the field values in the comment instead. - enable_all_threads_agx3b/agx3c in agx3_pack.c are never referenced. - Four unit tests put a bare EXPECT_*() under an if; the gtest macros expand to an if/else, which GCC reports as a dangling else. Add braces. No functional change. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
GCC and Clang reject these with -Dwerror=true: - agx3_g17p_grid_helper_core.c carries a precompiled copy of the grid setup helper that nothing references; the helper is built from its source text, which is all agx3_g17p_grid_helper_source() returns. - copies_start in the IOTO load core and chan in the prolog/epilog varying bound check are computed and never read. No functional change. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
With -Dwerror=true Honeykrisp does not build: several functions keep locals from earlier revisions that are no longer read (the render command's stream length and start, the dispatch sink start, the heap pointer pair now read from rodata, the scaled-conversion offset replaced by the aligned 32-bit load, and two unused handles). The G17P vertex program info call stays, without its unused result: on failure it clears the program info, and the draw paths then refuse the vertex program variant on their own. No functional change. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
This was referenced Nov 23, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the -Werror build of the AGX drivers
agx3bdoes not build with-Dwerror=true, which Mesa CI uses. GCC 16 and Clang 23 both fail:agx3_copy_encode_reg_to_uniform()still declares the composer tables of an instruction it now writes byte by byte.enable_all_threads_agx3b/agx3care never referenced.EXPECT_*()under anif. The gtest macros expand to an if/else, so GCC reports a danglingelse.src/asahi/lib: an unreferenced precompiled copy of the grid-setup helper, plus two unused locals.There is one commit per component (
agx:,asahi:,hk:). None of them changes behaviour.Testing
Rebased on
agx3b5544dbf; the same errors are still there. On Fedora 45 aarch64, configured with-Dbuildtype=debugoptimized -Dwerror=true -Db_ndebug=false -Dgallium-drivers=asahi,zink -Dvulkan-drivers=asahi -Dbuild-tests=true -Dtools=asahi:meson testgives 55/56; the one failure isnir_tests, which is fixed separately by thenir/range_analysisPR (with both: 56/56).src/egl/main/eglglvnd.c(-Wunused-but-set-global) andsrc/glx/glxcmds.c(-Wattribute-alias).🤖 Generated with Claude Code