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
55b63fe0
Commit
55b63fe0
authored
Aug 14, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 20, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Reinstall the internal reference on vertex buffers.
parent
a7a0d4df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
device.c
dlls/wined3d/device.c
+8
-0
stateblock.c
dlls/wined3d/stateblock.c
+7
-0
No files found.
dlls/wined3d/device.c
View file @
55b63fe0
...
...
@@ -2240,9 +2240,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSource(IWineD3DDevice *iface,
if
(
pStreamData
!=
NULL
)
{
IWineD3DVertexBufferImpl
*
vbImpl
=
(
IWineD3DVertexBufferImpl
*
)
pStreamData
;
InterlockedIncrement
(
&
vbImpl
->
bindCount
);
IWineD3DVertexBuffer_AddRef
(
pStreamData
);
}
if
(
oldSrc
!=
NULL
)
{
InterlockedDecrement
(
&
((
IWineD3DVertexBufferImpl
*
)
oldSrc
)
->
bindCount
);
IWineD3DVertexBuffer_Release
(
oldSrc
);
}
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_STREAMSRC
);
...
...
@@ -4752,13 +4754,16 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveUP(IWineD3DDevice *iface,
UINT
PrimitiveCount
,
CONST
void
*
pVertexStreamZeroData
,
UINT
VertexStreamZeroStride
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DVertexBuffer
*
vb
;
TRACE
(
"(%p) : Type=(%d,%s), pCount=%d, pVtxData=%p, Stride=%d
\n
"
,
This
,
PrimitiveType
,
debug_d3dprimitivetype
(
PrimitiveType
),
PrimitiveCount
,
pVertexStreamZeroData
,
VertexStreamZeroStride
);
/* Note in the following, it's not this type, but that's the purpose of streamIsUP */
vb
=
This
->
stateBlock
->
streamSource
[
0
];
This
->
stateBlock
->
streamSource
[
0
]
=
(
IWineD3DVertexBuffer
*
)
pVertexStreamZeroData
;
if
(
vb
)
IWineD3DVertexBuffer_Release
(
vb
);
This
->
stateBlock
->
streamOffset
[
0
]
=
0
;
This
->
stateBlock
->
streamStride
[
0
]
=
VertexStreamZeroStride
;
This
->
stateBlock
->
streamIsUP
=
TRUE
;
...
...
@@ -4787,6 +4792,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *
UINT
VertexStreamZeroStride
)
{
int
idxStride
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DVertexBuffer
*
vb
;
IWineD3DIndexBuffer
*
ib
;
TRACE
(
"(%p) : Type=(%d,%s), MinVtxIdx=%d, NumVIdx=%d, PCount=%d, pidxdata=%p, IdxFmt=%d, pVtxdata=%p, stride=%d
\n
"
,
...
...
@@ -4801,7 +4807,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *
}
/* Note in the following, it's not this type, but that's the purpose of streamIsUP */
vb
=
This
->
stateBlock
->
streamSource
[
0
];
This
->
stateBlock
->
streamSource
[
0
]
=
(
IWineD3DVertexBuffer
*
)
pVertexStreamZeroData
;
if
(
vb
)
IWineD3DVertexBuffer_Release
(
vb
);
This
->
stateBlock
->
streamIsUP
=
TRUE
;
This
->
stateBlock
->
streamOffset
[
0
]
=
0
;
This
->
stateBlock
->
streamStride
[
0
]
=
VertexStreamZeroStride
;
...
...
dlls/wined3d/stateblock.c
View file @
55b63fe0
...
...
@@ -262,6 +262,13 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) {
}
}
}
for
(
counter
=
0
;
counter
<
MAX_STREAMS
;
counter
++
)
{
if
(
This
->
streamSource
[
counter
])
{
if
(
0
!=
IWineD3DVertexBuffer_Release
(
This
->
streamSource
[
counter
]))
{
TRACE
(
"Vertex buffer still referenced by stateblock, applications has leaked Stream %u, buffer %p
\n
"
,
counter
,
This
->
streamSource
[
counter
]);
}
}
}
if
(
This
->
pIndexData
)
IWineD3DIndexBuffer_Release
(
This
->
pIndexData
);
}
...
...
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