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
a75dde2c
Commit
a75dde2c
authored
Feb 24, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 22, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Stop generating the wine/vulkan_driver.h header.
parent
9ee2adba
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
69 deletions
+14
-69
make_vulkan
dlls/winevulkan/make_vulkan
+0
-63
vulkan_driver.h
include/wine/vulkan_driver.h
+14
-6
No files found.
dlls/winevulkan/make_vulkan
View file @
a75dde2c
...
...
@@ -3142,66 +3142,6 @@ class VkGenerator(object):
f
.
write
(
"#endif /* __WINE_VULKAN_H */
\n
"
)
def
generate_vulkan_driver_h
(
self
,
f
):
self
.
_generate_copyright
(
f
)
f
.
write
(
"#ifndef __WINE_VULKAN_DRIVER_H
\n
"
)
f
.
write
(
"#define __WINE_VULKAN_DRIVER_H
\n\n
"
)
f
.
write
(
"/* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */
\n
"
)
f
.
write
(
"#define WINE_VULKAN_DRIVER_VERSION {0}
\n\n
"
.
format
(
DRIVER_VERSION
))
f
.
write
(
"struct vulkan_funcs
\n
{
\n
"
)
f
.
write
(
" /* Vulkan global functions. These are the only calls at this point a graphics driver
\n
"
)
f
.
write
(
" * needs to provide. Other function calls will be provided indirectly by dispatch
\n
"
)
f
.
write
(
" * tables part of dispatchable Vulkan objects such as VkInstance or vkDevice.
\n
"
)
f
.
write
(
" */
\n
"
)
for
vk_func
in
self
.
registry
.
funcs
.
values
():
if
not
vk_func
.
is_driver_func
():
continue
pfn
=
vk_func
.
pfn
()
# Avoid PFN_vkVoidFunction in driver interface as Vulkan likes to put calling convention
# stuff in there. For simplicity substitute with "void *".
pfn
=
pfn
.
replace
(
"PFN_vkVoidFunction"
,
"void *"
)
f
.
write
(
" {0};
\n
"
.
format
(
pfn
))
f
.
write
(
"
\n
"
)
f
.
write
(
" /* winevulkan specific functions */
\n
"
)
f
.
write
(
" VkSurfaceKHR (*p_wine_get_host_surface)(VkSurfaceKHR);
\n
"
)
f
.
write
(
"};
\n\n
"
)
f
.
write
(
"static inline void *get_vulkan_driver_device_proc_addr(
\n
"
)
f
.
write
(
" const struct vulkan_funcs *vulkan_funcs, const char *name)
\n
{
\n
"
)
f
.
write
(
" if (!name || name[0] != 'v' || name[1] != 'k') return NULL;
\n\n
"
)
f
.
write
(
" name += 2;
\n\n
"
)
for
vk_func
in
self
.
registry
.
funcs
.
values
():
if
vk_func
.
is_driver_func
()
and
vk_func
.
is_device_func
():
f
.
write
(
' if (!strcmp(name, "{0}"))
\n
'
.
format
(
vk_func
.
name
[
2
:]))
f
.
write
(
' return vulkan_funcs->p_{0};
\n
'
.
format
(
vk_func
.
name
))
f
.
write
(
"
\n
"
)
f
.
write
(
" return NULL;
\n
}
\n\n
"
)
f
.
write
(
"static inline void *get_vulkan_driver_instance_proc_addr(
\n
"
)
f
.
write
(
" const struct vulkan_funcs *vulkan_funcs, VkInstance instance, const char *name)
\n
{
\n
"
)
f
.
write
(
" if (!name || name[0] != 'v' || name[1] != 'k') return NULL;
\n\n
"
)
f
.
write
(
" name += 2;
\n\n
"
)
for
vk_func
in
self
.
registry
.
funcs
.
values
():
if
vk_func
.
is_driver_func
()
and
vk_func
.
is_global_func
()
and
vk_func
.
name
!=
"vkGetInstanceProcAddr"
:
f
.
write
(
' if (!strcmp(name, "{0}"))
\n
'
.
format
(
vk_func
.
name
[
2
:]))
f
.
write
(
' return vulkan_funcs->p_{0};
\n
'
.
format
(
vk_func
.
name
))
f
.
write
(
"
\n
"
)
f
.
write
(
" if (!instance) return NULL;
\n\n
"
)
for
vk_func
in
self
.
registry
.
funcs
.
values
():
if
vk_func
.
is_driver_func
()
and
(
vk_func
.
is_instance_func
()
or
vk_func
.
is_phys_dev_func
()):
f
.
write
(
' if (!strcmp(name, "{0}"))
\n
'
.
format
(
vk_func
.
name
[
2
:]))
f
.
write
(
' return vulkan_funcs->p_{0};
\n
'
.
format
(
vk_func
.
name
))
f
.
write
(
"
\n
"
)
f
.
write
(
" name -= 2;
\n\n
"
)
f
.
write
(
" return get_vulkan_driver_device_proc_addr(vulkan_funcs, name);
\n
}
\n\n
"
)
f
.
write
(
"#endif /* __WINE_VULKAN_DRIVER_H */
\n
"
)
def
generate_vulkan_spec
(
self
,
f
):
self
.
_generate_copyright
(
f
,
spec_file
=
True
)
f
.
write
(
"@ stdcall -private vk_icdGetInstanceProcAddr(ptr str)
\n
"
)
...
...
@@ -3894,9 +3834,6 @@ def main():
with
open
(
WINE_VULKAN_H
,
"w"
)
as
f
:
generator
.
generate_vulkan_h
(
f
)
with
open
(
WINE_VULKAN_DRIVER_H
,
"w"
)
as
f
:
generator
.
generate_vulkan_driver_h
(
f
)
with
open
(
WINE_VULKAN_THUNKS_H
,
"w"
)
as
f
:
generator
.
generate_thunks_h
(
f
,
"wine_"
)
...
...
include/wine/vulkan_driver.h
View file @
a75dde2c
/* Automatically generated from Vulkan vk.xml; DO NOT EDIT!
/*
* Copyright 2017-2018 Roderick Colenbrander
* Copyright 2022 Jacek Caban for CodeWeavers
*
* This file is generated from Vulkan vk.xml file covered
* by the following copyright and permission notice:
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Copyright 2015-2024 The Khronos Group Inc.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_VULKAN_DRIVER_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