nvc0: write 0 to pipeline_statistics.cs_invocations
authorKarol Herbst <karolherbst@gmail.com>
Sun, 27 Aug 2017 16:00:52 +0000 (18:00 +0200)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 1 Sep 2017 02:57:22 +0000 (22:57 -0400)
cs_invocations are currently unsupported, but leaving the field uninitialized
is even worse.

fixes on nvc0:
 * KHR-GL45.pipeline_statistics_query_tests_ARB.functional_default_qo_values
 * KHR-GL45.pipeline_statistics_query_tests_ARB.functional_non_rendering_commands_do_not_affect_queries

Signed-off-by: Karol Herbst <karolherbst@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c

index 0991af872bed75dfddee0477ecce0609cb77eee8..d8d82de8650904aa3029dac771a274de4020661b 100644 (file)
@@ -346,6 +346,7 @@ nvc0_hw_get_query_result(struct nvc0_context *nvc0, struct nvc0_query *q,
    case PIPE_QUERY_PIPELINE_STATISTICS:
       for (i = 0; i < 10; ++i)
          res64[i] = data64[i * 2] - data64[24 + i * 2];
+      result->pipeline_statistics.cs_invocations = 0;
       break;
    case NVC0_HW_QUERY_TFB_BUFFER_OFFSET:
       res32[0] = hq->data[1];