summaryrefslogtreecommitdiff
path: root/src/gallium/docs
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/docs')
-rw-r--r--src/gallium/docs/source/context.rst31
-rw-r--r--src/gallium/docs/source/cso/rasterizer.rst135
-rw-r--r--src/gallium/docs/source/screen.rst19
3 files changed, 120 insertions, 65 deletions
diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst
index ac3c3c7bdb..89c02b1b70 100644
--- a/src/gallium/docs/source/context.rst
+++ b/src/gallium/docs/source/context.rst
@@ -201,9 +201,16 @@ returned). Otherwise, if the ``wait`` parameter is FALSE, the call
will not block and the return value will be TRUE if the query has
completed or FALSE otherwise.
-A common type of query is the occlusion query which counts the number of
-fragments/pixels which are written to the framebuffer (and not culled by
-Z/stencil/alpha testing or shader KILL instructions).
+The most common type of query is the occlusion query,
+``PIPE_QUERY_OCCLUSION_COUNTER``, which counts the number of fragments which
+are written to the framebuffer without being culled by
+:ref:`Depth, Stencil, & Alpha` testing or shader KILL instructions.
+
+Another type of query, ``PIPE_QUERY_TIME_ELAPSED``, returns the amount of
+time, in nanoseconds, the context takes to perform operations.
+
+Gallium does not guarantee the availability of any query types; one must
+always check the capabilities of the :ref:`Screen` first.
Conditional Rendering
@@ -289,11 +296,6 @@ data to be written to the resource at this point.
The returned map points to the start of the mapped range according to
the box region, not the beginning of the resource.
-.. _transfer_flush_region:
-``transfer_flush_region`` If a transfer was created with TRANFER_FLUSH_EXPLICIT,
-only the region specified is guaranteed to be written to. This is relative to
-the mapped range, not the beginning of the resource.
-
``transfer_unmap`` remove the memory mapping for the transfer object.
Any pointers into the map should be considered invalid and discarded.
@@ -301,6 +303,16 @@ Any pointers into the map should be considered invalid and discarded.
Basically get_transfer, transfer_map, data write, transfer_unmap, and
transfer_destroy all in one.
+.. _transfer_flush_region:
+
+transfer_flush_region
+%%%%%%%%%%%%%%%%%%%%%
+
+If a transfer was created with ``FLUSH_EXPLICIT``, it will not automatically
+be flushed on write or unmap. Flushes must be requested with
+``transfer_flush_region``. Flush ranges are relative to the mapped range, not
+the beginning of the resource.
+
.. _pipe_transfer:
PIPE_TRANSFER
@@ -320,5 +332,4 @@ These flags control the behavior of a transfer object.
operations pending on the resource are undefined. Cannot be used with
``READ``.
* ``FLUSH_EXPLICIT``: Written ranges will be notified later with
- :ref:`transfer_flush_region`. Cannot be used with
- ``READ``.
+ :ref:`transfer_flush_region`. Cannot be used with ``READ``.
diff --git a/src/gallium/docs/source/cso/rasterizer.rst b/src/gallium/docs/source/cso/rasterizer.rst
index 56a601a8d0..ad1612f93e 100644
--- a/src/gallium/docs/source/cso/rasterizer.rst
+++ b/src/gallium/docs/source/cso/rasterizer.rst
@@ -46,6 +46,78 @@ There are several important exceptions to the specification of this rule.
second vertex, not the first. This permits each segment of the fan to have
a different color.
+Polygons
+--------
+
+light_twoside
+^^^^^^^^^^^^^
+
+If set, there are per-vertex back-facing colors. The hardware
+(perhaps assisted by :ref:`Draw`) should be set up to use this state
+along with the front/back information to set the final vertex colors
+prior to rasterization.
+
+The frontface vertex shader color output is marked with TGSI semantic
+COLOR[0], and backface COLOR[1].
+
+front_ccw
+ Indicates whether the window order of front-facing polygons is
+ counter-clockwise (TRUE) or clockwise (FALSE).
+
+cull_mode
+ Indicates which faces of polygons to cull, either PIPE_FACE_NONE
+ (cull no polygons), PIPE_FACE_FRONT (cull front-facing polygons),
+ PIPE_FACE_BACK (cull back-facing polygons), or
+ PIPE_FACE_FRONT_AND_BACK (cull all polygons).
+
+fill_front
+ Indicates how to fill front-facing polygons, either
+ PIPE_POLYGON_MODE_FILL, PIPE_POLYGON_MODE_LINE or
+ PIPE_POLYGON_MODE_POINT.
+fill_back
+ Indicates how to fill back-facing polygons, either
+ PIPE_POLYGON_MODE_FILL, PIPE_POLYGON_MODE_LINE or
+ PIPE_POLYGON_MODE_POINT.
+
+poly_stipple_enable
+ Whether polygon stippling is enabled.
+poly_smooth
+ Controls OpenGL-style polygon smoothing/antialiasing
+
+offset_point
+ If set, point-filled polygons will have polygon offset factors applied
+offset_line
+ If set, line-filled polygons will have polygon offset factors applied
+offset_tri
+ If set, filled polygons will have polygon offset factors applied
+
+offset_units
+ Specifies the polygon offset bias
+offset_scale
+ Specifies the polygon offset scale
+
+
+
+Lines
+-----
+
+line_width
+ The width of lines.
+line_smooth
+ Whether lines should be smoothed. Line smoothing is simply anti-aliasing.
+line_stipple_enable
+ Whether line stippling is enabled.
+line_stipple_pattern
+ 16-bit bitfield of on/off flags, used to pattern the line stipple.
+line_stipple_factor
+ When drawing a stippled line, each bit in the stipple pattern is
+ repeated N times, where N = line_stipple_factor + 1.
+line_last_pixel
+ Controls whether the last pixel in a line is drawn or not. OpenGL
+ omits the last pixel to avoid double-drawing pixels at the ends of lines
+ when drawing connected lines.
+
+
Points
------
@@ -89,68 +161,21 @@ coordinates are not generated.
Some renderers always internally translate points into quads; this state
still affects those renderers by overriding other rasterization state.
-Other Members
-^^^^^^^^^^^^^
-
-light_twoside
- If set, there are per-vertex back-facing colors. :ref:`Draw`
- uses this state along with the front/back information to set the
- final vertex colors prior to rasterization.
-
-front_winding
- Indicates the window order of front-facing polygons, either
- PIPE_WINDING_CW or PIPE_WINDING_CCW
-
-cull_mode
- Indicates which polygons to cull, either PIPE_WINDING_NONE (cull no
- polygons), PIPE_WINDING_CW (cull clockwise-winding polygons),
- PIPE_WINDING_CCW (cull counter clockwise-winding polygons), or
- PIPE_WINDING_BOTH (cull all polygons).
-
-fill_cw
- Indicates how to fill clockwise polygons, either PIPE_POLYGON_MODE_FILL,
- PIPE_POLYGON_MODE_LINE or PIPE_POLYGON_MODE_POINT.
-fill_ccw
- Indicates how to fill counter clockwise polygons, either
- PIPE_POLYGON_MODE_FILL, PIPE_POLYGON_MODE_LINE or PIPE_POLYGON_MODE_POINT.
-
-poly_stipple_enable
- Whether polygon stippling is enabled.
-poly_smooth
- Controls OpenGL-style polygon smoothing/antialiasing
-offset_cw
- If set, clockwise polygons will have polygon offset factors applied
-offset_ccw
- If set, counter clockwise polygons will have polygon offset factors applied
-offset_units
- Specifies the polygon offset bias
-offset_scale
- Specifies the polygon offset scale
-
-line_width
- The width of lines.
-line_smooth
- Whether lines should be smoothed. Line smoothing is simply anti-aliasing.
-line_stipple_enable
- Whether line stippling is enabled.
-line_stipple_pattern
- 16-bit bitfield of on/off flags, used to pattern the line stipple.
-line_stipple_factor
- When drawing a stippled line, each bit in the stipple pattern is
- repeated N times, where N = line_stipple_factor + 1.
-line_last_pixel
- Controls whether the last pixel in a line is drawn or not. OpenGL
- omits the last pixel to avoid double-drawing pixels at the ends of lines
- when drawing connected lines.
-
point_smooth
Whether points should be smoothed. Point smoothing turns rectangular
points into circles or ovals.
point_size_per_vertex
- Whether vertices have a point size element.
+ Whether the vertex shader is expected to have a point size output.
+ Undefined behaviour is permitted if there is disagreement between
+ this flag and the actual bound shader.
point_size
The size of points, if not specified per-vertex.
+
+
+Other Members
+-------------
+
scissor
Whether the scissor test is enabled.
diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
index 5a60ee00a6..48d9d570b6 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -1,3 +1,5 @@
+.. _screen:
+
Screen
======
@@ -33,6 +35,7 @@ The integer capabilities:
* ``MAX_RENDER_TARGETS``: The maximum number of render targets that may be
bound.
* ``OCCLUSION_QUERY``: Whether occlusion queries are available.
+* ``TIMER_QUERY``: Whether timer queries are available.
* ``TEXTURE_SHADOW_MAP``: XXX
* ``MAX_TEXTURE_2D_LEVELS``: The maximum number of mipmap levels available
for a 2D texture.
@@ -101,6 +104,22 @@ The floating-point capabilities:
* ``GUARD_BAND_LEFT``, ``GUARD_BAND_TOP``, ``GUARD_BAND_RIGHT``,
``GUARD_BAND_BOTTOM``: XXX
+Fragment shader limits:
+
+* ``PIPE_CAP_MAX_FS_INSTRUCTIONS``: The maximum number of instructions.
+* ``PIPE_CAP_MAX_FS_ALU_INSTRUCTIONS``: The maximum number of arithmetic instructions.
+* ``PIPE_CAP_MAX_FS_TEX_INSTRUCTIONS``: The maximum number of texture instructions.
+* ``PIPE_CAP_MAX_FS_TEX_INDIRECTIONS``: The maximum number of texture indirections.
+* ``PIPE_CAP_MAX_FS_CONTROL_FLOW_DEPTH``: The maximum nested control flow depth.
+* ``PIPE_CAP_MAX_FS_INPUTS``: The maximum number of input registers.
+* ``PIPE_CAP_MAX_FS_CONSTS``: The maximum number of constants.
+* ``PIPE_CAP_MAX_FS_TEMPS``: The maximum number of temporary registers.
+* ``PIPE_CAP_MAX_FS_ADDRS``: The maximum number of address registers.
+* ``PIPE_CAP_MAX_FS_PREDS``: The maximum number of predicate registers.
+
+Vertex shader limits:
+
+* ``PIPE_CAP_MAX_VS_*``: Identical to ``PIPE_CAP_MAX_FS_*``.
.. _pipe_bind: