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
24187d53
Commit
24187d53
authored
Apr 07, 2014
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 08, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Nvidia has an off-by-one rectangle handling bug.
parent
2bf09a15
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
4 deletions
+68
-4
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+17
-1
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+17
-1
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+17
-1
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+17
-1
No files found.
dlls/ddraw/tests/ddraw1.c
View file @
24187d53
...
...
@@ -556,6 +556,21 @@ static void test_clipper_blt(void)
0x00000000
,
0x00000000
,
0x00ff0000
,
0x00ffffff
,
0x00000000
,
0x00000000
,
0x00ff0000
,
0x00ffffff
,
};
/* Nvidia on Windows seems to have an off-by-one error
* when processing source rectangles. Our left = 1 and
* right = 5 input reads from x = {1, 2, 3}. x = 4 is
* read as well, but only for the edge pixels on the
* output image. The bug happens on the y axis as well,
* but we only read one row there, and all source rows
* contain the same data. This bug is not dependent on
* the presence of a clipper. */
static
const
D3DCOLOR
expected1_broken
[]
=
{
0x000000ff
,
0x000000ff
,
0x00000000
,
0x00000000
,
0x000000ff
,
0x000000ff
,
0x00000000
,
0x00000000
,
0x00000000
,
0x00000000
,
0x00ff0000
,
0x00ff0000
,
0x00000000
,
0x00000000
,
0x0000ff00
,
0x00ff0000
,
};
static
const
D3DCOLOR
expected2
[]
=
{
0x000000ff
,
0x000000ff
,
0x00000000
,
0x00000000
,
...
...
@@ -669,7 +684,8 @@ static void test_clipper_blt(void)
x
=
80
*
((
2
*
j
)
+
1
);
y
=
60
*
((
2
*
i
)
+
1
);
color
=
get_surface_color
(
dst_surface
,
x
,
y
);
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
)
||
broken
(
compare_color
(
color
,
expected1_broken
[
i
*
4
+
j
],
1
)),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
color
);
}
}
...
...
dlls/ddraw/tests/ddraw2.c
View file @
24187d53
...
...
@@ -504,6 +504,21 @@ static void test_clipper_blt(void)
0x00000000
,
0x00000000
,
0x00ff0000
,
0x00ffffff
,
0x00000000
,
0x00000000
,
0x00ff0000
,
0x00ffffff
,
};
/* Nvidia on Windows seems to have an off-by-one error
* when processing source rectangles. Our left = 1 and
* right = 5 input reads from x = {1, 2, 3}. x = 4 is
* read as well, but only for the edge pixels on the
* output image. The bug happens on the y axis as well,
* but we only read one row there, and all source rows
* contain the same data. This bug is not dependent on
* the presence of a clipper. */
static
const
D3DCOLOR
expected1_broken
[]
=
{
0x000000ff
,
0x000000ff
,
0x00000000
,
0x00000000
,
0x000000ff
,
0x000000ff
,
0x00000000
,
0x00000000
,
0x00000000
,
0x00000000
,
0x00ff0000
,
0x00ff0000
,
0x00000000
,
0x00000000
,
0x0000ff00
,
0x00ff0000
,
};
static
const
D3DCOLOR
expected2
[]
=
{
0x000000ff
,
0x000000ff
,
0x00000000
,
0x00000000
,
...
...
@@ -617,7 +632,8 @@ static void test_clipper_blt(void)
x
=
80
*
((
2
*
j
)
+
1
);
y
=
60
*
((
2
*
i
)
+
1
);
color
=
get_surface_color
(
dst_surface
,
x
,
y
);
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
)
||
broken
(
compare_color
(
color
,
expected1_broken
[
i
*
4
+
j
],
1
)),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
color
);
}
}
...
...
dlls/ddraw/tests/ddraw4.c
View file @
24187d53
...
...
@@ -696,6 +696,21 @@ static void test_clipper_blt(void)
0x00000000
,
0x00000000
,
0x00ff0000
,
0x00ffffff
,
0x00000000
,
0x00000000
,
0x00ff0000
,
0x00ffffff
,
};
/* Nvidia on Windows seems to have an off-by-one error
* when processing source rectangles. Our left = 1 and
* right = 5 input reads from x = {1, 2, 3}. x = 4 is
* read as well, but only for the edge pixels on the
* output image. The bug happens on the y axis as well,
* but we only read one row there, and all source rows
* contain the same data. This bug is not dependent on
* the presence of a clipper. */
static
const
D3DCOLOR
expected1_broken
[]
=
{
0x000000ff
,
0x000000ff
,
0x00000000
,
0x00000000
,
0x000000ff
,
0x000000ff
,
0x00000000
,
0x00000000
,
0x00000000
,
0x00000000
,
0x00ff0000
,
0x00ff0000
,
0x00000000
,
0x00000000
,
0x0000ff00
,
0x00ff0000
,
};
static
const
D3DCOLOR
expected2
[]
=
{
0x000000ff
,
0x000000ff
,
0x00000000
,
0x00000000
,
...
...
@@ -809,7 +824,8 @@ static void test_clipper_blt(void)
x
=
80
*
((
2
*
j
)
+
1
);
y
=
60
*
((
2
*
i
)
+
1
);
color
=
get_surface_color
(
dst_surface
,
x
,
y
);
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
)
||
broken
(
compare_color
(
color
,
expected1_broken
[
i
*
4
+
j
],
1
)),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
color
);
}
}
...
...
dlls/ddraw/tests/ddraw7.c
View file @
24187d53
...
...
@@ -670,6 +670,21 @@ static void test_clipper_blt(void)
0x00000000
,
0x00000000
,
0x00ff0000
,
0x00ffffff
,
0x00000000
,
0x00000000
,
0x00ff0000
,
0x00ffffff
,
};
/* Nvidia on Windows seems to have an off-by-one error
* when processing source rectangles. Our left = 1 and
* right = 5 input reads from x = {1, 2, 3}. x = 4 is
* read as well, but only for the edge pixels on the
* output image. The bug happens on the y axis as well,
* but we only read one row there, and all source rows
* contain the same data. This bug is not dependent on
* the presence of a clipper. */
static
const
D3DCOLOR
expected1_broken
[]
=
{
0x000000ff
,
0x000000ff
,
0x00000000
,
0x00000000
,
0x000000ff
,
0x000000ff
,
0x00000000
,
0x00000000
,
0x00000000
,
0x00000000
,
0x00ff0000
,
0x00ff0000
,
0x00000000
,
0x00000000
,
0x0000ff00
,
0x00ff0000
,
};
static
const
D3DCOLOR
expected2
[]
=
{
0x000000ff
,
0x000000ff
,
0x00000000
,
0x00000000
,
...
...
@@ -783,7 +798,8 @@ static void test_clipper_blt(void)
x
=
80
*
((
2
*
j
)
+
1
);
y
=
60
*
((
2
*
i
)
+
1
);
color
=
get_surface_color
(
dst_surface
,
x
,
y
);
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
)
||
broken
(
compare_color
(
color
,
expected1_broken
[
i
*
4
+
j
],
1
)),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
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