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
95aaaf2f
Commit
95aaaf2f
authored
Jun 11, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Add a test for offscreen point sprites.
parent
b1abafcf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
visual.c
dlls/d3d9/tests/visual.c
+49
-0
No files found.
dlls/d3d9/tests/visual.c
View file @
95aaaf2f
...
...
@@ -8797,7 +8797,9 @@ static void pointsize_test(IDirect3DDevice9 *device)
D3DMATRIX
identity
;
float
ptsize
,
ptsize_orig
,
ptsizemax_orig
,
ptsizemin_orig
;
DWORD
color
;
IDirect3DSurface9
*
rt
,
*
backbuffer
;
IDirect3DTexture9
*
tex1
,
*
tex2
;
RECT
rect
=
{
0
,
0
,
128
,
128
};
D3DLOCKED_RECT
lr
;
const
DWORD
tex1_data
[
4
]
=
{
0x00ff0000
,
0x00ff0000
,
0x00000000
,
0x00000000
};
...
...
@@ -9007,6 +9009,53 @@ static void pointsize_test(IDirect3DDevice9 *device)
ok
(
color
==
0x00ffff00
,
"pSprite: Pixel (64+4),(64-4) has color 0x%08x, expected 0x00ffff00
\n
"
,
color
);
IDirect3DDevice9_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
U
(
matrix
).
m
[
0
][
0
]
=
1
.
0
f
/
64
.
0
f
;
U
(
matrix
).
m
[
1
][
1
]
=
-
1
.
0
f
/
64
.
0
f
;
hr
=
IDirect3DDevice9_SetTransform
(
device
,
D3DTS_PROJECTION
,
&
matrix
);
ok
(
SUCCEEDED
(
hr
),
"SetTransform failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_GetRenderTarget
(
device
,
0
,
&
backbuffer
);
ok
(
SUCCEEDED
(
hr
),
"GetRenderTarget failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_CreateRenderTarget
(
device
,
128
,
128
,
D3DFMT_A8R8G8B8
,
D3DMULTISAMPLE_NONE
,
0
,
TRUE
,
&
rt
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"CreateRenderTarget failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetRenderTarget
(
device
,
0
,
rt
);
ok
(
SUCCEEDED
(
hr
),
"SetRenderTarget failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
|
D3DCLEAR_ZBUFFER
,
0xff00ffff
,
0
.
0
f
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Clear failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_BeginScene
(
device
);
ok
(
SUCCEEDED
(
hr
),
"BeginScene failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_DrawPrimitiveUP
(
device
,
D3DPT_POINTLIST
,
1
,
&
vertices
[
0
],
sizeof
(
float
)
*
3
);
ok
(
SUCCEEDED
(
hr
),
"DrawPrimitiveUP failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_EndScene
(
device
);
ok
(
SUCCEEDED
(
hr
),
"EndScene failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_StretchRect
(
device
,
rt
,
&
rect
,
backbuffer
,
&
rect
,
D3DTEXF_NONE
);
ok
(
SUCCEEDED
(
hr
),
"StretchRect failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetRenderTarget
(
device
,
0
,
backbuffer
);
ok
(
SUCCEEDED
(
hr
),
"SetRenderTarget failed, hr %#x.
\n
"
,
hr
);
IDirect3DSurface9_Release
(
backbuffer
);
IDirect3DSurface9_Release
(
rt
);
color
=
getPixelColor
(
device
,
64
-
4
,
64
-
4
);
ok
(
color_match
(
color
,
D3DCOLOR_ARGB
(
0x00
,
0xff
,
0x00
,
0x00
),
0
),
"Expected color 0x00ff0000, got 0x%08x.
\n
"
,
color
);
color
=
getPixelColor
(
device
,
64
+
4
,
64
-
4
);
ok
(
color_match
(
color
,
D3DCOLOR_ARGB
(
0x00
,
0xff
,
0xff
,
0x00
),
0
),
"Expected color 0x0000ff00, got 0x%08x.
\n
"
,
color
);
color
=
getPixelColor
(
device
,
64
-
4
,
64
+
4
);
ok
(
color_match
(
color
,
D3DCOLOR_ARGB
(
0x00
,
0x00
,
0x00
,
0x00
),
0
),
"Expected color 0x00000000, got 0x%08x.
\n
"
,
color
);
color
=
getPixelColor
(
device
,
64
+
4
,
64
+
4
);
ok
(
color_match
(
color
,
D3DCOLOR_ARGB
(
0x00
,
0x00
,
0xff
,
0x00
),
0
),
"Expected color 0x0000ff00, got 0x%08x.
\n
"
,
color
);
hr
=
IDirect3DDevice9_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Present failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
0
,
D3DTSS_COLOROP
,
D3DTOP_DISABLE
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_SetTextureStageState failed hr=%08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetTextureStageState
(
device
,
1
,
D3DTSS_COLOROP
,
D3DTOP_DISABLE
);
...
...
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