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
3546b8bb
Commit
3546b8bb
authored
Jun 23, 2008
by
H. Verbeet
Committed by
Alexandre Julliard
Jun 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Use color_match() in alpha_test().
Also fixes some of the messages.
parent
f4536999
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
20 deletions
+8
-20
visual.c
dlls/d3d8/tests/visual.c
+8
-20
No files found.
dlls/d3d8/tests/visual.c
View file @
3546b8bb
...
...
@@ -746,7 +746,7 @@ static void alpha_test(IDirect3DDevice8 *device)
HRESULT
hr
;
IDirect3DTexture8
*
offscreenTexture
;
IDirect3DSurface8
*
backbuffer
=
NULL
,
*
offscreen
=
NULL
,
*
depthstencil
=
NULL
;
DWORD
color
,
red
,
green
,
blue
;
DWORD
color
;
struct
vertex
quad1
[]
=
{
...
...
@@ -870,32 +870,20 @@ static void alpha_test(IDirect3DDevice8 *device)
IDirect3DDevice8_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
color
=
getPixelColor
(
device
,
160
,
360
);
red
=
(
color
&
0x00ff0000
)
>>
16
;
green
=
(
color
&
0x0000ff00
)
>>
8
;
blue
=
(
color
&
0x000000ff
);
ok
(
red
>=
0xbe
&&
red
<=
0xc0
&&
green
>=
0x39
&&
green
<=
0x41
&&
blue
==
0x00
,
ok
(
color_match
(
color
,
D3DCOLOR_ARGB
(
0x00
,
0xbf
,
0x40
,
0x00
),
1
),
"SRCALPHA on frame buffer returned color %08x, expected 0x00bf4000
\n
"
,
color
);
color
=
getPixelColor
(
device
,
160
,
120
);
red
=
(
color
&
0x00ff0000
)
>>
16
;
green
=
(
color
&
0x0000ff00
)
>>
8
;
blue
=
(
color
&
0x000000ff
);
ok
(
red
>=
0x7e
&&
red
<=
0x81
&&
green
==
0x00
&&
blue
>=
0x7e
&&
blue
<=
0x81
,
"DSTALPHA on frame buffer returned color %08x, expected 0x00ff0000
\n
"
,
color
);
ok
(
color_match
(
color
,
D3DCOLOR_ARGB
(
0x00
,
0x7f
,
0x00
,
0x80
),
2
),
"DSTALPHA on frame buffer returned color %08x, expected 0x007f0080
\n
"
,
color
);
color
=
getPixelColor
(
device
,
480
,
360
);
red
=
(
color
&
0x00ff0000
)
>>
16
;
green
=
(
color
&
0x0000ff00
)
>>
8
;
blue
=
(
color
&
0x000000ff
);
ok
(
red
>=
0xbe
&&
red
<=
0xc0
&&
green
>=
0x39
&&
green
<=
0x41
&&
blue
==
0x00
,
"SRCALPHA on texture returned color %08x, expected bar
\n
"
,
color
);
ok
(
color_match
(
color
,
D3DCOLOR_ARGB
(
0x00
,
0xbf
,
0x40
,
0x00
),
1
),
"SRCALPHA on texture returned color %08x, expected 0x00bf4000
\n
"
,
color
);
color
=
getPixelColor
(
device
,
480
,
120
);
red
=
(
color
&
0x00ff0000
)
>>
16
;
green
=
(
color
&
0x0000ff00
)
>>
8
;
blue
=
(
color
&
0x000000ff
);
ok
(
red
==
0x00
&&
green
==
0x00
&&
blue
>=
0xfe
&&
blue
<=
0xff
,
"DSTALPHA on texture returned color %08x, expected foo
\n
"
,
color
);
ok
(
color_match
(
color
,
D3DCOLOR_ARGB
(
0x00
,
0x00
,
0x00
,
0xff
),
1
),
"DSTALPHA on texture returned color %08x, expected 0x000000ff
\n
"
,
color
);
out:
/* restore things */
...
...
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