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
3a5155a9
Commit
3a5155a9
authored
Nov 12, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Introduce find_next_struct32.
parent
b6205f57
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
3 deletions
+45
-3
make_vulkan
dlls/winevulkan/make_vulkan
+18
-3
vulkan_private.h
dlls/winevulkan/vulkan_private.h
+27
-0
vulkan_thunks.c
dlls/winevulkan/vulkan_thunks.c
+0
-0
No files found.
dlls/winevulkan/make_vulkan
View file @
3a5155a9
...
...
@@ -2185,8 +2185,18 @@ class StructConversionFunction(object):
body
+=
"{
\n
"
if
needs_extensions
:
body
+=
" const VkBaseInStructure *in_header;
\n
"
body
+=
" VkBaseOutStructure *out_header = (void *)out;
\n\n
"
if
self
.
direction
==
Direction
.
INPUT
:
if
self
.
conv
:
body
+=
" const VkBaseInStructure32 *in_header;
\n
"
else
:
body
+=
" const VkBaseInStructure *in_header;
\n
"
body
+=
" VkBaseOutStructure *out_header = (void *)out;
\n\n
"
else
:
body
+=
" const VkBaseInStructure *in_header;
\n
"
if
self
.
conv
:
body
+=
" VkBaseOutStructure32 *out_header = (void *)out;
\n\n
"
else
:
body
+=
" VkBaseOutStructure *out_header = (void *)out;
\n\n
"
body
+=
" if (!in) return;
\n\n
"
...
...
@@ -2200,7 +2210,10 @@ class StructConversionFunction(object):
body
+=
" "
+
m
.
copy
(
"in->"
,
"out->"
,
self
.
direction
,
self
.
conv
,
self
.
unwrap
)
if
needs_extensions
:
body
+=
"
\n
for (in_header = in->pNext; in_header; in_header = in_header->pNext)
\n
"
if
self
.
conv
and
self
.
direction
==
Direction
.
INPUT
:
body
+=
"
\n
for (in_header = UlongToPtr(in->pNext); in_header; in_header = UlongToPtr(in_header->pNext))
\n
"
else
:
body
+=
"
\n
for (in_header = (void *)in->pNext; in_header; in_header = (void *)in_header->pNext)
\n
"
body
+=
" {
\n
"
body
+=
" switch (in_header->sType)
\n
"
body
+=
" {
\n
"
...
...
@@ -2232,6 +2245,8 @@ class StructConversionFunction(object):
body
+=
" {
\n
"
if
self
.
direction
==
Direction
.
INPUT
:
body
+=
ident
+
"{0} *out_ext = conversion_context_alloc(ctx, sizeof(*out_ext));
\n
"
.
format
(
out_type
)
elif
self
.
conv
:
body
+=
ident
+
"{0} *out_ext = find_next_struct32(out_header, {1});
\n
"
.
format
(
out_type
,
stype
)
else
:
body
+=
ident
+
"{0} *out_ext = find_next_struct(out_header, {1});
\n
"
.
format
(
out_type
,
stype
)
...
...
dlls/winevulkan/vulkan_private.h
View file @
3a5155a9
...
...
@@ -277,6 +277,33 @@ static inline void *conversion_context_alloc(struct conversion_context *pool, si
}
}
typedef
UINT32
PTR32
;
typedef
struct
{
VkStructureType
sType
;
PTR32
pNext
;
}
VkBaseInStructure32
;
typedef
struct
{
VkStructureType
sType
;
PTR32
pNext
;
}
VkBaseOutStructure32
;
static
inline
void
*
find_next_struct32
(
void
*
s
,
VkStructureType
t
)
{
VkBaseOutStructure32
*
header
;
for
(
header
=
s
;
header
;
header
=
UlongToPtr
(
header
->
pNext
))
{
if
(
header
->
sType
==
t
)
return
header
;
}
return
NULL
;
}
static
inline
void
*
find_next_struct
(
const
void
*
s
,
VkStructureType
t
)
{
VkBaseOutStructure
*
header
;
...
...
dlls/winevulkan/vulkan_thunks.c
View file @
3a5155a9
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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