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
7b84e323
Commit
7b84e323
authored
May 30, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
May 31, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Implement d3d10_device_CreatePredicate().
parent
e4f50de3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
7 deletions
+37
-7
async.c
dlls/d3d10core/async.c
+6
-2
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+3
-1
device.c
dlls/d3d10core/device.c
+28
-4
No files found.
dlls/d3d10core/async.c
View file @
7b84e323
...
...
@@ -33,9 +33,12 @@ static inline struct d3d10_query *impl_from_ID3D10Query(ID3D10Query *iface)
static
HRESULT
STDMETHODCALLTYPE
d3d10_query_QueryInterface
(
ID3D10Query
*
iface
,
REFIID
riid
,
void
**
object
)
{
struct
d3d10_query
*
query
=
impl_from_ID3D10Query
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
if
(
IsEqualGUID
(
riid
,
&
IID_ID3D10Query
)
if
((
IsEqualGUID
(
riid
,
&
IID_ID3D10Predicate
)
&&
query
->
predicate
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D10Query
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D10Asynchronous
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D10DeviceChild
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
...
...
@@ -162,10 +165,11 @@ static const struct ID3D10QueryVtbl d3d10_query_vtbl =
d3d10_query_GetDesc
,
};
HRESULT
d3d10_query_init
(
struct
d3d10_query
*
query
)
HRESULT
d3d10_query_init
(
struct
d3d10_query
*
query
,
BOOL
predicate
)
{
query
->
ID3D10Query_iface
.
lpVtbl
=
&
d3d10_query_vtbl
;
query
->
refcount
=
1
;
query
->
predicate
=
predicate
;
return
S_OK
;
}
dlls/d3d10core/d3d10core_private.h
View file @
7b84e323
...
...
@@ -278,9 +278,11 @@ struct d3d10_query
{
ID3D10Query
ID3D10Query_iface
;
LONG
refcount
;
BOOL
predicate
;
};
HRESULT
d3d10_query_init
(
struct
d3d10_query
*
query
)
DECLSPEC_HIDDEN
;
HRESULT
d3d10_query_init
(
struct
d3d10_query
*
query
,
BOOL
predicate
)
DECLSPEC_HIDDEN
;
/* IDirect3D10Device */
struct
d3d10_device
...
...
dlls/d3d10core/device.c
View file @
7b84e323
...
...
@@ -1532,8 +1532,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateQuery(ID3D10Device *iface,
if
(
!
object
)
return
E_OUTOFMEMORY
;
hr
=
d3d10_query_init
(
object
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
=
d3d10_query_init
(
object
,
FALSE
)))
{
WARN
(
"Failed to initialize query, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
...
...
@@ -1549,9 +1548,34 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateQuery(ID3D10Device *iface,
static
HRESULT
STDMETHODCALLTYPE
d3d10_device_CreatePredicate
(
ID3D10Device
*
iface
,
const
D3D10_QUERY_DESC
*
desc
,
ID3D10Predicate
**
predicate
)
{
FIXME
(
"iface %p, desc %p, predicate %p stub!
\n
"
,
iface
,
desc
,
predicate
);
struct
d3d10_query
*
object
;
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"iface %p, desc %p, predicate %p.
\n
"
,
iface
,
desc
,
predicate
);
if
(
!
desc
)
return
E_INVALIDARG
;
if
(
desc
->
Query
!=
D3D10_QUERY_OCCLUSION_PREDICATE
&&
desc
->
Query
!=
D3D10_QUERY_SO_OVERFLOW_PREDICATE
)
{
WARN
(
"Query type %#x is not a predicate.
\n
"
,
desc
->
Query
);
return
E_INVALIDARG
;
}
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
FAILED
(
hr
=
d3d10_query_init
(
object
,
TRUE
)))
{
WARN
(
"Failed to initialize predicate, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created predicate %p.
\n
"
,
object
);
*
predicate
=
(
ID3D10Predicate
*
)
&
object
->
ID3D10Query_iface
;
return
S_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d10_device_CreateCounter
(
ID3D10Device
*
iface
,
...
...
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