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
5061e350
Commit
5061e350
authored
Mar 12, 2015
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: r200 ignores the alpha channel when matching color keys.
parent
b003cefe
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
56 deletions
+80
-56
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+20
-14
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+20
-14
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+20
-14
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+20
-14
No files found.
dlls/ddraw/tests/ddraw1.c
View file @
5061e350
...
...
@@ -1202,19 +1202,21 @@ static void test_ck_rgba(void)
D3DCOLOR
fill_color
;
BOOL
color_key
;
BOOL
blend
;
D3DCOLOR
result1
;
D3DCOLOR
result2
;
D3DCOLOR
result1
,
result1_broken
;
D3DCOLOR
result2
,
result2_broken
;
}
tests
[]
=
{
{
0xff00ff00
,
TRUE
,
TRUE
,
0x00ff0000
,
0x000000ff
},
{
0xff00ff00
,
TRUE
,
FALSE
,
0x00ff0000
,
0x000000ff
},
{
0xff00ff00
,
FALSE
,
TRUE
,
0x0000ff00
,
0x0000ff00
},
{
0xff00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
},
{
0x7f00ff00
,
TRUE
,
TRUE
,
0x00807f00
,
0x00807f00
},
{
0x7f00ff00
,
TRUE
,
FALSE
,
0x0000ff00
,
0x0000ff00
},
{
0x7f00ff00
,
FALSE
,
TRUE
,
0x00807f00
,
0x00807f00
},
{
0x7f00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
},
/* r200 on Windows doesn't check the alpha component when applying the color
* key, so the key matches on every texel. */
{
0xff00ff00
,
TRUE
,
TRUE
,
0x00ff0000
,
0x00ff0000
,
0x000000ff
,
0x000000ff
},
{
0xff00ff00
,
TRUE
,
FALSE
,
0x00ff0000
,
0x00ff0000
,
0x000000ff
,
0x000000ff
},
{
0xff00ff00
,
FALSE
,
TRUE
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
},
{
0xff00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
},
{
0x7f00ff00
,
TRUE
,
TRUE
,
0x00807f00
,
0x00ff0000
,
0x00807f00
,
0x000000ff
},
{
0x7f00ff00
,
TRUE
,
FALSE
,
0x0000ff00
,
0x00ff0000
,
0x0000ff00
,
0x000000ff
},
{
0x7f00ff00
,
FALSE
,
TRUE
,
0x00807f00
,
0x00807f00
,
0x00807f00
,
0x00807f00
},
{
0x7f00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
},
};
IDirect3DExecuteBuffer
*
execute_buffer
;
...
...
@@ -1328,10 +1330,12 @@ static void test_ck_rgba(void)
color
=
get_surface_color
(
rt
,
320
,
240
);
if
(
i
==
2
)
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result1_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result1
,
i
,
color
);
else
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result1_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result1
,
i
,
color
);
U5
(
fx
).
dwFillColor
=
0xff0000ff
;
...
...
@@ -1350,10 +1354,12 @@ static void test_ck_rgba(void)
* discarded, instead of just fully transparent. */
color
=
get_surface_color
(
rt
,
320
,
240
);
if
(
i
==
2
)
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result2_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result2
,
i
,
color
);
else
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result2_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result2
,
i
,
color
);
}
...
...
dlls/ddraw/tests/ddraw2.c
View file @
5061e350
...
...
@@ -1471,19 +1471,21 @@ static void test_ck_rgba(void)
D3DCOLOR
fill_color
;
BOOL
color_key
;
BOOL
blend
;
D3DCOLOR
result1
;
D3DCOLOR
result2
;
D3DCOLOR
result1
,
result1_broken
;
D3DCOLOR
result2
,
result2_broken
;
}
tests
[]
=
{
{
0xff00ff00
,
TRUE
,
TRUE
,
0x00ff0000
,
0x000000ff
},
{
0xff00ff00
,
TRUE
,
FALSE
,
0x00ff0000
,
0x000000ff
},
{
0xff00ff00
,
FALSE
,
TRUE
,
0x0000ff00
,
0x0000ff00
},
{
0xff00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
},
{
0x7f00ff00
,
TRUE
,
TRUE
,
0x00807f00
,
0x00807f00
},
{
0x7f00ff00
,
TRUE
,
FALSE
,
0x0000ff00
,
0x0000ff00
},
{
0x7f00ff00
,
FALSE
,
TRUE
,
0x00807f00
,
0x00807f00
},
{
0x7f00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
},
/* r200 on Windows doesn't check the alpha component when applying the color
* key, so the key matches on every texel. */
{
0xff00ff00
,
TRUE
,
TRUE
,
0x00ff0000
,
0x00ff0000
,
0x000000ff
,
0x000000ff
},
{
0xff00ff00
,
TRUE
,
FALSE
,
0x00ff0000
,
0x00ff0000
,
0x000000ff
,
0x000000ff
},
{
0xff00ff00
,
FALSE
,
TRUE
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
},
{
0xff00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
},
{
0x7f00ff00
,
TRUE
,
TRUE
,
0x00807f00
,
0x00ff0000
,
0x00807f00
,
0x000000ff
},
{
0x7f00ff00
,
TRUE
,
FALSE
,
0x0000ff00
,
0x00ff0000
,
0x0000ff00
,
0x000000ff
},
{
0x7f00ff00
,
FALSE
,
TRUE
,
0x00807f00
,
0x00807f00
,
0x00807f00
,
0x00807f00
},
{
0x7f00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
},
};
D3DTEXTUREHANDLE
texture_handle
;
...
...
@@ -1576,10 +1578,12 @@ static void test_ck_rgba(void)
color
=
get_surface_color
(
rt
,
320
,
240
);
if
(
i
==
2
)
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result1_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result1
,
i
,
color
);
else
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result1_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result1
,
i
,
color
);
U5
(
fx
).
dwFillColor
=
0xff0000ff
;
...
...
@@ -1597,10 +1601,12 @@ static void test_ck_rgba(void)
* discarded, instead of just fully transparent. */
color
=
get_surface_color
(
rt
,
320
,
240
);
if
(
i
==
2
)
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result2_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result2
,
i
,
color
);
else
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result2_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result2
,
i
,
color
);
}
...
...
dlls/ddraw/tests/ddraw4.c
View file @
5061e350
...
...
@@ -1662,19 +1662,21 @@ static void test_ck_rgba(void)
D3DCOLOR
fill_color
;
BOOL
color_key
;
BOOL
blend
;
D3DCOLOR
result1
;
D3DCOLOR
result2
;
D3DCOLOR
result1
,
result1_broken
;
D3DCOLOR
result2
,
result2_broken
;
}
tests
[]
=
{
{
0xff00ff00
,
TRUE
,
TRUE
,
0x00ff0000
,
0x000000ff
},
{
0xff00ff00
,
TRUE
,
FALSE
,
0x00ff0000
,
0x000000ff
},
{
0xff00ff00
,
FALSE
,
TRUE
,
0x0000ff00
,
0x0000ff00
},
{
0xff00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
},
{
0x7f00ff00
,
TRUE
,
TRUE
,
0x00807f00
,
0x00807f00
},
{
0x7f00ff00
,
TRUE
,
FALSE
,
0x0000ff00
,
0x0000ff00
},
{
0x7f00ff00
,
FALSE
,
TRUE
,
0x00807f00
,
0x00807f00
},
{
0x7f00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
},
/* r200 on Windows doesn't check the alpha component when applying the color
* key, so the key matches on every texel. */
{
0xff00ff00
,
TRUE
,
TRUE
,
0x00ff0000
,
0x00ff0000
,
0x000000ff
,
0x000000ff
},
{
0xff00ff00
,
TRUE
,
FALSE
,
0x00ff0000
,
0x00ff0000
,
0x000000ff
,
0x000000ff
},
{
0xff00ff00
,
FALSE
,
TRUE
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
},
{
0xff00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
},
{
0x7f00ff00
,
TRUE
,
TRUE
,
0x00807f00
,
0x00ff0000
,
0x00807f00
,
0x000000ff
},
{
0x7f00ff00
,
TRUE
,
FALSE
,
0x0000ff00
,
0x00ff0000
,
0x0000ff00
,
0x000000ff
},
{
0x7f00ff00
,
FALSE
,
TRUE
,
0x00807f00
,
0x00807f00
,
0x00807f00
,
0x00807f00
},
{
0x7f00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
},
};
IDirectDrawSurface4
*
surface
;
...
...
@@ -1765,10 +1767,12 @@ static void test_ck_rgba(void)
color
=
get_surface_color
(
rt
,
320
,
240
);
if
(
i
==
2
)
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result1_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result1
,
i
,
color
);
else
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result1_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result1
,
i
,
color
);
U5
(
fx
).
dwFillColor
=
0xff0000ff
;
...
...
@@ -1786,10 +1790,12 @@ static void test_ck_rgba(void)
* discarded, instead of just fully transparent. */
color
=
get_surface_color
(
rt
,
320
,
240
);
if
(
i
==
2
)
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result2_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result2
,
i
,
color
);
else
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result2_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result2
,
i
,
color
);
}
...
...
dlls/ddraw/tests/ddraw7.c
View file @
5061e350
...
...
@@ -1376,19 +1376,21 @@ static void test_ck_rgba(void)
D3DCOLOR
fill_color
;
BOOL
color_key
;
BOOL
blend
;
D3DCOLOR
result1
;
D3DCOLOR
result2
;
D3DCOLOR
result1
,
result1_broken
;
D3DCOLOR
result2
,
result2_broken
;
}
tests
[]
=
{
{
0xff00ff00
,
TRUE
,
TRUE
,
0x00ff0000
,
0x000000ff
},
{
0xff00ff00
,
TRUE
,
FALSE
,
0x00ff0000
,
0x000000ff
},
{
0xff00ff00
,
FALSE
,
TRUE
,
0x0000ff00
,
0x0000ff00
},
{
0xff00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
},
{
0x7f00ff00
,
TRUE
,
TRUE
,
0x00807f00
,
0x00807f00
},
{
0x7f00ff00
,
TRUE
,
FALSE
,
0x0000ff00
,
0x0000ff00
},
{
0x7f00ff00
,
FALSE
,
TRUE
,
0x00807f00
,
0x00807f00
},
{
0x7f00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
},
/* r200 on Windows doesn't check the alpha component when applying the color
* key, so the key matches on every texel. */
{
0xff00ff00
,
TRUE
,
TRUE
,
0x00ff0000
,
0x00ff0000
,
0x000000ff
,
0x000000ff
},
{
0xff00ff00
,
TRUE
,
FALSE
,
0x00ff0000
,
0x00ff0000
,
0x000000ff
,
0x000000ff
},
{
0xff00ff00
,
FALSE
,
TRUE
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
},
{
0xff00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
},
{
0x7f00ff00
,
TRUE
,
TRUE
,
0x00807f00
,
0x00ff0000
,
0x00807f00
,
0x000000ff
},
{
0x7f00ff00
,
TRUE
,
FALSE
,
0x0000ff00
,
0x00ff0000
,
0x0000ff00
,
0x000000ff
},
{
0x7f00ff00
,
FALSE
,
TRUE
,
0x00807f00
,
0x00807f00
,
0x00807f00
,
0x00807f00
},
{
0x7f00ff00
,
FALSE
,
FALSE
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
},
};
IDirectDrawSurface7
*
texture
;
...
...
@@ -1470,10 +1472,12 @@ static void test_ck_rgba(void)
color
=
get_surface_color
(
rt
,
320
,
240
);
if
(
i
==
2
)
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result1_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result1
,
i
,
color
);
else
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result1_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result1
,
i
,
color
);
U5
(
fx
).
dwFillColor
=
0xff0000ff
;
...
...
@@ -1491,10 +1495,12 @@ static void test_ck_rgba(void)
* discarded, instead of just fully transparent. */
color
=
get_surface_color
(
rt
,
320
,
240
);
if
(
i
==
2
)
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result2_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result2
,
i
,
color
);
else
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
)
||
compare_color
(
color
,
tests
[
i
].
result2_broken
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result2
,
i
,
color
);
}
...
...
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