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
1ac8f4d4
Commit
1ac8f4d4
authored
May 11, 2011
by
Rico Schüller
Committed by
Alexandre Julliard
May 11, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Add ID3DXEffect::Get/SetStateManager() test.
parent
72d3ee3a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
effect.c
dlls/d3dx9_36/tests/effect.c
+26
-0
No files found.
dlls/d3dx9_36/tests/effect.c
View file @
1ac8f4d4
...
...
@@ -33,6 +33,7 @@ static void test_create_effect_and_pool(IDirect3DDevice9 *device)
ID3DXBaseEffect
*
base
;
ULONG
count
;
IDirect3DDevice9
*
device2
;
LPD3DXEFFECTSTATEMANAGER
manager
=
(
LPD3DXEFFECTSTATEMANAGER
)
0xdeadbeef
;
ID3DXEffectPool
*
pool
=
(
ID3DXEffectPool
*
)
0xdeadbeef
,
*
pool2
;
hr
=
D3DXCreateEffect
(
NULL
,
effect_desc
,
sizeof
(
effect_desc
),
NULL
,
NULL
,
0
,
NULL
,
NULL
,
NULL
);
...
...
@@ -53,6 +54,31 @@ static void test_create_effect_and_pool(IDirect3DDevice9 *device)
hr
=
effect
->
lpVtbl
->
QueryInterface
(
effect
,
&
IID_ID3DXBaseEffect
,
(
void
**
)
&
base
);
ok
(
hr
==
E_NOINTERFACE
,
"QueryInterface failed, got %x, expected %x (E_NOINTERFACE)
\n
"
,
hr
,
E_NOINTERFACE
);
hr
=
effect
->
lpVtbl
->
GetStateManager
(
effect
,
NULL
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"GetStateManager failed, got %x, expected %x (D3DERR_INVALIDCALL)
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
effect
->
lpVtbl
->
GetStateManager
(
effect
,
&
manager
);
ok
(
hr
==
D3D_OK
,
"GetStateManager failed, got %x, expected 0 (D3D_OK)
\n
"
,
hr
);
ok
(
!
manager
,
"GetStateManager failed, got %p
\n
"
,
manager
);
/* this works, but it is not recommended! */
hr
=
effect
->
lpVtbl
->
SetStateManager
(
effect
,
(
LPD3DXEFFECTSTATEMANAGER
)
device
);
ok
(
hr
==
D3D_OK
,
"SetStateManager failed, got %x, expected 0 (D3D_OK)
\n
"
,
hr
);
hr
=
effect
->
lpVtbl
->
GetStateManager
(
effect
,
&
manager
);
ok
(
hr
==
D3D_OK
,
"GetStateManager failed, got %x, expected 0 (D3D_OK)
\n
"
,
hr
);
ok
(
manager
!=
NULL
,
"GetStateManager failed
\n
"
);
IDirect3DDevice9_AddRef
(
device
);
count
=
IDirect3DDevice9_Release
(
device
);
ok
(
count
==
4
,
"Release failed, got %u, expected 4
\n
"
,
count
);
count
=
IUnknown_Release
(
manager
);
ok
(
count
==
3
,
"Release failed, got %u, expected 3
\n
"
,
count
);
hr
=
effect
->
lpVtbl
->
SetStateManager
(
effect
,
NULL
);
ok
(
hr
==
D3D_OK
,
"SetStateManager failed, got %x, expected 0 (D3D_OK)
\n
"
,
hr
);
hr
=
effect
->
lpVtbl
->
GetPool
(
effect
,
&
pool
);
ok
(
hr
==
D3D_OK
,
"GetPool failed, got %x, expected 0 (D3D_OK)
\n
"
,
hr
);
ok
(
!
pool
,
"GetPool failed, got %p
\n
"
,
pool
);
...
...
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