<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - gl_PrimitiveId seems to reset at 340"
href="https://bugs.freedesktop.org/show_bug.cgi?id=90130#c9">Comment # 9</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - gl_PrimitiveId seems to reset at 340"
href="https://bugs.freedesktop.org/show_bug.cgi?id=90130">bug 90130</a>
from <span class="vcard"><a class="email" href="mailto:kennethmorrismartin@gmail.com" title="Ken Martin <kennethmorrismartin@gmail.com>"> <span class="fn">Ken Martin</span></a>
</span></b>
<pre>(In reply to Roland Scheidegger from <a href="show_bug.cgi?id=90130#c5">comment #5</a>)
<span class="quote">> Or even better, a piglit test :-).
>
> I suspect there's an issue with the prim assembler in draw.
> Since from a quick look it seems like the prim assembler would always reset
> the prim_id it's going to inject whenever it's run, and that's going to
> happen per chunk (as we don't process all vertices in a draw call at once if
> there's too many). Probably would need to fix that somehow so it's only
> reset per instance.
> We possibly (?) handle this correctly if there's a gs.</span >
(In reply to Roland Scheidegger from <a href="show_bug.cgi?id=90130#c5">comment #5</a>)
<span class="quote">> Or even better, a piglit test :-).
>
> I suspect there's an issue with the prim assembler in draw.
> Since from a quick look it seems like the prim assembler would always reset
> the prim_id it's going to inject whenever it's run, and that's going to
> happen per chunk (as we don't process all vertices in a draw call at once if
> there's too many). Probably would need to fix that somehow so it's only
> reset per instance.
> We possibly (?) handle this correctly if there's a gs.</span >
Any suggestion on a piglit test to use as a starting point? It would need
OpenGL 3.2 and the basic test would be
draw say 10000 triangles each covering the entire window with this fragment
shader
#version 150
main
{
// throw out the first 9999 triangles (0 to 9998)
if (glPrimitiveID < 9999) { discard; }
// for the last triangle create the color based on glPrimitiveId
gl_FragColor = vec4(glPrimitiveId%256,glPrimitiveId/256,0.0,1.0);
}
Then test the color of a pixel to see if it is RGBA (15,39,0,255) or the equiv
in float.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>