Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
46eabd5b
Commit
46eabd5b
authored
Jan 07, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't delete queries from the wrong context.
parent
0e8ed9be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
query.c
dlls/wined3d/query.c
+21
-3
No files found.
dlls/wined3d/query.c
View file @
46eabd5b
...
...
@@ -63,8 +63,18 @@ static ULONG WINAPI IWineD3DQueryImpl_Release(IWineD3DQuery *iface) {
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
{
ENTER_GL
();
/* Queries are specific to the GL context that created them. Not
* deleting the query will obviously leak it, but that's still better
* than potentially deleting a different query with the same id in this
* context, and (still) leaking the actual query. */
if
(
This
->
type
==
WINED3DQUERYTYPE_EVENT
)
{
if
(
GL_SUPPORT
(
APPLE_FENCE
))
{
if
(((
WineQueryEventData
*
)
This
->
extendedData
)
->
ctx
!=
This
->
wineD3DDevice
->
activeContext
||
This
->
wineD3DDevice
->
activeContext
->
tid
!=
GetCurrentThreadId
())
{
FIXME
(
"Query was created in a different context, skipping deletion
\n
"
);
}
else
if
(
GL_SUPPORT
(
APPLE_FENCE
))
{
GL_EXTCALL
(
glDeleteFencesAPPLE
(
1
,
&
((
WineQueryEventData
*
)(
This
->
extendedData
))
->
fenceId
));
checkGLcall
(
"glDeleteFencesAPPLE"
);
}
else
if
(
GL_SUPPORT
(
NV_FENCE
))
{
...
...
@@ -72,8 +82,16 @@ static ULONG WINAPI IWineD3DQueryImpl_Release(IWineD3DQuery *iface) {
checkGLcall
(
"glDeleteFencesNV"
);
}
}
else
if
(
This
->
type
==
WINED3DQUERYTYPE_OCCLUSION
&&
GL_SUPPORT
(
ARB_OCCLUSION_QUERY
))
{
GL_EXTCALL
(
glDeleteQueriesARB
(
1
,
&
((
WineQueryOcclusionData
*
)(
This
->
extendedData
))
->
queryId
));
checkGLcall
(
"glDeleteQueriesARB"
);
if
(((
WineQueryOcclusionData
*
)
This
->
extendedData
)
->
ctx
!=
This
->
wineD3DDevice
->
activeContext
||
This
->
wineD3DDevice
->
activeContext
->
tid
!=
GetCurrentThreadId
())
{
FIXME
(
"Query was created in a different context, skipping deletion
\n
"
);
}
else
{
GL_EXTCALL
(
glDeleteQueriesARB
(
1
,
&
((
WineQueryOcclusionData
*
)(
This
->
extendedData
))
->
queryId
));
checkGLcall
(
"glDeleteQueriesARB"
);
}
}
LEAVE_GL
();
...
...
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