Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0300016a
Commit
0300016a
authored
Apr 22, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
May 07, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Remove driver-specific id from struct gdi_gpu.
parent
62c60a9e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
19 deletions
+32
-19
display.c
dlls/winemac.drv/display.c
+0
-1
display.c
dlls/winewayland.drv/display.c
+1
-2
display.c
dlls/winex11.drv/display.c
+10
-3
x11drv.h
dlls/winex11.drv/x11drv.h
+11
-2
xinerama.c
dlls/winex11.drv/xinerama.c
+3
-3
xrandr.c
dlls/winex11.drv/xrandr.c
+7
-7
gdi_driver.h
include/wine/gdi_driver.h
+0
-1
No files found.
dlls/winemac.drv/display.c
View file @
0300016a
...
@@ -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
,
...
...
dlls/winewayland.drv/display.c
View file @
0300016a
...
@@ -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
);
}
}
...
...
dlls/winex11.drv/display.c
View file @
0300016a
...
@@ -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
;
...
...
dlls/winex11.drv/x11drv.h
View file @
0300016a
...
@@ -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
);
...
...
dlls/winex11.drv/xinerama.c
View file @
0300016a
...
@@ -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
);
}
}
...
...
dlls/winex11.drv/xrandr.c
View file @
0300016a
...
@@ -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 */
...
...
include/wine/gdi_driver.h
View file @
0300016a
...
@@ -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 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment