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
49752f34
Commit
49752f34
authored
Aug 28, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Get rid of unix_funcs.
parent
395061e3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
25 deletions
+13
-25
loader.c
dlls/winevulkan/loader.c
+4
-2
loader_thunks.c
dlls/winevulkan/loader_thunks.c
+0
-0
make_vulkan
dlls/winevulkan/make_vulkan
+4
-9
vulkan.c
dlls/winevulkan/vulkan.c
+1
-1
vulkan_loader.h
dlls/winevulkan/vulkan_loader.h
+2
-6
vulkan_private.h
dlls/winevulkan/vulkan_private.h
+1
-1
vulkan_thunks.c
dlls/winevulkan/vulkan_thunks.c
+1
-6
No files found.
dlls/winevulkan/loader.c
View file @
49752f34
...
...
@@ -34,7 +34,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(vulkan);
DEFINE_DEVPROPKEY
(
DEVPROPKEY_GPU_LUID
,
0x60b193cb
,
0x5276
,
0x4d0f
,
0x96
,
0xfc
,
0xf1
,
0x73
,
0xab
,
0xad
,
0x3e
,
0xc6
,
2
);
DEFINE_DEVPROPKEY
(
WINE_DEVPROPKEY_GPU_VULKAN_UUID
,
0x233a9ef3
,
0xafc4
,
0x4abd
,
0xb5
,
0x64
,
0xc3
,
0x2f
,
0x21
,
0xf1
,
0x53
,
0x5c
,
2
);
const
struct
unix_funcs
*
unix_funcs
;
NTSTATUS
(
WINAPI
*
p_vk_direct_unix_call
)(
unixlib_handle_t
handle
,
unsigned
int
code
,
void
*
args
)
;
unixlib_handle_t
unix_handle
;
static
HINSTANCE
hinstance
;
...
...
@@ -231,7 +231,9 @@ static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context)
&
unix_handle
,
sizeof
(
unix_handle
),
NULL
))
return
FALSE
;
return
!
vk_unix_call
(
unix_init
,
&
unix_funcs
);
if
(
vk_unix_call
(
unix_init
,
&
p_vk_direct_unix_call
))
return
FALSE
;
if
(
!
p_vk_direct_unix_call
)
p_vk_direct_unix_call
=
__wine_unix_call
;
return
TRUE
;
}
static
BOOL
wine_vk_init_once
(
void
)
...
...
dlls/winevulkan/loader_thunks.c
View file @
49752f34
This diff is collapsed.
Click to expand it.
dlls/winevulkan/make_vulkan
View file @
49752f34
...
...
@@ -176,7 +176,7 @@ class ThunkType(Enum):
# - PUBLIC means the implementation is fully auto generated.
# - PRIVATE thunks can be used in custom implementations for
# struct conversion.
# - loader_thunk sets whether to create a thunk for unix
_
funcs.
# - loader_thunk sets whether to create a thunk for unix
funcs.
FUNCTION_OVERRIDES
=
{
# Global functions
"vkCreateInstance"
:
{
"dispatch"
:
False
,
"driver"
:
True
,
"thunk"
:
ThunkType
.
NONE
,
"loader_thunk"
:
ThunkType
.
PRIVATE
},
...
...
@@ -777,7 +777,7 @@ class VkFunction(object):
if
self
.
type
!=
"void"
and
not
self
.
returns_longlong
():
body
+=
"return "
if
self
.
needs_direct_call
():
body
+=
"
unix_funcs->p_vk_call(
unix_{0}, ¶ms);
\n
"
.
format
(
self
.
name
)
body
+=
"
p_vk_direct_unix_call(unix_handle,
unix_{0}, ¶ms);
\n
"
.
format
(
self
.
name
)
else
:
body
+=
"vk_unix_call(unix_{0}, ¶ms);
\n
"
.
format
(
self
.
name
)
if
self
.
returns_longlong
():
...
...
@@ -2851,15 +2851,10 @@ class VkGenerator(object):
f
.
write
(
"};
\n
"
)
f
.
write
(
"C_ASSERT(ARRAYSIZE(__wine_unix_call_funcs) == unix_count);
\n\n
"
)
f
.
write
(
"
static NTSTATUS WINAPI wine_vk_call(enum unix_call
code, void *params)
\n
"
)
f
.
write
(
"
NTSTATUS WINAPI vk_direct_unix_call(unixlib_handle_t handle, unsigned int
code, void *params)
\n
"
)
f
.
write
(
"{
\n
"
)
f
.
write
(
" return __wine_unix_call_funcs[code](params);
\n
"
)
f
.
write
(
"}
\n\n
"
)
f
.
write
(
"const struct unix_funcs loader_funcs =
\n
"
)
f
.
write
(
"{
\n
"
)
f
.
write
(
" wine_vk_call,
\n
"
)
f
.
write
(
"};
\n
"
)
f
.
write
(
"}
\n
"
)
def
generate_thunks_h
(
self
,
f
,
prefix
):
self
.
_generate_copyright
(
f
)
...
...
dlls/winevulkan/vulkan.c
View file @
49752f34
...
...
@@ -444,7 +444,7 @@ NTSTATUS init_vulkan(void *args)
}
*
(
const
struct
unix_funcs
**
)
args
=
&
loader_funcs
;
*
(
void
**
)
args
=
vk_direct_unix_call
;
return
STATUS_SUCCESS
;
}
...
...
dlls/winevulkan/vulkan_loader.h
View file @
49752f34
...
...
@@ -106,7 +106,8 @@ struct is_available_device_function_params
const
char
*
name
;
};
extern
const
struct
unix_funcs
*
unix_funcs
;
extern
NTSTATUS
(
WINAPI
*
p_vk_direct_unix_call
)(
unixlib_handle_t
handle
,
unsigned
int
code
,
void
*
args
)
DECLSPEC_HIDDEN
;
extern
unixlib_handle_t
unix_handle
DECLSPEC_HIDDEN
;
static
inline
NTSTATUS
vk_unix_call
(
enum
unix_call
code
,
void
*
params
)
...
...
@@ -114,9 +115,4 @@ static inline NTSTATUS vk_unix_call(enum unix_call code, void *params)
return
__wine_unix_call
(
unix_handle
,
code
,
params
);
}
struct
unix_funcs
{
NTSTATUS
(
WINAPI
*
p_vk_call
)(
enum
unix_call
,
void
*
);
};
#endif
/* __WINE_VULKAN_LOADER_H */
dlls/winevulkan/vulkan_private.h
View file @
49752f34
...
...
@@ -212,7 +212,7 @@ uint64_t wine_vk_unwrap_handle(VkObjectType type, uint64_t handle) DECLSPEC_HIDD
NTSTATUS
init_vulkan
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
const
struct
unix_funcs
loader_funcs
;
NTSTATUS
WINAPI
vk_direct_unix_call
(
unixlib_handle_t
handle
,
unsigned
int
code
,
void
*
arg
)
DECLSPEC_HIDDEN
;
NTSTATUS
vk_is_available_instance_function
(
void
*
arg
)
DECLSPEC_HIDDEN
;
NTSTATUS
vk_is_available_device_function
(
void
*
arg
)
DECLSPEC_HIDDEN
;
...
...
dlls/winevulkan/vulkan_thunks.c
View file @
49752f34
...
...
@@ -10751,12 +10751,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
};
C_ASSERT
(
ARRAYSIZE
(
__wine_unix_call_funcs
)
==
unix_count
);
static
NTSTATUS
WINAPI
wine_vk_call
(
enum
unix_call
code
,
void
*
params
)
NTSTATUS
WINAPI
vk_direct_unix_call
(
unixlib_handle_t
handle
,
unsigned
int
code
,
void
*
params
)
{
return
__wine_unix_call_funcs
[
code
](
params
);
}
const
struct
unix_funcs
loader_funcs
=
{
wine_vk_call
,
};
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