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
1226ffe0
Commit
1226ffe0
authored
Oct 09, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Add a test for IDirect3DDevice9::GetRenderTarget().
parent
739a9d98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
+51
-0
device.c
dlls/d3d9/tests/device.c
+51
-0
No files found.
dlls/d3d9/tests/device.c
View file @
1226ffe0
...
@@ -1758,6 +1758,56 @@ cleanup:
...
@@ -1758,6 +1758,56 @@ cleanup:
if
(
hwnd
)
DestroyWindow
(
hwnd
);
if
(
hwnd
)
DestroyWindow
(
hwnd
);
}
}
static
void
test_get_rt
(
void
)
{
IDirect3DSurface9
*
backbuffer
,
*
rt
;
IDirect3DDevice9
*
device
;
IDirect3D9
*
d3d9
;
D3DCAPS9
caps
;
HWND
window
;
HRESULT
hr
;
ULONG
ref
;
UINT
i
;
if
(
!
(
d3d9
=
pDirect3DCreate9
(
D3D_SDK_VERSION
)))
{
skip
(
"Failed to create IDirect3D9 object, skipping tests.
\n
"
);
return
;
}
window
=
CreateWindowA
(
"d3d9_test_wc"
,
"d3d9_test"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
128
,
128
,
0
,
0
,
0
,
0
);
device
=
create_device
(
d3d9
,
window
,
window
,
TRUE
);
if
(
!
device
)
{
skip
(
"Failed to create a D3D device, skipping tests.
\n
"
);
goto
done
;
}
hr
=
IDirect3DDevice9_GetRenderTarget
(
device
,
0
,
&
backbuffer
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get backbuffer, hr %#x.
\n
"
,
hr
);
ok
(
!!
backbuffer
,
"Got a NULL backbuffer.
\n
"
);
hr
=
IDirect3DDevice9_GetDeviceCaps
(
device
,
&
caps
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device caps, hr %#x.
\n
"
,
hr
);
for
(
i
=
1
;
i
<
caps
.
NumSimultaneousRTs
;
++
i
)
{
rt
=
backbuffer
;
hr
=
IDirect3DDevice9_GetRenderTarget
(
device
,
i
,
&
rt
);
ok
(
hr
==
D3DERR_NOTFOUND
,
"IDirect3DDevice9_GetRenderTarget returned %#x.
\n
"
,
hr
);
ok
(
!
rt
,
"Got rt %p.
\n
"
,
rt
);
}
IDirect3DSurface9_Release
(
backbuffer
);
ref
=
IDirect3DDevice9_Release
(
device
);
ok
(
!
ref
,
"The device was not properly freed: refcount %u.
\n
"
,
ref
);
done:
IDirect3D9_Release
(
d3d9
);
DestroyWindow
(
window
);
}
/* Test what happens when IDirect3DDevice9_DrawIndexedPrimitive is called without a valid index buffer set. */
/* Test what happens when IDirect3DDevice9_DrawIndexedPrimitive is called without a valid index buffer set. */
static
void
test_draw_indexed
(
void
)
static
void
test_draw_indexed
(
void
)
{
{
...
@@ -3119,6 +3169,7 @@ START_TEST(device)
...
@@ -3119,6 +3169,7 @@ START_TEST(device)
test_scene
();
test_scene
();
test_limits
();
test_limits
();
test_depthstenciltest
();
test_depthstenciltest
();
test_get_rt
();
test_draw_indexed
();
test_draw_indexed
();
test_null_stream
();
test_null_stream
();
test_lights
();
test_lights
();
...
...
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