mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Fail if dxcompiler is not available at runtime.
This commit is contained in:
parent
1ee0cbb627
commit
c1de65a99b
Notes:
Alexandre Julliard
2023-10-16 22:59:19 +02:00
Approved-by: Conor McCarthy (@cmccarthy) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/390
@ -1457,23 +1457,20 @@ static IDxcCompiler3 *dxcompiler_create()
|
|||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
void *dll;
|
void *dll;
|
||||||
|
|
||||||
if (!(dll = vkd3d_dlopen(SONAME_LIBDXCOMPILER)))
|
dll = vkd3d_dlopen(SONAME_LIBDXCOMPILER);
|
||||||
{
|
ok(dll, "Failed to load dxcompiler library, %s.\n", vkd3d_dlerror());
|
||||||
trace("Failed to load dxcompiler library, %s.\n", vkd3d_dlerror());
|
if (!dll)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
if (!(create_instance = (DxcCreateInstanceProc)vkd3d_dlsym(dll, "DxcCreateInstance")))
|
create_instance = (DxcCreateInstanceProc)vkd3d_dlsym(dll, "DxcCreateInstance");
|
||||||
{
|
ok(create_instance, "Failed to get DxcCreateInstance() pointer.\n");
|
||||||
trace("Failed to get DxcCreateInstance() pointer.\n");
|
if (!create_instance)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
if (FAILED(hr = create_instance(&CLSID_DxcCompiler, &IID_IDxcCompiler3, (void **)&compiler)))
|
hr = create_instance(&CLSID_DxcCompiler, &IID_IDxcCompiler3, (void **)&compiler);
|
||||||
{
|
ok(SUCCEEDED(hr), "Failed to create instance, hr %#x.\n", hr);
|
||||||
trace("Failed to create instance, hr %#x.\n", hr);
|
if (FAILED(hr))
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
return compiler;
|
return compiler;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user