Skip to content

Add Metal 4 support to samples - #28

Open
selimsandal wants to merge 4 commits into
NVIDIA-RTX:mainfrom
selimsandal:main
Open

selimsandal wants to merge 4 commits into
NVIDIA-RTX:mainfrom
selimsandal:main

Conversation

@selimsandal

@selimsandal selimsandal commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor
  • Resize handles HiDPI windows.
  • Wrapper enables VK_KHR_portability_subset when the device has it (MoltenVK), and DescriptorPoolIndexing checks features.mutableDescriptorType before using MUTABLE descriptors.
  • CopyTests covers ETC2 and ASTC host copies, and DeviceInfo accepts --api=D3D11.
  • A new GraphicsVertexInput test covers vertex input, geometry and tessellation draws.
  • The tests accept --api=METAL, and HLSL is compiled with -D NRI_METAL_DXIL for the converter. BindlessSceneViewer, Triangle, Multisample and Wrapper have small Metal fixes.
  • The README has macOS setup steps.

This depends on the NRIFramework PR. I'll bump External/NRIFramework once it's merged.

- Resize: tracked window size in points and output resolution in pixels
- Wrapper: enabled "VK_KHR_portability_subset" if supported (MoltenVK)
- DescriptorPoolIndexing: required "features.mutableDescriptorType"
- CopyTests: added ETC2 and ASTC host copies
- DeviceInfo: accepted "--api=D3D11"
- added GraphicsVertexInput: vertex input, geometry and tessellation draw testing
- accepted "--api=METAL" in test samples and DeviceInfo, Metal is the default on Apple platforms if Metal Shader Converter is enabled
- compiled DXIL for Metal Shader Converter with "NRI_METAL_DXIL"
- used draw parameters emulation on Metal (DXIL) in BindlessSceneViewer
- avoided "SV_ViewID" in Triangle and Multisample on Metal (unsupported by Metal Shader Converter)
- Wrapper: Metal device wrapping is not demonstrated
Every sample has a different value and sample 0 is neither the minimum, nor the maximum, nor the average. Covers integer color, depth and stencil through attachments and "CmdResolveTexture", depth "MIN" with a separate stencil "SAMPLE_ZERO", and a depth/stencil plane upload/readback round trip, for "D32_SFLOAT_S8_UINT" and "D24_UNORM_S8_UINT". Unsupported cases are skipped based on "DeviceDesc::resolve".
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.

1 participant