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
1b007ad3
Commit
1b007ad3
authored
Feb 09, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8/tests: Add a test for resource creation with D3DFMT_UNKNOWN.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5278b342
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
102 additions
and
0 deletions
+102
-0
device.c
dlls/d3d8/tests/device.c
+102
-0
No files found.
dlls/d3d8/tests/device.c
View file @
1b007ad3
...
...
@@ -8149,6 +8149,107 @@ static void test_render_target_device_mismatch(void)
DestroyWindow
(
window
);
}
static
void
test_format_unknown
(
void
)
{
IDirect3DDevice8
*
device
;
IDirect3D8
*
d3d
;
UINT
refcount
;
HWND
window
;
void
*
iface
;
HRESULT
hr
;
window
=
CreateWindowA
(
"static"
,
"d3d8_test"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
640
,
480
,
NULL
,
NULL
,
NULL
,
NULL
);
d3d
=
Direct3DCreate8
(
D3D_SDK_VERSION
);
ok
(
!!
d3d
,
"Failed to create a D3D object.
\n
"
);
if
(
!
(
device
=
create_device
(
d3d
,
window
,
NULL
)))
{
skip
(
"Failed to create a D3D device.
\n
"
);
IDirect3D8_Release
(
d3d
);
DestroyWindow
(
window
);
return
;
}
if
(
SUCCEEDED
(
IDirect3D8_CheckDeviceFormat
(
d3d
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
D3DFMT_X8R8G8B8
,
0
,
D3DRTYPE_TEXTURE
,
D3DFMT_P8
)))
{
skip
(
"P8 textures are supported, skipping some tests.
\n
"
);
}
else
{
iface
=
(
void
*
)
0xdeadbeef
;
hr
=
IDirect3DDevice8_CreateRenderTarget
(
device
,
64
,
64
,
D3DFMT_P8
,
D3DMULTISAMPLE_NONE
,
FALSE
,
(
IDirect3DSurface8
**
)
&
iface
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
iface
,
"Got unexpected iface %p.
\n
"
,
iface
);
iface
=
(
void
*
)
0xdeadbeef
;
hr
=
IDirect3DDevice8_CreateDepthStencilSurface
(
device
,
64
,
64
,
D3DFMT_P8
,
D3DMULTISAMPLE_NONE
,
(
IDirect3DSurface8
**
)
&
iface
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
iface
,
"Got unexpected iface %p.
\n
"
,
iface
);
iface
=
(
void
*
)
0xdeadbeef
;
hr
=
IDirect3DDevice8_CreateTexture
(
device
,
64
,
64
,
1
,
0
,
D3DFMT_P8
,
D3DPOOL_DEFAULT
,
(
IDirect3DTexture8
**
)
&
iface
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
iface
,
"Got unexpected iface %p.
\n
"
,
iface
);
iface
=
(
void
*
)
0xdeadbeef
;
hr
=
IDirect3DDevice8_CreateCubeTexture
(
device
,
64
,
1
,
0
,
D3DFMT_P8
,
D3DPOOL_DEFAULT
,
(
IDirect3DCubeTexture8
**
)
&
iface
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
iface
,
"Got unexpected iface %p.
\n
"
,
iface
);
iface
=
(
void
*
)
0xdeadbeef
;
hr
=
IDirect3DDevice8_CreateVolumeTexture
(
device
,
64
,
64
,
1
,
1
,
0
,
D3DFMT_P8
,
D3DPOOL_DEFAULT
,
(
IDirect3DVolumeTexture8
**
)
&
iface
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
iface
,
"Got unexpected iface %p.
\n
"
,
iface
);
}
iface
=
(
void
*
)
0xdeadbeef
;
hr
=
IDirect3DDevice8_CreateRenderTarget
(
device
,
64
,
64
,
D3DFMT_UNKNOWN
,
D3DMULTISAMPLE_NONE
,
FALSE
,
(
IDirect3DSurface8
**
)
&
iface
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
iface
==
(
void
*
)
0xdeadbeef
,
"Got unexpected iface %p.
\n
"
,
iface
);
iface
=
(
void
*
)
0xdeadbeef
;
hr
=
IDirect3DDevice8_CreateDepthStencilSurface
(
device
,
64
,
64
,
D3DFMT_UNKNOWN
,
D3DMULTISAMPLE_NONE
,
(
IDirect3DSurface8
**
)
&
iface
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
iface
==
(
void
*
)
0xdeadbeef
,
"Got unexpected iface %p.
\n
"
,
iface
);
iface
=
(
void
*
)
0xdeadbeef
;
hr
=
IDirect3DDevice8_CreateImageSurface
(
device
,
64
,
64
,
D3DFMT_UNKNOWN
,
(
IDirect3DSurface8
**
)
&
iface
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
iface
,
"Got unexpected iface %p.
\n
"
,
iface
);
iface
=
(
void
*
)
0xdeadbeef
;
hr
=
IDirect3DDevice8_CreateTexture
(
device
,
64
,
64
,
1
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_DEFAULT
,
(
IDirect3DTexture8
**
)
&
iface
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
iface
==
(
void
*
)
0xdeadbeef
,
"Got unexpected iface %p.
\n
"
,
iface
);
iface
=
(
void
*
)
0xdeadbeef
;
hr
=
IDirect3DDevice8_CreateCubeTexture
(
device
,
64
,
1
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_DEFAULT
,
(
IDirect3DCubeTexture8
**
)
&
iface
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
iface
==
(
void
*
)
0xdeadbeef
,
"Got unexpected iface %p.
\n
"
,
iface
);
iface
=
(
void
*
)
0xdeadbeef
;
hr
=
IDirect3DDevice8_CreateVolumeTexture
(
device
,
64
,
64
,
1
,
1
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_DEFAULT
,
(
IDirect3DVolumeTexture8
**
)
&
iface
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
iface
==
(
void
*
)
0xdeadbeef
,
"Got unexpected iface %p.
\n
"
,
iface
);
refcount
=
IDirect3DDevice8_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
IDirect3D8_Release
(
d3d
);
DestroyWindow
(
window
);
}
START_TEST
(
device
)
{
HMODULE
d3d8_handle
=
LoadLibraryA
(
"d3d8.dll"
);
...
...
@@ -8254,6 +8355,7 @@ START_TEST(device)
test_check_device_format
();
test_miptree_layout
();
test_render_target_device_mismatch
();
test_format_unknown
();
UnregisterClassA
(
"d3d8_test_wc"
,
GetModuleHandleA
(
NULL
));
}
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