libsdl-org / SDL_shadercross

Shader translation library for SDL's GPU API.
zlib License
57 stars 18 forks source link

Build dxcompiler dependency for MacOS #38

Closed thatcosmonaut closed 3 days ago

thatcosmonaut commented 2 weeks ago

This is required for cross-platform HLSL workflows.

flibitijibibo commented 2 weeks ago

Since we'd have to build it anyway, should we also link this statically? I guess it would depend on whether or not the dxil-less builds are still technically proprietary, otherwise it'd ensure the one DLL supports all configurations (which would help obsolete #28)

TheSpydog commented 2 weeks ago

It’d be really nice if we could, but…

https://devlog.hexops.com/2024/building-the-directx-shader-compiler-better-than-microsoft/#well-why-not-just-statically-link-against-it

I wonder if the situation has improved at all since this blog post was written. Integrating DXIL signing into dxcompiler itself solves at least that problem, but I have no idea about the build system.

thatcosmonaut commented 2 weeks ago

This might be something we can do more easily once HLSL is upstreamed into clang.

thatcosmonaut commented 2 weeks ago

To recap:

thatcosmonaut commented 3 days ago

Resolved by https://github.com/libsdl-org/SDL_gpu_shadercross/commit/933e058bc2f442461b4358b3fc2e896c34775478