24746e78771a1aafc540467b4a231469a766f658
[profile/ivi/mesa.git] / src / gallium / drivers / r600 / r600_query.c
1 /*
2  * Copyright 2010 Jerome Glisse <glisse@freedesktop.org>
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  * Authors:
24  *      Jerome Glisse
25  *      Corbin Simpson
26  */
27 #include <util/u_inlines.h>
28 #include <util/u_format.h>
29 #include <util/u_memory.h>
30 #include "r600_screen.h"
31 #include "r600_context.h"
32
33 static struct pipe_query *r600_create_query(struct pipe_context *pipe, unsigned query_type)
34 {
35         return NULL;
36 }
37
38 static void r600_destroy_query(struct pipe_context *pipe, struct pipe_query *query)
39 {
40         FREE(query);
41 }
42
43 static void r600_begin_query(struct pipe_context *pipe, struct pipe_query *query)
44 {
45 }
46
47 static void r600_end_query(struct pipe_context *pipe, struct pipe_query *query)
48 {
49 }
50
51 static boolean r600_get_query_result(struct pipe_context *pipe,
52                                         struct pipe_query *query,
53                                         boolean wait, uint64_t *result)
54 {
55         return TRUE;
56 }
57
58 void r600_init_query_functions(struct r600_context* rctx)
59 {
60         rctx->context.create_query = r600_create_query;
61         rctx->context.destroy_query = r600_destroy_query;
62         rctx->context.begin_query = r600_begin_query;
63         rctx->context.end_query = r600_end_query;
64         rctx->context.get_query_result = r600_get_query_result;
65 }