Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
1318d578
Commit
1318d578
authored
Jan 16, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Verify dwBackBufferCount on back buffer surfaces in test_flip().
parent
7c12d889
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
22 deletions
+13
-22
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+3
-0
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+3
-0
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+3
-0
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+3
-0
dsurface.c
dlls/ddraw/tests/dsurface.c
+1
-22
No files found.
dlls/ddraw/tests/ddraw1.c
View file @
1318d578
...
...
@@ -3879,6 +3879,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface_GetSurfaceDesc
(
backbuffer1
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
|
DDSCAPS_BACKBUFFER
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
@@ -3888,6 +3889,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface_GetSurfaceDesc
(
backbuffer2
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
@@ -3897,6 +3899,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface_GetSurfaceDesc
(
backbuffer3
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
dlls/ddraw/tests/ddraw2.c
View file @
1318d578
...
...
@@ -4560,6 +4560,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface_GetSurfaceDesc
(
backbuffer1
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
|
DDSCAPS_BACKBUFFER
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
@@ -4569,6 +4570,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface_GetSurfaceDesc
(
backbuffer2
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
@@ -4578,6 +4580,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface_GetSurfaceDesc
(
backbuffer3
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
dlls/ddraw/tests/ddraw4.c
View file @
1318d578
...
...
@@ -5163,6 +5163,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface4_GetSurfaceDesc
(
backbuffer1
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
|
DDSCAPS_BACKBUFFER
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
@@ -5172,6 +5173,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface4_GetSurfaceDesc
(
backbuffer2
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
@@ -5181,6 +5183,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface4_GetSurfaceDesc
(
backbuffer3
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
dlls/ddraw/tests/ddraw7.c
View file @
1318d578
...
...
@@ -5041,6 +5041,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface7_GetSurfaceDesc
(
backbuffer1
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
|
DDSCAPS_BACKBUFFER
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
@@ -5050,6 +5051,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface7_GetSurfaceDesc
(
backbuffer2
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
@@ -5059,6 +5061,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface7_GetSurfaceDesc
(
backbuffer3
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
dlls/ddraw/tests/dsurface.c
View file @
1318d578
...
...
@@ -1125,10 +1125,10 @@ static void AttachmentTest7(void)
IDirectDraw7
*
dd7
;
IDirectDrawSurface7
*
surface1
,
*
surface2
,
*
surface3
,
*
surface4
;
IDirectDrawSurface
*
surface1v1
,
*
surface2v1
;
DDSCAPS2
caps
=
{
DDSCAPS_TEXTURE
,
0
,
0
,
0
};
DDSURFACEDESC2
ddsd
,
ddsd2
;
DWORD
ref
;
UINT
num
;
DDSCAPS2
caps
=
{
DDSCAPS_TEXTURE
,
0
,
0
,
0
},
caps2
=
{
DDSCAPS_BACKBUFFER
,
0
,
0
,
0
};
HWND
window
=
CreateWindowA
(
"static"
,
"ddraw_test"
,
WS_OVERLAPPEDWINDOW
,
100
,
100
,
160
,
160
,
NULL
,
NULL
,
NULL
,
NULL
);
...
...
@@ -1218,27 +1218,6 @@ static void AttachmentTest7(void)
hr
=
IDirectDraw7_SetCooperativeLevel
(
dd7
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
hr
==
DD_OK
,
"SetCooperativeLevel returned %08x
\n
"
,
hr
);
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
dwFlags
=
DDSD_BACKBUFFERCOUNT
|
DDSD_CAPS
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_COMPLEX
|
DDSCAPS_FLIP
;
ddsd
.
dwBackBufferCount
=
2
;
hr
=
IDirectDraw7_CreateSurface
(
dd7
,
&
ddsd
,
&
surface1
,
NULL
);
ok
(
hr
==
DD_OK
,
"CreateSurface returned: %x
\n
"
,
hr
);
/* backbuffer surfaces must not have dwBackBufferCount set */
ddsd2
.
dwSize
=
sizeof
(
ddsd2
);
hr
=
IDirectDrawSurface7_GetAttachedSurface
(
surface1
,
&
caps2
,
&
surface2
);
ok
(
hr
==
DD_OK
,
"GetAttachedSurface returned: %x
\n
"
,
hr
);
hr
=
IDirectDrawSurface7_GetSurfaceDesc
(
surface2
,
&
ddsd2
);
ok
(
hr
==
DD_OK
,
"GetSurfaceDesc returned: %x
\n
"
,
hr
);
ok
(
ddsd2
.
dwBackBufferCount
==
0
,
"backbuffer surface has dwBackBufferCount==%u
\n
"
,
ddsd2
.
dwBackBufferCount
);
num
=
0
;
IDirectDrawSurface7_EnumAttachedSurfaces
(
surface1
,
&
num
,
SurfaceCounter
);
ok
(
num
==
1
,
"Primary surface has %d surfaces attached, expected 1
\n
"
,
num
);
IDirectDrawSurface7_Release
(
surface1
);
/* Those are some invalid descriptions, no need to test attachments with them */
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
ddsd
.
dwSize
=
sizeof
(
ddsd
);
...
...
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