Repository navigation
borealis: share nested command buffers, depth clip control, and primitives-generated queries - #928
Conversation
…tives-generated queries Remove qualification-only chip gates for shared Vulkan extensions whose implementations are common across Borealis generations: - VK_EXT_nested_command_buffer: pure software secondary command-buffer replay in hk_CmdExecuteCommands() across all generations (G13-G17). - VK_EXT_depth_clip_control and extendedDynamicState3DepthClipNegativeOneToOne: lowered in NIR (agx_nir_lower_clip_m1_1) through the shared root table on AGX2 (G13/G14) and native AGX3 (G15/G16/G17P); kept off HAL300 until M5 PPP profile admission accepts negative-one depth clip. - VK_EXT_primitives_generated_query: counted in the shared pre-graphics helpers across all generations (G13-G17). - Drop the redundant G16G robustImageAccess override, already unconditionally enabled in hk_get_device_features(). Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Exact-head
+121 NS -> Pass, 0 Fail, 0 GPU faults, 0 AVCs, SELinux Enforcing, 0 failed units. |
RyanTheTide
left a comment
There was a problem hiding this comment.
Source review of exact head 24701906cc34. No defect.
Checked.
nestedCommandBuffer*andprimitivesGeneratedQuery*(includingWithNonZeroStreams) follow the extension bits.geometryStreamsandtransformFeedbackare true on every path that now gets the query, so non-zero streams are valid there.depthClipControlandextendedDynamicState3DepthClipNegativeOneToOnenow followEXT_depth_clip_control, so the extension and its features can no longer disagree.- The removed G16G block was dead code.
robustImageAccessandrobustImageAccess2are initialized totruein the same function, and nothing clears them in between. - Removing the late
EXT_primitives_generated_queryoverride inhk_create_drm_physical_device()leaves a single source of truth.
Notes, not blocking:
EXT_primitives_generated_queryandEXT_nested_command_bufferare now also advertised on G18G, which is on the HAL300 path and is admitted. It shares the M5 pre-graphics helpers, so this is probably fine, but no row covers it. The PR body lists G13-G17. If G18G is meant to be included, say so; otherwise keep it out until it has a run.- The G13 (J316s) and G15 (J615) exact-head rows listed under Still to run are the ones that cover the AGX2-only and G15 paths of
agx_nir_lower_clip_m1_1. J413 covers G14 only.
DjDeveloperr
left a comment
There was a problem hiding this comment.
Code review of exact head 24701906cc343dc320cb46d2fb159c1814974755 (OPEN, merges cleanly onto current aurora-wip with no overlap against #824). Code changes are clean with no correctness, safety, or policy defects; holding approval only for the remaining G15 exact-head hardware receipt.
Checklist Summary
- §1 No model gating: Pass. Removes qualification-only chip gates for
VK_EXT_nested_command_bufferandVK_EXT_primitives_generated_query, drops the deadAGX_CHIP_G16Goverride, and scopesVK_EXT_depth_clip_controlto!agx_chip_hal300_path(dev->chip)where HAL300 PPP admission (src/asahi/vulkan/hk_cmd_draw.c:9962) still rejectsdepth_clip_negative_one_to_one. - §2 Production-ready: Pass. Feature flags (
depthClipControl,extendedDynamicState3DepthClipNegativeOneToOne,nestedCommandBuffer*,primitivesGeneratedQuery*) all track their correspondingsupported_extensions->EXT_*bits cleanly, and removing the lateEXT_primitives_generated_queryoverride inhk_create_drm_physical_device()leaves one source of truth. The deletedAGX_CHIP_G16GrobustImageAccess{,2}block was dead code (both are initialized totrueunconditionally athk_physical_device.c:608and:923and never cleared afterwards). - §3 Safety & correctness: Pass.
- Nested command buffers: Pure software replay via
vk_cmd_queue_execute()inhk_CmdExecuteCommands()(hk_cmd_buffer.c:522) with conditional rendering save/restore and full graphics/compute state invalidation (while preserving active queries and render pass state). - Depth clip control: Lowered in NIR via
agx_nir_lower_clip_m1_1fromhk_lower_hw_vs()(hk_shader.c:4192, called for VS/TES at:5495and GS raster at:8042), fed byclip_z_coeffin the shared root table (hk_nir_lower_descriptors.c:924, updated on the shared slow path athk_cmd_draw.c:11508;hk_g17p_flush_dynamic_state_fast()bails on any dirty dynamic state). Shader object cache/serialization (hk_shader.c:908,937,7528,9138,9659) and full-frame scissor elision (hk_cmd_draw.c:8988) are consistent across AGX2 and native AGX3. - Primitives-generated queries: Handled across both AGX2 and native AGX3 query reset/begin/end/copy paths (
hk_query_pool.c), direct/indirect/restart IA helpers (hk_ia_updateusing the unconditionally mapped RWAGX_SCRATCH_PAGE_ADDRESSfromagx_device.c:1534), tessellation (libagx_prefix_sum_tess, withtess_batchdisabled when active), and multi-stream geometry shaders (poly_pre_gsinsrc/poly/cl/geometry.cl:289).hk_g17p_indirect_records_eligible()(hk_cmd_draw.c:14345) bails when active,hk_rast_discard()does not bypass counting, andhk_cmd_invalidate_graphics_state()preserves activeprims_generated_querybindings across secondary replay.
- Nested command buffers: Pure software replay via
- §4 Clean-room & attribution: Pass. Single commit with human author and
Signed-off-by:only; no prohibited trailers or third-party material. - §5 Evidence & CI (at
24701906cc343dc320cb46d2fb159c1814974755):- CI:
statusCheckRolluponaurora-silicon/mesa#928is empty; mirror CI onDjDeveloperr/mesa(ci/train-pr928, exact head24701906cc34) passed bothaurora-agent-policy(run 45384823239) andasahibuild-test(run 45384823323). - Hardware verified: G13 (J316s M1 Pro), G14 (J413 M2 Air), G16 (J713 M4 Air), and G17P (Neo regression) all pass with +121 NS -> Pass on G13/G14/G16, 0 Fail, 0 regressions, 0 GPU faults, 0 new AVCs.
- Remaining for approval: The queued G15 (J615 M3 Air) exact-head CTS receipt covering the G15 command-stream generation.
- CI:
- §6 Naming: Pass. Borealis naming used consistently throughout commit message and PR description.
Non-blocking Note
- Setting
.EXT_nested_command_buffer = trueand.EXT_primitives_generated_query = trueunconditionally also exposes both extensions onAGX_CHIP_G18G(whileEXT_depth_clip_controlremains gated off by!agx_chip_hal300_path(dev->chip)). Worth noting in the PR/commit summary if G18G is intentionally included alongside G13–G17.
|
Exact-head
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Promoting to APPROVE at exact head 24701906cc343dc320cb46d2fb159c1814974755.
All §1–§6 criteria are now satisfied:
- Code & safety (§1–§4, §6): Verified clean in the prior review at this exact head (zero code/policy blockers, merges cleanly onto
aurora-wip). - Exact-head CI (§5): Mirror
aurora-agent-policy(45384823239) andasahibuild-test(45384823323) both PASS on24701906cc343dc320cb46d2fb159c1814974755. - Exact-head hardware (§5): J615 (M3 Air, G15G) receipt posted (
+95 NS -> Pass,0Fail,0GPU faults,0new AVCs, SELinux Enforcing,0failed units), completing exact-head PASS coverage across all five generations (G13X J316s, G14G J413, G15G J615, G16G J713, G17P Neo).
|
Merged into
|
Problem
Several Borealis Vulkan extensions whose implementations are shared across generations remained gated to G17P or M5 only after initial qualification:
VK_EXT_nested_command_bufferis pure software secondary command-buffer replay inhk_CmdExecuteCommands().VK_EXT_depth_clip_controlandextendedDynamicState3DepthClipNegativeOneToOneare lowered in NIR (agx_nir_lower_clip_m1_1) through the shared root table across AGX2 and native AGX3 (HAL300/M5 PPP admission currently rejects negative-one depth clip athk_cmd_draw.c:9962).VK_EXT_primitives_generated_queryis counted by the shared pre-graphics helpers across all generations.robustImageAccess/robustImageAccess2override inhk_get_device_features()duplicated the unconditionaltrueinitializers in the same function.Change
VK_EXT_nested_command_bufferandVK_EXT_primitives_generated_queryunconditionally across all Borealis generations (G13-G17).VK_EXT_depth_clip_control(depthClipControlandextendedDynamicState3DepthClipNegativeOneToOne) on all non-HAL300 paths (!agx_chip_hal300_path(dev->chip), i.e. G13-G17P), keeping HAL300/M5 gated until M5 PPP admission supports negative-one depth clip.dev->chip == AGX_CHIP_G16GrobustImageAccess{,2}block.#824,#810,#812,#813,#416,#456).Testing
Exact head
24701906cc34(arm64 ICDlibvulkan_asahi.sosha256a756b96daa2794af...vsaurora-wip912c9e4cc7esha25618224556d3f83964..., userspace-only viaVK_DRIVER_FILES, 0 GPU faults, 0 new AVCs, Enforcing, 0 failed units):meson test --suite asahi245/245 PASS.fleet87):nested12 -> 24/24 Pass,depth_clip0 -> 37/72 Pass (35 NS),primitives0 -> 72/72 Pass (+121 NS -> Pass, 0 Fail), control 87/96 identical.fleet85):nested12 -> 24/24 Pass,depth_clip0 -> 37/72 Pass (35 NS),primitives0 -> 72/72 Pass (+121 NS -> Pass, 0 Fail), control (excluding pre-existing baseline MSAA depth submit EINVAL) 95/95 identical.fleet87):nested24/24,depth_clip46/72 (26 NS),primitives72/72, control 96/96 — 100% identical, 0 regressions.Still to run
VK_EXT_depth_clip_controlremains intentionally gated until M5 PPP admission acceptsdepth_clip_negative_one_to_one.Exact-head CTS matrix & environment receipts (2470190)
nested(24)depth_clip(72)primitives(72)control7.3.0-aurora-fleet87base(912c9e4cc7e)7.3.0-aurora-fleet87b1(24701906cc3)7.3.0-aurora-fleet85base(912c9e4cc7e)7.3.0-aurora-fleet85b1(24701906cc3)7.3.0-aurora-fleet87base(912c9e4cc7e)7.3.0-aurora-fleet87b1(24701906cc3)*J713
fleet85has one pre-existing baseline MSAA depth submit EINVAL (std_sample_locations.draw.depth), identical acrossbaseandb1; all other 95/95 control cases pass.ICD SHA-256:
base(912c9e4cc7e):18224556d3f839649cc03e525696211342944e49dc5b3b3d3efc8686a5d37797b1(24701906cc343dc320cb46d2fb159c1814974755):a756b96daa2794af3c5a8c6559c8134de4ae24bdaff6ac11851eb58a62681360