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
12743d57
Commit
12743d57
authored
Apr 04, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Use a separate device for np2_stretch_rect_test().
parent
2e0e4f91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
18 deletions
+35
-18
visual.c
dlls/d3d9/tests/visual.c
+35
-18
No files found.
dlls/d3d9/tests/visual.c
View file @
12743d57
...
...
@@ -10696,22 +10696,39 @@ done:
DestroyWindow
(
window
);
}
static
void
np2_stretch_rect_test
(
IDirect3DDevice9
*
device
)
{
static
void
np2_stretch_rect_test
(
void
)
{
IDirect3DSurface9
*
src
=
NULL
,
*
dst
=
NULL
,
*
backbuffer
=
NULL
;
IDirect3DTexture9
*
dsttex
=
NULL
;
IDirect3DDevice9
*
device
;
IDirect3D9
*
d3d
;
D3DCOLOR
color
;
ULONG
refcount
;
HWND
window
;
HRESULT
hr
;
DWORD
color
;
D3DRECT
r1
=
{
0
,
0
,
50
,
50
};
D3DRECT
r2
=
{
50
,
0
,
100
,
50
};
D3DRECT
r3
=
{
50
,
50
,
100
,
100
};
D3DRECT
r4
=
{
0
,
50
,
50
,
100
};
const
float
quad
[]
=
{
-
1
.
0
,
-
1
.
0
,
0
.
1
,
0
.
0
,
0
.
0
,
1
.
0
,
-
1
.
0
,
0
.
1
,
1
.
0
,
0
.
0
,
-
1
.
0
,
1
.
0
,
0
.
1
,
0
.
0
,
1
.
0
,
1
.
0
,
1
.
0
,
0
.
1
,
1
.
0
,
1
.
0
,
static
const
D3DRECT
r1
=
{
0
,
0
,
50
,
50
};
static
const
D3DRECT
r2
=
{
50
,
0
,
100
,
50
};
static
const
D3DRECT
r3
=
{
50
,
50
,
100
,
100
};
static
const
D3DRECT
r4
=
{
0
,
50
,
50
,
100
};
static
const
float
quad
[]
=
{
-
1
.
0
f
,
-
1
.
0
f
,
0
.
1
f
,
0
.
0
f
,
0
.
0
f
,
-
1
.
0
f
,
1
.
0
f
,
0
.
1
f
,
0
.
0
f
,
1
.
0
f
,
1
.
0
f
,
-
1
.
0
f
,
0
.
1
f
,
1
.
0
f
,
0
.
0
f
,
1
.
0
f
,
1
.
0
f
,
0
.
1
f
,
1
.
0
f
,
1
.
0
f
,
};
window
=
CreateWindowA
(
"static"
,
"d3d9_test"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
0
,
0
,
640
,
480
,
NULL
,
NULL
,
NULL
,
NULL
);
d3d
=
Direct3DCreate9
(
D3D_SDK_VERSION
);
ok
(
!!
d3d
,
"Failed to create a D3D object.
\n
"
);
if
(
!
(
device
=
create_device
(
d3d
,
window
,
window
,
TRUE
)))
{
skip
(
"Failed to create a D3D device, skipping tests.
\n
"
);
goto
done
;
}
hr
=
IDirect3DDevice9_GetBackBuffer
(
device
,
0
,
0
,
D3DBACKBUFFER_TYPE_MONO
,
&
backbuffer
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_GetBackBuffer failed with %08x
\n
"
,
hr
);
...
...
@@ -10728,7 +10745,7 @@ static void np2_stretch_rect_test(IDirect3DDevice9 *device) {
hr
=
IDirect3DTexture9_GetSurfaceLevel
(
dsttex
,
0
,
&
dst
);
ok
(
hr
==
D3D_OK
,
"IDirect3DTexture9_GetSurfaceLevel failed with %08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xff00ffff
,
0
.
0
,
0
);
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
|
D3DCLEAR_ZBUFFER
,
0xff00ffff
,
1
.
0
f
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear failed with %08x
\n
"
,
hr
);
/* Clear the StretchRect destination for debugging */
...
...
@@ -10788,15 +10805,15 @@ static void np2_stretch_rect_test(IDirect3DDevice9 *device) {
hr
=
IDirect3DDevice9_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Present failed with %08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetTexture
(
device
,
0
,
NULL
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_SetTexture failed with %08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
0
,
D3DTSS_COLOROP
,
D3DTOP_DISABLE
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_SetTexture failed with %08x
\n
"
,
hr
);
cleanup:
if
(
src
)
IDirect3DSurface9_Release
(
src
);
if
(
backbuffer
)
IDirect3DSurface9_Release
(
backbuffer
);
if
(
dsttex
)
IDirect3DTexture9_Release
(
dsttex
);
refcount
=
IDirect3DDevice9_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
done:
IDirect3D9_Release
(
d3d
);
DestroyWindow
(
window
);
}
static
void
texop_test
(
void
)
...
...
@@ -16495,11 +16512,11 @@ START_TEST(visual)
fixed_function_bumpmap_test
(
device_ptr
);
pointsize_test
(
device_ptr
);
tssargtemp_test
(
device_ptr
);
np2_stretch_rect_test
(
device_ptr
);
cleanup_device
(
device_ptr
);
device_ptr
=
NULL
;
np2_stretch_rect_test
();
yuv_color_test
();
yuv_layout_test
();
zwriteenable_test
();
...
...
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