[Mesa-dev] [PATCH 3/9] st/mesa: map semantic driver query types to underlying type
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Nov 13 09:34:38 PST 2015
On 11/13/2015 04:57 PM, Nicolai Hähnle wrote:
> ---
> src/gallium/include/pipe/p_defines.h | 2 ++
> src/mesa/state_tracker/st_cb_perfmon.c | 3 +++
> 2 files changed, 5 insertions(+)
>
> diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
> index 7f241c8..7ed9f6d 100644
> --- a/src/gallium/include/pipe/p_defines.h
> +++ b/src/gallium/include/pipe/p_defines.h
> @@ -791,6 +791,8 @@ union pipe_query_result
> /* PIPE_QUERY_PRIMITIVES_GENERATED */
> /* PIPE_QUERY_PRIMITIVES_EMITTED */
> /* PIPE_DRIVER_QUERY_TYPE_UINT64 */
> + /* PIPE_DRIVER_QUERY_TYPE_BYTES */
> + /* PIPE_DRIVER_QUERY_TYPE_MICROSECONDS */
When you are at it, please also add /*
PIPE_DRIVER_QUERY_TYPE_MICROSECONDS */ to pipe_query_result.
With this minor change, this patch is:
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> /* PIPE_DRIVER_QUERY_TYPE_HZ */
> uint64_t u64;
>
> diff --git a/src/mesa/state_tracker/st_cb_perfmon.c b/src/mesa/state_tracker/st_cb_perfmon.c
> index 4ec6d86..dedb8f5 100644
> --- a/src/mesa/state_tracker/st_cb_perfmon.c
> +++ b/src/mesa/state_tracker/st_cb_perfmon.c
> @@ -334,6 +334,9 @@ st_init_perfmon(struct st_context *st)
> c->Name = info.name;
> switch (info.type) {
> case PIPE_DRIVER_QUERY_TYPE_UINT64:
> + case PIPE_DRIVER_QUERY_TYPE_BYTES:
> + case PIPE_DRIVER_QUERY_TYPE_MICROSECONDS:
> + case PIPE_DRIVER_QUERY_TYPE_HZ:
> c->Minimum.u64 = 0;
> c->Maximum.u64 = info.max_value.u64 ? info.max_value.u64 : -1;
> c->Type = GL_UNSIGNED_INT64_AMD;
>
--
-Samuel
More information about the mesa-dev
mailing list