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
f072404f
Commit
f072404f
authored
Jun 10, 2012
by
Józef Kucia
Committed by
Alexandre Julliard
Jun 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Add tests for D3DXCreateRenderToEnvMap.
parent
1325c400
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
1 deletion
+69
-1
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+1
-1
render.c
dlls/d3dx9_36/render.c
+16
-0
core.c
dlls/d3dx9_36/tests/core.c
+52
-0
No files found.
dlls/d3dx9_36/d3dx9_36.spec
View file @
f072404f
...
...
@@ -81,7 +81,7 @@
@ stub D3DXCreatePRTBufferTex(long long long long ptr)
@ stub D3DXCreatePRTCompBuffer(long long long ptr ptr ptr ptr)
@ stub D3DXCreatePRTEngine(ptr ptr long ptr ptr)
@ st
ub
D3DXCreateRenderToEnvMap(ptr long long long long long ptr)
@ st
dcall
D3DXCreateRenderToEnvMap(ptr long long long long long ptr)
@ stdcall D3DXCreateRenderToSurface(ptr long long long long long ptr)
@ stub D3DXCreateSPMesh(ptr ptr ptr ptr ptr)
@ stdcall D3DXCreateSkinInfo(long ptr long ptr)
...
...
dlls/d3dx9_36/render.c
View file @
f072404f
...
...
@@ -386,3 +386,19 @@ HRESULT WINAPI D3DXCreateRenderToSurface(IDirect3DDevice9 *device,
*
out
=
&
render
->
ID3DXRenderToSurface_iface
;
return
D3D_OK
;
}
HRESULT
WINAPI
D3DXCreateRenderToEnvMap
(
IDirect3DDevice9
*
device
,
UINT
size
,
UINT
mip_levels
,
D3DFORMAT
format
,
BOOL
depth_stencil
,
D3DFORMAT
depth_stencil_format
,
ID3DXRenderToEnvMap
**
out
)
{
FIXME
(
"(%p, %u, %u, %#x, %d, %#x, %p): stub
\n
"
,
device
,
size
,
mip_levels
,
format
,
depth_stencil
,
depth_stencil_format
,
out
);
if
(
!
device
||
!
out
)
return
D3DERR_INVALIDCALL
;
return
E_NOTIMPL
;
}
dlls/d3dx9_36/tests/core.c
View file @
f072404f
...
...
@@ -883,6 +883,57 @@ static void test_ID3DXRenderToSurface(IDirect3DDevice9 *device)
test_ID3DXRenderToSurface_device_state
(
device
);
}
void
test_D3DXCreateRenderToEnvMap
(
IDirect3DDevice9
*
device
)
{
int
i
;
HRESULT
hr
;
ULONG
ref_count
;
D3DXRTE_DESC
desc
;
ID3DXRenderToEnvMap
*
render
;
static
const
struct
{
D3DXRTE_DESC
parameters
;
D3DXRTE_DESC
expected_values
;
}
tests
[]
=
{
{
{
0
,
0
,
D3DFMT_A8R8G8B8
,
FALSE
,
D3DFMT_UNKNOWN
},
{
1
,
1
,
D3DFMT_A8R8G8B8
,
FALSE
,
D3DFMT_UNKNOWN
}
},
{
{
256
,
0
,
D3DFMT_A8R8G8B8
,
FALSE
,
D3DFMT_UNKNOWN
},
{
256
,
9
,
D3DFMT_A8R8G8B8
,
FALSE
,
D3DFMT_UNKNOWN
}
},
{
{
256
,
4
,
D3DFMT_A8R8G8B8
,
FALSE
,
D3DFMT_D24S8
},
{
256
,
4
,
D3DFMT_A8R8G8B8
,
FALSE
,
D3DFMT_D24S8
}
},
{
{
256
,
256
,
D3DFMT_UNKNOWN
,
FALSE
,
D3DFMT_R8G8B8
},
{
256
,
9
,
D3DFMT_A8R8G8B8
,
FALSE
,
D3DFMT_R8G8B8
}
},
{
{
-
1
,
-
1
,
D3DFMT_A8R8G8B8
,
TRUE
,
D3DFMT_DXT1
},
{
256
,
9
,
D3DFMT_A8R8G8B8
,
TRUE
,
D3DFMT_DXT1
}
},
{
{
256
,
1
,
D3DFMT_X8R8G8B8
,
TRUE
,
D3DFMT_UNKNOWN
},
{
256
,
1
,
D3DFMT_X8R8G8B8
,
TRUE
,
D3DFMT_UNKNOWN
}
}
};
for
(
i
=
0
;
i
<
sizeof
(
tests
)
/
sizeof
(
tests
[
0
]);
i
++
)
{
const
D3DXRTE_DESC
*
parameters
=
&
tests
[
i
].
parameters
;
const
D3DXRTE_DESC
*
expected
=
&
tests
[
i
].
expected_values
;
hr
=
D3DXCreateRenderToEnvMap
(
device
,
parameters
->
Size
,
parameters
->
MipLevels
,
parameters
->
Format
,
parameters
->
DepthStencil
,
parameters
->
DepthStencilFormat
,
&
render
);
todo_wine
ok
(
hr
==
D3D_OK
,
"%d: D3DXCreateRenderToEnvMap returned %#x, expected %#x
\n
"
,
i
,
hr
,
D3D_OK
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
ID3DXRenderToEnvMap_GetDesc
(
render
,
&
desc
);
ok
(
hr
==
D3D_OK
,
"%d: GetDesc failed %#x
\n
"
,
i
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
ok
(
desc
.
Size
==
expected
->
Size
,
"%d: Got size %u, expected %u
\n
"
,
i
,
desc
.
Size
,
expected
->
Size
);
ok
(
desc
.
MipLevels
==
expected
->
MipLevels
,
"%d: Got miplevels %u, expected %u
\n
"
,
i
,
desc
.
MipLevels
,
expected
->
MipLevels
);
ok
(
desc
.
Format
==
expected
->
Format
,
"%d: Got format %#x, expected %#x
\n
"
,
i
,
desc
.
Format
,
expected
->
Format
);
ok
(
desc
.
DepthStencil
==
expected
->
DepthStencil
,
"%d: Got depth stencil %d, expected %d
\n
"
,
i
,
expected
->
DepthStencil
,
expected
->
DepthStencil
);
ok
(
desc
.
DepthStencilFormat
==
expected
->
DepthStencilFormat
,
"%d: Got depth stencil format %#x, expected %#x
\n
"
,
i
,
expected
->
DepthStencilFormat
,
expected
->
DepthStencilFormat
);
}
check_release
((
IUnknown
*
)
render
,
0
);
}
}
/* check device ref count */
ref_count
=
get_ref
((
IUnknown
*
)
device
);
hr
=
D3DXCreateRenderToEnvMap
(
device
,
0
,
0
,
D3DFMT_UNKNOWN
,
FALSE
,
D3DFMT_UNKNOWN
,
&
render
);
todo_wine
check_ref
((
IUnknown
*
)
device
,
ref_count
+
1
);
if
(
SUCCEEDED
(
hr
))
ID3DXRenderToEnvMap_Release
(
render
);
}
START_TEST
(
core
)
{
HWND
wnd
;
...
...
@@ -919,6 +970,7 @@ START_TEST(core)
test_ID3DXFont
(
device
);
test_D3DXCreateRenderToSurface
(
device
);
test_ID3DXRenderToSurface
(
device
);
test_D3DXCreateRenderToEnvMap
(
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