mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator
synced 2025-07-06 22:42:19 +08:00
Added support for dynamic d3dcompile load
If you really want to use d3dcompile, then I think its better to find the most recent d3dcompile you have on your computer and load its D3DCompile function. This process is now automatically handled. Just define the right Preprocessor.
This commit is contained in:
@ -468,6 +468,12 @@ bool ImGui_ImplDX12_CreateDeviceObjects()
|
||||
psoDesc.SampleDesc.Count = 1;
|
||||
psoDesc.Flags = D3D12_PIPELINE_STATE_FLAG_NONE;
|
||||
|
||||
#ifdef USE_D3DCOMPILE
|
||||
decltype(D3DCompile)* D3DCompile = load_d3dcompile();
|
||||
if (D3DCompile == nullptr)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
// Create the vertex shader
|
||||
{
|
||||
#ifdef USE_D3DCOMPILE
|
||||
@ -546,6 +552,10 @@ bool ImGui_ImplDX12_CreateDeviceObjects()
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef USE_D3DCOMPILE
|
||||
unload_d3dcompile();
|
||||
#endif
|
||||
|
||||
// Create the blending setup
|
||||
{
|
||||
D3D12_BLEND_DESC& desc = psoDesc.BlendState;
|
||||
|
Reference in New Issue
Block a user