st/mesa: map semantic driver query types to underlying type
authorNicolai Hähnle <nhaehnle@gmail.com>
Fri, 6 Nov 2015 13:19:54 +0000 (14:19 +0100)
committerNicolai Hähnle <nhaehnle@gmail.com>
Fri, 20 Nov 2015 16:26:59 +0000 (17:26 +0100)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/gallium/include/pipe/p_defines.h
src/mesa/state_tracker/st_cb_perfmon.c

index 7f241c8cad4623ca1e7f539b5e0799e220a5f04c..7ed9f6df3f78035dccfc25bd9dfdafa36d5614f5 100644 (file)
@@ -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 */
    /* PIPE_DRIVER_QUERY_TYPE_HZ */
    uint64_t u64;
 
index 4ec6d86d6ba110c99d3d24f447bd1ecb27dec9d2..dedb8f520f4b3e7ccc18c3087f8ec9cc0f78dfe1 100644 (file)
@@ -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;