Skip to content

Conversation

squidbus
Copy link
Contributor

@squidbus squidbus commented Aug 3, 2025

Backport of MSL support from the Marathon fork of XenosRecomp, which in turn is based on @IsaacMarovitz's work (#15) with some additional tweaks and fixes.

  • Generates shader code that is both valid HLSL and MSL.
    • This required some extra work in the compiler to perform things like input/output size tracking for correct vector type casts.
  • Compiles to Metal AIR using Xcode tools.
    • Unfortunately cannot include source info for debugging using code-based shader compilation, which would make it impossible to see shaders in the Metal debugger.
  • Misc backports:
    • Fix for SetpInv logic.
    • tfetchTexcoord -> swapFloats for generic use by projects needing to swap other attributes.
    • Generates shader names in cache table for debugging purposes.

This has been tested with both MarathonRecomp and UnleashedRecomp.

@squidbus squidbus force-pushed the msl branch 6 times, most recently from 1d52a81 to f581e40 Compare August 9, 2025 10:53
Co-authored-by: Isaac Marovitz <[email protected]>
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