Repository navigation
borealis,asahi: enable G16G AGX3B/HAL200 fast paths (shadow-array, quad-deriv, R11G11B10 EOT) - #732
Conversation
|
Review at aa64538. Thanks. The shadow-array part looks right. The tri-merge quirk and the R11G11B10 class are wider than the evidence for them, and the change also reaches M3:
|
aa64538 to
6565106
Compare
|
Re-checked at 6565106. Fixed: hk_image.h:281 now uses Still open. The body's results are for aa64538 on the old base, so they need a rerun at this head:
We can run (3) and the M4 parts of (1) and (2) at this head on our M3 Air and M4 Air if you want. Assisted-by: LLM (Claude:Opus 5.5) |
|
Exact-head M4 (
Assisted-by: LLM (Gemini:4 Neon) |
|
Thanks for the M4 rows at 6565106. The title is fixed. The shadow-array sets on M4 (all 157 Still open:
A note on merge order with #736: once this lands, G16G has the own class, so #736's single-RT R11G11B10F path on M4 goes back to direct resolve. The M4 Assisted-by: LLM (Claude:Opus 5.5) |
…ad-deriv, R11G11B10 EOT) Widen two G17P-only AGX3B/HAL200 fast paths to cover G16G (M4), and drop the stale G17P-only chip check on Gallium's quad-derivative triangle-merge guard: - agx_optimizer.c / hk_shader.c / agx_nir_lower_g17p_combined_sampler.c: guard shadow 2D-array constant level/bias register staging on AGX_ISA_ENCODING_AGX3B instead of AGX_CHIP_G17P, admit agx_chip_native_agx3() in hk_compile_nir() (renaming local g17p to native_agx3), and update the regression test and comment to cover AGX3B. - agx_state.c: remove the stale dev->chip == AGX_CHIP_G17P guard on ctx->fs->b.info.needs_quad_derivatives in agx_g17p_emit_bind_state() so Gallium fragment shaders with implicit 2x2 quad derivatives disable triangle merging on every native AGX3 chip (including G16G and conservatively G15G/S/C), matching hk_cmd_draw.c. - hk_image.h: switch hk_eot_r11g11b10_own_class() to agx_chip_native_hal200(dev->chip) and update its comment for HAL200. Signed-off-by: Diljit Singh <hey@djdev.me>
6565106 to
390a582
Compare
|
Re-checked at 390a582. Against 6565106 the only change is that the G16G tri-merge quirk is dropped: agx_chip.h and test-chip.c are back to the base, and the title and commit message are updated. That settles the tri-merge point; G16G keeps the linker's conservative bit, and the Still open:
The M3 (G15G) shadow-array rows are on us. The shadow-array code is the same as at 6565106, so I'll run them at 390a582, together with the GLES3 projected mipmap cases, since the Assisted-by: LLM (Claude:Opus 5.5) |
|
@RyanTheTide Thanks for the review ( We audited our local M4 captures and confirmed Exact-head
We'll also re-run Assisted-by: LLM (Gemini:4 Neon) |
Resolve hk_shader.c conflict with the pre-scanned AGX3 compute lowering and G18G vertex/fragment native-or-g18g guard, keeping native_agx3 (agx_chip_native_agx3()) across all combined/indexed sampler calls so G18G stays excluded while G15/G16G/G17P match AGX_ISA_ENCODING_AGX3B. Signed-off-by: Diljit Singh <hey@djdev.me>
…1B10 EOT in tests Add unit test coverage for G16G bias and G15G constant LOD/bias shadow-array register staging in test-native-form-regressions.cpp and for hk_eot_r11g11b10_own_class / hk_eot_pbe_format / hk_eot_key_format across G15G, G16G, G17P, M5, and G18G in test-hk-compression-contract.c. Also update the stale G17P-only comments in agx_optimizer.c and hk_image.h to match the AGX3B / HAL200 predicates and M4 (G16G) measurements. Signed-off-by: Diljit Singh <hey@djdev.me>
|
Refreshed onto latest
Exact-Head Verification (
|
satchlj
left a comment
There was a problem hiding this comment.
Verdict: MERGE at c39e703e9d6e
Blockers: none
Checked: full diff across agx_optimizer.c, agx_nir_lower_g17p_combined_sampler.c, hk_shader.c, hk_image.h, agx_state.c, test-native-form-regressions.cpp, and test-hk-compression-contract.c; chip predicate equivalence verifying AGX_ISA_ENCODING_AGX3B matches agx_chip_native_agx3() across all admitted chips (G15G/S/C, G16G, G17P, excluding M5 AGX3C and G18G AGX3D) and agx_chip_native_hal200() restricts R11G11B10F own-class EOT to G16G and G17P; merge resolution in 04e2b4a950d6 against aurora-wip; native GCC 16 -Db_ndebug=false build and full unit test suite; targeted unit tests and live Mac Studio M5 Max (J775c, T6050) Vulkan CTS and gpubench-vk sanity with zero GPU faults; exact-head M4 (G16G B0, J773g) hardware verification covering aurora-r11g11b10f 2, test-mixed-mrt-snorm-resolve, Vulkan CTS (b10g11r11 and 2D-array shadow), and gpubench-vk; commit hygiene (all 3 commits carry DCO Signed-off-by, zero AI attribution in commits, zero Apple material).
Evidence
- Code & predicate audit (
c39e703e9d6e36b57f19430e087960afd4528277):src/asahi/lib/agx_chip.h: every admitted chip (path != NONE) withAGX_ISA_ENCODING_AGX3Bis exactlyG15G,G15S,G15C,G16G,G17P, matchingagx_chip_native_agx3()while excluding M5 (AGX3C/HAL300) andG18G(AGX3D/HAL300).agx_chip_native_hal200()selectsG16GandG17Ponly.src/gallium/drivers/asahi/agx_state.c: removingdev->chip == AGX_CHIP_G17P &&onctx->fs->b.info.needs_quad_derivativesmatches Borealis'shk_cmd_draw.cdraw path verbatim.git show --cc 04e2b4a950d6: merge withaurora-wipcleanly preserves pre-scanned AGX3 compute lowering and theG18Gguard while threadingnative_agx3across all combined/indexed sampler paths.
- Native GCC 16 build & unit tests (
-Dbuildtype=release -Db_ndebug=false -Dbuild-tests=true, Mac Studio M5 Max J775c / T6050):meson test -C build --suite asahi --print-errorlogs: 208/208 OK (0Fail).- Targeted
agx_tests --gtest_filter="NativeForms.AGX3BArrayShadowConstantLodKeepsEncodableImmediates": PASS (1/1). - Targeted
hk_compression_contract_test: PASS (validatinghk_eot_r11g11b10_own_class,hk_eot_pbe_format, andhk_eot_key_formatacrossG15G,G16G,G17P, M5, andG18G).
- Live Mac Studio M5 Max (J775c, T6050, G17C) Vulkan sanity (
MESA_SHADER_CACHE_DISABLE=1):dEQP-VK.api.smoke.*: 8/8 Pass, 0 Fail.dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.color.2d.b10g11r11_ufloat_pack32.b10g11r11_ufloat_pack32.*: 8/12 Pass, 4 NotSupported, 0 Fail.dEQP-VK.texture.shadow.2d_array.nearest.*: 32/128 Pass, 96 NotSupported, 0 Fail.gpubench-vk --test compute.heavy --depths 1 --warmup-ms 100 --runs 2 --run-ms 100:status=ok, 409 submits, median491.823 us/submit,4391.60 GFLOP/s.GPU_FAULT_DELTA=0(FAULTS_BEFORE=0,FAULTS_AFTER=0).
- Exact-head M4 (
G16G B0, J773g) hardware verification (author report atc39e703e9d6e):aurora-r11g11b10f 2(5x),test-mixed-mrt-snorm-resolve(10x,single_rt_r11g11b10f0fails),925Vulkan CTS cases (b10g11r11+ 2D-array shadow,0fail), and202/202gpubench-vkCRC smoke rows with0GPU faults/recoveries.
|
Merged latest
|
|
PASS on MacBook Neo J700 (
|
Summary
Widens two
G17P-only AGX3B/HAL200 fast paths to coverAGX_CHIP_G16G(M4), and drops the staleG17P-only chip check on Gallium's quad-derivative triangle-merge guard:src/asahi/compiler/agx_optimizer.c,src/asahi/compiler/agx_nir_lower_g17p_combined_sampler.c,src/asahi/vulkan/hk_shader.c,src/asahi/compiler/test/test-native-form-regressions.cpp: guard shadow 2D-array constant level/bias register staging onAGX_ISA_ENCODING_AGX3Binstead ofAGX_CHIP_G17P, admitagx_chip_native_agx3()inhk_compile_nir()(renaming localg17ptonative_agx3, matchingAGX_ISA_ENCODING_AGX3Bwhile keepingG18Gexcluded), and add unit test coverage forG16GandG15G.src/gallium/drivers/asahi/agx_state.c: remove thedev->chip == AGX_CHIP_G17Pguard onctx->fs->b.info.needs_quad_derivativesinagx_g17p_emit_bind_state()so Gallium fragment shaders with implicit 2x2 quad derivatives disable triangle merging on every native AGX3 chip (includingG16Gand conservativelyG15G/S/C), matching Borealis's draw path.src/asahi/vulkan/hk_image.h,src/asahi/vulkan/tests/test-hk-compression-contract.c: switchhk_eot_r11g11b10_own_class()toagx_chip_native_hal200(dev->chip), update its comment for HAL200 and M4 (G16G) measurements, and add unit test coverage forhk_eot_r11g11b10_own_class(),hk_eot_pbe_format(), andhk_eot_key_format()acrossG15G,G16G,G17P, M5, andG18G.Verification (Exact HEAD
c39e703e9d6e)buildtype=debugoptimized/b_ndebug=if-release):meson test --suite asahi208 / 208PASS (0Fail), includingNativeForms.AGX3BArrayShadowConstantLodKeepsEncodableImmediatesandhk_compression_contract.Apple M4 (G16G B0),J773g, Linux7.3.0-ARCH-m4mainefed1ae3, BorealisMesa 26.3.0-devel (git-c39e703e9d)):aurora-r11g11b10f 2(5x):res-eot,res-store, andres-image5 / 5PASS (0 / 6144pixels differing from expected mean0x701e0400,0 / 6144words differing).test-mixed-mrt-snorm-resolve(10x):10 / 10PASS (single_rt_r11g11b10f:10 / 10PASS,rgb=(0.500,1.000,2.000) exp=(0.500,1.000,2.000) fails=0; all 4 mixed-MRT and suspend/resume subtestsfails=0).--jobs 1,925cases):b10g11r11copy/blit (12cases):8Pass /4NotSupported /0Fail /0Crash /0TimeoutdEQP-VK.texture.shadow.2d_array.*+dEQP-VK.glsl.texture_functions.*sampler2darrayshadow*,913cases):270Pass /643NotSupported /0Fail /0Crash /0Timeoutgpubench-vkCRC smoke (plan.txt,plan-90pct.txt,plan-90pct-w2.txt):202 / 202rowsok,84 / 84CRCs valid.health: failed 0 errno 0 degraded 0,0GPU recoveries,0hang kills,0M4 GPU recovery generationorfault bankkernel log lines.