gallium: replace INLINE with inline
[mesa.git] / src / gallium / state_trackers / nine / query9.h
1 /*
2 * Copyright 2011 Joakim Sindholt <opensource@zhasha.com>
3 *
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:
10 *
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
13 * Software.
14 *
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. */
22
23 #ifndef _NINE_QUERY9_H_
24 #define _NINE_QUERY9_H_
25
26 #include "iunknown.h"
27
28 enum nine_query_state
29 {
30 NINE_QUERY_STATE_FRESH = 0,
31 NINE_QUERY_STATE_RUNNING,
32 NINE_QUERY_STATE_ENDED,
33 };
34
35 struct NineQuery9
36 {
37 struct NineUnknown base;
38 struct pipe_query *pq;
39 DWORD result_size;
40 D3DQUERYTYPE type;
41 enum nine_query_state state;
42 boolean instant; /* true if D3DISSUE_BEGIN is not needed / invalid */
43 };
44 static inline struct NineQuery9 *
45 NineQuery9( void *data )
46 {
47 return (struct NineQuery9 *)data;
48 }
49
50 HRESULT
51 nine_is_query_supported(struct pipe_screen *screen, D3DQUERYTYPE);
52
53 HRESULT
54 NineQuery9_new( struct NineDevice9 *Device,
55 struct NineQuery9 **ppOut,
56 D3DQUERYTYPE);
57
58 HRESULT
59 NineQuery9_ctor( struct NineQuery9 *,
60 struct NineUnknownParams *pParams,
61 D3DQUERYTYPE Type );
62
63 void
64 NineQuery9_dtor( struct NineQuery9 * );
65
66 D3DQUERYTYPE WINAPI
67 NineQuery9_GetType( struct NineQuery9 *This );
68
69 DWORD WINAPI
70 NineQuery9_GetDataSize( struct NineQuery9 *This );
71
72 HRESULT WINAPI
73 NineQuery9_Issue( struct NineQuery9 *This,
74 DWORD dwIssueFlags );
75
76 HRESULT WINAPI
77 NineQuery9_GetData( struct NineQuery9 *This,
78 void *pData,
79 DWORD dwSize,
80 DWORD dwGetDataFlags );
81
82 #endif /* _NINE_QUERY9_H_ */