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
62f66c3d
Commit
62f66c3d
authored
Oct 24, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Oct 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Store GPU luid in adapters cache.
parent
93ba92de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
sysparams.c
dlls/win32u/sysparams.c
+20
-11
No files found.
dlls/win32u/sysparams.c
View file @
62f66c3d
...
...
@@ -211,6 +211,7 @@ struct adapter
LONG
refcount
;
struct
list
entry
;
struct
display_device
dev
;
LUID
gpu_luid
;
unsigned
int
id
;
const
WCHAR
*
config_key
;
unsigned
int
mode_count
;
...
...
@@ -565,6 +566,17 @@ static int mode_compare(const void *p1, const void *p2)
return
0
;
}
static
unsigned
int
query_reg_subkey_value
(
HKEY
hkey
,
const
WCHAR
*
name
,
unsigned
int
name_size
,
KEY_VALUE_PARTIAL_INFORMATION
*
value
,
unsigned
int
size
)
{
HKEY
subkey
;
if
(
!
(
subkey
=
reg_open_key
(
hkey
,
name
,
name_size
)))
return
0
;
size
=
query_reg_value
(
subkey
,
NULL
,
value
,
size
);
NtClose
(
subkey
);
return
size
;
}
static
BOOL
read_display_adapter_settings
(
unsigned
int
index
,
struct
adapter
*
info
)
{
char
buffer
[
4096
];
...
...
@@ -637,6 +649,14 @@ static BOOL read_display_adapter_settings( unsigned int index, struct adapter *i
if
(
!
(
hkey
=
reg_open_key
(
enum_key
,
value_str
,
value
->
DataLength
-
sizeof
(
WCHAR
)
)))
return
FALSE
;
size
=
query_reg_subkey_value
(
hkey
,
devpropkey_gpu_luidW
,
sizeof
(
devpropkey_gpu_luidW
),
value
,
sizeof
(
buffer
)
);
if
(
size
!=
sizeof
(
info
->
gpu_luid
))
{
NtClose
(
hkey
);
return
FALSE
;
}
memcpy
(
&
info
->
gpu_luid
,
value
->
Data
,
sizeof
(
info
->
gpu_luid
)
);
size
=
query_reg_value
(
hkey
,
hardware_idW
,
value
,
sizeof
(
buffer
)
);
NtClose
(
hkey
);
if
(
!
size
||
(
value
->
Type
!=
REG_SZ
&&
value
->
Type
!=
REG_MULTI_SZ
))
...
...
@@ -646,17 +666,6 @@ static BOOL read_display_adapter_settings( unsigned int index, struct adapter *i
return
TRUE
;
}
static
unsigned
int
query_reg_subkey_value
(
HKEY
hkey
,
const
WCHAR
*
name
,
unsigned
int
name_size
,
KEY_VALUE_PARTIAL_INFORMATION
*
value
,
unsigned
int
size
)
{
HKEY
subkey
;
if
(
!
(
subkey
=
reg_open_key
(
hkey
,
name
,
name_size
)))
return
0
;
size
=
query_reg_value
(
subkey
,
NULL
,
value
,
size
);
NtClose
(
subkey
);
return
size
;
}
static
BOOL
read_monitor_settings
(
struct
adapter
*
adapter
,
DWORD
index
,
struct
monitor
*
monitor
)
{
char
buffer
[
4096
];
...
...
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