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
06f65e65
Commit
06f65e65
authored
May 28, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
May 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Add a test to see whether offscreen surfaces can be locked while a reset occurs.
parent
3175fc5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
device.c
dlls/d3d9/tests/device.c
+24
-0
No files found.
dlls/d3d9/tests/device.c
View file @
06f65e65
...
...
@@ -729,6 +729,7 @@ static void test_reset(void)
IDirect3DVertexShader9
*
shader
;
BOOL
support_800x600
=
FALSE
;
UINT
i
;
D3DLOCKED_RECT
lockrect
;
pD3d
=
pDirect3DCreate9
(
D3D_SDK_VERSION
);
ok
(
pD3d
!=
NULL
,
"Failed to create IDirect3D9 object
\n
"
);
...
...
@@ -923,6 +924,29 @@ static void test_reset(void)
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_TestCooperativeLevel after a successful reset returned %#x
\n
"
,
hr
);
IDirect3DSurface9_Release
(
surface
);
/* Will a sysmem or scratch survive while locked */
hr
=
IDirect3DDevice9_CreateOffscreenPlainSurface
(
pDevice
,
16
,
16
,
D3DFMT_R5G6B5
,
D3DPOOL_SYSTEMMEM
,
&
surface
,
NULL
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_CreateOffscreenPlainSurface returned %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DSurface9_LockRect
(
surface
,
&
lockrect
,
NULL
,
D3DLOCK_DISCARD
);
ok
(
hr
==
D3D_OK
,
"IDirect3DSurface9_LockRect returned %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_Reset
(
pDevice
,
&
d3dpp
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Reset failed with %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_TestCooperativeLevel
(
pDevice
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_TestCooperativeLevel after a successful reset returned %#x
\n
"
,
hr
);
IDirect3DSurface9_UnlockRect
(
surface
);
IDirect3DSurface9_Release
(
surface
);
hr
=
IDirect3DDevice9_CreateOffscreenPlainSurface
(
pDevice
,
16
,
16
,
D3DFMT_R5G6B5
,
D3DPOOL_SCRATCH
,
&
surface
,
NULL
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_CreateOffscreenPlainSurface returned %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DSurface9_LockRect
(
surface
,
&
lockrect
,
NULL
,
D3DLOCK_DISCARD
);
ok
(
hr
==
D3D_OK
,
"IDirect3DSurface9_LockRect returned %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_Reset
(
pDevice
,
&
d3dpp
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Reset failed with %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_TestCooperativeLevel
(
pDevice
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_TestCooperativeLevel after a successful reset returned %#x
\n
"
,
hr
);
IDirect3DSurface9_UnlockRect
(
surface
);
IDirect3DSurface9_Release
(
surface
);
hr
=
IDirect3DDevice9_CreateTexture
(
pDevice
,
16
,
16
,
0
,
0
,
D3DFMT_R5G6B5
,
D3DPOOL_MANAGED
,
&
texture
,
NULL
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_CreateTexture returned %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_Reset
(
pDevice
,
&
d3dpp
);
...
...
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