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
20a2afe6
Commit
20a2afe6
authored
Apr 01, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Add a test for temporary results.
parent
dd0c9300
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
0 deletions
+77
-0
visual.c
dlls/d3d9/tests/visual.c
+77
-0
No files found.
dlls/d3d9/tests/visual.c
View file @
20a2afe6
...
...
@@ -8561,6 +8561,82 @@ out:
}
}
static
void
tssargtemp_test
(
IDirect3DDevice9
*
device
)
{
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
}
};
D3DCAPS9
caps
;
memset
(
&
caps
,
0
,
sizeof
(
caps
));
hr
=
IDirect3DDevice9_GetDeviceCaps
(
device
,
&
caps
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_GetDeviceCaps failed with %s
\n
"
,
DXGetErrorString9
(
hr
));
if
(
!
(
caps
.
PrimitiveMiscCaps
&
D3DPMISCCAPS_TSSARGTEMP
))
{
skip
(
"D3DPMISCCAPS_TSSARGTEMP not supported
\n
"
);
return
;
}
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xff000000
,
0
.
0
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear failed with %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
0
,
D3DTSS_COLOROP
,
D3DTOP_SELECTARG1
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
0
,
D3DTSS_COLORARG1
,
D3DTA_DIFFUSE
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
1
,
D3DTSS_COLOROP
,
D3DTOP_SELECTARG1
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
1
,
D3DTSS_COLORARG1
,
D3DTA_TFACTOR
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
1
,
D3DTSS_RESULTARG
,
D3DTA_TEMP
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
2
,
D3DTSS_COLOROP
,
D3DTOP_ADD
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
2
,
D3DTSS_COLORARG1
,
D3DTA_CURRENT
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
2
,
D3DTSS_COLORARG2
,
D3DTA_TEMP
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
3
,
D3DTSS_COLOROP
,
D3DTOP_DISABLE
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_TEXTUREFACTOR
,
0x0000ff00
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_SetRenderState failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetFVF
(
device
,
D3DFVF_XYZ
|
D3DFVF_DIFFUSE
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_SetFVF failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_BeginScene
(
device
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_BeginScene failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
if
(
SUCCEEDED
(
hr
))
{
hr
=
IDirect3DDevice9_EndScene
(
device
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_EndScene failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_DrawPrimitiveUP
(
device
,
D3DPT_TRIANGLESTRIP
,
2
,
quad
,
sizeof
(
quad
[
0
]));
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_DrawPrimitiveUP failed with %s
\n
"
,
DXGetErrorString9
(
hr
));
}
IDirect3DDevice9_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
color
=
getPixelColor
(
device
,
320
,
240
);
ok
(
color
==
0x00FFFF00
,
"TSSARGTEMP test returned color 0x%08x, expected 0x00FFFF00
\n
"
,
color
);
/* Set stage 1 back to default */
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
1
,
D3DTSS_RESULTARG
,
D3DTA_CURRENT
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
0
,
D3DTSS_COLOROP
,
D3DTOP_DISABLE
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
1
,
D3DTSS_COLOROP
,
D3DTOP_DISABLE
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
2
,
D3DTSS_COLOROP
,
D3DTOP_DISABLE
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
3
,
D3DTSS_COLOROP
,
D3DTOP_DISABLE
);
ok
(
hr
==
D3D_OK
,
"SetTextureStageState failed, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
}
START_TEST
(
visual
)
{
IDirect3DDevice9
*
device_ptr
;
...
...
@@ -8654,6 +8730,7 @@ START_TEST(visual)
skip
(
"No two sided stencil support
\n
"
);
}
pointsize_test
(
device_ptr
);
tssargtemp_test
(
device_ptr
);
if
(
caps
.
VertexShaderVersion
>=
D3DVS_VERSION
(
1
,
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