Skip to content

Conversation

@squidbus
Copy link
Contributor

@squidbus squidbus commented Mar 3, 2025

Adds working macOS support.

@to-fuu
Copy link

to-fuu commented Mar 3, 2025

Can you provide details on how you managed to build directx-dxc?
I was able to build it but the required cmake config files were missing

@squidbus
Copy link
Contributor Author

squidbus commented Mar 3, 2025

Can you provide details on how you managed to build directx-dxc? I was able to build it but the required cmake config files were missing

I cloned DirectXShaderCompiler and built it like so:

mkdir build && cd build
cmake -C ../cmake/caches/PredefinedParams.cmake ..
make -j10

@to-fuu
Copy link

to-fuu commented Mar 3, 2025

Can you provide details on how you managed to build directx-dxc? I was able to build it but the required cmake config files were missing

I cloned DirectXShaderCompiler and built it like so:

mkdir build && cd build
cmake -C ../cmake/caches/PredefinedParams.cmake ..
make -j10

This error keeps coming

CMake Error at tools/XenosRecomp/XenosRecomp/CMakeLists.txt:22 (find_package):
  Could not find a package configuration file provided by "directx-dxc" with
  any of the following names:

    directx-dxcConfig.cmake
    directx-dxc-config.cmake

  Add the installation prefix of "directx-dxc" to CMAKE_PREFIX_PATH or set
  "directx-dxc_DIR" to a directory containing one of the above files.  If
  "directx-dxc" provides a separate development package or SDK, be sure it
  has been installed.

@IsaacMarovitz
Copy link
Contributor

This error keeps coming

After you build directx-dxc separately you need to tell CMake where to find it. Point the directx-dxc_DIR environment variable to wherever you built it.

@to-fuu
Copy link

to-fuu commented Mar 3, 2025

This error keeps coming

After you build directx-dxc separately you need to tell CMake where to find it. Point the directx-dxc_DIR environment variable to wherever you built it.

Exactly what I did. I'm probably missing something

@squidbus
Copy link
Contributor Author

squidbus commented Mar 4, 2025

Current status: With everything here and in linked PRs in the original post, along with a build of latest MoltenVK and a fixed SPIRV-Cross, able to get fully working ARM Debug/RelWithDebInfo builds. Release builds still have an issue causing crash on game start that I need to look into.

@Yash-Singh1
Copy link

Yash-Singh1 commented Mar 4, 2025

Hi @squidbus, where can I get the fixed SPIRV-Cross from? I am building from the latest commit on the main branch and am getting the following error when trying to load files:

program_source:26:43: error: as_type cast from 'ulong' (aka 'unsigned long') to 'device int2 *' is not allowed
    int2 _55 = int2(gl_FragCoord.xy) - (*(as_type<device int2*>(reinterpret_cast<ulong>(g_PushConstants.SharedConstants + 16ul))));
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
program_source:30:29: error: as_type cast from 'ulong' (aka 'unsigned long') to 'device int2 *' is not allowed
        _66 = any(_55 >= (*(as_type<device int2*>(reinterpret_cast<ulong>(g_PushConstants.SharedConstants + 24ul)))));
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
program_source:45:34: error: as_type cast from 'ulong' (aka 'unsigned long') to 'device float3 *' is not allowed
    float3 _81 = powr(_77.xyz, *(as_type<device float3*>(reinterpret_cast<ulong>(g_PushConstants.SharedConstants))));
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@IsaacMarovitz
Copy link
Contributor

Hi @squidbus, where can I get the fixed SPIRV-Cross from? I am building from the latest commit on the main branch and am getting the following error when trying to load files:

KhronosGroup/SPIRV-Cross#2452

@squidbus
Copy link
Contributor Author

squidbus commented Mar 4, 2025

Still will need some other PR merges to be ready but should be able to build and run this without modifications now.

@to-fuu
Copy link

to-fuu commented Mar 4, 2025

I can confirm.
I was able to get to the alias issue by doing some changes here and there but as of the latest commit, the build works without any modifications and the installer launches

@Yash-Singh1
Copy link

I was able to get in game, and play until the loop in the first level. Some of the first few cutscenes are a bit choppy, but it's more smooth during gameplay. After that, it crashes with a EXC_BAD_ACCESS.

@to-fuu
Copy link

to-fuu commented Mar 4, 2025

@squidbus @Yash-Singh1
Tried release build
The cutscenes lag and the crashes are gone.
The game so far runs at a perfect 120fps without any issues.
I was able to finish apotos act 2
image

@squidbus
Copy link
Contributor Author

Also if you do have frame rate issues still, it could be useful to open the profiler graph with F1 and send a screenshot of the graph and the time numbers below it.

@ArtisIan97
Copy link

Screenshot 2025-05-17 at 11 35 51 AM

Beautiful! It runs a lot smoother now, and I can even bump up a lot of the settings, like AA and shadow resolution, without it dipping below 60 FPS. Thank you so much!

@blueskythlikesclouds blueskythlikesclouds merged commit 80e779a into hedge-dev:main Aug 3, 2025
1 of 2 checks passed
@squidbus squidbus deleted the mac-support branch August 7, 2025 22:16
@iamnotthatskibidlol
Copy link

It's expired are you still working on it?

@squidbus
Copy link
Contributor Author

It's expired are you still working on it?

This PR is already merged into main, you can find builds from the actions runs in this repo.

@iamnotthatskibidlol
Copy link

Thanks! another question does it work on intel macs or do you have a emulator for intel macs to run apple sli applications

@squidbus
Copy link
Contributor Author

Thanks! another question does it work on intel macs or do you have a emulator for intel macs to run apple sli applications

No, it does not support Intel Macs.

@iamnotthatskibidlol
Copy link

Awh man thanks tho.

@vicento
Copy link

vicento commented Sep 10, 2025

@GRANAREGRIA
Copy link

How can I play unleashed recomp now?I didn't see any files.Do u have some video or web can tell me how to play it?I really need it:)

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.