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
f8015cd2
Commit
f8015cd2
authored
Mar 25, 2012
by
Józef Kucia
Committed by
Alexandre Julliard
Mar 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Add tests for D3DXCreateVolumeTextureFromFileInMemory.
parent
7f3f5dd1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
surface.c
dlls/d3dx9_36/tests/surface.c
+45
-0
No files found.
dlls/d3dx9_36/tests/surface.c
View file @
f8015cd2
...
...
@@ -779,6 +779,50 @@ static void test_D3DXCreateCubeTexture(IDirect3DDevice9 *device)
}
}
static
void
test_D3DXCreateVolumeTexture
(
IDirect3DDevice9
*
device
)
{
HRESULT
hr
;
ULONG
ref
;
DWORD
levelcount
;
IDirect3DVolumeTexture9
*
volume_texture
;
D3DVOLUME_DESC
volume_desc
;
todo_wine
{
hr
=
D3DXCreateVolumeTextureFromFileInMemory
(
NULL
,
dds_volume_map
,
sizeof
(
dds_volume_map
),
&
volume_texture
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXCreateVolumeTextureFromFileInMemory returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateVolumeTextureFromFileInMemory
(
device
,
NULL
,
sizeof
(
dds_volume_map
),
&
volume_texture
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXCreateVolumeTextureFromFileInMemory returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateVolumeTextureFromFileInMemory
(
device
,
dds_volume_map
,
0
,
&
volume_texture
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXCreateVolumeTextureFromFileInMemory returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateVolumeTextureFromFileInMemory
(
device
,
dds_volume_map
,
sizeof
(
dds_volume_map
),
NULL
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXCreateVolumeTextureFromFileInMemory returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateVolumeTextureFromFileInMemory
(
device
,
dds_volume_map
,
sizeof
(
dds_volume_map
),
&
volume_texture
);
if
(
SUCCEEDED
(
hr
))
{
levelcount
=
IDirect3DVolumeTexture9_GetLevelCount
(
volume_texture
);
ok
(
levelcount
==
3
,
"GetLevelCount returned %u, expected 3
\n
"
,
levelcount
);
hr
=
IDirect3DVolumeTexture9_GetLevelDesc
(
volume_texture
,
0
,
&
volume_desc
);
ok
(
hr
==
D3D_OK
,
"GetLevelDesc returend %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
volume_desc
.
Width
==
4
,
"Got width %u, expected 4
\n
"
,
volume_desc
.
Width
);
ok
(
volume_desc
.
Height
==
4
,
"Got height %u, expected 4
\n
"
,
volume_desc
.
Height
);
ok
(
volume_desc
.
Depth
==
2
,
"Got depth %u, expected 2
\n
"
,
volume_desc
.
Depth
);
hr
=
IDirect3DVolumeTexture9_GetLevelDesc
(
volume_texture
,
1
,
&
volume_desc
);
ok
(
hr
==
D3D_OK
,
"GetLevelDesc returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
volume_desc
.
Width
==
2
,
"Got width %u, expected 2
\n
"
,
volume_desc
.
Width
);
ok
(
volume_desc
.
Height
==
2
,
"Got height %u, expected 2
\n
"
,
volume_desc
.
Height
);
ok
(
volume_desc
.
Depth
==
1
,
"Got depth %u, expected 1
\n
"
,
volume_desc
.
Depth
);
ref
=
IDirect3DVolumeTexture9_Release
(
volume_texture
);
ok
(
ref
==
0
,
"Invalid reference count. Got %u, expected 0
\n
"
,
ref
);
}
}
}
START_TEST
(
surface
)
{
HWND
wnd
;
...
...
@@ -813,6 +857,7 @@ START_TEST(surface)
test_D3DXGetImageInfo
();
test_D3DXLoadSurface
(
device
);
test_D3DXCreateCubeTexture
(
device
);
test_D3DXCreateVolumeTexture
(
device
);
check_release
((
IUnknown
*
)
device
,
0
);
check_release
((
IUnknown
*
)
d3d
,
0
);
...
...
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