Module: wine Branch: master Commit: c2bdb4cf28370c336279927287d4fa385907a649 URL: https://gitlab.winehq.org/wine/wine/-/commit/c2bdb4cf28370c336279927287d4fa3...
Author: Rémi Bernon rbernon@codeweavers.com Date: Thu May 2 16:26:17 2024 +0200
win32u: Enumerate offscreen vulkan devices as GPU devices.
---
dlls/win32u/sysparams.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 07aa44e02be..c6eb09c4268 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -1994,6 +1994,18 @@ static UINT update_display_devices( BOOL force, struct device_manager_ctx *ctx ) return status; }
+static void add_vulkan_only_gpus( struct device_manager_ctx *ctx ) +{ + struct list gpus = LIST_INIT(gpus); + struct vulkan_gpu *gpu, *next; + + LIST_FOR_EACH_ENTRY_SAFE( gpu, next, &ctx->vulkan_gpus, struct vulkan_gpu, entry ) + { + TRACE( "adding vulkan-only gpu uuid %s, name %s\n", debugstr_guid(&gpu->uuid), debugstr_a(gpu->name)); + add_gpu( gpu->name, &gpu->pci_id, &gpu->uuid, ctx ); + } +} + BOOL update_display_cache( BOOL force ) { static const WCHAR wine_service_station_name[] = @@ -2016,7 +2028,8 @@ BOOL update_display_cache( BOOL force )
if (!get_vulkan_gpus( &ctx.vulkan_gpus )) WARN( "Failed to find any vulkan GPU\n" );
- status = update_display_devices( force, &ctx ); + if (!(status = update_display_devices( force, &ctx ))) + add_vulkan_only_gpus( &ctx );
release_display_manager_ctx( &ctx ); if (status && status != STATUS_ALREADY_COMPLETE) WARN( "Failed to update display devices, status %#x\n", status );