2 * Copyright 2011 Joakim Sindholt <opensource@zhasha.com>
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * on the rights to use, copy, modify, merge, publish, distribute, sub
8 * license, and/or sell copies of the Software, and to permit persons to whom
9 * the Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
19 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
21 * USE OR OTHER DEALINGS IN THE SOFTWARE. */
23 #ifndef _NINE_QUERY9_H_
24 #define _NINE_QUERY9_H_
30 NINE_QUERY_STATE_FRESH
= 0,
31 NINE_QUERY_STATE_RUNNING
,
32 NINE_QUERY_STATE_ENDED
,
37 struct NineUnknown base
;
38 struct pipe_query
*pq
;
41 enum nine_query_state state
;
42 boolean instant
; /* true if D3DISSUE_BEGIN is not needed / invalid */
43 unsigned counter
; /* Number of pending Begin/End (0 if internal multithreading off) */
45 static inline struct NineQuery9
*
46 NineQuery9( void *data
)
48 return (struct NineQuery9
*)data
;
52 nine_is_query_supported(struct pipe_screen
*screen
, D3DQUERYTYPE
);
55 NineQuery9_new( struct NineDevice9
*Device
,
56 struct NineQuery9
**ppOut
,
60 NineQuery9_ctor( struct NineQuery9
*,
61 struct NineUnknownParams
*pParams
,
65 NineQuery9_dtor( struct NineQuery9
* );
67 D3DQUERYTYPE NINE_WINAPI
68 NineQuery9_GetType( struct NineQuery9
*This
);
71 NineQuery9_GetDataSize( struct NineQuery9
*This
);
74 NineQuery9_Issue( struct NineQuery9
*This
,
78 NineQuery9_GetData( struct NineQuery9
*This
,
81 DWORD dwGetDataFlags
);
83 #endif /* _NINE_QUERY9_H_ */