diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_queryobj.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_queryobj.c b/src/mesa/drivers/dri/i965/gen6_queryobj.c index 09b66ca73a1..6431ed56d81 100644 --- a/src/mesa/drivers/dri/i965/gen6_queryobj.c +++ b/src/mesa/drivers/dri/i965/gen6_queryobj.c @@ -147,6 +147,11 @@ emit_pipeline_stat(struct brw_context *brw, drm_intel_bo *bo, }; STATIC_ASSERT(ARRAY_SIZE(target_to_register) == MAX_PIPELINE_STATISTICS); uint32_t reg = target_to_register[pipeline_target_to_index(target)]; + /* Gen6 GS code counts full primitives, that is, it won't count individual + * triangles in a triangle strip. Use CL_INVOCATION_COUNT for that. + */ + if (brw->gen == 6 && target == GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB) + reg = CL_INVOCATION_COUNT; assert(reg != 0); /* Emit a flush to make sure various parts of the pipeline are complete and |