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
3d2ae691
Commit
3d2ae691
authored
Aug 07, 2006
by
H. Verbeet
Committed by
Alexandre Julliard
Aug 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Allow async occlusion queries.
parent
008c23d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
query.c
dlls/wined3d/query.c
+20
-6
wined3d_gl.h
include/wine/wined3d_gl.h
+1
-0
No files found.
dlls/wined3d/query.c
View file @
3d2ae691
...
...
@@ -94,6 +94,7 @@ static HRESULT WINAPI IWineD3DQueryImpl_GetDevice(IWineD3DQuery* iface, IWineD3
static
HRESULT
WINAPI
IWineD3DQueryImpl_GetData
(
IWineD3DQuery
*
iface
,
void
*
pData
,
DWORD
dwSize
,
DWORD
dwGetDataFlags
){
IWineD3DQueryImpl
*
This
=
(
IWineD3DQueryImpl
*
)
iface
;
HRESULT
res
=
S_OK
;
TRACE
(
"(%p) : type %#x, pData %p, dwSize %#lx, dwGetDataFlags %#lx
\n
"
,
This
,
This
->
type
,
pData
,
dwSize
,
dwGetDataFlags
);
...
...
@@ -157,14 +158,27 @@ static HRESULT WINAPI IWineD3DQueryImpl_GetData(IWineD3DQuery* iface, void* pDa
{
DWORD
*
data
=
pData
;
if
(
GL_SUPPORT
(
ARB_OCCLUSION_QUERY
))
{
GLint
samples
;
GL_EXTCALL
(
glGetQueryObjectivARB
(((
WineQueryOcclusionData
*
)
This
->
extendedData
)
->
queryId
,
GL_QUERY_RESULT_ARB
,
&
samples
));
checkGLcall
(
"glGetQueryObjectiv()
\n
"
);
TRACE
(
"(%p) : Returning %d samples.
\n
"
,
This
,
samples
);
*
data
=
samples
;
GLuint
available
;
GLuint
samples
;
GLuint
queryId
=
((
WineQueryOcclusionData
*
)
This
->
extendedData
)
->
queryId
;
GL_EXTCALL
(
glGetQueryObjectuivARB
(
queryId
,
GL_QUERY_RESULT_AVAILABLE_ARB
,
&
available
));
checkGLcall
(
"glGetQueryObjectiv(GL_QUERY_RESULT_AVAILABLE)
\n
"
);
TRACE
(
"(%p) : available %d.
\n
"
,
This
,
available
);
if
(
available
||
dwGetDataFlags
&
WINED3DGETDATA_FLUSH
)
{
GL_EXTCALL
(
glGetQueryObjectuivARB
(
queryId
,
GL_QUERY_RESULT_ARB
,
&
samples
));
checkGLcall
(
"glGetQueryObjectuiv(GL_QUERY_RESULT)
\n
"
);
TRACE
(
"(%p) : Returning %d samples.
\n
"
,
This
,
samples
);
*
data
=
samples
;
res
=
S_OK
;
}
else
{
res
=
S_FALSE
;
}
}
else
{
FIXME
(
"(%p) : Occlusion queries not supported. Returning 1.
\n
"
,
This
);
*
data
=
1
;
res
=
S_OK
;
}
}
break
;
...
...
@@ -252,7 +266,7 @@ static HRESULT WINAPI IWineD3DQueryImpl_GetData(IWineD3DQuery* iface, void* pDa
D3DGETDATA_FLUSH may return WINED3DERR_DEVICELOST if the device is lost
*/
FIXME
(
"(%p) : type %#x, Partial stub
\n
"
,
This
,
This
->
type
);
return
S_OK
;
/* S_OK if the query data is available*/
return
res
;
/* S_OK if the query data is available*/
}
...
...
include/wine/wined3d_gl.h
View file @
3d2ae691
...
...
@@ -1439,6 +1439,7 @@ typedef enum _GL_SupportedExt {
USE_GL_FUNC(PGLFNBEGINQUERYARBPROC, glBeginQueryARB); \
USE_GL_FUNC(PGLFNENDQUERYARBPROC, glEndQueryARB); \
USE_GL_FUNC(PGLFNGETQUERYOBJECTIVARBPROC, glGetQueryObjectivARB); \
USE_GL_FUNC(PGLFNGETQUERYOBJECTUIVARBPROC, glGetQueryObjectuivARB); \
/* GL_ARB_point_parameters */
\
USE_GL_FUNC(PGLFNGLPOINTPARAMETERFARBPROC, glPointParameterfARB); \
USE_GL_FUNC(PGLFNGLPOINTPARAMETERFVARBPROC, glPointParameterfvARB); \
...
...
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