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
e184b09a
Commit
e184b09a
authored
Aug 14, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fake occlusion queries if the wrong context is active.
parent
a99907d1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
9 deletions
+19
-9
device.c
dlls/wined3d/device.c
+1
-0
query.c
dlls/wined3d/query.c
+17
-9
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/device.c
View file @
e184b09a
...
...
@@ -1140,6 +1140,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateQuery(IWineD3DDevice *iface, WINE
TRACE
(
"(%p) Allocating data for an occlusion query
\n
"
,
This
);
object
->
extendedData
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
WineQueryOcclusionData
));
GL_EXTCALL
(
glGenQueriesARB
(
1
,
&
((
WineQueryOcclusionData
*
)(
object
->
extendedData
))
->
queryId
));
((
WineQueryOcclusionData
*
)(
object
->
extendedData
))
->
ctx
=
This
->
activeContext
;
break
;
}
case
WINED3DQUERYTYPE_EVENT
:
...
...
dlls/wined3d/query.c
View file @
e184b09a
...
...
@@ -187,7 +187,9 @@ static HRESULT WINAPI IWineD3DQueryImpl_GetData(IWineD3DQuery* iface, void* pDa
case
WINED3DQUERYTYPE_OCCLUSION
:
{
DWORD
*
data
=
pData
;
if
(
GL_SUPPORT
(
ARB_OCCLUSION_QUERY
))
{
if
(
GL_SUPPORT
(
ARB_OCCLUSION_QUERY
)
&&
((
WineQueryOcclusionData
*
)
This
->
extendedData
)
->
ctx
==
This
->
wineD3DDevice
->
activeContext
&&
This
->
wineD3DDevice
->
activeContext
->
tid
==
GetCurrentThreadId
())
{
GLuint
available
;
GLuint
samples
;
GLuint
queryId
=
((
WineQueryOcclusionData
*
)
This
->
extendedData
)
->
queryId
;
...
...
@@ -206,7 +208,7 @@ static HRESULT WINAPI IWineD3DQueryImpl_GetData(IWineD3DQuery* iface, void* pDa
res
=
S_FALSE
;
}
}
else
{
FIXME
(
"(%p) : Occlusion queries not supported
. Returning 1.
\n
"
,
This
);
WARN
(
"(%p) : Occlusion queries not supported, or wrong context
. Returning 1.
\n
"
,
This
);
*
data
=
1
;
res
=
S_OK
;
}
...
...
@@ -380,13 +382,19 @@ static HRESULT WINAPI IWineD3DQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIs
switch
(
This
->
type
)
{
case
WINED3DQUERYTYPE_OCCLUSION
:
if
(
GL_SUPPORT
(
ARB_OCCLUSION_QUERY
))
{
if
(
dwIssueFlags
&
WINED3DISSUE_BEGIN
)
{
GL_EXTCALL
(
glBeginQueryARB
(
GL_SAMPLES_PASSED_ARB
,
((
WineQueryOcclusionData
*
)
This
->
extendedData
)
->
queryId
));
checkGLcall
(
"glBeginQuery()"
);
}
if
(
dwIssueFlags
&
WINED3DISSUE_END
)
{
GL_EXTCALL
(
glEndQueryARB
(
GL_SAMPLES_PASSED_ARB
));
checkGLcall
(
"glEndQuery()"
);
WineD3DContext
*
ctx
=
((
WineQueryOcclusionData
*
)
This
->
extendedData
)
->
ctx
;
if
(
ctx
!=
This
->
wineD3DDevice
->
activeContext
||
ctx
->
tid
!=
GetCurrentThreadId
())
{
WARN
(
"Not the owning context, can't start query
\n
"
);
}
else
{
if
(
dwIssueFlags
&
WINED3DISSUE_BEGIN
)
{
GL_EXTCALL
(
glBeginQueryARB
(
GL_SAMPLES_PASSED_ARB
,
((
WineQueryOcclusionData
*
)
This
->
extendedData
)
->
queryId
));
checkGLcall
(
"glBeginQuery()"
);
}
if
(
dwIssueFlags
&
WINED3DISSUE_END
)
{
GL_EXTCALL
(
glEndQueryARB
(
GL_SAMPLES_PASSED_ARB
));
checkGLcall
(
"glEndQuery()"
);
}
}
}
else
{
FIXME
(
"(%p) : Occlusion queries not supported
\n
"
,
This
);
...
...
dlls/wined3d/wined3d_private.h
View file @
e184b09a
...
...
@@ -1460,6 +1460,7 @@ extern const IWineD3DQueryVtbl IWineD3DQuery_Vtbl;
/* Datastructures for IWineD3DQueryImpl.extendedData */
typedef
struct
WineQueryOcclusionData
{
GLuint
queryId
;
WineD3DContext
*
ctx
;
}
WineQueryOcclusionData
;
typedef
struct
WineQueryEventData
{
...
...
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