Repository navigation
borealis: expose single-texel buffer offsets on every M5 part - #450
Conversation
|
Thanks for this; getting vkd3d-proton past the alignment check is a real fix. We select behaviour by a hardware property rather than by the chip it was tested on. The texel-buffer tail is enabled for one M5 part:
The comment you updated says the reason is the AGX3 texture/PBE including the alignment tail in its height, which G17G and G17S share with G17C. Could the test be Happy to run rows on our M1 Pro, M2, M4 Pro and A18 Pro if that helps. |
Merge train: independent review (code only, Opus 5.5 xhigh)Verdict: CLEAN WITH NITS. No blocker or major. Only G17C's reported device limits change (single-texel alignment plus the reserved 15-element R8 tail); there's no codegen or layout change on any chip.
Train: held only on the open property-gate request (owner decision pending on merging G17C-gated PRs as-is). If widened to G17G/G17S, the M5 Pro (G17S) gate would cover it ( |
a28eac4 to
d333b20
Compare
|
Note 🤖 Claude Opus 5.5 responding on behalf of erikwb The tail is now reported on every M5 part: G17G, G17S and G17C share the buffer-view path that writes the software tail and counts it in both descriptor heights ( |
RyanTheTide
left a comment
There was a problem hiding this comment.
No blockers. Re-review of d333b20: the tail is now selected by agx_chip_native_agx3() || agx_chip_g17_m5(), with the G18G reason in a comment. That matches the buffer-view and PBE paths in hk_buffer_view.c, which take the tail on the same set. Our point is resolved. Limits on G13-G17P are unchanged. The one gap is the G17G/G17S row you already named (dEQP-VK.texel_buffer.*, api.info.*, api.buffer_view.*).
Assisted-by: LLM (Claude:Opus 5.5)
|
Looks good; approve once the commit message is fixed and the G17G/G17S row is in.
I re-checked the reach at head. HW row: an M5 or M5 Pro (G17G/G17S) on head d333b20. Run Assisted-by: LLM (Claude:Opus 5.5) |
Native AGX3 and every M5 part (G17G, G17S, G17C) view texel buffers through the 2D texture/PBE descriptor, and the buffer view and lowering paths handle the sub-16-byte alignment tail. Report the single-texel alignment to Vulkan clients on all of them, and reserve room for the worst-case 15 R8 texels of that tail at the maximum view size. G18G takes the legacy buffer-view path, which has no tail, and keeps its 16-byte alignment. Signed-off-by: Erik Bourget <erik@ebourget.net>
d333b20 to
d48f3d0
Compare
|
Note 🤖 Gemini 4 Neon responding on behalf of erikwb Updated commit attribution and the PR body at
We do not have an M5 (G17G) or M5 Pro (G17S) Mac in our lab, so the G17G/G17S hardware row ( |
|
Re-checked d48f3d0. The commit message is fixed (author and Signed-off-by only), and the code is the same as d333b20, which we already cleared: Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Reviewed at d48f3d02203a against the pre-PR checklist. 0 code, attribution, or policy blockers; leaving as COMMENT only because G17G/G17S hardware evidence (and remaining CTS groups) is still owed.
Code & checklist audit
- Descriptor/property parity (
src/asahi/vulkan/hk_physical_device.c:1124-1129, 1196-1199):agx3_texel_buffer_tail(agx_chip_native_agx3(dev->chip) || agx_chip_g17_m5(dev->chip)) matches the exact chip set using the 2D texture/PBE software alignment tail insrc/asahi/vulkan/hk_buffer_view.c:105,203-227,267-278andsrc/asahi/vulkan/hk_shader.c:3475(agx_chip_native_or_m5()). (Optional non-blocking nit:agx_chip_native_or_m5(dev->chip)can be used directly.)- Reserving 15 R8 texels in
maxTexelBufferElements(AGX_TEXTURE_BUFFER_MAX_SIZE - 15=268,435,441) keepselements + tail_offset_elwithin the 2D descriptor height limit at any single-texel offset. - G18G stays properly excluded with a clear hardware comment (legacy buffer-view path, no software tail).
- Checklist §1, §2, §4, §6: covers all M5 parts without a single-chip gate; no hacks/env vars; commit
d48f3d02203ahas human author/committer + humanSigned-off-by:only; PR body uses Borealis naming and ends withAssisted-by:. - Build & tested hardware (§5): no GitHub CI checks are configured; host
--suite asahi(140/140), aarch64 Borealis cross-build, J716c (M5 Max, G17C)vulkaninfo+ 15/15 compute probe (including R8 offsets 1/7/15 at max size268,435,441) +api.buffer_view.*&api.infosubset A/B (0 diffs, 0 GPU faults), and J713 (M4, G16G) unchanged-path check are reported at this head.
Remaining §5 HW evidence before approval
- M5 (G17G) and/or M5 Pro (G17S): base-vs-head run of
dEQP-VK.api.buffer_view.*,dEQP-VK.api.info.*, texel-buffer CTS (dEQP-VK.texel_buffer.*/binding_model/robustness), and the R8 offset 1/7/15 max-size (268,435,441) readback check with 0 GPU faults. - Complete the remaining
dEQP-VK.api.info.*and texel-buffer CTS groups listed in Still to run on G17C (and note §5 regression health: SELinux / failed units / kernel errors).
Assisted-by: LLM (Gemini 4 Neon)
|
Verified on Apple M5 Pro (
Ready to merge from |
|
Merged into Verification summary on
Assisted-by: LLM (Google:Gemini 4 Neon) |
Problem
On M5 GPUs (G17G, G17S, G17C), Borealis did not advertise
uniformTexelBufferOffsetSingleTexelAlignmentorstorageTexelBufferOffsetSingleTexelAlignment, causing vkd3d-proton to reject the adapter during alignment checks.Change
Native AGX3 and every M5 part (G17G, G17S, G17C) view texel buffers through the 2D texture/PBE descriptor with the software alignment tail in
src/asahi/vulkan/hk_buffer_view.c, and the lowering paths consume that metadata for fetches, loads and stores.In
src/asahi/vulkan/hk_physical_device.c, includeagx_chip_g17_m5(dev->chip)alongsideagx_chip_native_agx3(dev->chip)inagx3_texel_buffer_tailso every M5 part:uniformTexelBufferOffsetSingleTexelAlignmentandstorageTexelBufferOffsetSingleTexelAlignment, andmaxTexelBufferElements(AGX_TEXTURE_BUFFER_MAX_SIZE - 15=268,435,441) so a maximally sized view at a single-texel offset still fits the native 2D descriptor.G18G stays excluded because it takes the legacy buffer-view path, which has no software tail, and keeps its 16-byte alignment. G13–G16 and G17P limits are unchanged.
Testing
meson test --suite asahipasses 140/140 (0 fail); aarch64 Borealis cross-build succeeds.7.3.0-ewb270+) — baseafcc08b710vs headd48f3d02203:vulkaninfo:maxTexelBufferElements268435456→268435441;uniformTexelBufferOffsetSingleTexelAlignmentandstorageTexelBufferOffsetSingleTexelAlignmentfalse→true.268,435,441texels); R32 and RGB32 uniform component-aligned offsets 4, 8 and 12; R32 storage buffer-view read/write at offsets 4, 8 and 12.dEQP-VK.api.buffer_view.*: 656 Pass, 348 NotSupported, 0 Fail on both (0 diffs).dEQP-VK.api.info.{vulkan1p3_limits_validation,device_properties,instance_extensions,get_physical_device_properties2}.*: 1288 Pass, 920 NotSupported, 0 Fail on both (0 diffs).7.3.0-1-40-ARCH, unchanged path regression check):vulkaninfounchanged (maxTexelBufferElements = 268435441, uniform and storage single-texel alignmenttrue).268,435,441texels), 0 GPU faults or new kernel errors in dmesg.Still to run
dEQP-VK.api.buffer_view.*,dEQP-VK.api.info.*, texel-buffer CTS cases, and the R8 offset 1/7/15 max-size (268,435,441) readback check on G17G and/or G17S with 0 GPU faults.dEQP-VK.api.info.*andbinding_model/robustnesstexel-buffer CTS groups on G17C.Assisted-by: LLM (OpenAI:GPT-6.2, Anthropic:Claude Opus 5.5, Google:Gemini 4 Neon)