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
7980b8d8
Commit
7980b8d8
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 tssargtemp_test().
parent
12743d57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
22 deletions
+35
-22
visual.c
dlls/d3d9/tests/visual.c
+35
-22
No files found.
dlls/d3d9/tests/visual.c
View file @
7980b8d8
...
...
@@ -10318,27 +10318,44 @@ out:
}
}
static
void
tssargtemp_test
(
IDirect3DDevice9
*
device
)
static
void
tssargtemp_test
(
void
)
{
IDirect3DDevice9
*
device
;
IDirect3D9
*
d3d
;
D3DCOLOR
color
;
ULONG
refcount
;
D3DCAPS9
caps
;
HWND
window
;
HRESULT
hr
;
DWORD
color
;
static
const
struct
vertex
quad
[]
=
{
{
-
1
.
0
,
-
1
.
0
,
0
.
1
,
0x00ff0000
},
{
1
.
0
,
-
1
.
0
,
0
.
1
,
0x00ff0000
},
{
-
1
.
0
,
1
.
0
,
0
.
1
,
0x00ff0000
},
{
1
.
0
,
1
.
0
,
0
.
1
,
0x00ff0000
}
static
const
struct
vertex
quad
[]
=
{
{
-
1
.
0
f
,
-
1
.
0
f
,
0
.
1
f
,
0x00ff0000
},
{
-
1
.
0
f
,
1
.
0
f
,
0
.
1
f
,
0x00ff0000
},
{
1
.
0
f
,
-
1
.
0
f
,
0
.
1
f
,
0x00ff0000
},
{
1
.
0
f
,
1
.
0
f
,
0
.
1
f
,
0x00ff0000
},
};
D3DCAPS9
caps
;
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
;
}
memset
(
&
caps
,
0
,
sizeof
(
caps
));
hr
=
IDirect3DDevice9_GetDeviceCaps
(
device
,
&
caps
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_GetDeviceCaps failed with %08x
\n
"
,
hr
);
if
(
!
(
caps
.
PrimitiveMiscCaps
&
D3DPMISCCAPS_TSSARGTEMP
))
{
skip
(
"D3DPMISCCAPS_TSSARGTEMP not supported
\n
"
);
return
;
IDirect3DDevice9_Release
(
device
);
goto
done
;
}
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xff000000
,
0
.
0
,
0
);
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
|
D3DCLEAR_ZBUFFER
,
0xff000000
,
1
.
0
f
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear failed with %08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
0
,
D3DTSS_COLOROP
,
D3DTOP_SELECTARG1
);
...
...
@@ -10365,6 +10382,8 @@ static void tssargtemp_test(IDirect3DDevice9 *device)
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_TEXTUREFACTOR
,
0x0000ff00
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_SetRenderState failed, hr = %08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_LIGHTING
,
FALSE
);
ok
(
SUCCEEDED
(
hr
),
"Failed to disable lighting, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetFVF
(
device
,
D3DFVF_XYZ
|
D3DFVF_DIFFUSE
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_SetFVF failed, hr = %08x
\n
"
,
hr
);
...
...
@@ -10380,17 +10399,11 @@ static void tssargtemp_test(IDirect3DDevice9 *device)
ok
(
color
==
0x00ffff00
,
"TSSARGTEMP test returned color 0x%08x, expected 0x00ffff00
\n
"
,
color
);
IDirect3DDevice9_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
/* Set stage 1 back to default */
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
1
,
D3DTSS_RESULTARG
,
D3DTA_CURRENT
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
0
,
D3DTSS_COLOROP
,
D3DTOP_DISABLE
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
1
,
D3DTSS_COLOROP
,
D3DTOP_DISABLE
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
2
,
D3DTSS_COLOROP
,
D3DTOP_DISABLE
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
3
,
D3DTSS_COLOROP
,
D3DTOP_DISABLE
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %08x
\n
"
,
hr
);
refcount
=
IDirect3DDevice9_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
done:
IDirect3D9_Release
(
d3d
);
DestroyWindow
(
window
);
}
/* Drawing Indexed Geometry with instances*/
...
...
@@ -16511,11 +16524,11 @@ START_TEST(visual)
conditional_np2_repeat_test
(
device_ptr
);
fixed_function_bumpmap_test
(
device_ptr
);
pointsize_test
(
device_ptr
);
tssargtemp_test
(
device_ptr
);
cleanup_device
(
device_ptr
);
device_ptr
=
NULL
;
tssargtemp_test
();
np2_stretch_rect_test
();
yuv_color_test
();
yuv_layout_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