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
686546b6
Commit
686546b6
authored
Sep 19, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Create wined3d queries for queries.
parent
23981241
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
6 deletions
+44
-6
async.c
dlls/d3d10core/async.c
+33
-1
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+3
-1
device.c
dlls/d3d10core/device.c
+2
-2
device.c
dlls/d3d10core/tests/device.c
+3
-2
wined3d.h
include/wine/wined3d.h
+3
-0
No files found.
dlls/d3d10core/async.c
View file @
686546b6
...
...
@@ -171,10 +171,42 @@ static const struct ID3D10QueryVtbl d3d10_query_vtbl =
d3d10_query_GetDesc
,
};
HRESULT
d3d10_query_init
(
struct
d3d10_query
*
query
,
struct
d3d10_device
*
device
,
BOOL
predicate
)
HRESULT
d3d10_query_init
(
struct
d3d10_query
*
query
,
struct
d3d10_device
*
device
,
const
D3D10_QUERY_DESC
*
desc
,
BOOL
predicate
)
{
HRESULT
hr
;
static
const
enum
wined3d_query_type
query_type_map
[]
=
{
/* D3D10_QUERY_EVENT */
WINED3D_QUERY_TYPE_EVENT
,
/* D3D10_QUERY_OCCLUSION */
WINED3D_QUERY_TYPE_OCCLUSION
,
/* D3D10_QUERY_TIMESTAMP */
WINED3D_QUERY_TYPE_TIMESTAMP
,
/* D3D10_QUERY_TIMESTAMP_DISJOINT */
WINED3D_QUERY_TYPE_TIMESTAMP_DISJOINT
,
/* D3D10_QUERY_PIPELINE_STATISTICS */
WINED3D_QUERY_TYPE_PIPELINE_STATISTICS
,
/* D3D10_QUERY_OCCLUSION_PREDICATE */
WINED3D_QUERY_TYPE_OCCLUSION
,
/* D3D10_QUERY_SO_STATISTICS */
WINED3D_QUERY_TYPE_SO_STATISTICS
,
/* D3D10_QUERY_SO_OVERFLOW_PREDICATE */
WINED3D_QUERY_TYPE_SO_OVERFLOW
,
};
if
(
desc
->
Query
>
sizeof
(
query_type_map
)
/
sizeof
(
*
query_type_map
))
{
FIXME
(
"Unhandled query type %#x.
\n
"
,
desc
->
Query
);
return
E_INVALIDARG
;
}
if
(
desc
->
MiscFlags
)
FIXME
(
"Ignoring MiscFlags %#x.
\n
"
,
desc
->
MiscFlags
);
query
->
ID3D10Query_iface
.
lpVtbl
=
&
d3d10_query_vtbl
;
query
->
refcount
=
1
;
if
(
FAILED
(
hr
=
wined3d_query_create
(
device
->
wined3d_device
,
query_type_map
[
desc
->
Query
],
&
query
->
wined3d_query
)))
{
WARN
(
"Failed to create wined3d query, hr %#x.
\n
"
,
hr
);
return
hr
;
}
query
->
predicate
=
predicate
;
query
->
device
=
&
device
->
ID3D10Device1_iface
;
ID3D10Device1_AddRef
(
query
->
device
);
...
...
dlls/d3d10core/d3d10core_private.h
View file @
686546b6
...
...
@@ -297,11 +297,13 @@ struct d3d10_query
ID3D10Query
ID3D10Query_iface
;
LONG
refcount
;
struct
wined3d_query
*
wined3d_query
;
BOOL
predicate
;
ID3D10Device1
*
device
;
};
HRESULT
d3d10_query_init
(
struct
d3d10_query
*
query
,
struct
d3d10_device
*
device
,
BOOL
predicate
)
DECLSPEC_HIDDEN
;
HRESULT
d3d10_query_init
(
struct
d3d10_query
*
query
,
struct
d3d10_device
*
device
,
const
D3D10_QUERY_DESC
*
desc
,
BOOL
predicate
)
DECLSPEC_HIDDEN
;
/* IDirect3D10Device1 */
struct
d3d10_device
...
...
dlls/d3d10core/device.c
View file @
686546b6
...
...
@@ -1722,7 +1722,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateQuery(ID3D10Device1 *iface,
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
FAILED
(
hr
=
d3d10_query_init
(
object
,
device
,
FALSE
)))
if
(
FAILED
(
hr
=
d3d10_query_init
(
object
,
device
,
desc
,
FALSE
)))
{
WARN
(
"Failed to initialize query, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
...
...
@@ -1756,7 +1756,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreatePredicate(ID3D10Device1 *ifa
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
FAILED
(
hr
=
d3d10_query_init
(
object
,
device
,
TRUE
)))
if
(
FAILED
(
hr
=
d3d10_query_init
(
object
,
device
,
desc
,
TRUE
)))
{
WARN
(
"Failed to initialize predicate, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
...
...
dlls/d3d10core/tests/device.c
View file @
686546b6
...
...
@@ -961,8 +961,9 @@ static void test_create_predicate(void)
query_desc
.
Query
=
D3D10_QUERY_SO_OVERFLOW_PREDICATE
;
hr
=
ID3D10Device_CreatePredicate
(
device
,
&
query_desc
,
&
predicate
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create predicate, hr %#x.
\n
"
,
hr
);
ID3D10Predicate_Release
(
predicate
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to create predicate, hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
ID3D10Predicate_Release
(
predicate
);
refcount
=
ID3D10Device_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
...
...
include/wine/wined3d.h
View file @
686546b6
...
...
@@ -694,6 +694,9 @@ enum wined3d_pool
enum
wined3d_query_type
{
WINED3D_QUERY_TYPE_PIPELINE_STATISTICS
=
1
,
WINED3D_QUERY_TYPE_SO_STATISTICS
=
2
,
WINED3D_QUERY_TYPE_SO_OVERFLOW
=
3
,
WINED3D_QUERY_TYPE_VCACHE
=
4
,
WINED3D_QUERY_TYPE_RESOURCE_MANAGER
=
5
,
WINED3D_QUERY_TYPE_VERTEX_STATS
=
6
,
...
...
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