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
0d5c6d55
Commit
0d5c6d55
authored
May 31, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Jun 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Avoid adding duplicate GPUs.
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
parent
c2a455a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
xrandr.c
dlls/winex11.drv/xrandr.c
+18
-3
No files found.
dlls/winex11.drv/xrandr.c
View file @
0d5c6d55
...
...
@@ -633,7 +633,8 @@ static BOOL is_crtc_primary( RECT primary, const XRRCrtcInfo *crtc )
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
gdi_gpu
*
gpu
,
const
XRRProviderInfo
*
provider_info
,
struct
gdi_gpu
*
prev_gpus
,
int
prev_gpu_count
)
{
static
const
char
*
extensions
[]
=
{
...
...
@@ -648,7 +649,7 @@ static BOOL get_gpu_properties_from_vulkan( struct gdi_gpu *gpu, const XRRProvid
VkResult
(
*
pvkGetRandROutputDisplayEXT
)(
VkPhysicalDevice
,
Display
*
,
RROutput
,
VkDisplayKHR
*
);
PFN_vkGetPhysicalDeviceProperties2KHR
pvkGetPhysicalDeviceProperties2KHR
;
PFN_vkEnumeratePhysicalDevices
pvkEnumeratePhysicalDevices
;
uint32_t
device_count
,
device_idx
,
output_idx
;
uint32_t
device_count
,
device_idx
,
output_idx
,
i
;
VkPhysicalDevice
*
vk_physical_devices
=
NULL
;
VkPhysicalDeviceProperties2
properties2
;
VkInstanceCreateInfo
create_info
;
...
...
@@ -703,6 +704,8 @@ static BOOL get_gpu_properties_from_vulkan( struct gdi_gpu *gpu, const XRRProvid
goto
done
;
}
TRACE
(
"provider name %s.
\n
"
,
debugstr_a
(
provider_info
->
name
));
for
(
device_idx
=
0
;
device_idx
<
device_count
;
++
device_idx
)
{
for
(
output_idx
=
0
;
output_idx
<
provider_info
->
noutputs
;
++
output_idx
)
...
...
@@ -720,7 +723,19 @@ static BOOL get_gpu_properties_from_vulkan( struct gdi_gpu *gpu, const XRRProvid
properties2
.
pNext
=
&
id
;
pvkGetPhysicalDeviceProperties2KHR
(
vk_physical_devices
[
device_idx
],
&
properties2
);
for
(
i
=
0
;
i
<
prev_gpu_count
;
++
i
)
{
if
(
!
memcmp
(
&
prev_gpus
[
i
].
vulkan_uuid
,
&
id
.
deviceUUID
,
sizeof
(
id
.
deviceUUID
)
))
{
WARN
(
"device UUID %#x:%#x already assigned to GPU %u.
\n
"
,
*
((
uint32_t
*
)
id
.
deviceUUID
+
1
),
*
(
uint32_t
*
)
id
.
deviceUUID
,
i
);
break
;
}
}
if
(
i
<
prev_gpu_count
)
continue
;
memcpy
(
&
gpu
->
vulkan_uuid
,
id
.
deviceUUID
,
sizeof
(
id
.
deviceUUID
)
);
/* Ignore Khronos vendor IDs */
if
(
properties2
.
properties
.
vendorID
<
0x10000
)
{
...
...
@@ -808,7 +823,7 @@ static BOOL xrandr14_get_gpus2( struct gdi_gpu **new_gpus, int *count, BOOL get_
gpus
[
i
].
id
=
provider_resources
->
providers
[
i
];
if
(
get_properties
)
{
if
(
!
get_gpu_properties_from_vulkan
(
&
gpus
[
i
],
provider_info
))
if
(
!
get_gpu_properties_from_vulkan
(
&
gpus
[
i
],
provider_info
,
gpus
,
i
))
RtlUTF8ToUnicodeN
(
gpus
[
i
].
name
,
sizeof
(
gpus
[
i
].
name
),
&
len
,
provider_info
->
name
,
strlen
(
provider_info
->
name
)
+
1
);
/* FIXME: Add an alternate method of getting PCI IDs, for systems that don't support Vulkan */
...
...
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