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
cafab890
Commit
cafab890
authored
May 21, 2012
by
Józef Kucia
Committed by
Alexandre Julliard
May 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Add tests for IDirect3DCubeTexture9::GetLevelDesc and…
d3d9/tests: Add tests for IDirect3DCubeTexture9::GetLevelDesc and IDirect3DCubeTexture9::GetCubeMapSurface.
parent
cd4b973d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
texture.c
dlls/d3d9/tests/texture.c
+43
-0
No files found.
dlls/d3d9/tests/texture.c
View file @
cafab890
...
...
@@ -152,6 +152,48 @@ static void test_cube_texture_mipmap_gen(IDirect3DDevice9 *device_ptr)
texture_ptr
=
NULL
;
}
static
void
test_cube_texture_levels
(
IDirect3DDevice9
*
device_ptr
)
{
IDirect3DCubeTexture9
*
texture_ptr
;
DWORD
levels
;
D3DSURFACE_DESC
desc
;
HRESULT
hr
;
IDirect3DSurface9
*
surface
;
hr
=
IDirect3DDevice9_CreateCubeTexture
(
device_ptr
,
64
,
0
,
0
,
D3DFMT_X8R8G8B8
,
D3DPOOL_DEFAULT
,
&
texture_ptr
,
NULL
);
if
(
FAILED
(
hr
))
{
skip
(
"Couldn't create cube texture
\n
"
);
return
;
}
levels
=
IDirect3DCubeTexture9_GetLevelCount
(
texture_ptr
);
ok
(
levels
==
7
,
"Got %u levels, expected 7
\n
"
,
levels
);
hr
=
IDirect3DCubeTexture9_GetLevelDesc
(
texture_ptr
,
levels
-
1
,
&
desc
);
ok
(
hr
==
D3D_OK
,
"IDirect3DCubeTexture9_GetLevelDesc returned %#x
\n
"
,
hr
);
hr
=
IDirect3DCubeTexture9_GetLevelDesc
(
texture_ptr
,
levels
,
&
desc
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"IDirect3DCubeTexture9_GetLevelDesc returned %#x
\n
"
,
hr
);
hr
=
IDirect3DCubeTexture9_GetLevelDesc
(
texture_ptr
,
levels
+
1
,
&
desc
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"IDirect3DCubeTexture9_GetLevelDesc returned %#x
\n
"
,
hr
);
hr
=
IDirect3DCubeTexture9_GetCubeMapSurface
(
texture_ptr
,
D3DCUBEMAP_FACE_POSITIVE_X
,
0
,
&
surface
);
ok
(
hr
==
D3D_OK
,
"IDirect3DCubeTexture9_GetCubeMapSurface returned %#x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IDirect3DSurface9_Release
(
surface
);
hr
=
IDirect3DCubeTexture9_GetCubeMapSurface
(
texture_ptr
,
D3DCUBEMAP_FACE_NEGATIVE_Z
+
1
,
0
,
&
surface
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"IDirect3DCubeTexture9_GetCubeMapSurface returned %#x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IDirect3DSurface9_Release
(
surface
);
hr
=
IDirect3DCubeTexture9_GetCubeMapSurface
(
texture_ptr
,
D3DCUBEMAP_FACE_POSITIVE_X
-
1
,
0
,
&
surface
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"IDirect3DCubeTexture9_GetCubeMapSurface returned %#x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IDirect3DSurface9_Release
(
surface
);
IDirect3DCubeTexture9_Release
(
texture_ptr
);
}
static
void
test_cube_textures
(
IDirect3DDevice9
*
device_ptr
,
DWORD
caps
)
{
test_cube_texture_from_pool
(
device_ptr
,
caps
,
D3DPOOL_DEFAULT
,
TRUE
);
...
...
@@ -159,6 +201,7 @@ static void test_cube_textures(IDirect3DDevice9 *device_ptr, DWORD caps)
test_cube_texture_from_pool
(
device_ptr
,
caps
,
D3DPOOL_SYSTEMMEM
,
TRUE
);
test_cube_texture_from_pool
(
device_ptr
,
caps
,
D3DPOOL_SCRATCH
,
FALSE
);
test_cube_texture_mipmap_gen
(
device_ptr
);
test_cube_texture_levels
(
device_ptr
);
}
static
void
test_mipmap_gen
(
IDirect3DDevice9
*
device
)
...
...
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