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
92e9f440
Commit
92e9f440
authored
Jul 28, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Unify the query issue() implementations.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
70889d68
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
31 deletions
+13
-31
query.c
dlls/wined3d/query.c
+12
-30
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/query.c
View file @
92e9f440
...
...
@@ -350,7 +350,14 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
{
TRACE
(
"query %p, flags %#x.
\n
"
,
query
,
flags
);
return
query
->
query_ops
->
query_issue
(
query
,
flags
);
query
->
query_ops
->
query_issue
(
query
,
flags
);
if
(
flags
&
WINED3DISSUE_BEGIN
)
query
->
state
=
QUERY_BUILDING
;
else
query
->
state
=
QUERY_SIGNALLED
;
return
WINED3D_OK
;
}
static
BOOL
wined3d_occlusion_query_ops_poll
(
struct
wined3d_query
*
query
)
...
...
@@ -434,7 +441,7 @@ enum wined3d_query_type CDECL wined3d_query_get_type(const struct wined3d_query
return
query
->
type
;
}
static
HRESULT
wined3d_event_query_ops_issue
(
struct
wined3d_query
*
query
,
DWORD
flags
)
static
void
wined3d_event_query_ops_issue
(
struct
wined3d_query
*
query
,
DWORD
flags
)
{
TRACE
(
"query %p, flags %#x.
\n
"
,
query
,
flags
);
...
...
@@ -449,16 +456,9 @@ static HRESULT wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD
/* Started implicitly at query creation. */
ERR
(
"Event query issued with START flag - what to do?
\n
"
);
}
if
(
flags
&
WINED3DISSUE_BEGIN
)
query
->
state
=
QUERY_BUILDING
;
else
query
->
state
=
QUERY_SIGNALLED
;
return
WINED3D_OK
;
}
static
HRESULT
wined3d_occlusion_query_ops_issue
(
struct
wined3d_query
*
query
,
DWORD
flags
)
static
void
wined3d_occlusion_query_ops_issue
(
struct
wined3d_query
*
query
,
DWORD
flags
)
{
struct
wined3d_occlusion_query
*
oq
=
wined3d_occlusion_query_from_query
(
query
);
struct
wined3d_device
*
device
=
query
->
device
;
...
...
@@ -524,13 +524,6 @@ static HRESULT wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DW
}
}
}
if
(
flags
&
WINED3DISSUE_BEGIN
)
query
->
state
=
QUERY_BUILDING
;
else
query
->
state
=
QUERY_SIGNALLED
;
return
WINED3D_OK
;
/* can be WINED3DERR_INVALIDCALL. */
}
static
BOOL
wined3d_timestamp_query_ops_poll
(
struct
wined3d_query
*
query
)
...
...
@@ -571,7 +564,7 @@ static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query)
return
available
;
}
static
HRESULT
wined3d_timestamp_query_ops_issue
(
struct
wined3d_query
*
query
,
DWORD
flags
)
static
void
wined3d_timestamp_query_ops_issue
(
struct
wined3d_query
*
query
,
DWORD
flags
)
{
struct
wined3d_timestamp_query
*
tq
=
wined3d_timestamp_query_from_query
(
query
);
struct
wined3d_device
*
device
=
query
->
device
;
...
...
@@ -593,11 +586,7 @@ static HRESULT wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DW
GL_EXTCALL
(
glQueryCounter
(
tq
->
id
,
GL_TIMESTAMP
));
checkGLcall
(
"glQueryCounter()"
);
context_release
(
context
);
query
->
state
=
QUERY_SIGNALLED
;
}
return
WINED3D_OK
;
}
static
BOOL
wined3d_timestamp_disjoint_query_ops_poll
(
struct
wined3d_query
*
query
)
...
...
@@ -607,16 +596,9 @@ static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *quer
return
TRUE
;
}
static
HRESULT
wined3d_timestamp_disjoint_query_ops_issue
(
struct
wined3d_query
*
query
,
DWORD
flags
)
static
void
wined3d_timestamp_disjoint_query_ops_issue
(
struct
wined3d_query
*
query
,
DWORD
flags
)
{
TRACE
(
"query %p, flags %#x.
\n
"
,
query
,
flags
);
if
(
flags
&
WINED3DISSUE_BEGIN
)
query
->
state
=
QUERY_BUILDING
;
if
(
flags
&
WINED3DISSUE_END
)
query
->
state
=
QUERY_SIGNALLED
;
return
WINED3D_OK
;
}
static
const
struct
wined3d_query_ops
event_query_ops
=
...
...
dlls/wined3d/wined3d_private.h
View file @
92e9f440
...
...
@@ -1380,7 +1380,7 @@ enum wined3d_query_state
struct
wined3d_query_ops
{
BOOL
(
*
query_poll
)(
struct
wined3d_query
*
query
);
HRESULT
(
*
query_issue
)(
struct
wined3d_query
*
query
,
DWORD
flags
);
void
(
*
query_issue
)(
struct
wined3d_query
*
query
,
DWORD
flags
);
};
struct
wined3d_query
...
...
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