diff options
author | Chia-I Wu <[email protected]> | 2014-09-24 13:11:25 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2014-09-26 21:15:55 +0800 |
commit | 3afe30e64be7f4686398f826389159d87d8ae096 (patch) | |
tree | 99b0c56d4537cbbbb5fb397094ec4179809d88b6 /src/gallium/drivers/ilo/ilo_query.c | |
parent | b6443ae969f613458635f043f322ba362e671254 (diff) |
ilo: remove struct ilo_3d
Move members of ilo_3d that still make sense to ilo_context. With ilo_3d
gone, rename functions whose names begin with ilo_3d to something more
appropriate.
Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_query.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_query.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/gallium/drivers/ilo/ilo_query.c b/src/gallium/drivers/ilo/ilo_query.c index 8ab333e43c6..942df2d683d 100644 --- a/src/gallium/drivers/ilo/ilo_query.c +++ b/src/gallium/drivers/ilo/ilo_query.c @@ -33,30 +33,30 @@ #include "ilo_query.h" static const struct { - bool (*init)(struct pipe_context *pipe, struct ilo_query *q); - void (*begin)(struct pipe_context *pipe, struct ilo_query *q); - void (*end)(struct pipe_context *pipe, struct ilo_query *q); - void (*process)(struct pipe_context *pipe, struct ilo_query *q); + bool (*init)(struct ilo_context *ilo, struct ilo_query *q); + void (*begin)(struct ilo_context *ilo, struct ilo_query *q); + void (*end)(struct ilo_context *ilo, struct ilo_query *q); + void (*process)(struct ilo_context *ilo, struct ilo_query *q); } ilo_query_table[PIPE_QUERY_TYPES] = { -#define INFO(prefix) { \ - .init = prefix ## _init_query, \ - .begin = prefix ## _begin_query, \ - .end = prefix ## _end_query, \ - .process = prefix ## _process_query, \ +#define INFO(mod) { \ + .init = ilo_init_ ## mod ## _query, \ + .begin = ilo_begin_ ## mod ## _query, \ + .end = ilo_end_ ## mod ## _query, \ + .process = ilo_process_ ## mod ## _query, \ } #define INFOX(prefix) { NULL, NULL, NULL, NULL, } - [PIPE_QUERY_OCCLUSION_COUNTER] = INFO(ilo_3d), - [PIPE_QUERY_OCCLUSION_PREDICATE] = INFOX(ilo_3d), - [PIPE_QUERY_TIMESTAMP] = INFO(ilo_3d), - [PIPE_QUERY_TIMESTAMP_DISJOINT] = INFOX(ilo_3d), - [PIPE_QUERY_TIME_ELAPSED] = INFO(ilo_3d), - [PIPE_QUERY_PRIMITIVES_GENERATED] = INFO(ilo_3d), - [PIPE_QUERY_PRIMITIVES_EMITTED] = INFO(ilo_3d), - [PIPE_QUERY_SO_STATISTICS] = INFOX(ilo_3d), - [PIPE_QUERY_SO_OVERFLOW_PREDICATE] = INFOX(ilo_3d), - [PIPE_QUERY_GPU_FINISHED] = INFOX(ilo_3d), - [PIPE_QUERY_PIPELINE_STATISTICS] = INFO(ilo_3d), + [PIPE_QUERY_OCCLUSION_COUNTER] = INFO(draw), + [PIPE_QUERY_OCCLUSION_PREDICATE] = INFOX(draw), + [PIPE_QUERY_TIMESTAMP] = INFO(draw), + [PIPE_QUERY_TIMESTAMP_DISJOINT] = INFOX(draw), + [PIPE_QUERY_TIME_ELAPSED] = INFO(draw), + [PIPE_QUERY_PRIMITIVES_GENERATED] = INFO(draw), + [PIPE_QUERY_PRIMITIVES_EMITTED] = INFO(draw), + [PIPE_QUERY_SO_STATISTICS] = INFOX(draw), + [PIPE_QUERY_SO_OVERFLOW_PREDICATE] = INFOX(draw), + [PIPE_QUERY_GPU_FINISHED] = INFOX(draw), + [PIPE_QUERY_PIPELINE_STATISTICS] = INFO(draw), #undef INFO #undef INFOX @@ -94,7 +94,7 @@ ilo_create_query(struct pipe_context *pipe, unsigned query_type, unsigned index) list_inithead(&q->list); - if (!ilo_query_table[q->type].init(pipe, q)) { + if (!ilo_query_table[q->type].init(ilo_context(pipe), q)) { FREE(q); return NULL; } @@ -125,7 +125,7 @@ ilo_begin_query(struct pipe_context *pipe, struct pipe_query *query) q->used = 0; q->active = true; - ilo_query_table[q->type].begin(pipe, q); + ilo_query_table[q->type].begin(ilo_context(pipe), q); } static void @@ -143,7 +143,7 @@ ilo_end_query(struct pipe_context *pipe, struct pipe_query *query) q->active = false; - ilo_query_table[q->type].end(pipe, q); + ilo_query_table[q->type].end(ilo_context(pipe), q); } /** @@ -208,7 +208,7 @@ ilo_get_query_result(struct pipe_context *pipe, struct pipe_query *query, return false; } - ilo_query_table[q->type].process(pipe, q); + ilo_query_table[q->type].process(ilo_context(pipe), q); if (result) query_serialize(q, (void *) result); |