feat(metal4): add configurable MSAA with resolve #487

Manually merged
github merged 1 commit from github-bot/gh-487 into gh-pr/487/base 2026-11-27 19:42:05 +00:00 AGit
Owner

@⁠maple-quartz18 on GitHub · 2026-11-27 18:31 UTC · original
maple-quartz18:feature/metal4-render-parity → master · +344 −61 · 4 files · 1 commits · merged 2026-11-27 19:38 UTC

Summary

  • Add Metal 4 MSAA levels Off, 2x, 4x, 8x, and 16x to the renderer controls.
  • Select the highest supported sample count at or below the requested level and show fallback state in the UI.
  • Allocate matching multisample color/depth attachments, compile matching MTL4 pipeline variants, and resolve the color attachment through the Metal 4 render pass.
  • Add a checked set_color_attachment_with_resolve safe Metal-Rust API (dependency PR: https://github.com/gamesir-labs/Metal-Rust/pull/3).
  • Disable MSAA while temporal upscaling is active because its depth and motion inputs are currently single-sample; restore the requested MSAA level when temporal upscaling is off.

Validation

  • cargo build --locked -p sixng-gui --features metal4-poc
  • cargo test --locked -p sixng-gui --features metal4-poc msaa_ -- --nocapture (3 passed)
  • MTL_DEBUG_LAYER=1 MTL_SHADER_VALIDATION=1 MTL_SHADER_VALIDATION_REPORT_TO_STDERR=1 cargo test --locked -p sixng-gui --features metal4-poc mtl4_mesh_upload_and_draw_changes_pixels_when_available -- --nocapture (passed)

The tested Mac reports support for sample counts 1, 2, 4, and 8; 16x is skipped by the device capability query. Two existing fetch_update deprecation warnings remain.

**@⁠maple-quartz18** on GitHub · 2026-11-27 18:31 UTC · [original](https://github.com/holdmysocks/SixNG/pull/487) `maple-quartz18:feature/metal4-render-parity` → `master` · +344 −61 · 4 files · 1 commits · merged 2026-11-27 19:38 UTC ## Summary - Add Metal 4 MSAA levels Off, 2x, 4x, 8x, and 16x to the renderer controls. - Select the highest supported sample count at or below the requested level and show fallback state in the UI. - Allocate matching multisample color/depth attachments, compile matching MTL4 pipeline variants, and resolve the color attachment through the Metal 4 render pass. - Add a checked `set_color_attachment_with_resolve` safe Metal-Rust API (dependency PR: https://github.com/gamesir-labs/Metal-Rust/pull/3). - Disable MSAA while temporal upscaling is active because its depth and motion inputs are currently single-sample; restore the requested MSAA level when temporal upscaling is off. ## Validation - `cargo build --locked -p sixng-gui --features metal4-poc` - `cargo test --locked -p sixng-gui --features metal4-poc msaa_ -- --nocapture` (3 passed) - `MTL_DEBUG_LAYER=1 MTL_SHADER_VALIDATION=1 MTL_SHADER_VALIDATION_REPORT_TO_STDERR=1 cargo test --locked -p sixng-gui --features metal4-poc mtl4_mesh_upload_and_draw_changes_pixels_when_available -- --nocapture` (passed) The tested Mac reports support for sample counts 1, 2, 4, and 8; 16x is skipped by the device capability query. Two existing `fetch_update` deprecation warnings remain.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 18:34:45 +00:00
github-bot changed target branch from master to gh-pr/487/base 2026-11-27 19:42:02 +00:00
github manually merged commit 8063000ef2 into gh-pr/487/base 2026-11-27 19:42:05 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.