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
a4babd2e
Commit
a4babd2e
authored
Apr 24, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Nvidia cannot handle 2x1 YUY2/UYVY surfaces.
parent
6f8d2563
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
18 deletions
+10
-18
visual.c
dlls/d3d9/tests/visual.c
+10
-18
No files found.
dlls/d3d9/tests/visual.c
View file @
a4babd2e
...
...
@@ -10253,8 +10253,11 @@ static void yuv_color_test(IDirect3DDevice9 *device) {
continue
;
}
/* A pixel is effectively 16 bit large, but two pixels are stored together, so the minimum size is 2x1 */
hr
=
IDirect3DDevice9_CreateOffscreenPlainSurface
(
device
,
2
,
1
,
format
,
D3DPOOL_DEFAULT
,
&
surface
,
NULL
);
/* A pixel is effectively 16 bit large, but two pixels are stored together, so the minimum size is 2x1
* However, Nvidia Windows drivers have problems with 2x1 YUY2/UYVY surfaces, so use a 4x1 surface and
* fill the second block with dummy data. If the surface has a size of 2x1, those drivers ignore the
* second luminance value, resulting in an incorrect color in the right pixel. */
hr
=
IDirect3DDevice9_CreateOffscreenPlainSurface
(
device
,
4
,
1
,
format
,
D3DPOOL_DEFAULT
,
&
surface
,
NULL
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_CreateOffscreenPlainSurface failed, hr = %08x
\n
"
,
hr
);
for
(
i
=
0
;
i
<
(
sizeof
(
test_data
)
/
sizeof
(
test_data
[
0
]));
i
++
)
{
...
...
@@ -10269,7 +10272,8 @@ static void yuv_color_test(IDirect3DDevice9 *device) {
memset
(
&
lr
,
0
,
sizeof
(
lr
));
hr
=
IDirect3DSurface9_LockRect
(
surface
,
&
lr
,
NULL
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DSurface9_LockRect failed, hr = %08x
\n
"
,
hr
);
*
((
DWORD
*
)
lr
.
pBits
)
=
test_data
[
i
].
in
;
((
DWORD
*
)
lr
.
pBits
)[
0
]
=
test_data
[
i
].
in
;
((
DWORD
*
)
lr
.
pBits
)[
1
]
=
0x00800080
;
hr
=
IDirect3DSurface9_UnlockRect
(
surface
);
ok
(
hr
==
D3D_OK
,
"IDirect3DSurface9_UnlockRect failed, hr = %08x
\n
"
,
hr
);
...
...
@@ -10283,24 +10287,13 @@ static void yuv_color_test(IDirect3DDevice9 *device) {
* want to add tests for the filtered pixels as well.
*
* Unfortunately different implementations(Windows-NV and Mac-ATI tested) interpret some colors vastly
* differently, so we need a max diff of 1
6
* differently, so we need a max diff of 1
8
*/
color
=
getPixelColor
(
device
,
40
,
240
);
/* Newer versions of the Nvidia Windows driver mix up the U and V channels, breaking all the tests
* where U != V. Skip the entire test if this bug in this case
*/
if
(
broken
(
test_data
[
i
].
in
==
0xff000000
&&
color
==
0x00008800
&&
format
==
D3DFMT_UYVY
))
{
skip
(
"Nvidia channel confusion bug detected, skipping YUV tests
\n
"
);
IDirect3DSurface9_Release
(
surface
);
goto
out
;
}
color
=
getPixelColor
(
device
,
1
,
240
);
ok
(
color_match
(
color
,
ref_color_left
,
18
),
"Input 0x%08x: Got color 0x%08x for pixel 1/1, expected 0x%08x, format %s
\n
"
,
test_data
[
i
].
in
,
color
,
ref_color_left
,
fmt_string
);
color
=
getPixelColor
(
device
,
600
,
240
);
color
=
getPixelColor
(
device
,
318
,
240
);
ok
(
color_match
(
color
,
ref_color_right
,
18
),
"Input 0x%08x: Got color 0x%08x for pixel 2/1, expected 0x%08x, format %s
\n
"
,
test_data
[
i
].
in
,
color
,
ref_color_right
,
fmt_string
);
...
...
@@ -10310,7 +10303,6 @@ static void yuv_color_test(IDirect3DDevice9 *device) {
IDirect3DSurface9_Release
(
surface
);
}
out:
IDirect3DSurface9_Release
(
target
);
IDirect3D9_Release
(
d3d
);
}
...
...
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