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
4eb3ce85
Commit
4eb3ce85
authored
Nov 01, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8/tests: Use color_match() in p8_texture_test().
parent
a24081a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
28 deletions
+6
-28
visual.c
dlls/d3d8/tests/visual.c
+6
-28
No files found.
dlls/d3d8/tests/visual.c
View file @
4eb3ce85
...
...
@@ -2078,8 +2078,8 @@ static void p8_texture_test(IDirect3DDevice8 *device)
IDirect3DTexture8
*
texture
=
NULL
,
*
texture2
=
NULL
;
D3DLOCKED_RECT
lr
;
unsigned
char
*
data
;
DWORD
color
,
red
,
green
,
blue
;
PALETTEENTRY
table
[
256
];
D3DCOLOR
color
;
D3DCAPS8
caps
;
UINT
i
;
float
quad
[]
=
{
...
...
@@ -2193,18 +2193,9 @@ static void p8_texture_test(IDirect3DDevice8 *device)
}
color
=
getPixelColor
(
device
,
32
,
32
);
red
=
(
color
&
0x00ff0000
)
>>
16
;
green
=
(
color
&
0x0000ff00
)
>>
8
;
blue
=
(
color
&
0x000000ff
)
>>
0
;
ok
(
red
==
0xff
&&
blue
==
0
&&
green
==
0
,
"got color %08x, expected 0x00ff0000
\n
"
,
color
);
ok
(
color_match
(
color
,
0x00ff0000
,
0
),
"Got unexpected color 0x%08x.
\n
"
,
color
);
color
=
getPixelColor
(
device
,
32
,
320
);
red
=
(
color
&
0x00ff0000
)
>>
16
;
green
=
(
color
&
0x0000ff00
)
>>
8
;
blue
=
(
color
&
0x000000ff
)
>>
0
;
ok
(
red
==
0
&&
blue
==
0xff
&&
green
==
0
,
"got color %08x, expected 0x000000ff
\n
"
,
color
);
ok
(
color_match
(
color
,
0x000000ff
,
0
),
"Got unexpected color 0x%08x.
\n
"
,
color
);
hr
=
IDirect3DDevice8_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice8_Present failed, hr = %08x
\n
"
,
hr
);
...
...
@@ -2227,11 +2218,7 @@ static void p8_texture_test(IDirect3DDevice8 *device)
color
=
getPixelColor
(
device
,
32
,
32
);
red
=
(
color
&
0x00ff0000
)
>>
16
;
green
=
(
color
&
0x0000ff00
)
>>
8
;
blue
=
(
color
&
0x000000ff
)
>>
0
;
ok
(
red
==
0
&&
blue
==
0xff
&&
green
==
0
,
"got color %08x, expected 0x000000ff
\n
"
,
color
);
ok
(
color_match
(
color
,
0x000000ff
,
0
),
"Got unexpected color 0x%08x.
\n
"
,
color
);
hr
=
IDirect3DDevice8_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice8_Present failed, hr = %08x
\n
"
,
hr
);
...
...
@@ -2290,18 +2277,9 @@ static void p8_texture_test(IDirect3DDevice8 *device)
}
color
=
getPixelColor
(
device
,
32
,
32
);
red
=
(
color
&
0x00ff0000
)
>>
16
;
green
=
(
color
&
0x0000ff00
)
>>
8
;
blue
=
(
color
&
0x000000ff
)
>>
0
;
ok
(
red
>=
0x7e
&&
red
<=
0x81
&&
blue
==
0
&&
green
==
0
,
"got color %08x, expected 0x00800000 or near
\n
"
,
color
);
ok
(
color_match
(
color
,
0x00800000
,
1
),
"Got unexpected color 0x%08x.
\n
"
,
color
);
color
=
getPixelColor
(
device
,
32
,
320
);
red
=
(
color
&
0x00ff0000
)
>>
16
;
green
=
(
color
&
0x0000ff00
)
>>
8
;
blue
=
(
color
&
0x000000ff
)
>>
0
;
ok
(
red
==
0
&&
blue
>=
0x7e
&&
blue
<=
0x81
&&
green
==
0
,
"got color %08x, expected 0x00000080 or near
\n
"
,
color
);
ok
(
color_match
(
color
,
0x00000080
,
1
),
"Got unexpected color 0x%08x.
\n
"
,
color
);
hr
=
IDirect3DDevice8_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice8_Present failed, hr = %08x
\n
"
,
hr
);
...
...
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