So, primitive id in llvmpipe doesn't really work, or rather it works but it can't do much useful with the way mesa/st sets this up at least for some tests. In particular all of piglit glsl-1.50-geometry-primitive-id-restart fail (result is always 0). We actually have both system value prim id and ordinary input prim id (both using TGSI_SEMANTIC_PRIMID) in gallium. There's some halfway support for both, but in particular ordinary input prim id in gs will not work in draw/gallivm at all. This is both due to tgsi_scan_shader() not recognizing it in gs (only in fs), nor is it wired up in other places. I actually made the test work in llvmpipe by some horrendous hacks (fix the mentioned tgsi_scan_shader() issue, and hack up the gs_input fetching to just fetch the associated system value instead), but that's not a proper fix. So I am wondering, why isn't this a system value in mesa in the first place, just like vertex ids, invocation ids and the like? Looks like it really is such a value to me. Somehow I guess we should avoid having that as both system value and ordinary input in gallium...
Roland _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev