mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07: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;
|
||||
void *dll;
|
||||
|
||||
if (!(dll = vkd3d_dlopen(SONAME_LIBDXCOMPILER)))
|
||||
{
|
||||
trace("Failed to load dxcompiler library, %s.\n", vkd3d_dlerror());
|
||||
dll = vkd3d_dlopen(SONAME_LIBDXCOMPILER);
|
||||
ok(dll, "Failed to load dxcompiler library, %s.\n", vkd3d_dlerror());
|
||||
if (!dll)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!(create_instance = (DxcCreateInstanceProc)vkd3d_dlsym(dll, "DxcCreateInstance")))
|
||||
{
|
||||
trace("Failed to get DxcCreateInstance() pointer.\n");
|
||||
create_instance = (DxcCreateInstanceProc)vkd3d_dlsym(dll, "DxcCreateInstance");
|
||||
ok(create_instance, "Failed to get DxcCreateInstance() pointer.\n");
|
||||
if (!create_instance)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (FAILED(hr = create_instance(&CLSID_DxcCompiler, &IID_IDxcCompiler3, (void **)&compiler)))
|
||||
{
|
||||
trace("Failed to create instance, hr %#x.\n", hr);
|
||||
hr = create_instance(&CLSID_DxcCompiler, &IID_IDxcCompiler3, (void **)&compiler);
|
||||
ok(SUCCEEDED(hr), "Failed to create instance, hr %#x.\n", hr);
|
||||
if (FAILED(hr))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return compiler;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user