diff options
author | Chia-I Wu <[email protected]> | 2014-03-02 14:02:12 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2014-03-10 16:43:53 +0800 |
commit | 5ecdd7ba22945ce4e3a10b26c6f34a19eceeb289 (patch) | |
tree | 7ea78441c0de086880a1580c51b4f769c04c3c73 /src/gallium/drivers/ilo/ilo_query.c | |
parent | 8fc2f0c874929a391c0369c8a12839caf786dfc6 (diff) |
ilo: add support for PIPE_QUERY_PIPELINE_STATISTICS
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_query.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_query.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/gallium/drivers/ilo/ilo_query.c b/src/gallium/drivers/ilo/ilo_query.c index 6a7da7f2730..71bcc0f983f 100644 --- a/src/gallium/drivers/ilo/ilo_query.c +++ b/src/gallium/drivers/ilo/ilo_query.c @@ -57,7 +57,7 @@ static const struct { [PIPE_QUERY_SO_STATISTICS] = INFOX(ilo_3d, "so statistics"), [PIPE_QUERY_SO_OVERFLOW_PREDICATE] = INFOX(ilo_3d, "so overflow pred."), [PIPE_QUERY_GPU_FINISHED] = INFOX(ilo_3d, "gpu finished"), - [PIPE_QUERY_PIPELINE_STATISTICS] = INFOX(ilo_3d, "pipeline statistics"), + [PIPE_QUERY_PIPELINE_STATISTICS] = INFO(ilo_3d, "pipeline statistics"), #undef INFO #undef INFOX @@ -80,6 +80,7 @@ ilo_create_query(struct pipe_context *pipe, unsigned query_type) case PIPE_QUERY_TIME_ELAPSED: case PIPE_QUERY_PRIMITIVES_GENERATED: case PIPE_QUERY_PRIMITIVES_EMITTED: + case PIPE_QUERY_PIPELINE_STATISTICS: break; default: return NULL; @@ -151,6 +152,22 @@ serialize_query_data(unsigned type, const union pipe_query_result *data, r[0] = data->u64; } break; + case PIPE_QUERY_PIPELINE_STATISTICS: + { + uint64_t *r = buf; + r[0] = data->pipeline_statistics.ia_vertices; + r[1] = data->pipeline_statistics.ia_primitives; + r[2] = data->pipeline_statistics.vs_invocations; + r[3] = data->pipeline_statistics.gs_invocations; + r[4] = data->pipeline_statistics.gs_primitives; + r[5] = data->pipeline_statistics.c_invocations; + r[6] = data->pipeline_statistics.c_primitives; + r[7] = data->pipeline_statistics.ps_invocations; + r[8] = data->pipeline_statistics.hs_invocations; + r[9] = data->pipeline_statistics.ds_invocations; + r[10] = data->pipeline_statistics.cs_invocations; + } + break; default: memset(buf, 0, sizeof(union pipe_query_result)); break; |