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
9b74d762
Commit
9b74d762
authored
Nov 03, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 04, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Add refcount test for binding objects.
parent
7cae24fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
device.c
dlls/d3d9/tests/device.c
+26
-0
No files found.
dlls/d3d9/tests/device.c
View file @
9b74d762
...
...
@@ -315,8 +315,27 @@ static void test_refcount(void)
/* Buffers */
hr
=
IDirect3DDevice9_CreateIndexBuffer
(
pDevice
,
16
,
0
,
D3DFMT_INDEX32
,
D3DPOOL_DEFAULT
,
&
pIndexBuffer
,
NULL
);
CHECK_CALL
(
hr
,
"CreateIndexBuffer"
,
pDevice
,
++
refcount
);
if
(
pIndexBuffer
)
{
tmp
=
get_refcount
(
(
IUnknown
*
)
pIndexBuffer
);
hr
=
IDirect3DDevice9_SetIndices
(
pDevice
,
pIndexBuffer
);
CHECK_CALL
(
hr
,
"SetIndices"
,
pIndexBuffer
,
tmp
);
hr
=
IDirect3DDevice9_SetIndices
(
pDevice
,
NULL
);
CHECK_CALL
(
hr
,
"SetIndices"
,
pIndexBuffer
,
tmp
);
}
hr
=
IDirect3DDevice9_CreateVertexBuffer
(
pDevice
,
16
,
0
,
D3DFVF_XYZ
,
D3DPOOL_DEFAULT
,
&
pVertexBuffer
,
NULL
);
CHECK_CALL
(
hr
,
"CreateVertexBuffer"
,
pDevice
,
++
refcount
);
if
(
pVertexBuffer
)
{
tmp
=
get_refcount
(
(
IUnknown
*
)
pVertexBuffer
);
hr
=
IDirect3DDevice9_SetStreamSource
(
pDevice
,
0
,
pVertexBuffer
,
0
,
3
*
sizeof
(
float
));
CHECK_CALL
(
hr
,
"SetStreamSource"
,
pVertexBuffer
,
tmp
);
hr
=
IDirect3DDevice9_SetStreamSource
(
pDevice
,
0
,
NULL
,
0
,
0
);
CHECK_CALL
(
hr
,
"SetStreamSource"
,
pVertexBuffer
,
tmp
);
}
/* Shaders */
hr
=
IDirect3DDevice9_CreateVertexDeclaration
(
pDevice
,
decl
,
&
pVertexDeclaration
);
CHECK_CALL
(
hr
,
"CreateVertexDeclaration"
,
pDevice
,
++
refcount
);
...
...
@@ -330,6 +349,13 @@ static void test_refcount(void)
if
(
pTexture
)
{
tmp
=
get_refcount
(
(
IUnknown
*
)
pTexture
);
/* SetTexture should not increase refcounts */
hr
=
IDirect3DDevice9_SetTexture
(
pDevice
,
0
,
(
IDirect3DBaseTexture9
*
)
pTexture
);
CHECK_CALL
(
hr
,
"SetTexture"
,
pTexture
,
tmp
);
hr
=
IDirect3DDevice9_SetTexture
(
pDevice
,
0
,
NULL
);
CHECK_CALL
(
hr
,
"SetTexture"
,
pTexture
,
tmp
);
/* This should not increment device refcount */
hr
=
IDirect3DTexture9_GetSurfaceLevel
(
pTexture
,
1
,
&
pTextureLevel
);
CHECK_CALL
(
hr
,
"GetSurfaceLevel"
,
pDevice
,
refcount
);
...
...
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