Commit 0300016a authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

win32u: Remove driver-specific id from struct gdi_gpu.

parent 62c60a9e
...@@ -1141,7 +1141,6 @@ BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device_manage ...@@ -1141,7 +1141,6 @@ BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device_manage
{ {
struct gdi_gpu gdi_gpu = struct gdi_gpu gdi_gpu =
{ {
.id = gpu->id,
.pci_id = .pci_id =
{ {
.vendor = gpu->vendor_id, .vendor = gpu->vendor_id,
......
...@@ -204,8 +204,7 @@ static void wayland_add_device_gpu(const struct gdi_device_manager *device_manag ...@@ -204,8 +204,7 @@ static void wayland_add_device_gpu(const struct gdi_device_manager *device_manag
struct gdi_gpu gpu = {0}; struct gdi_gpu gpu = {0};
lstrcpyW(gpu.name, wayland_gpuW); lstrcpyW(gpu.name, wayland_gpuW);
TRACE("id=0x%s name=%s\n", TRACE("name=%s\n", wine_dbgstr_w(gpu.name));
wine_dbgstr_longlong(gpu.id), wine_dbgstr_w(gpu.name));
device_manager->add_gpu(&gpu, param); device_manager->add_gpu(&gpu, param);
} }
......
...@@ -395,7 +395,7 @@ POINT root_to_virtual_screen(INT x, INT y) ...@@ -395,7 +395,7 @@ POINT root_to_virtual_screen(INT x, INT y)
RECT get_host_primary_monitor_rect(void) RECT get_host_primary_monitor_rect(void)
{ {
INT gpu_count, adapter_count, monitor_count; INT gpu_count, adapter_count, monitor_count;
struct gdi_gpu *gpus = NULL; struct x11drv_gpu *gpus = NULL;
struct x11drv_adapter *adapters = NULL; struct x11drv_adapter *adapters = NULL;
struct gdi_monitor *monitors = NULL; struct gdi_monitor *monitors = NULL;
RECT rect = {0}; RECT rect = {0};
...@@ -497,7 +497,7 @@ BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manage ...@@ -497,7 +497,7 @@ BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manage
{ {
struct x11drv_adapter *adapters; struct x11drv_adapter *adapters;
struct gdi_monitor *monitors; struct gdi_monitor *monitors;
struct gdi_gpu *gpus; struct x11drv_gpu *gpus;
INT gpu_count, adapter_count, monitor_count; INT gpu_count, adapter_count, monitor_count;
INT gpu, adapter, monitor; INT gpu, adapter, monitor;
DEVMODEW *modes; DEVMODEW *modes;
...@@ -514,7 +514,14 @@ BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manage ...@@ -514,7 +514,14 @@ BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manage
for (gpu = 0; gpu < gpu_count; gpu++) for (gpu = 0; gpu < gpu_count; gpu++)
{ {
device_manager->add_gpu( &gpus[gpu], param ); struct gdi_gpu gdi_gpu =
{
.pci_id = gpus[gpu].pci_id,
.vulkan_uuid = gpus[gpu].vulkan_uuid,
.memory_size = gpus[gpu].memory_size,
};
memcpy( gdi_gpu.name, gpus[gpu].name, sizeof(gdi_gpu.name) );
device_manager->add_gpu( &gdi_gpu, param );
/* Initialize adapters */ /* Initialize adapters */
if (!host_handler.get_adapters( gpus[gpu].id, &adapters, &adapter_count )) break; if (!host_handler.get_adapters( gpus[gpu].id, &adapters, &adapter_count )) break;
......
...@@ -764,6 +764,15 @@ void init_user_driver(void); ...@@ -764,6 +764,15 @@ void init_user_driver(void);
/* X11 display device handler. Used to initialize display device registry data */ /* X11 display device handler. Used to initialize display device registry data */
struct x11drv_gpu
{
ULONG_PTR id;
WCHAR name[128];
struct pci_id pci_id;
GUID vulkan_uuid;
ULONGLONG memory_size;
};
struct x11drv_adapter struct x11drv_adapter
{ {
ULONG_PTR id; ULONG_PTR id;
...@@ -782,7 +791,7 @@ struct x11drv_display_device_handler ...@@ -782,7 +791,7 @@ struct x11drv_display_device_handler
/* get_gpus will be called to get a list of GPUs. First GPU has to be where the primary adapter is. /* get_gpus will be called to get a list of GPUs. First GPU has to be where the primary adapter is.
* *
* Return FALSE on failure with parameters unchanged */ * Return FALSE on failure with parameters unchanged */
BOOL (*get_gpus)(struct gdi_gpu **gpus, int *count, BOOL get_properties); BOOL (*get_gpus)(struct x11drv_gpu **gpus, int *count, BOOL get_properties);
/* get_adapters will be called to get a list of adapters in EnumDisplayDevices context under a GPU. /* get_adapters will be called to get a list of adapters in EnumDisplayDevices context under a GPU.
* The first adapter has to be primary if GPU is primary. * The first adapter has to be primary if GPU is primary.
...@@ -797,7 +806,7 @@ struct x11drv_display_device_handler ...@@ -797,7 +806,7 @@ struct x11drv_display_device_handler
BOOL (*get_monitors)(ULONG_PTR adapter_id, struct gdi_monitor **monitors, int *count); BOOL (*get_monitors)(ULONG_PTR adapter_id, struct gdi_monitor **monitors, int *count);
/* free_gpus will be called to free a GPU list from get_gpus */ /* free_gpus will be called to free a GPU list from get_gpus */
void (*free_gpus)(struct gdi_gpu *gpus); void (*free_gpus)(struct x11drv_gpu *gpus);
/* free_adapters will be called to free an adapter list from get_adapters */ /* free_adapters will be called to free an adapter list from get_adapters */
void (*free_adapters)(struct x11drv_adapter *adapters); void (*free_adapters)(struct x11drv_adapter *adapters);
......
...@@ -190,10 +190,10 @@ done: ...@@ -190,10 +190,10 @@ done:
return ret; return ret;
} }
static BOOL xinerama_get_gpus( struct gdi_gpu **new_gpus, int *count, BOOL get_properties ) static BOOL xinerama_get_gpus( struct x11drv_gpu **new_gpus, int *count, BOOL get_properties )
{ {
static const WCHAR wine_adapterW[] = {'W','i','n','e',' ','A','d','a','p','t','e','r',0}; static const WCHAR wine_adapterW[] = {'W','i','n','e',' ','A','d','a','p','t','e','r',0};
struct gdi_gpu *gpus; struct x11drv_gpu *gpus;
/* Xinerama has no support for GPU, faking one */ /* Xinerama has no support for GPU, faking one */
gpus = calloc( 1, sizeof(*gpus) ); gpus = calloc( 1, sizeof(*gpus) );
...@@ -208,7 +208,7 @@ static BOOL xinerama_get_gpus( struct gdi_gpu **new_gpus, int *count, BOOL get_p ...@@ -208,7 +208,7 @@ static BOOL xinerama_get_gpus( struct gdi_gpu **new_gpus, int *count, BOOL get_p
return TRUE; return TRUE;
} }
static void xinerama_free_gpus( struct gdi_gpu *gpus ) static void xinerama_free_gpus( struct x11drv_gpu *gpus )
{ {
free( gpus ); free( gpus );
} }
......
...@@ -627,8 +627,8 @@ static BOOL is_crtc_primary( RECT primary, const XRRCrtcInfo *crtc ) ...@@ -627,8 +627,8 @@ static BOOL is_crtc_primary( RECT primary, const XRRCrtcInfo *crtc )
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR)
static BOOL get_gpu_properties_from_vulkan( struct gdi_gpu *gpu, const XRRProviderInfo *provider_info, static BOOL get_gpu_properties_from_vulkan( struct x11drv_gpu *gpu, const XRRProviderInfo *provider_info,
struct gdi_gpu *prev_gpus, int prev_gpu_count ) struct x11drv_gpu *prev_gpus, int prev_gpu_count )
{ {
static const char *extensions[] = static const char *extensions[] =
{ {
...@@ -768,10 +768,10 @@ done: ...@@ -768,10 +768,10 @@ done:
/* Get a list of GPUs reported by XRandR 1.4. Set get_properties to FALSE if GPU properties are /* Get a list of GPUs reported by XRandR 1.4. Set get_properties to FALSE if GPU properties are
* not needed to avoid unnecessary querying */ * not needed to avoid unnecessary querying */
static BOOL xrandr14_get_gpus( struct gdi_gpu **new_gpus, int *count, BOOL get_properties ) static BOOL xrandr14_get_gpus( struct x11drv_gpu **new_gpus, int *count, BOOL get_properties )
{ {
static const WCHAR wine_adapterW[] = {'W','i','n','e',' ','A','d','a','p','t','e','r',0}; static const WCHAR wine_adapterW[] = {'W','i','n','e',' ','A','d','a','p','t','e','r',0};
struct gdi_gpu *gpus = NULL; struct x11drv_gpu *gpus = NULL;
XRRScreenResources *screen_resources = NULL; XRRScreenResources *screen_resources = NULL;
XRRProviderResources *provider_resources = NULL; XRRProviderResources *provider_resources = NULL;
XRRProviderInfo *provider_info = NULL; XRRProviderInfo *provider_info = NULL;
...@@ -844,7 +844,7 @@ static BOOL xrandr14_get_gpus( struct gdi_gpu **new_gpus, int *count, BOOL get_p ...@@ -844,7 +844,7 @@ static BOOL xrandr14_get_gpus( struct gdi_gpu **new_gpus, int *count, BOOL get_p
/* Make primary GPU the first */ /* Make primary GPU the first */
if (primary_provider > 0) if (primary_provider > 0)
{ {
struct gdi_gpu tmp = gpus[0]; struct x11drv_gpu tmp = gpus[0];
gpus[0] = gpus[primary_provider]; gpus[0] = gpus[primary_provider];
gpus[primary_provider] = tmp; gpus[primary_provider] = tmp;
} }
...@@ -865,7 +865,7 @@ done: ...@@ -865,7 +865,7 @@ done:
return ret; return ret;
} }
static void xrandr14_free_gpus( struct gdi_gpu *gpus ) static void xrandr14_free_gpus( struct x11drv_gpu *gpus )
{ {
free( gpus ); free( gpus );
} }
...@@ -1253,7 +1253,7 @@ static BOOL xrandr14_get_id( const WCHAR *device_name, BOOL is_primary, x11drv_s ...@@ -1253,7 +1253,7 @@ static BOOL xrandr14_get_id( const WCHAR *device_name, BOOL is_primary, x11drv_s
INT gpu_count, adapter_count, new_current_mode_count = 0; INT gpu_count, adapter_count, new_current_mode_count = 0;
INT gpu_idx, adapter_idx, display_idx; INT gpu_idx, adapter_idx, display_idx;
struct x11drv_adapter *adapters; struct x11drv_adapter *adapters;
struct gdi_gpu *gpus; struct x11drv_gpu *gpus;
WCHAR *end; WCHAR *end;
/* Parse \\.\DISPLAY%d */ /* Parse \\.\DISPLAY%d */
......
...@@ -247,7 +247,6 @@ struct pci_id ...@@ -247,7 +247,6 @@ struct pci_id
struct gdi_gpu struct gdi_gpu
{ {
ULONG_PTR id;
WCHAR name[128]; WCHAR name[128];
struct pci_id pci_id; struct pci_id pci_id;
GUID vulkan_uuid; /* Vulkan device UUID */ GUID vulkan_uuid; /* Vulkan device UUID */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment