Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
250072f9
Commit
250072f9
authored
Apr 16, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Move Vulkan calls to Unix lib.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
187e4d7e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
8 deletions
+25
-8
loader.c
dlls/winevulkan/loader.c
+5
-6
make_vulkan
dlls/winevulkan/make_vulkan
+5
-0
vulkan.c
dlls/winevulkan/vulkan.c
+11
-2
vulkan_thunks.c
dlls/winevulkan/vulkan_thunks.c
+4
-0
No files found.
dlls/winevulkan/loader.c
View file @
250072f9
...
...
@@ -21,6 +21,7 @@
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "winreg.h"
#include "winuser.h"
#include "initguid.h"
...
...
@@ -218,10 +219,8 @@ static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context)
ReleaseDC
(
0
,
hdc
);
if
(
!
driver
)
ERR
(
"Failed to load Wine graphics driver supporting Vulkan.
\n
"
);
else
unix_funcs
=
unix_vk_init
(
driver
);
return
driver
!=
NULL
;
return
driver
&&
!
__wine_init_unix_lib
(
hinstance
,
DLL_PROCESS_ATTACH
,
driver
,
&
unix_funcs
)
;
}
static
BOOL
wine_vk_init_once
(
void
)
...
...
@@ -239,7 +238,7 @@ VkResult WINAPI wine_vkCreateInstance(const VkInstanceCreateInfo *create_info,
if
(
!
wine_vk_init_once
())
return
VK_ERROR_INITIALIZATION_FAILED
;
return
unix_vkCreateInstance
(
create_info
,
allocator
,
instance
);
return
unix_
funcs
->
p_
vkCreateInstance
(
create_info
,
allocator
,
instance
);
}
VkResult
WINAPI
wine_vkEnumerateInstanceExtensionProperties
(
const
char
*
layer_name
,
...
...
@@ -259,7 +258,7 @@ VkResult WINAPI wine_vkEnumerateInstanceExtensionProperties(const char *layer_na
return
VK_SUCCESS
;
}
return
unix_vkEnumerateInstanceExtensionProperties
(
layer_name
,
count
,
properties
);
return
unix_
funcs
->
p_
vkEnumerateInstanceExtensionProperties
(
layer_name
,
count
,
properties
);
}
VkResult
WINAPI
wine_vkEnumerateInstanceVersion
(
uint32_t
*
version
)
...
...
@@ -272,7 +271,7 @@ VkResult WINAPI wine_vkEnumerateInstanceVersion(uint32_t *version)
return
VK_SUCCESS
;
}
return
unix_vkEnumerateInstanceVersion
(
version
);
return
unix_
funcs
->
p_
vkEnumerateInstanceVersion
(
version
);
}
static
HANDLE
get_display_device_init_mutex
(
void
)
...
...
dlls/winevulkan/make_vulkan
View file @
250072f9
...
...
@@ -2263,6 +2263,11 @@ class VkGenerator(object):
def
generate_thunks_c
(
self
,
f
,
prefix
):
self
.
_generate_copyright
(
f
)
f
.
write
(
"#if 0
\n
"
)
f
.
write
(
"#pragma makedep unix
\n
"
)
f
.
write
(
"#endif
\n\n
"
)
f
.
write
(
"#include
\"
config.h
\"\n
"
)
f
.
write
(
"#include
\"
wine/port.h
\"\n\n
"
)
...
...
dlls/winevulkan/vulkan.c
View file @
250072f9
...
...
@@ -17,11 +17,17 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include <time.h>
#include <stdarg.h>
#include <stdlib.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
...
...
@@ -448,11 +454,14 @@ static void wine_vk_device_free(struct VkDevice_T *device)
free
(
device
);
}
const
struct
unix_funcs
*
unix_vk_init
(
const
struct
vulkan_funcs
*
driver
)
NTSTATUS
CDECL
__wine_init_unix_lib
(
HMODULE
module
,
DWORD
reason
,
const
void
*
driver
,
void
*
ptr_out
)
{
if
(
reason
!=
DLL_PROCESS_ATTACH
)
return
STATUS_SUCCESS
;
vk_funcs
=
driver
;
p_vkEnumerateInstanceVersion
=
vk_funcs
->
p_vkGetInstanceProcAddr
(
NULL
,
"vkEnumerateInstanceVersion"
);
return
&
loader_funcs
;
*
(
const
struct
unix_funcs
**
)
ptr_out
=
&
loader_funcs
;
return
STATUS_SUCCESS
;
}
/* Helper function for converting between win32 and host compatible VkInstanceCreateInfo.
...
...
dlls/winevulkan/vulkan_thunks.c
View file @
250072f9
...
...
@@ -9,6 +9,10 @@
*
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "wine/port.h"
...
...
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