d3d12: Don't require DXIL for WSL
Always use the experimental shader models feature, which allows unsigned DXIL to be used, so we don't need a libdxil for WSL. Reviewed-by: Bill Kristiansen <billkris@microsoft.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
This commit is contained in:
parent
0b60d6a24d
commit
eb4353838d
|
@ -1174,19 +1174,25 @@ d3d12_validation_tools::d3d12_validation_tools()
|
||||||
{
|
{
|
||||||
load_dxil_dll();
|
load_dxil_dll();
|
||||||
DxcCreateInstanceProc dxil_create_func = (DxcCreateInstanceProc)util_dl_get_proc_address(dxil_module, "DxcCreateInstance");
|
DxcCreateInstanceProc dxil_create_func = (DxcCreateInstanceProc)util_dl_get_proc_address(dxil_module, "DxcCreateInstance");
|
||||||
assert(dxil_create_func);
|
|
||||||
|
|
||||||
|
if (dxil_create_func) {
|
||||||
HRESULT hr = dxil_create_func(CLSID_DxcValidator, IID_PPV_ARGS(&validator));
|
HRESULT hr = dxil_create_func(CLSID_DxcValidator, IID_PPV_ARGS(&validator));
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
debug_printf("D3D12: Unable to create validator\n");
|
debug_printf("D3D12: Unable to create validator\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
#ifdef _WIN32
|
||||||
|
else if (!(d3d12_debug & D3D12_DEBUG_EXPERIMENTAL)) {
|
||||||
|
debug_printf("D3D12: Unable to load DXIL.dll\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
DxcCreateInstanceProc compiler_create_func = nullptr;
|
DxcCreateInstanceProc compiler_create_func = nullptr;
|
||||||
if(dxc_compiler_module.load("dxcompiler.dll"))
|
if(dxc_compiler_module.load("dxcompiler.dll"))
|
||||||
compiler_create_func = (DxcCreateInstanceProc)util_dl_get_proc_address(dxc_compiler_module, "DxcCreateInstance");
|
compiler_create_func = (DxcCreateInstanceProc)util_dl_get_proc_address(dxc_compiler_module, "DxcCreateInstance");
|
||||||
|
|
||||||
if (compiler_create_func) {
|
if (compiler_create_func) {
|
||||||
hr = compiler_create_func(CLSID_DxcLibrary, IID_PPV_ARGS(&library));
|
HRESULT hr = compiler_create_func(CLSID_DxcLibrary, IID_PPV_ARGS(&library));
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
debug_printf("D3D12: Unable to create library instance: %x\n", hr);
|
debug_printf("D3D12: Unable to create library instance: %x\n", hr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -702,7 +702,10 @@ create_device(IUnknown *adapter)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d3d12_debug & D3D12_DEBUG_EXPERIMENTAL) {
|
#ifdef _WIN32
|
||||||
|
if (d3d12_debug & D3D12_DEBUG_EXPERIMENTAL)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
D3D12EnableExperimentalFeatures = (PFN_D3D12ENABLEEXPERIMENTALFEATURES)util_dl_get_proc_address(d3d12_mod, "D3D12EnableExperimentalFeatures");
|
D3D12EnableExperimentalFeatures = (PFN_D3D12ENABLEEXPERIMENTALFEATURES)util_dl_get_proc_address(d3d12_mod, "D3D12EnableExperimentalFeatures");
|
||||||
D3D12EnableExperimentalFeatures(1, &D3D12ExperimentalShaderModels, NULL, NULL);
|
D3D12EnableExperimentalFeatures(1, &D3D12ExperimentalShaderModels, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue