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
4466d622
Commit
4466d622
authored
Aug 28, 2011
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Add tests for DDSD_PIXELFORMAT and DDSD_ZBUFFERBITDEPTH in Lock.
parent
029c5a6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
dsurface.c
dlls/ddraw/tests/dsurface.c
+39
-0
No files found.
dlls/ddraw/tests/dsurface.c
View file @
4466d622
...
...
@@ -4184,6 +4184,45 @@ static void test_ddsd(DDSURFACEDESC *ddsd, BOOL expect_pf, BOOL expect_zd, const
ok
(
!
(
out
.
dwFlags
&
DDSD_ZBUFFERBITDEPTH
),
"%s surface: Expected DDSD_ZBUFFERBITDEPTH not to be set
\n
"
,
name
);
}
reset_ddsd
(
&
out
);
hr
=
IDirectDrawSurface_Lock
(
surface
,
NULL
,
&
out
,
0
,
NULL
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IDirectDrawSurface_Unlock
(
surface
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"IDirectDrawSurface_GetSurfaceDesc failed, hr %#x.
\n
"
,
hr
);
/* DDSD_ZBUFFERBITDEPTH is never set on Nvidia, but follows GetSurfaceDesc rules on AMD */
if
(
!
expect_zd
)
{
ok
(
!
(
out
.
dwFlags
&
DDSD_ZBUFFERBITDEPTH
),
"Lock %s surface: Expected DDSD_ZBUFFERBITDEPTH not to be set
\n
"
,
name
);
}
/* DDSD_PIXELFORMAT follows GetSurfaceDesc rules */
if
(
expect_pf
)
{
ok
(
out
.
dwFlags
&
DDSD_PIXELFORMAT
,
"%s surface: Expected DDSD_PIXELFORMAT to be set
\n
"
,
name
);
}
else
{
ok
(
!
(
out
.
dwFlags
&
DDSD_PIXELFORMAT
),
"Lock %s surface: Expected DDSD_PIXELFORMAT not to be set
\n
"
,
name
);
}
}
hr
=
IDirectDrawSurface7_Lock
(
surface7
,
NULL
,
&
out2
,
0
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"IDirectDrawSurface7_Lock failed, hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IDirectDrawSurface7_Unlock
(
surface7
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"IDirectDrawSurface7_Unlock failed, hr %#x.
\n
"
,
hr
);
/* DDSD_PIXELFORMAT is always set, DDSD_ZBUFFERBITDEPTH never */
ok
(
out2
.
dwFlags
&
DDSD_PIXELFORMAT
,
"Lock %s surface: Expected DDSD_PIXELFORMAT to be set in DDSURFACEDESC2
\n
"
,
name
);
ok
(
!
(
out2
.
dwFlags
&
DDSD_ZBUFFERBITDEPTH
),
"Lock %s surface: Did not expect DDSD_ZBUFFERBITDEPTH to be set in DDSURFACEDESC2
\n
"
,
name
);
}
IDirectDrawSurface7_Release
(
surface7
);
IDirectDrawSurface_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