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
ee7bf795
Commit
ee7bf795
authored
Nov 15, 2006
by
Markus Amsler
Committed by
Alexandre Julliard
Nov 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Test AddRef with refcount==0.
parent
577d5d25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
device.c
dlls/d3d8/tests/device.c
+21
-3
No files found.
dlls/d3d8/tests/device.c
View file @
ee7bf795
...
@@ -342,8 +342,14 @@ static void test_refcount(void)
...
@@ -342,8 +342,14 @@ static void test_refcount(void)
todo_wine
CHECK_REFCOUNT
(
pRenderTarget
,
2
);
todo_wine
CHECK_REFCOUNT
(
pRenderTarget
,
2
);
todo_wine
CHECK_RELEASE_REFCOUNT
(
pRenderTarget
,
1
);
todo_wine
CHECK_RELEASE_REFCOUNT
(
pRenderTarget
,
1
);
todo_wine
CHECK_RELEASE_REFCOUNT
(
pRenderTarget
,
0
);
todo_wine
CHECK_RELEASE_REFCOUNT
(
pRenderTarget
,
0
);
CHECK_REFCOUNT
(
pDevice
,
--
refcount
);
/* The render target is released with the device, so AddRef with refcount=0 is fine here. */
todo_wine
CHECK_ADDREF_REFCOUNT
(
pRenderTarget
,
1
);
todo_wine
CHECK_REFCOUNT
(
pDevice
,
++
refcount
);
todo_wine
CHECK_RELEASE_REFCOUNT
(
pRenderTarget
,
0
);
CHECK_REFCOUNT
(
pDevice
,
--
refcount
);
}
}
CHECK_REFCOUNT
(
pDevice
,
--
refcount
);
/* Render target and back buffer are identical. */
/* Render target and back buffer are identical. */
hr
=
IDirect3DDevice8_GetBackBuffer
(
pDevice
,
0
,
0
,
&
pBackBuffer
);
hr
=
IDirect3DDevice8_GetBackBuffer
(
pDevice
,
0
,
0
,
&
pBackBuffer
);
...
@@ -371,9 +377,15 @@ static void test_refcount(void)
...
@@ -371,9 +377,15 @@ static void test_refcount(void)
todo_wine
CHECK_REFCOUNT
(
pDevice
,
refcount
);
todo_wine
CHECK_REFCOUNT
(
pDevice
,
refcount
);
todo_wine
CHECK_RELEASE_REFCOUNT
(
pStencilSurface
,
0
);
todo_wine
CHECK_RELEASE_REFCOUNT
(
pStencilSurface
,
0
);
CHECK_REFCOUNT
(
pDevice
,
--
refcount
);
/* The stencil surface is released with the device, so AddRef with refcount=0 is fine here. */
todo_wine
CHECK_ADDREF_REFCOUNT
(
pStencilSurface
,
1
);
todo_wine
CHECK_REFCOUNT
(
pDevice
,
++
refcount
);
todo_wine
CHECK_RELEASE_REFCOUNT
(
pStencilSurface
,
0
);
CHECK_REFCOUNT
(
pDevice
,
--
refcount
);
pStencilSurface
=
NULL
;
pStencilSurface
=
NULL
;
}
}
CHECK_REFCOUNT
(
pDevice
,
--
refcount
);
/* Buffers */
/* Buffers */
hr
=
IDirect3DDevice8_CreateIndexBuffer
(
pDevice
,
16
,
0
,
D3DFMT_INDEX32
,
D3DPOOL_DEFAULT
,
&
pIndexBuffer
);
hr
=
IDirect3DDevice8_CreateIndexBuffer
(
pDevice
,
16
,
0
,
D3DFMT_INDEX32
,
D3DPOOL_DEFAULT
,
&
pIndexBuffer
);
...
@@ -482,10 +494,16 @@ static void test_refcount(void)
...
@@ -482,10 +494,16 @@ static void test_refcount(void)
todo_wine
CHECK_SURFACE_CONTAINER
(
pBackBuffer
,
IID_IDirect3DDevice8
,
pDevice
);
todo_wine
CHECK_SURFACE_CONTAINER
(
pBackBuffer
,
IID_IDirect3DDevice8
,
pDevice
);
todo_wine
CHECK_REFCOUNT
(
pBackBuffer
,
1
);
todo_wine
CHECK_REFCOUNT
(
pBackBuffer
,
1
);
todo_wine
CHECK_RELEASE_REFCOUNT
(
pBackBuffer
,
0
);
todo_wine
CHECK_RELEASE_REFCOUNT
(
pBackBuffer
,
0
);
CHECK_REFCOUNT
(
pDevice
,
--
refcount
);
/* The back buffer is released with the swapchain, so AddRef with refcount=0 is fine here. */
todo_wine
CHECK_ADDREF_REFCOUNT
(
pBackBuffer
,
1
);
todo_wine
CHECK_REFCOUNT
(
pDevice
,
++
refcount
);
todo_wine
CHECK_RELEASE_REFCOUNT
(
pBackBuffer
,
0
);
CHECK_REFCOUNT
(
pDevice
,
--
refcount
);
pBackBuffer
=
NULL
;
pBackBuffer
=
NULL
;
}
}
CHECK_REFCOUNT
(
pSwapChain
,
1
);
CHECK_REFCOUNT
(
pSwapChain
,
1
);
CHECK_REFCOUNT
(
pDevice
,
--
refcount
);
}
}
if
(
pVertexBuffer
)
if
(
pVertexBuffer
)
...
...
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