From 71ee0030417c644342b6e2555463b5bc6ca38ed0 Mon Sep 17 00:00:00 2001
From: Brian Paul
+This test draws an engine model with a two-pass algorithm. +The first pass is drawn with polygon stipple enabled. +The second pass is drawn without polygon stipple but with blending +and GL_DEPTH_FUNC=GL_LEQUAL. +If either of the two passes happen to use a software fallback of some +sort, the Z values of fragments may be different between the two passes. +This leads to incorrect rendering. +
+ ++For example, the VMware SVGA gallium driver uses a special semi-fallback path +for drawing with polygon stipple. +Since the two passes are rendered with different vertex transformation +implementations, the rendering doesn't appear as expected. +Setting the SVGA_FORCE_SWTNL environment variable to 1 will force the +driver to use the software vertex path all the time and clears up this issue. +
+ ++According to the OpenGL invariance rules, there's no guarantee that +the pixels produced by these two rendering states will match. +To achieve invariance, both passes should enable polygon stipple and +blending with appropriate patterns/modes to ensure the same fragments +are produced in both passes. +
+ +