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
0d8bdf39
Commit
0d8bdf39
authored
Feb 28, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 07, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Keep the vulkan GUID on the gpu structure.
parent
c8d2955c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
sysparams.c
dlls/win32u/sysparams.c
+12
-3
No files found.
dlls/win32u/sysparams.c
View file @
0d8bdf39
...
@@ -113,6 +113,7 @@ struct gpu
...
@@ -113,6 +113,7 @@ struct gpu
char
guid
[
39
];
char
guid
[
39
];
LUID
luid
;
LUID
luid
;
UINT
index
;
UINT
index
;
GUID
vulkan_uuid
;
UINT
adapter_count
;
UINT
adapter_count
;
};
};
...
@@ -1059,13 +1060,20 @@ static BOOL read_gpu_from_registry( struct gpu *gpu )
...
@@ -1059,13 +1060,20 @@ static BOOL read_gpu_from_registry( struct gpu *gpu )
NtClose
(
subkey
);
NtClose
(
subkey
);
}
}
if
((
subkey
=
reg_open_ascii_key
(
hkey
,
devpropkey_gpu_vulkan_uuidA
)))
{
if
(
query_reg_value
(
subkey
,
NULL
,
value
,
sizeof
(
buffer
)
)
==
sizeof
(
GUID
))
gpu
->
vulkan_uuid
=
*
(
const
GUID
*
)
value
->
Data
;
NtClose
(
subkey
);
}
NtClose
(
hkey
);
NtClose
(
hkey
);
return
TRUE
;
return
TRUE
;
}
}
static
BOOL
write_gpu_to_registry
(
const
struct
gpu
*
gpu
,
const
struct
pci_id
*
pci
,
static
BOOL
write_gpu_to_registry
(
const
struct
gpu
*
gpu
,
const
struct
pci_id
*
pci
,
const
GUID
*
vulkan_uuid
,
ULONGLONG
memory_size
)
ULONGLONG
memory_size
)
{
{
const
WCHAR
*
desc
;
const
WCHAR
*
desc
;
char
buffer
[
4096
],
*
tmp
;
char
buffer
[
4096
],
*
tmp
;
...
@@ -1158,7 +1166,7 @@ static BOOL write_gpu_to_registry( const struct gpu *gpu, const struct pci_id *p
...
@@ -1158,7 +1166,7 @@ static BOOL write_gpu_to_registry( const struct gpu *gpu, const struct pci_id *p
if
((
subkey
=
reg_create_ascii_key
(
hkey
,
devpropkey_gpu_vulkan_uuidA
,
0
,
NULL
)))
if
((
subkey
=
reg_create_ascii_key
(
hkey
,
devpropkey_gpu_vulkan_uuidA
,
0
,
NULL
)))
{
{
set_reg_value
(
subkey
,
NULL
,
0xffff0000
|
DEVPROP_TYPE_GUID
,
set_reg_value
(
subkey
,
NULL
,
0xffff0000
|
DEVPROP_TYPE_GUID
,
&
vulkan_uuid
,
sizeof
(
vulkan_uuid
)
);
&
gpu
->
vulkan_uuid
,
sizeof
(
gpu
->
vulkan_uuid
)
);
NtClose
(
subkey
);
NtClose
(
subkey
);
}
}
...
@@ -1266,6 +1274,7 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param )
...
@@ -1266,6 +1274,7 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param )
memset
(
&
ctx
->
gpu
,
0
,
sizeof
(
ctx
->
gpu
)
);
memset
(
&
ctx
->
gpu
,
0
,
sizeof
(
ctx
->
gpu
)
);
ctx
->
gpu
.
index
=
ctx
->
gpu_count
;
ctx
->
gpu
.
index
=
ctx
->
gpu_count
;
lstrcpyW
(
ctx
->
gpu
.
name
,
gpu
->
name
);
lstrcpyW
(
ctx
->
gpu
.
name
,
gpu
->
name
);
ctx
->
gpu
.
vulkan_uuid
=
gpu
->
vulkan_uuid
;
ctx
->
monitor_count
=
0
;
ctx
->
monitor_count
=
0
;
ctx
->
mode_count
=
0
;
ctx
->
mode_count
=
0
;
...
@@ -1311,7 +1320,7 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param )
...
@@ -1311,7 +1320,7 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param )
NtClose
(
hkey
);
NtClose
(
hkey
);
if
(
!
write_gpu_to_registry
(
&
ctx
->
gpu
,
&
pci_id
,
&
gpu
->
vulkan_uuid
,
gpu
->
memory_size
))
if
(
!
write_gpu_to_registry
(
&
ctx
->
gpu
,
&
pci_id
,
gpu
->
memory_size
))
WARN
(
"Failed to write gpu to registry
\n
"
);
WARN
(
"Failed to write gpu to registry
\n
"
);
else
else
ctx
->
gpu_count
++
;
ctx
->
gpu_count
++
;
...
...
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