Module: Mesa
Branch: master
Commit: ea12fc3f6c154ac32573f6c0039af21676ad1c18
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ea12fc3f6c154ac32573f6c0039af21676ad1c18

Author: Christoph Bumiller <e0425...@student.tuwien.ac.at>
Date:   Fri Mar 29 15:11:16 2013 +0100

nvc0: use correct hw query for PRIMITIVES_GENERATED

It was the same as SO_STATISTICS[1] before.

---

 src/gallium/drivers/nvc0/nvc0_query.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/nvc0/nvc0_query.c 
b/src/gallium/drivers/nvc0/nvc0_query.c
index cd0dacd..2c8fcfa 100644
--- a/src/gallium/drivers/nvc0/nvc0_query.c
+++ b/src/gallium/drivers/nvc0/nvc0_query.c
@@ -129,12 +129,15 @@ nvc0_query_create(struct pipe_context *pipe, unsigned 
type)
       q->is64bit = TRUE;
       space = 64;
       break;
+   case PIPE_QUERY_PRIMITIVES_GENERATED:
+   case PIPE_QUERY_PRIMITIVES_EMITTED:
+      q->is64bit = TRUE;
+      space = 32;
+      break;
    case PIPE_QUERY_TIME_ELAPSED:
    case PIPE_QUERY_TIMESTAMP:
    case PIPE_QUERY_TIMESTAMP_DISJOINT:
    case PIPE_QUERY_GPU_FINISHED:
-   case PIPE_QUERY_PRIMITIVES_GENERATED:
-   case PIPE_QUERY_PRIMITIVES_EMITTED:
       space = 32;
       break;
    case NVC0_QUERY_TFB_BUFFER_OFFSET:
@@ -234,7 +237,7 @@ nvc0_query_begin(struct pipe_context *pipe, struct 
pipe_query *pq)
       }
       break;
    case PIPE_QUERY_PRIMITIVES_GENERATED:
-      nvc0_query_get(push, q, 0x10, 0x06805002 | (q->index << 5));
+      nvc0_query_get(push, q, 0x10, 0x09005002 | (q->index << 5));
       break;
    case PIPE_QUERY_PRIMITIVES_EMITTED:
       nvc0_query_get(push, q, 0x10, 0x05805002 | (q->index << 5));
@@ -295,7 +298,7 @@ nvc0_query_end(struct pipe_context *pipe, struct pipe_query 
*pq)
       }
       break;
    case PIPE_QUERY_PRIMITIVES_GENERATED:
-      nvc0_query_get(push, q, 0, 0x06805002 | (q->index << 5));
+      nvc0_query_get(push, q, 0, 0x09005002 | (q->index << 5));
       break;
    case PIPE_QUERY_PRIMITIVES_EMITTED:
       nvc0_query_get(push, q, 0, 0x05805002 | (q->index << 5));

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to