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
f4ae6f53
Commit
f4ae6f53
authored
Aug 14, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Fix some test failures on 64-bit ddraw.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
493f4098
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
45 deletions
+75
-45
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+33
-21
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+36
-23
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+6
-1
No files found.
dlls/ddraw/tests/ddraw1.c
View file @
f4ae6f53
...
...
@@ -12982,34 +12982,46 @@ static void test_caps(void)
ok
(
!
(
~
hal_caps
.
ddsCaps
.
dwCaps
&
caps_always
),
"Got unexpected caps %#x.
\n
"
,
hal_caps
.
ddsCaps
.
dwCaps
);
todo_wine_if
(
no3d
)
ok
(
!
(
~
hal_caps
.
ddsCaps
.
dwCaps
&
caps_hal
),
"Got unexpected caps %#x.
\n
"
,
hal_caps
.
ddsCaps
.
dwCaps
);
todo_wine
ok
(
!
hel_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
if
(
is_ddraw64
)
{
ok
(
!
(
hel_caps
.
ddsCaps
.
dwCaps
&
caps_never
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
ok
(
!
(
~
hel_caps
.
ddsCaps
.
dwCaps
&
caps_always
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
todo_wine_if
(
!
no3d
)
ok
(
!
(
hel_caps
.
ddsCaps
.
dwCaps
&
caps_hal
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
}
else
{
todo_wine
ok
(
!
hel_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
}
IDirectDraw_Release
(
ddraw
);
}
hr
=
DirectDrawCreate
((
GUID
*
)
DDCREATE_EMULATIONONLY
,
&
ddraw
,
NULL
);
ok
(
hr
==
DD_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
memset
(
&
hal_caps
,
0
,
sizeof
(
hal_caps
));
memset
(
&
hel_caps
,
0
,
sizeof
(
hel_caps
));
hal_caps
.
dwSize
=
sizeof
(
hal_caps
);
hel_caps
.
dwSize
=
sizeof
(
hel_caps
);
hr
=
IDirectDraw_GetCaps
(
ddraw
,
&
hal_caps
,
&
hel_caps
);
ok
(
hr
==
DD_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hal_caps
.
ddsOldCaps
.
dwCaps
==
hal_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x, expected %#x.
\n
"
,
hal_caps
.
ddsOldCaps
.
dwCaps
,
hal_caps
.
ddsCaps
.
dwCaps
);
ok
(
hel_caps
.
ddsOldCaps
.
dwCaps
==
hel_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x, expected %#x.
\n
"
,
hel_caps
.
ddsOldCaps
.
dwCaps
,
hel_caps
.
ddsCaps
.
dwCaps
);
ok
(
hr
==
(
is_ddraw64
?
E_FAIL
:
DD_OK
),
"Got unexpected hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
memset
(
&
hal_caps
,
0
,
sizeof
(
hal_caps
));
memset
(
&
hel_caps
,
0
,
sizeof
(
hel_caps
));
hal_caps
.
dwSize
=
sizeof
(
hal_caps
);
hel_caps
.
dwSize
=
sizeof
(
hel_caps
);
hr
=
IDirectDraw_GetCaps
(
ddraw
,
&
hal_caps
,
&
hel_caps
);
ok
(
hr
==
DD_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hal_caps
.
ddsOldCaps
.
dwCaps
==
hal_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x, expected %#x.
\n
"
,
hal_caps
.
ddsOldCaps
.
dwCaps
,
hal_caps
.
ddsCaps
.
dwCaps
);
ok
(
hel_caps
.
ddsOldCaps
.
dwCaps
==
hel_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x, expected %#x.
\n
"
,
hel_caps
.
ddsOldCaps
.
dwCaps
,
hel_caps
.
ddsCaps
.
dwCaps
);
todo_wine
ok
(
!
hal_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x.
\n
"
,
hal_caps
.
ddsCaps
.
dwCaps
);
ok
(
!
(
hel_caps
.
ddsCaps
.
dwCaps
&
caps_never
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
ok
(
!
(
~
hel_caps
.
ddsCaps
.
dwCaps
&
caps_always
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
todo_wine_if
(
!
no3d
)
ok
(
!
(
hel_caps
.
ddsCaps
.
dwCaps
&
caps_hal
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
todo_wine
ok
(
!
hal_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x.
\n
"
,
hal_caps
.
ddsCaps
.
dwCaps
);
ok
(
!
(
hel_caps
.
ddsCaps
.
dwCaps
&
caps_never
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
ok
(
!
(
~
hel_caps
.
ddsCaps
.
dwCaps
&
caps_always
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
todo_wine_if
(
!
no3d
)
ok
(
!
(
hel_caps
.
ddsCaps
.
dwCaps
&
caps_hal
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
IDirectDraw_Release
(
ddraw
);
IDirectDraw_Release
(
ddraw
);
}
}
static
void
test_d32_support
(
void
)
...
...
dlls/ddraw/tests/ddraw2.c
View file @
f4ae6f53
...
...
@@ -13862,37 +13862,50 @@ static void test_caps(void)
ok
(
!
(
~
hal_caps
.
ddsCaps
.
dwCaps
&
caps_always
),
"Got unexpected caps %#x.
\n
"
,
hal_caps
.
ddsCaps
.
dwCaps
);
todo_wine_if
(
no3d
)
ok
(
!
(
~
hal_caps
.
ddsCaps
.
dwCaps
&
caps_hal
),
"Got unexpected caps %#x.
\n
"
,
hal_caps
.
ddsCaps
.
dwCaps
);
todo_wine
ok
(
!
hel_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
if
(
is_ddraw64
)
{
ok
(
!
(
hel_caps
.
ddsCaps
.
dwCaps
&
caps_never
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
ok
(
!
(
~
hel_caps
.
ddsCaps
.
dwCaps
&
caps_always
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
todo_wine_if
(
!
no3d
)
ok
(
!
(
hel_caps
.
ddsCaps
.
dwCaps
&
caps_hal
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
}
else
{
todo_wine
ok
(
!
hel_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
}
IDirectDraw2_Release
(
ddraw
);
}
hr
=
DirectDrawCreate
((
GUID
*
)
DDCREATE_EMULATIONONLY
,
&
ddraw1
,
NULL
);
ok
(
hr
==
DD_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw_QueryInterface
(
ddraw1
,
&
IID_IDirectDraw2
,
(
void
**
)
&
ddraw
);
ok
(
hr
==
DD_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
IDirectDraw_Release
(
ddraw1
);
ok
(
hr
==
(
is_ddraw64
?
E_FAIL
:
DD_OK
),
"Got unexpected hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IDirectDraw_QueryInterface
(
ddraw1
,
&
IID_IDirectDraw2
,
(
void
**
)
&
ddraw
);
ok
(
hr
==
DD_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
IDirectDraw_Release
(
ddraw1
);
memset
(
&
hal_caps
,
0
,
sizeof
(
hal_caps
));
memset
(
&
hel_caps
,
0
,
sizeof
(
hel_caps
));
hal_caps
.
dwSize
=
sizeof
(
hal_caps
);
hel_caps
.
dwSize
=
sizeof
(
hel_caps
);
hr
=
IDirectDraw2_GetCaps
(
ddraw
,
&
hal_caps
,
&
hel_caps
);
ok
(
hr
==
DD_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hal_caps
.
ddsOldCaps
.
dwCaps
==
hal_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x, expected %#x.
\n
"
,
hal_caps
.
ddsOldCaps
.
dwCaps
,
hal_caps
.
ddsCaps
.
dwCaps
);
ok
(
hel_caps
.
ddsOldCaps
.
dwCaps
==
hel_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x, expected %#x.
\n
"
,
hel_caps
.
ddsOldCaps
.
dwCaps
,
hel_caps
.
ddsCaps
.
dwCaps
);
memset
(
&
hal_caps
,
0
,
sizeof
(
hal_caps
));
memset
(
&
hel_caps
,
0
,
sizeof
(
hel_caps
));
hal_caps
.
dwSize
=
sizeof
(
hal_caps
);
hel_caps
.
dwSize
=
sizeof
(
hel_caps
);
hr
=
IDirectDraw2_GetCaps
(
ddraw
,
&
hal_caps
,
&
hel_caps
);
ok
(
hr
==
DD_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hal_caps
.
ddsOldCaps
.
dwCaps
==
hal_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x, expected %#x.
\n
"
,
hal_caps
.
ddsOldCaps
.
dwCaps
,
hal_caps
.
ddsCaps
.
dwCaps
);
ok
(
hel_caps
.
ddsOldCaps
.
dwCaps
==
hel_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x, expected %#x.
\n
"
,
hel_caps
.
ddsOldCaps
.
dwCaps
,
hel_caps
.
ddsCaps
.
dwCaps
);
todo_wine
ok
(
!
hal_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x.
\n
"
,
hal_caps
.
ddsCaps
.
dwCaps
);
ok
(
!
(
hel_caps
.
ddsCaps
.
dwCaps
&
caps_never
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
ok
(
!
(
~
hel_caps
.
ddsCaps
.
dwCaps
&
caps_always
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
todo_wine_if
(
!
no3d
)
ok
(
!
(
hel_caps
.
ddsCaps
.
dwCaps
&
caps_hal
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
todo_wine
ok
(
!
hal_caps
.
ddsCaps
.
dwCaps
,
"Got unexpected caps %#x.
\n
"
,
hal_caps
.
ddsCaps
.
dwCaps
);
ok
(
!
(
hel_caps
.
ddsCaps
.
dwCaps
&
caps_never
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
ok
(
!
(
~
hel_caps
.
ddsCaps
.
dwCaps
&
caps_always
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
todo_wine_if
(
!
no3d
)
ok
(
!
(
hel_caps
.
ddsCaps
.
dwCaps
&
caps_hal
),
"Got unexpected caps %#x.
\n
"
,
hel_caps
.
ddsCaps
.
dwCaps
);
IDirectDraw2_Release
(
ddraw
);
IDirectDraw2_Release
(
ddraw
);
}
}
static
void
test_d32_support
(
void
)
...
...
dlls/ddraw/tests/ddraw7.c
View file @
f4ae6f53
...
...
@@ -8900,7 +8900,12 @@ static void test_palette_alpha(void)
surface_desc
.
dwHeight
=
128
;
surface_desc
.
ddsCaps
.
dwCaps
=
test_data
[
i
].
caps
;
hr
=
IDirectDraw7_CreateSurface
(
ddraw
,
&
surface_desc
,
&
surface
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create %s surface, hr %#x.
\n
"
,
test_data
[
i
].
name
,
hr
);
if
(
is_ddraw64
&&
test_data
[
i
].
caps
&
DDSCAPS_TEXTURE
)
todo_wine
ok
(
hr
==
E_NOINTERFACE
,
"%s: Got unexpected hr %#x.
\n
"
,
test_data
[
i
].
name
,
hr
);
else
ok
(
hr
==
DD_OK
,
"%s: Got unexpected hr %#x.
\n
"
,
test_data
[
i
].
name
,
hr
);
if
(
FAILED
(
hr
))
continue
;
hr
=
IDirectDrawSurface7_SetPalette
(
surface
,
palette
);
if
(
test_data
[
i
].
attach_allowed
)
...
...
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