gallium: add PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION

Just let the hardware do it if it can and avoid drivers having to
check for the special case on each draw call.

v2: update the draw module
This commit is contained in:
Christoph Bumiller
2012-02-06 16:29:03 +01:00
parent 26de5273ac
commit 8b4f7b0672
19 changed files with 52 additions and 16 deletions

View File

@@ -59,13 +59,14 @@ flatshade_first
Whether the first vertex should be the provoking vertex, for most primitives.
If not set, the last vertex is the provoking vertex.
There are several important exceptions to the specification of this rule.
There are a few important exceptions to the specification of this rule.
* ``PIPE_PRIMITIVE_POLYGON``: The provoking vertex is always the first
vertex. If the caller wishes to change the provoking vertex, they merely
need to rotate the vertices themselves.
* ``PIPE_PRIMITIVE_QUAD``, ``PIPE_PRIMITIVE_QUAD_STRIP``: This option has no
effect; the provoking vertex is always the last vertex.
* ``PIPE_PRIMITIVE_QUAD``, ``PIPE_PRIMITIVE_QUAD_STRIP``: The option only has
an effect if ``PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION`` is true.
If it is not, the provoking vertex is always the last vertex.
* ``PIPE_PRIMITIVE_TRIANGLE_FAN``: When set, the provoking vertex is the
second vertex, not the first. This permits each segment of the fan to have
a different color.

View File

@@ -96,6 +96,8 @@ The integer capabilities:
controlled through pipe_rasterizer_state.
* ``PIPE_CAP_GLSL_FEATURE_LEVEL``: Whether the driver supports features
equivalent to a specific GLSL version. E.g. for GLSL 1.3, report 130.
* ``PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION``: Whether quads adhere to
the flatshade_first setting in ``pipe_rasterizer_state``.