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
7f3f5dd1
Commit
7f3f5dd1
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 D3DXCreateCubeTextureFromFileInMemory.
parent
e0f2d4cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
surface.c
dlls/d3dx9_36/tests/surface.c
+41
-0
No files found.
dlls/d3dx9_36/tests/surface.c
View file @
7f3f5dd1
...
...
@@ -739,6 +739,46 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
if
(
testbitmap_ok
)
DeleteFileA
(
"testbitmap.bmp"
);
}
static
void
test_D3DXCreateCubeTexture
(
IDirect3DDevice9
*
device
)
{
HRESULT
hr
;
ULONG
ref
;
DWORD
levelcount
;
IDirect3DCubeTexture9
*
cube_texture
;
D3DSURFACE_DESC
surface_desc
;
todo_wine
{
hr
=
D3DXCreateCubeTextureFromFileInMemory
(
NULL
,
dds_cube_map
,
sizeof
(
dds_cube_map
),
&
cube_texture
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXCreateCubeTextureFromFileInMemory returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateCubeTextureFromFileInMemory
(
device
,
NULL
,
sizeof
(
dds_cube_map
),
&
cube_texture
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXCreateCubeTextureFromFileInMemory returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateCubeTextureFromFileInMemory
(
device
,
dds_cube_map
,
0
,
&
cube_texture
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXCreateCubeTextureFromFileInMemory returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateCubeTextureFromFileInMemory
(
device
,
dds_cube_map
,
sizeof
(
dds_cube_map
),
NULL
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXCreateCubeTextureFromFileInMemory returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateCubeTextureFromFileInMemory
(
device
,
dds_cube_map
,
sizeof
(
dds_cube_map
),
&
cube_texture
);
if
(
SUCCEEDED
(
hr
))
{
levelcount
=
IDirect3DCubeTexture9_GetLevelCount
(
cube_texture
);
ok
(
levelcount
==
3
,
"GetLevelCount returned %u, expected 3
\n
"
,
levelcount
);
hr
=
IDirect3DCubeTexture9_GetLevelDesc
(
cube_texture
,
0
,
&
surface_desc
);
ok
(
hr
==
D3D_OK
,
"GetLevelDesc returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
surface_desc
.
Width
==
4
,
"Got width %u, expected 4
\n
"
,
surface_desc
.
Width
);
ok
(
surface_desc
.
Height
==
4
,
"Got height %u, expected 4
\n
"
,
surface_desc
.
Height
);
hr
=
IDirect3DCubeTexture9_GetLevelDesc
(
cube_texture
,
3
,
&
surface_desc
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"GetLevelDesc returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
ref
=
IDirect3DCubeTexture9_Release
(
cube_texture
);
ok
(
ref
==
0
,
"Invalid reference count. Got %u, expected 0
\n
"
,
ref
);
}
else
skip
(
"Couldn't create cube texture
\n
"
);
}
}
START_TEST
(
surface
)
{
HWND
wnd
;
...
...
@@ -772,6 +812,7 @@ START_TEST(surface)
test_D3DXGetImageInfo
();
test_D3DXLoadSurface
(
device
);
test_D3DXCreateCubeTexture
(
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