Skip to content

Commit e174edd

Browse files
committed
GPU (Linux): always try directx
1 parent f866c90 commit e174edd

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/detection/gpu/gpu_linux.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -524,14 +524,14 @@ static const char* pciDetectGPUs(const FFGPUOptions* options, FFlist* gpus)
524524

525525
const char* ffDetectGPUImpl(const FFGPUOptions* options, FFlist* gpus)
526526
{
527+
#ifdef FF_HAVE_DIRECTX_HEADERS
528+
const char* ffGPUDetectByDirectX(const FFGPUOptions* options, FFlist* gpus);
529+
if (ffGPUDetectByDirectX(options, gpus) == NULL)
530+
return NULL;
531+
#endif
532+
527533
if (options->detectionMethod == FF_GPU_DETECTION_METHOD_AUTO)
528534
{
529-
#ifdef FF_HAVE_DIRECTX_HEADERS
530-
const char* ffGPUDetectByDirectX(const FFGPUOptions* options, FFlist* gpus);
531-
if (ffGPUDetectByDirectX(options, gpus) == NULL)
532-
return NULL;
533-
#endif
534-
535535
if (drmDetectGPUs(options, gpus) == NULL && gpus->length > 0)
536536
return NULL;
537537
}

src/detection/gpu/gpu_wsl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ struct on_scope_exit {
2828
extern "C"
2929
const char* ffGPUDetectByDirectX(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist* gpus)
3030
{
31-
FF_LIBRARY_LOAD(libdxcore, nullptr, "dlopen libdxcore.so failed. Make sure WSLg is enabled", "/usr/lib/wsl/lib/libdxcore" FF_LIBRARY_EXTENSION, 4)
31+
FF_LIBRARY_LOAD(libdxcore, nullptr, "dlopen libdxcore.so failed", "/usr/lib/wsl/lib/libdxcore" FF_LIBRARY_EXTENSION, 4)
3232
// DXCoreCreateAdapterFactory is a reloaded function, so we can't use FF_LIBRARY_LOAD_SYMBOL_MESSAGE here
3333
typedef HRESULT (*DXCoreCreateAdapterFactory_t)(REFIID riid, void** ppvFactory);
3434

0 commit comments

Comments
 (0)