[Mesa-dev,17/18] i965: Implement GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN with non-zero streams.

Submitted by Iago Toral Quiroga on June 11, 2014, 7:49 a.m.

Details

Message ID 1402472981-22428-18-git-send-email-itoral@igalia.com
State Accepted
Commit a374685f092cbe57aae89e6977b8bdde0c8ec623
Headers show

Not browsing as part of any series.

Commit Message

Iago Toral Quiroga June 11, 2014, 7:49 a.m.
---
 src/mesa/drivers/dri/i965/gen6_queryobj.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/mesa/drivers/dri/i965/gen6_queryobj.c b/src/mesa/drivers/dri/i965/gen6_queryobj.c
index 06ac645..0cb64ca 100644
--- a/src/mesa/drivers/dri/i965/gen6_queryobj.c
+++ b/src/mesa/drivers/dri/i965/gen6_queryobj.c
@@ -93,12 +93,12 @@  write_primitives_generated(struct brw_context *brw,
 
 static void
 write_xfb_primitives_written(struct brw_context *brw,
-                             drm_intel_bo *bo, int idx)
+                             drm_intel_bo *bo, int stream, int idx)
 {
    intel_batchbuffer_emit_mi_flush(brw);
 
    if (brw->gen >= 7) {
-      brw_store_register_mem64(brw, bo, GEN7_SO_NUM_PRIMS_WRITTEN(0), idx);
+      brw_store_register_mem64(brw, bo, GEN7_SO_NUM_PRIMS_WRITTEN(stream), idx);
    } else {
       brw_store_register_mem64(brw, bo, GEN6_SO_NUM_PRIMS_WRITTEN, idx);
    }
@@ -244,7 +244,7 @@  gen6_begin_query(struct gl_context *ctx, struct gl_query_object *q)
       break;
 
    case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:
-      write_xfb_primitives_written(brw, query->bo, 0);
+      write_xfb_primitives_written(brw, query->bo, query->Base.Stream, 0);
       break;
 
    default:
@@ -283,7 +283,7 @@  gen6_end_query(struct gl_context *ctx, struct gl_query_object *q)
       break;
 
    case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:
-      write_xfb_primitives_written(brw, query->bo, 1);
+      write_xfb_primitives_written(brw, query->bo, query->Base.Stream, 1);
       break;
 
    default: