libsdl-org / SDL_shadercross

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

Install vkd3d on Linux/macOS #29

Closed madebr closed 2 weeks ago

madebr commented 2 weeks ago

In https://github.com/libsdl-org/SDL_ttf/pull/412#issuecomment-2440116196, I was informed efxc.exe is needed for compiling directx11 shaders.

This pr builds efxc2 on ever platform as a Windows executable, and also installs it. A later pr can wrap the fxc.exe in a shell script calling wine fxc.exe.

After this pr, a linux install prefix (including all deps) looks like this:

SDL3_gpu_shadercross-3.0.0-linux-x64
├── bin
│   └── shadercross
├── include
│   └── SDL3_gpu_shadercross
│       └── SDL_gpu_shadercross.h
├── lib
│   ├── cmake
│   │   └── SDL3_gpu_shadercross
│   │       ├── SDL3_gpu_shadercrossConfig.cmake
│   │       ├── SDL3_gpu_shadercrossConfigVersion.cmake
│   │       ├── SDL3_gpu_shadercross-shared-targets.cmake
│   │       ├── SDL3_gpu_shadercross-shared-targets-noconfig.cmake
│   │       ├── SDL3_gpu_shadercross-static-targets.cmake
│   │       └── SDL3_gpu_shadercross-static-targets-noconfig.cmake
│   ├── libdxcompiler.so
│   ├── libdxil.so
│   ├── libSDL3_gpu_shadercross.a
│   ├── libSDL3_gpu_shadercross.so -> libSDL3_gpu_shadercross.so.0
│   ├── libSDL3_gpu_shadercross.so.0 -> libSDL3_gpu_shadercross.so.0.0.0
│   ├── libSDL3_gpu_shadercross.so.0.0.0
│   ├── libSDL3.so.0 -> libSDL3.so.0.1.5
│   ├── libSDL3.so.0.1.5
│   ├── libspirv-cross-c-shared.so -> libspirv-cross-c-shared.so.0
│   ├── libspirv-cross-c-shared.so.0 -> libspirv-cross-c-shared.so.0.64.0
│   ├── libspirv-cross-c-shared.so.0.64.0
│   ├── libvkd3d-shader.so -> libvkd3d-shader.so.1.11.0
│   ├── libvkd3d-shader.so.1 -> libvkd3d-shader.so.1.11.0
│   ├── libvkd3d-shader.so.1.11.0
│   ├── libvkd3d.so -> libvkd3d.so.1.13.0
│   ├── libvkd3d.so.1 -> libvkd3d.so.1.13.0
│   ├── libvkd3d.so.1.13.0
│   ├── libvkd3d-utils.so -> libvkd3d-utils.so.1.5.2
│   ├── libvkd3d-utils.so.1 -> libvkd3d-utils.so.1.5.2
│   ├── libvkd3d-utils.so.1.5.2
│   └── pkgconfig
│       └── sdl3-gpu-shadercross.pc
└── share
    └── licenses
        ├── dxc
        │   ├── LICENSE-LLVM.txt
        │   └── LICENSE-MS.txt
        ├── SDL3_gpu_shadercross
        │   └── LICENSE.txt
        ├── spirv-cross
        │   └── LICENSE
        └── vkd3d
            └── COPYING
thatcosmonaut commented 2 weeks ago

I'm really not sure that this is necessary. FXC is effectively just a D3DCompile frontend, and the shadercross library is already calling into D3DCompile to produce DXBC bytecode.

madebr commented 2 weeks ago

I'm really not sure that this is necessary. FXC is effectively just a D3DCompile frontend, and the shadercross library is already calling into D3DCompile to produce DXBC bytecode.

Indeed. Installing vkd3d does the job as well.