src/tests/gl_tests/ProvokingVertexTest.cpp


Log

Author Commit Date CI Message
Jamie Madill c7a92fdb 2015-10-29T10:08:09 D3D11: Fix provoking vertex for flat triangle strips. Triangle strips alternate the provoking vertex based on the primitive, so use the primitive ID in the GS to determine this. This might interact poorly with primitive restart, so we might have to use a slow path for that. BUG=angleproject:754 Change-Id: I4f6f520887d4c4c52d2ad020e6db148607f68325 Reviewed-on: https://chromium-review.googlesource.com/309156 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3e14e2b1 2015-10-29T14:38:53 D3D11: Fix basic provoking vertex flat shading cases. The enables geometry shaders that correct for the flat shading on provoking vertexes. It does not fix it for triangle strips, or in conjunction with primitive restart (which is not yet implemented in D3D11). Also ensure we do not regress with flat shading enabled and transform feedback. In cases where we use flat shading, do a double draw call, first with an untransformed vertex stream, and no geometry shader, then with the geometry shader enabled. This also fixes the dEQP fragment output tests with ints. BUG=angleproject:754 Change-Id: Ib37e8ec32d19db17ea5d4dc88158cdae0c956bfc Reviewed-on: https://chromium-review.googlesource.com/309155 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill d55d283c 2015-10-27T13:59:19 Add a test for flat shader 'provoking vertex'. The provoking vertex, or leading vertex, is the vertex in a triangle which produces the value that gets used for a flat-shaded triangle. Flat shading means the same value gets used for the entire triangle. It seems as though D3D and OpenGL have different definitions of which vertex is the leading/provoking one; GL says it is the *last* vertex of a primitive, while while D3D says it is the first. Additional complexity comes about from triangle strips, which switch winding order, and primitive restart, which defines new primitives in the middle of prior primitives. BUG=angleproject:754 Change-Id: If1217cba33dabf3b1e4ad13fd639d049cb16fe44 Reviewed-on: https://chromium-review.googlesource.com/309152 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>