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
7e33bc7a
Commit
7e33bc7a
authored
Jun 12, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 12, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: 64-bit ddraw only has DWORD surface pitch alignment in some cases.
parent
cbe63d97
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
106 additions
and
82 deletions
+106
-82
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+19
-13
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+19
-13
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+34
-28
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+34
-28
No files found.
dlls/ddraw/tests/ddraw1.c
View file @
7e33bc7a
...
...
@@ -4503,28 +4503,29 @@ static void test_create_surface_pitch(void)
DWORD
pitch_in
;
HRESULT
hr
;
DWORD
flags_out
;
DWORD
pitch_out
;
DWORD
pitch_out32
;
DWORD
pitch_out64
;
}
test_data
[]
=
{
{
DDSCAPS_VIDEOMEMORY
,
0
,
0
,
DD_OK
,
DDSD_PITCH
,
0x100
},
DDSD_PITCH
,
0x100
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_PITCH
,
0x104
,
DD_OK
,
DDSD_PITCH
,
0x100
},
DDSD_PITCH
,
0x100
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_PITCH
,
0x0f8
,
DD_OK
,
DDSD_PITCH
,
0x100
},
DDSD_PITCH
,
0x100
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x100
,
DDERR_INVALIDCAPS
,
0
,
0
},
0
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
0
,
0
,
DD_OK
,
DDSD_PITCH
,
0x100
},
DDSD_PITCH
,
0x100
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_PITCH
,
0x104
,
DD_OK
,
DDSD_PITCH
,
0x100
},
DDSD_PITCH
,
0x100
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_PITCH
,
0x0f8
,
DD_OK
,
DDSD_PITCH
,
0x100
},
DDSD_PITCH
,
0x100
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
,
0
,
DDERR_INVALIDPARAMS
,
0
,
0
},
0
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x100
,
DDERR_INVALIDPARAMS
,
0
,
0
},
0
,
0
,
0
},
};
DWORD
flags_mask
=
DDSD_PITCH
|
DDSD_LPSURFACE
;
...
...
@@ -4566,9 +4567,14 @@ static void test_create_surface_pitch(void)
ok
((
surface_desc
.
dwFlags
&
flags_mask
)
==
test_data
[
i
].
flags_out
,
"Test %u: Got unexpected flags %#x, expected %#x.
\n
"
,
i
,
surface_desc
.
dwFlags
&
flags_mask
,
test_data
[
i
].
flags_out
);
ok
(
U1
(
surface_desc
).
lPitch
==
test_data
[
i
].
pitch_out
,
"Test %u: Got unexpected pitch %u, expected %u.
\n
"
,
i
,
U1
(
surface_desc
).
lPitch
,
test_data
[
i
].
pitch_out
);
if
(
sizeof
(
void
*
)
!=
sizeof
(
DWORD
)
&&
test_data
[
i
].
pitch_out32
!=
test_data
[
i
].
pitch_out64
)
todo_wine
ok
(
U1
(
surface_desc
).
lPitch
==
test_data
[
i
].
pitch_out64
,
"Test %u: Got unexpected pitch %u, expected %u.
\n
"
,
i
,
U1
(
surface_desc
).
lPitch
,
test_data
[
i
].
pitch_out64
);
else
ok
(
U1
(
surface_desc
).
lPitch
==
test_data
[
i
].
pitch_out32
,
"Test %u: Got unexpected pitch %u, expected %u.
\n
"
,
i
,
U1
(
surface_desc
).
lPitch
,
test_data
[
i
].
pitch_out32
);
IDirectDrawSurface_Release
(
surface
);
}
...
...
dlls/ddraw/tests/ddraw2.c
View file @
7e33bc7a
...
...
@@ -5579,28 +5579,29 @@ static void test_create_surface_pitch(void)
DWORD
pitch_in
;
HRESULT
hr
;
DWORD
flags_out
;
DWORD
pitch_out
;
DWORD
pitch_out32
;
DWORD
pitch_out64
;
}
test_data
[]
=
{
{
DDSCAPS_VIDEOMEMORY
,
0
,
0
,
DD_OK
,
DDSD_PITCH
,
0x100
},
DDSD_PITCH
,
0x100
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_PITCH
,
0x104
,
DD_OK
,
DDSD_PITCH
,
0x100
},
DDSD_PITCH
,
0x100
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_PITCH
,
0x0f8
,
DD_OK
,
DDSD_PITCH
,
0x100
},
DDSD_PITCH
,
0x100
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x100
,
DDERR_INVALIDCAPS
,
0
,
0
},
0
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
0
,
0
,
DD_OK
,
DDSD_PITCH
,
0x100
},
DDSD_PITCH
,
0x100
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_PITCH
,
0x104
,
DD_OK
,
DDSD_PITCH
,
0x100
},
DDSD_PITCH
,
0x100
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_PITCH
,
0x0f8
,
DD_OK
,
DDSD_PITCH
,
0x100
},
DDSD_PITCH
,
0x100
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
,
0
,
DDERR_INVALIDPARAMS
,
0
,
0
},
0
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x100
,
DDERR_INVALIDPARAMS
,
0
,
0
},
0
,
0
,
0
},
};
DWORD
flags_mask
=
DDSD_PITCH
|
DDSD_LPSURFACE
;
...
...
@@ -5642,9 +5643,14 @@ static void test_create_surface_pitch(void)
ok
((
surface_desc
.
dwFlags
&
flags_mask
)
==
test_data
[
i
].
flags_out
,
"Test %u: Got unexpected flags %#x, expected %#x.
\n
"
,
i
,
surface_desc
.
dwFlags
&
flags_mask
,
test_data
[
i
].
flags_out
);
ok
(
U1
(
surface_desc
).
lPitch
==
test_data
[
i
].
pitch_out
,
"Test %u: Got unexpected pitch %u, expected %u.
\n
"
,
i
,
U1
(
surface_desc
).
lPitch
,
test_data
[
i
].
pitch_out
);
if
(
sizeof
(
void
*
)
!=
sizeof
(
DWORD
)
&&
test_data
[
i
].
pitch_out32
!=
test_data
[
i
].
pitch_out64
)
todo_wine
ok
(
U1
(
surface_desc
).
lPitch
==
test_data
[
i
].
pitch_out64
,
"Test %u: Got unexpected pitch %u, expected %u.
\n
"
,
i
,
U1
(
surface_desc
).
lPitch
,
test_data
[
i
].
pitch_out64
);
else
ok
(
U1
(
surface_desc
).
lPitch
==
test_data
[
i
].
pitch_out32
,
"Test %u: Got unexpected pitch %u, expected %u.
\n
"
,
i
,
U1
(
surface_desc
).
lPitch
,
test_data
[
i
].
pitch_out32
);
IDirectDrawSurface_Release
(
surface
);
}
...
...
dlls/ddraw/tests/ddraw4.c
View file @
7e33bc7a
...
...
@@ -6474,34 +6474,35 @@ static void test_create_surface_pitch(void)
DWORD
pitch_in
;
HRESULT
hr
;
DWORD
flags_out
;
DWORD
pitch_out
;
DWORD
pitch_out32
;
DWORD
pitch_out64
;
}
test_data
[]
=
{
{
DDSCAPS_VIDEOMEMORY
,
0
,
0
,
DD_OK
,
DDSD_PITCH
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_PITCH
,
0x104
,
DD_OK
,
DDSD_PITCH
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_PITCH
,
0x0f8
,
DD_OK
,
DDSD_PITCH
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x100
,
DDERR_INVALIDCAPS
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
0
,
0
,
DD_OK
,
DDSD_PITCH
,
0x100
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_PITCH
,
0x104
,
DD_OK
,
DDSD_PITCH
,
0x100
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_PITCH
,
0x0f8
,
DD_OK
,
DDSD_PITCH
,
0x100
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
,
0
,
DDERR_INVALIDPARAMS
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x100
,
DD_OK
,
DDSD_PITCH
,
0x100
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x0fe
,
DDERR_INVALIDPARAMS
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x0fc
,
DD_OK
,
DDSD_PITCH
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x0f8
,
DDERR_INVALIDPARAMS
,
0
,
0
},
{
DDSCAPS_VIDEOMEMORY
,
0
,
0
,
DD_OK
,
DDSD_PITCH
,
0x100
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_PITCH
,
0x104
,
DD_OK
,
DDSD_PITCH
,
0x100
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_PITCH
,
0x0f8
,
DD_OK
,
DDSD_PITCH
,
0x100
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x100
,
DDERR_INVALIDCAPS
,
0
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
0
,
0
,
DD_OK
,
DDSD_PITCH
,
0x100
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_PITCH
,
0x104
,
DD_OK
,
DDSD_PITCH
,
0x100
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_PITCH
,
0x0f8
,
DD_OK
,
DDSD_PITCH
,
0x100
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
,
0
,
DDERR_INVALIDPARAMS
,
0
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x100
,
DD_OK
,
DDSD_PITCH
,
0x100
,
0x100
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x0fe
,
DDERR_INVALIDPARAMS
,
0
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x0fc
,
DD_OK
,
DDSD_PITCH
,
0x0fc
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x0f8
,
DDERR_INVALIDPARAMS
,
0
,
0
,
0
},
};
DWORD
flags_mask
=
DDSD_PITCH
|
DDSD_LPSURFACE
;
...
...
@@ -6543,9 +6544,14 @@ static void test_create_surface_pitch(void)
ok
((
surface_desc
.
dwFlags
&
flags_mask
)
==
test_data
[
i
].
flags_out
,
"Test %u: Got unexpected flags %#x, expected %#x.
\n
"
,
i
,
surface_desc
.
dwFlags
&
flags_mask
,
test_data
[
i
].
flags_out
);
ok
(
U1
(
surface_desc
).
lPitch
==
test_data
[
i
].
pitch_out
,
"Test %u: Got unexpected pitch %u, expected %u.
\n
"
,
i
,
U1
(
surface_desc
).
lPitch
,
test_data
[
i
].
pitch_out
);
if
(
sizeof
(
void
*
)
!=
sizeof
(
DWORD
)
&&
test_data
[
i
].
pitch_out32
!=
test_data
[
i
].
pitch_out64
)
todo_wine
ok
(
U1
(
surface_desc
).
lPitch
==
test_data
[
i
].
pitch_out64
,
"Test %u: Got unexpected pitch %u, expected %u.
\n
"
,
i
,
U1
(
surface_desc
).
lPitch
,
test_data
[
i
].
pitch_out64
);
else
ok
(
U1
(
surface_desc
).
lPitch
==
test_data
[
i
].
pitch_out32
,
"Test %u: Got unexpected pitch %u, expected %u.
\n
"
,
i
,
U1
(
surface_desc
).
lPitch
,
test_data
[
i
].
pitch_out32
);
IDirectDrawSurface4_Release
(
surface
);
}
...
...
dlls/ddraw/tests/ddraw7.c
View file @
7e33bc7a
...
...
@@ -6297,34 +6297,35 @@ static void test_create_surface_pitch(void)
DWORD
pitch_in
;
HRESULT
hr
;
DWORD
flags_out
;
DWORD
pitch_out
;
DWORD
pitch_out32
;
DWORD
pitch_out64
;
}
test_data
[]
=
{
{
DDSCAPS_VIDEOMEMORY
,
0
,
0
,
DD_OK
,
DDSD_PITCH
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_PITCH
,
0x104
,
DD_OK
,
DDSD_PITCH
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_PITCH
,
0x0f8
,
DD_OK
,
DDSD_PITCH
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x100
,
DDERR_INVALIDCAPS
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
0
,
0
,
DD_OK
,
DDSD_PITCH
,
0x100
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_PITCH
,
0x104
,
DD_OK
,
DDSD_PITCH
,
0x100
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_PITCH
,
0x0f8
,
DD_OK
,
DDSD_PITCH
,
0x100
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
,
0
,
DDERR_INVALIDPARAMS
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x100
,
DD_OK
,
DDSD_PITCH
,
0x100
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x0fe
,
DDERR_INVALIDPARAMS
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x0fc
,
DD_OK
,
DDSD_PITCH
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x0f8
,
DDERR_INVALIDPARAMS
,
0
,
0
},
{
DDSCAPS_VIDEOMEMORY
,
0
,
0
,
DD_OK
,
DDSD_PITCH
,
0x100
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_PITCH
,
0x104
,
DD_OK
,
DDSD_PITCH
,
0x100
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_PITCH
,
0x0f8
,
DD_OK
,
DDSD_PITCH
,
0x100
,
0x100
},
{
DDSCAPS_VIDEOMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x100
,
DDERR_INVALIDCAPS
,
0
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
0
,
0
,
DD_OK
,
DDSD_PITCH
,
0x100
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_PITCH
,
0x104
,
DD_OK
,
DDSD_PITCH
,
0x100
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_PITCH
,
0x0f8
,
DD_OK
,
DDSD_PITCH
,
0x100
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
,
0
,
DDERR_INVALIDPARAMS
,
0
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x100
,
DD_OK
,
DDSD_PITCH
,
0x100
,
0x100
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x0fe
,
DDERR_INVALIDPARAMS
,
0
,
0
,
0
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x0fc
,
DD_OK
,
DDSD_PITCH
,
0x0fc
,
0x0fc
},
{
DDSCAPS_SYSTEMMEMORY
,
DDSD_LPSURFACE
|
DDSD_PITCH
,
0x0f8
,
DDERR_INVALIDPARAMS
,
0
,
0
,
0
},
};
DWORD
flags_mask
=
DDSD_PITCH
|
DDSD_LPSURFACE
;
...
...
@@ -6366,9 +6367,14 @@ static void test_create_surface_pitch(void)
ok
((
surface_desc
.
dwFlags
&
flags_mask
)
==
test_data
[
i
].
flags_out
,
"Test %u: Got unexpected flags %#x, expected %#x.
\n
"
,
i
,
surface_desc
.
dwFlags
&
flags_mask
,
test_data
[
i
].
flags_out
);
ok
(
U1
(
surface_desc
).
lPitch
==
test_data
[
i
].
pitch_out
,
"Test %u: Got unexpected pitch %u, expected %u.
\n
"
,
i
,
U1
(
surface_desc
).
lPitch
,
test_data
[
i
].
pitch_out
);
if
(
sizeof
(
void
*
)
!=
sizeof
(
DWORD
)
&&
test_data
[
i
].
pitch_out32
!=
test_data
[
i
].
pitch_out64
)
todo_wine
ok
(
U1
(
surface_desc
).
lPitch
==
test_data
[
i
].
pitch_out64
,
"Test %u: Got unexpected pitch %u, expected %u.
\n
"
,
i
,
U1
(
surface_desc
).
lPitch
,
test_data
[
i
].
pitch_out64
);
else
ok
(
U1
(
surface_desc
).
lPitch
==
test_data
[
i
].
pitch_out32
,
"Test %u: Got unexpected pitch %u, expected %u.
\n
"
,
i
,
U1
(
surface_desc
).
lPitch
,
test_data
[
i
].
pitch_out32
);
IDirectDrawSurface7_Release
(
surface
);
}
...
...
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