Skip to content

borealis: expose shared native feature paths on the Airs - #816

Closed
RyanTheTide wants to merge 3 commits into
aurora-wipfrom
borealis/air-native-feature-paths
Closed

RyanTheTide wants to merge 3 commits into
aurora-wipfrom
borealis/air-native-feature-paths

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 23, 2026 •

Copy link
Copy Markdown

Problem

Borealis leaves several Vulkan features disabled on native AGX3 GPUs that have the rendering, image, or compiler paths they use. R32F storage texel buffers also miss the atomic capability advertised for R32F storage images.

Change

Expose depth clip control and its dynamic state, D16/S8, ASTC HDR, float32 atomics, and compute derivatives where their paths are available. Run compute derivative lowering when the device advertises it. Use shaderImageFloat32Atomics for both R32F format queries.

Testing

On J713 (G16G), all 16 regular R32F texel-buffer atomic cases passed at 3746b762231. All 16 were NotSupported at the previous head 1e4207e69c8. The R32F format query shows the added buffer atomic bit. The 16 linear variants still skip because the required tiling is unsupported.

Final-head Vulkan CTS 1.4.7.1 on J713

Both ICDs ran on the production fleet85 kernel and command line. The baseline was efabab38502 and the candidate was 3746b762231.

Cases Baseline Pass / NotSupported Candidate Pass / NotSupported
Depth clip control 1 / 101 102 / 0
D16/S8 2 / 254 247 / 9
ASTC HDR 0 / 206 206 / 0
Float32 atomics 0 / 256 252 / 4
Compute derivative SPIR-V family 0 / 549 183 / 366
R32F texel-buffer atomics 0 / 32 16 / 16

All 183 compute-stage derivative cases pass. The other 366 target task or mesh. The 96-case control gave 95 Pass and the same DeviceLost on both builds. The 53 compute texture cases were NotSupported in both runs. For samplercubearrayshadow_compute, the candidate reaches the exclusive compute queue requirement and skips there.

Earlier J615 feature results remain at 0ef2643a97e and 1e4207e69c8.

The broader tier-A sample compared 346,963 cases on both builds. All 143,960 baseline passes stayed green and 21,363 more passed. Both builds had the same 18 crashes and 18 DeviceLost results on the matched set. The sweep used a fixed time cap per build. The candidate classified 346,963 cases and the baseline classified 399,127.

Regression tuple for the run was 0 SELinux denials, 0 failed units and 0 new error-priority kernel messages. No GPU firmware failure was reported.

Still to run

J615 (G15G) final-head validation and the remainder of the broader sweep. No G15S or G15C row is available from this run.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@DjDeveloperr

Copy link
Copy Markdown

Verified exact head 1e4207e69c8cb8e5689a9a1d899b3c6eace8f87f on Apple A18 Pro (G17P B1 / MacBook Neo) (7.3.0-41.fc44.aurora.aarch64, live ICD verified via vulkaninfo --summary: Mesa 26.3.0-devel (git-1e4207e69c), Borealis, derived from Honeykrisp, MESA_SHADER_CACHE_DISABLE=true):

Feature & Extension Exposure (vulkaninfo)

All 5 newly shared native feature paths are advertised on Apple A18 Pro (G17P B1):

  • VK_EXT_depth_clip_control (depthClipControl = true)
  • VK_FORMAT_D16_UNORM_S8_UINT
  • VK_EXT_texture_compression_astc_hdr (textureCompressionASTC_HDR = true)
  • VK_EXT_shader_atomic_float / VK_EXT_shader_atomic_float2 (shaderBufferFloat32Atomics = true, shaderSharedFloat32Atomics = true, shaderImageFloat32Atomics = true)
  • VK_KHR_compute_shader_derivatives (computeDerivativeGroupQuads = true, computeDerivativeGroupLinear = true)

Vulkan CTS 1.4.7.1 (1,973 tests: 1,332 Pass / 641 NotSupported / 0 Fail)

  • Depth clip control (clipping.depth_clip_control, pipeline.*.depth_clip_control, dynamic_state.*depth_clip_control*, clipping.user_defined): 256 / 256 Pass (0 Fail)
  • D16_UNORM_S8_UINT (renderpass, copy_and_blit, image, pipeline.depth, dynamic_rendering; 400 sampled from 3,034): 191 Pass / 209 NotSupported / 0 Fail
  • ASTC HDR (sfloat_block) (copy_and_blit, format_feature_flags2, format_properties; 400 sampled from 2,280): 211 Pass / 189 NotSupported / 0 Fail
  • Float32 atomics (glsl.atomic_operations, spirv_assembly.*float_atomic*, image.atomic_operations.*r32_sfloat*; 276 total): 92 Pass / 184 NotSupported / 0 Fail
  • Compute shader derivatives (glsl.derivate.* + spirv_assembly.instruction.compute.* linear/quads; 400 sampled from 675): 389 Pass / 11 NotSupported / 0 Fail
  • ASAHI_MESA_DEBUG=verify (compute.pipeline.basic, depth_clip_control, compute derivatives, ASTC HDR sfloat_block; 241 tests): 193 Pass / 48 NotSupported / 0 Fail, 0 verify errors

Hardware Health

  • Zero new GPU/MMU/firmware kernel faults (kfault_delta=0) and zero SELinux AVCs (avc_delta=0).

Assisted-by: LLM (Antigravity:Gemini 4 Neon)

@DjDeveloperr DjDeveloperr 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.

Formal §1–§6 pre-PR checklist review on live head 1e4207e69c8cb8e5689a9a1d899b3c6eace8f87f:

Blockers

  1. §1 / Code correctness — missed stale chip gate in src/asahi/vulkan/hk_buffer_view.c:82 (VK_FORMAT_R32_SFLOAT storage texel buffer atomics):
    This PR enables VK_EXT_shader_atomic_float / VK_EXT_shader_atomic_float2 (shaderImageFloat32Atomics, shaderImageFloat32AtomicAdd, shaderImageFloat32AtomicMinMax) on agx_chip_native_or_m5 and updates hk_image.c:235 from agx_chip_g17p_or_m5(pdev->dev.chip) to pdev->vk.supported_features.shaderImageFloat32Atomics. However, the twin check in hk_get_buffer_format_features() (src/asahi/vulkan/hk_buffer_view.c:80-83) was missed:

    if (p_format == PIPE_FORMAT_R32_UINT || p_format == PIPE_FORMAT_R32_SINT ||
        (p_format == PIPE_FORMAT_R32_FLOAT &&
         agx_chip_g17p_or_m5(pdev->dev.chip)))
       features |= VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT;

    On G15G/G15S/G15C/G16G, VK_FORMAT_R32_SFLOAT therefore advertises VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT in optimalTilingFeatures while omitting VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT in bufferFeatures (even though hk_CreateBufferView() at line 105 and image atomic lowering already run on agx_chip_native_or_m5). Please update hk_buffer_view.c:82 to check pdev->vk.supported_features.shaderImageFloat32Atomics to match hk_image.c:235, and verify the previously NotSupported R32F texel-buffer atomic CTS cases pass on G15G/G16G.

  2. §5 Evidence — incomplete pre-merge CTS sweep, stale-head rows on J615/J713, and missing regression tuple:

    • The PR is marked ready for review (not draft), while the PR description explicitly notes "Still to run before merge is the broader Vulkan CTS sweep." Please complete the sweep (or convert to draft until ready) before merge.
    • Four of the five feature CTS rows on J615 (G15G) and J713 (G16G) were recorded against commit 0ef2643a97e rather than the final head 1e4207e69c8cb8e5689a9a1d899b3c6eace8f87f (and will need a final-head re-run after fixing hk_buffer_view.c:82).
    • Please include the §5 system regression tuple (0 SELinux denials, 0 failed units, 0 new kernel errors) for the final-head runs on J615 and J713 (and note whether G15S/G15C hardware runs are available or requested per §1).

Non-blocking notes

  • hk_shader.c:561: Checking (vk_pdev->supported_features.computeDerivativeGroupQuads || vk_pdev->supported_features.computeDerivativeGroupLinear) instead of only computeDerivativeGroupQuads would keep the lowering gate consistent if the two bits ever diverged (today both are set together).
  • Broader CTS sweep check: Please confirm dEQP-VK.glsl.texture_functions.texture.*_compute (specifically samplercubearrayshadow_compute, given agx_nir_lower_g17p_combined_sampler.c:165 only admits m5 && cube_array && register_level) behaves cleanly on G15G/G16G during the broader sweep.

Checklist Summary

  • §1 No model gating: Changes requested — agx_chip_native_agx3 / agx_chip_native_or_m5 and feature-bit gating in hk_physical_device.c, hk_image.c, and hk_shader.c are clean (depth clip control, D16/S8, ASTC HDR, float32 atomics, compute derivatives all match hardware/compiler support on AGX3B), but hk_buffer_view.c:82 retains a stale agx_chip_g17p_or_m5 gate.
  • §2 Production-ready, no hacks: Pass — no new cmdline/env vars, retries, or lab-only paths.
  • §3 Safety: Pass — userspace feature exposure only; no hardware-protection or boot changes.
  • §4 Clean-room & attribution: Pass — both commits (0ef2643a97e, 1e4207e69c8) have human author/committer and human Signed-off-by: with zero AI trailers; PR body includes Assisted-by: LLM (Codex).
  • §5 Evidence: Changes requested — broader CTS sweep still pending, 4/5 J615+J713 feature rows are from 0ef2643a97e, and §5 regression tuple is missing.
  • §6 Naming: Pass — Borealis naming used throughout PR and commits.

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide
RyanTheTide marked this pull request as draft November 23, 2026 20:54
Use shaderImageFloat32Atomics for the R32F storage texel buffer format, as for R32F storage images. This exposes texel-buffer atomics on G15 and G16 where the driver already supports them.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@DjDeveloperr

Copy link
Copy Markdown

Closing as superseded by #928 and #929, which landed depth clip control, compute derivatives, float32 atomics, D16S8 and ASTC HDR, including the matching R32F capability checks.

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