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
5eeead1f
Commit
5eeead1f
authored
May 24, 2006
by
Vitaliy Margolen
Committed by
Alexandre Julliard
May 25, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: StateBlock is also created in EndStateBlock. With tests.
parent
a9e2fc28
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
stateblock.c
dlls/d3d9/stateblock.c
+9
-4
device.c
dlls/d3d9/tests/device.c
+8
-0
No files found.
dlls/d3d9/stateblock.c
View file @
5eeead1f
...
...
@@ -150,12 +150,17 @@ HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(LPDIRECT3DDEVICE9 iface, IDi
}
/* allocate a new IDirectD3DStateBlock */
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirect3DStateBlock9Impl
));
if
(
!
object
)
{
FIXME
(
"(%p) Failed to allocate %d bytes
\n
"
,
This
,
sizeof
(
IDirect3DStateBlock9Impl
));
return
E_OUTOFMEMORY
;
}
object
->
ref
=
1
;
object
->
lpVtbl
=
&
Direct3DStateBlock9_Vtbl
;
object
->
wineD3DStateBlock
=
wineD3DStateBlock
;
*
ppSB
=
(
IDirect3DStateBlock9
*
)
object
;
object
->
wineD3DStateBlock
=
wineD3DStateBlock
;
IUnknown_AddRef
(
iface
);
object
->
parentDevice
=
iface
;
*
ppSB
=
(
IDirect3DStateBlock9
*
)
object
;
TRACE
(
"(%p)Returning %p %p
\n
"
,
This
,
*
ppSB
,
wineD3DStateBlock
);
return
D3D_OK
;
}
dlls/d3d9/tests/device.c
View file @
5eeead1f
...
...
@@ -201,6 +201,7 @@ void test_refcount(void)
IDirect3DSurface9
*
pRenderTarget
=
NULL
;
IDirect3DSurface9
*
pTextureLevel
=
NULL
;
IDirect3DStateBlock9
*
pStateBlock
=
NULL
;
IDirect3DStateBlock9
*
pStateBlock1
=
NULL
;
IDirect3DSwapChain9
*
pSwapChain
=
NULL
;
IDirect3DQuery9
*
pQuery
=
NULL
;
D3DPRESENT_PARAMETERS
d3dpp
;
...
...
@@ -302,6 +303,12 @@ void test_refcount(void)
hr
=
IDirect3DDevice9_CreateQuery
(
pDevice
,
D3DQUERYTYPE_EVENT
,
&
pQuery
);
CHECK_CALL
(
hr
,
"CreateQuery"
,
pDevice
,
refcount
+
1
);
refcount
=
get_refcount
(
(
IUnknown
*
)
pDevice
);
hr
=
IDirect3DDevice9_BeginStateBlock
(
pDevice
);
CHECK_CALL
(
hr
,
"BeginStateBlock"
,
pDevice
,
refcount
);
hr
=
IDirect3DDevice9_EndStateBlock
(
pDevice
,
&
pStateBlock1
);
CHECK_CALL
(
hr
,
"EndStateBlock"
,
pDevice
,
refcount
+
1
);
cleanup:
if
(
pDevice
)
IUnknown_Release
(
pDevice
);
...
...
@@ -327,6 +334,7 @@ cleanup:
if (pSwapChain) IUnknown_Release( pSwapChain );
*/
if
(
pQuery
)
IUnknown_Release
(
pQuery
);
if
(
pStateBlock1
)
IUnknown_Release
(
pStateBlock1
);
if
(
pD3d
)
IUnknown_Release
(
pD3d
);
...
...
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