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
eb062df5
Commit
eb062df5
authored
Oct 23, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Use separated implementations for all 32-bit Unix calls.
parent
46f84ea2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
10 deletions
+56
-10
loader.c
dlls/winevulkan/loader.c
+2
-4
make_vulkan
dlls/winevulkan/make_vulkan
+3
-3
vulkan.c
dlls/winevulkan/vulkan.c
+45
-0
vulkan_private.h
dlls/winevulkan/vulkan_private.h
+3
-0
vulkan_thunks.c
dlls/winevulkan/vulkan_thunks.c
+3
-3
No files found.
dlls/winevulkan/loader.c
View file @
eb062df5
...
...
@@ -35,7 +35,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
);
NTSTATUS
(
WINAPI
*
p_vk_direct_unix_call
)(
unixlib_handle_t
handle
,
unsigned
int
code
,
void
*
args
);
NTSTATUS
(
WINAPI
*
p_vk_direct_unix_call
)(
unixlib_handle_t
handle
,
unsigned
int
code
,
void
*
args
)
=
__wine_unix_call
;
unixlib_handle_t
unix_handle
;
static
HINSTANCE
hinstance
;
...
...
@@ -239,9 +239,7 @@ static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context)
&
unix_handle
,
sizeof
(
unix_handle
),
NULL
))
return
FALSE
;
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
;
return
!
vk_unix_call
(
unix_init
,
&
p_vk_direct_unix_call
);
}
static
BOOL
wine_vk_init_once
(
void
)
...
...
dlls/winevulkan/make_vulkan
View file @
eb062df5
...
...
@@ -2686,9 +2686,9 @@ class VkGenerator(object):
f
.
write
(
"const unixlib_entry_t __wine_unix_call_funcs[] =
\n
"
)
f
.
write
(
"{
\n
"
)
f
.
write
(
" init_vulkan,
\n
"
)
f
.
write
(
" vk_is_available_instance_function,
\n
"
)
f
.
write
(
" vk_is_available_device_function,
\n
"
)
f
.
write
(
" init_vulkan
32
,
\n
"
)
f
.
write
(
" vk_is_available_instance_function
32
,
\n
"
)
f
.
write
(
" vk_is_available_device_function
32
,
\n
"
)
for
vk_func
in
self
.
registry
.
funcs
.
values
():
if
not
vk_func
.
needs_exposing
():
continue
...
...
dlls/winevulkan/vulkan.c
View file @
eb062df5
...
...
@@ -410,6 +410,8 @@ static void wine_vk_device_free(struct wine_device *device)
free
(
device
);
}
#ifdef _WIN64
NTSTATUS
init_vulkan
(
void
*
args
)
{
vk_funcs
=
__wine_get_vulkan_driver
(
WINE_VULKAN_DRIVER_VERSION
);
...
...
@@ -424,6 +426,23 @@ NTSTATUS init_vulkan(void *args)
return
STATUS_SUCCESS
;
}
#endif
/* _WIN64 */
NTSTATUS
init_vulkan32
(
void
*
args
)
{
vk_funcs
=
__wine_get_vulkan_driver
(
WINE_VULKAN_DRIVER_VERSION
);
if
(
!
vk_funcs
)
{
ERR
(
"Failed to load Wine graphics driver supporting Vulkan.
\n
"
);
return
STATUS_UNSUCCESSFUL
;
}
#ifndef _WIN64
*
(
void
**
)
args
=
vk_direct_unix_call
;
#endif
return
STATUS_SUCCESS
;
}
/* Helper function for converting between win32 and host compatible VkInstanceCreateInfo.
* This function takes care of extensions handled at winevulkan layer, a Wine graphics
* driver is responsible for handling e.g. surface extensions.
...
...
@@ -1587,6 +1606,8 @@ void wine_vkDestroyDebugReportCallbackEXT(VkInstance handle, VkDebugReportCallba
free
(
object
);
}
#ifdef _WIN64
NTSTATUS
vk_is_available_instance_function
(
void
*
arg
)
{
struct
is_available_instance_function_params
*
params
=
arg
;
...
...
@@ -1600,3 +1621,27 @@ NTSTATUS vk_is_available_device_function(void *arg)
struct
wine_device
*
device
=
wine_device_from_handle
(
params
->
device
);
return
!!
vk_funcs
->
p_vkGetDeviceProcAddr
(
device
->
device
,
params
->
name
);
}
#endif
/* _WIN64 */
NTSTATUS
vk_is_available_instance_function32
(
void
*
arg
)
{
struct
{
UINT32
instance
;
UINT32
name
;
}
*
params
=
arg
;
struct
wine_instance
*
instance
=
wine_instance_from_handle
(
UlongToPtr
(
params
->
instance
));
return
!!
vk_funcs
->
p_vkGetInstanceProcAddr
(
instance
->
instance
,
UlongToPtr
(
params
->
name
));
}
NTSTATUS
vk_is_available_device_function32
(
void
*
arg
)
{
struct
{
UINT32
device
;
UINT32
name
;
}
*
params
=
arg
;
struct
wine_device
*
device
=
wine_device_from_handle
(
UlongToPtr
(
params
->
device
));
return
!!
vk_funcs
->
p_vkGetDeviceProcAddr
(
device
->
device
,
UlongToPtr
(
params
->
name
));
}
dlls/winevulkan/vulkan_private.h
View file @
eb062df5
...
...
@@ -233,11 +233,14 @@ BOOL wine_vk_instance_extension_supported(const char *name) DECLSPEC_HIDDEN;
BOOL
wine_vk_is_type_wrapped
(
VkObjectType
type
)
DECLSPEC_HIDDEN
;
NTSTATUS
init_vulkan
(
void
*
args
)
DECLSPEC_HIDDEN
;
NTSTATUS
init_vulkan32
(
void
*
args
)
DECLSPEC_HIDDEN
;
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
;
NTSTATUS
vk_is_available_instance_function32
(
void
*
arg
)
DECLSPEC_HIDDEN
;
NTSTATUS
vk_is_available_device_function32
(
void
*
arg
)
DECLSPEC_HIDDEN
;
struct
conversion_context
{
...
...
dlls/winevulkan/vulkan_thunks.c
View file @
eb062df5
...
...
@@ -42999,9 +42999,9 @@ C_ASSERT(ARRAYSIZE(__wine_unix_call_funcs) == unix_count);
const
unixlib_entry_t
__wine_unix_call_funcs
[]
=
{
init_vulkan
,
vk_is_available_instance_function
,
vk_is_available_device_function
,
init_vulkan
32
,
vk_is_available_instance_function
32
,
vk_is_available_device_function
32
,
thunk32_vkAcquireNextImage2KHR
,
thunk32_vkAcquireNextImageKHR
,
thunk32_vkAcquirePerformanceConfigurationINTEL
,
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