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
629c2f90
Commit
629c2f90
authored
Sep 14, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
Sep 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Handle special adjacency index value in d3dx9_mesh_OptimizeInplace().
parent
e0f98c0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
mesh.c
dlls/d3dx9_36/mesh.c
+11
-3
No files found.
dlls/d3dx9_36/mesh.c
View file @
629c2f90
...
...
@@ -1624,6 +1624,13 @@ static HRESULT remap_faces_for_attrsort(struct d3dx9_mesh *This, const DWORD *in
return
D3D_OK
;
}
static
DWORD
adjacency_remap
(
DWORD
*
face_remap
,
DWORD
index
)
{
if
(
index
==
0xffffffff
)
return
index
;
return
face_remap
[
index
];
}
static
HRESULT
WINAPI
d3dx9_mesh_OptimizeInplace
(
ID3DXMesh
*
iface
,
DWORD
flags
,
const
DWORD
*
adjacency_in
,
DWORD
*
adjacency_out
,
DWORD
*
face_remap_out
,
ID3DXBuffer
**
vertex_remap_out
)
{
...
...
@@ -1778,9 +1785,10 @@ static HRESULT WINAPI d3dx9_mesh_OptimizeInplace(ID3DXMesh *iface, DWORD flags,
for
(
i
=
0
;
i
<
This
->
numfaces
;
i
++
)
{
DWORD
old_pos
=
i
*
3
;
DWORD
new_pos
=
face_remap
[
i
]
*
3
;
adjacency_out
[
new_pos
++
]
=
face_remap
[
adjacency_in
[
old_pos
++
]];
adjacency_out
[
new_pos
++
]
=
face_remap
[
adjacency_in
[
old_pos
++
]];
adjacency_out
[
new_pos
++
]
=
face_remap
[
adjacency_in
[
old_pos
++
]];
adjacency_out
[
new_pos
++
]
=
adjacency_remap
(
face_remap
,
adjacency_in
[
old_pos
++
]);
adjacency_out
[
new_pos
++
]
=
adjacency_remap
(
face_remap
,
adjacency_in
[
old_pos
++
]);
adjacency_out
[
new_pos
]
=
adjacency_remap
(
face_remap
,
adjacency_in
[
old_pos
]);
}
}
else
{
memcpy
(
adjacency_out
,
adjacency_in
,
This
->
numfaces
*
3
*
sizeof
(
*
adjacency_out
));
...
...
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