[Bug 89210] GS statistics fail on SNB

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Feb 19 02:25:25 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=89210

--- Comment #5 from Iago Toral <itoral at igalia.com> ---
Ok, so the problem is that, at least in gen6, we need to compute the number of
primitives emitted by the GS state manually adding assembly code to the
generated GS program (see gen6_gs_visitor.cpp, prim_count field).

Right now we are counting full-primitives only, that is, we increment the
primitive count when EndPrimitive() is called (explicitly or implicitly), so
for things such as triangle strips we count just one primitive, not the
individual triangles within the strip.

If this behavior is not what we expect then I think there are two ways to fix
this:

1) Simply use CL_PRIMITIVE_COUNT to resolve this query (this is what we have
been using all this time to resolve GL_PRIMITIVES_GENERATED).

2) Re-write the assembly code we generate for the GS stage so we handle things
different for strip primitives: for N vertices we generate a primitive count
N-2 for triangle strips and fans, N-1 (for line strips) and we leave the
current implementation for other primitives.

If 1) is enough to fix all the needs we have regarding this I'd favor that
approach, since that would be an easy fix. I'll attach a patch for that shortly
too.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20150219/c616f6fe/attachment.html>


More information about the intel-3d-bugs mailing list