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
5dcec4de
Commit
5dcec4de
authored
Jun 14, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Jun 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Reset the viewport data before each test.
parent
3f92030e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
d3d.c
dlls/ddraw/tests/d3d.c
+20
-11
No files found.
dlls/ddraw/tests/d3d.c
View file @
5dcec4de
...
@@ -1011,6 +1011,19 @@ static void D3D1_releaseObjects(void)
...
@@ -1011,6 +1011,19 @@ static void D3D1_releaseObjects(void)
if
(
DirectDraw1
)
IDirectDraw_Release
(
DirectDraw1
);
if
(
DirectDraw1
)
IDirectDraw_Release
(
DirectDraw1
);
}
}
#define SET_VP_DATA(vp_data) \
vp_data.dwSize = sizeof(vp_data); \
vp_data.dwX = 0; \
vp_data.dwY = 0; \
vp_data.dwWidth = 256; \
vp_data.dwHeight = 256; \
vp_data.dvMaxX = 256; \
vp_data.dvMaxY = 256; \
vp_data.dvScaleX = 5; \
vp_data.dvScaleY = 5; \
vp_data.dvMinZ = -25; \
vp_data.dvMaxZ = 60;
static
void
Direct3D1Test
(
void
)
static
void
Direct3D1Test
(
void
)
{
{
HRESULT
hr
;
HRESULT
hr
;
...
@@ -1153,17 +1166,7 @@ static void Direct3D1Test(void)
...
@@ -1153,17 +1166,7 @@ static void Direct3D1Test(void)
}
}
}
}
vp_data
.
dwSize
=
sizeof
(
vp_data
);
SET_VP_DATA
(
vp_data
);
vp_data
.
dwX
=
0
;
vp_data
.
dwY
=
0
;
vp_data
.
dwWidth
=
256
;
vp_data
.
dwHeight
=
256
;
vp_data
.
dvMaxX
=
256
;
vp_data
.
dvMaxY
=
256
;
vp_data
.
dvScaleX
=
5
;
vp_data
.
dvScaleY
=
5
;
vp_data
.
dvMinZ
=
-
25
;
vp_data
.
dvMaxZ
=
60
;
hr
=
IDirect3DViewport_SetViewport
(
Viewport
,
&
vp_data
);
hr
=
IDirect3DViewport_SetViewport
(
Viewport
,
&
vp_data
);
ok
(
hr
==
D3D_OK
,
"IDirect3DViewport_SetViewport returned %08x
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"IDirect3DViewport_SetViewport returned %08x
\n
"
,
hr
);
hr
=
IDirect3DViewport_TransformVertices
(
Viewport
,
sizeof
(
testverts
)
/
sizeof
(
testverts
[
0
]),
hr
=
IDirect3DViewport_TransformVertices
(
Viewport
,
sizeof
(
testverts
)
/
sizeof
(
testverts
[
0
]),
...
@@ -1184,6 +1187,7 @@ static void Direct3D1Test(void)
...
@@ -1184,6 +1187,7 @@ static void Direct3D1Test(void)
cmp
[
i
].
x
,
cmp
[
i
].
y
,
cmp
[
i
].
z
,
cmp
[
i
].
rhw
);
cmp
[
i
].
x
,
cmp
[
i
].
y
,
cmp
[
i
].
z
,
cmp
[
i
].
rhw
);
}
}
SET_VP_DATA
(
vp_data
);
vp_data
.
dwX
=
10
;
vp_data
.
dwX
=
10
;
vp_data
.
dwY
=
20
;
vp_data
.
dwY
=
20
;
hr
=
IDirect3DViewport_SetViewport
(
Viewport
,
&
vp_data
);
hr
=
IDirect3DViewport_SetViewport
(
Viewport
,
&
vp_data
);
...
@@ -1266,6 +1270,7 @@ static void Direct3D1Test(void)
...
@@ -1266,6 +1270,7 @@ static void Direct3D1Test(void)
outH
[
i
].
dwFlags
,
Flags
[
i
]);
outH
[
i
].
dwFlags
,
Flags
[
i
]);
}
}
SET_VP_DATA
(
vp_data
);
vp_data
.
dwWidth
=
10
;
vp_data
.
dwWidth
=
10
;
vp_data
.
dwHeight
=
1000
;
vp_data
.
dwHeight
=
1000
;
hr
=
IDirect3DViewport_SetViewport
(
Viewport
,
&
vp_data
);
hr
=
IDirect3DViewport_SetViewport
(
Viewport
,
&
vp_data
);
...
@@ -1288,6 +1293,8 @@ static void Direct3D1Test(void)
...
@@ -1288,6 +1293,8 @@ static void Direct3D1Test(void)
"Cliptest %d differs. Got %08x expexted %08x
\n
"
,
i
+
1
,
"Cliptest %d differs. Got %08x expexted %08x
\n
"
,
i
+
1
,
outH
[
i
].
dwFlags
,
Flags
[
i
]);
outH
[
i
].
dwFlags
,
Flags
[
i
]);
}
}
SET_VP_DATA
(
vp_data
);
vp_data
.
dwWidth
=
256
;
vp_data
.
dwWidth
=
256
;
vp_data
.
dwHeight
=
256
;
vp_data
.
dwHeight
=
256
;
vp_data
.
dvScaleX
=
1
;
vp_data
.
dvScaleX
=
1
;
...
@@ -1317,6 +1324,7 @@ static void Direct3D1Test(void)
...
@@ -1317,6 +1324,7 @@ static void Direct3D1Test(void)
* and with clipping on the offscreen flag is set if only one vertex
* and with clipping on the offscreen flag is set if only one vertex
* is transformed, and this vertex is offscreen.
* is transformed, and this vertex is offscreen.
*/
*/
SET_VP_DATA
(
vp_data
);
vp_data
.
dwWidth
=
5
;
vp_data
.
dwWidth
=
5
;
vp_data
.
dwHeight
=
5
;
vp_data
.
dwHeight
=
5
;
vp_data
.
dvScaleX
=
10000
;
vp_data
.
dvScaleX
=
10000
;
...
@@ -1348,6 +1356,7 @@ static void Direct3D1Test(void)
...
@@ -1348,6 +1356,7 @@ static void Direct3D1Test(void)
transformdata
.
lpIn
=
(
void
*
)
offscreentest
;
transformdata
.
lpIn
=
(
void
*
)
offscreentest
;
transformdata
.
dwInSize
=
sizeof
(
offscreentest
[
0
]);
transformdata
.
dwInSize
=
sizeof
(
offscreentest
[
0
]);
SET_VP_DATA
(
vp_data
);
vp_data
.
dwWidth
=
257
;
vp_data
.
dwWidth
=
257
;
vp_data
.
dwHeight
=
257
;
vp_data
.
dwHeight
=
257
;
vp_data
.
dvScaleX
=
1
;
vp_data
.
dvScaleX
=
1
;
...
...
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