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
6df6c7fe
Commit
6df6c7fe
authored
Feb 28, 2023
by
Illia Polishchuk
Committed by
Alexandre Julliard
Mar 02, 2023
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Add test for non-indexed instancing drawing.
Windows d3d9 always draws only a single instance for non-indexed draws.
parent
b3bf30e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
visual.c
dlls/d3d9/tests/visual.c
+30
-0
No files found.
dlls/d3d9/tests/visual.c
View file @
6df6c7fe
...
...
@@ -13090,6 +13090,36 @@ static void stream_test(void)
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
act
.
strInstance
,
vb3
,
0
,
sizeof
(
instancepos
[
0
]));
ok
(
SUCCEEDED
(
hr
),
"Failed to set stream source, hr %#lx.
\n
"
,
hr
);
/* Non-indexed draw test. Only a single instance should be drawn. */
hr
=
IDirect3DDevice9_DrawPrimitive
(
device
,
D3DPT_TRIANGLELIST
,
0
,
1
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#lx.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_EndScene
(
device
);
ok
(
SUCCEEDED
(
hr
),
"Failed to end scene, hr %#lx.
\n
"
,
hr
);
/* Check that only single triangle instance has beed drawn with non-indexed draw. */
color
=
getPixelColor
(
device
,
200
,
340
);
ok
(
color
==
act
.
color1
,
"has color 0x%08x, expected 0x%08x (case %i)
\n
"
,
color
,
act
.
color1
,
i
);
color
=
getPixelColor
(
device
,
400
,
340
);
todo_wine_if
(
color
!=
0x00ffffff
)
ok
(
color
==
0x00ffffff
,
"has color 0x%08x, expected 0x%08x (case %i)
\n
"
,
color
,
0x00ffffff
,
i
);
color
=
getPixelColor
(
device
,
400
,
180
);
todo_wine_if
(
color
!=
0x00ffffff
)
ok
(
color
==
0x00ffffff
,
"has color 0x%08x, expected 0x%08x (case %i)
\n
"
,
color
,
0x00ffffff
,
i
);
color
=
getPixelColor
(
device
,
200
,
180
);
todo_wine_if
(
color
!=
0x00ffffff
)
ok
(
color
==
0x00ffffff
,
"has color 0x%08x, expected 0x%08x (case %i)
\n
"
,
color
,
0x00ffffff
,
i
);
hr
=
IDirect3DDevice9_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
|
D3DCLEAR_ZBUFFER
,
0xffffffff
,
1
.
0
f
,
0
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_BeginScene
(
device
);
ok
(
SUCCEEDED
(
hr
),
"Failed to begin scene, hr %#lx.
\n
"
,
hr
);
/* Indexed draw test. */
hr
=
IDirect3DDevice9_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLELIST
,
0
,
0
,
4
,
0
,
2
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#lx.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_EndScene
(
device
);
Vitaly Lipatov
@lav
mentioned in commit
37731bb0
·
Feb 25, 2024
mentioned in commit
37731bb0
mentioned in commit 37731bb0a40ea5fe27c4d01e6936ca49c6cc649e
Toggle commit list
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