capi: emit delayload link arg for d3d12 for systems that don't have dxcompiler.dll

This commit is contained in:
chyyran 2023-02-18 23:14:30 -05:00 committed by Ronny Chan
parent 85ea566575
commit 284e0e2a0f
2 changed files with 9 additions and 0 deletions

View file

@ -173,6 +173,7 @@ Please report an issue if you run into a shader that works in RetroArch, but not
which was released in late 2018.
* For maximum compatibility with shaders, a shader compile pipeline based on [`spirv-to-dxil`](https://github.com/SnowflakePowered/spirv-to-dxil-rs) is used, with the SPIRV-Cross HLSL pipeline used as a fallback.
This brings shader compatibility beyond what the RetroArch Direct3D 12 driver provides. The HLSL pipeline fallback may be removed in the future as `spirv-to-dxil` improves.
* The Direct3D 12 runtime requires `dxil.dll` and `dxcompiler.dll` from the [DirectX Shader Compiler](https://github.com/microsoft/DirectXShaderCompiler).
Most, if not all shader presets should work fine on librashader. The runtime specific differences should not affect the output,
and are more a heads-up for integrating librashader into your project.

View file

@ -0,0 +1,8 @@
pub fn main() {
#[cfg(all(target_os = "windows", feature = "runtime-d3d12"))]
{
println!("cargo:rustc-link-lib=dylib=delayimp");
println!("cargo:rustc-link-arg=/DELAYLOAD:dxcompiler.dll");
println!("cargo:rustc-link-arg=/DELAYLOAD:d3d12.dll");
}
}