Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
3d2ae691
Commit
3d2ae691
authored
18 years ago
by
Henri Verbeet
Committed by
Alexandre Julliard
18 years ago
Browse files
Options
Downloads
Patches
Plain Diff
wined3d: Allow async occlusion queries.
parent
008c23d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/wined3d/query.c
+20
-6
20 additions, 6 deletions
dlls/wined3d/query.c
include/wine/wined3d_gl.h
+1
-0
1 addition, 0 deletions
include/wine/wined3d_gl.h
with
21 additions
and
6 deletions
dlls/wined3d/query.c
+
20
−
6
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*/
}
...
...
This diff is collapsed.
Click to expand it.
include/wine/wined3d_gl.h
+
1
−
0
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); \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment