Mesa (gallium-docs): Moar docs, mostly context.

Corbin Simpson csimpson at kemper.freedesktop.org
Sun Dec 20 19:43:14 PST 2009


Module: Mesa
Branch: gallium-docs
Commit: a524aab8ae356b3ef35392fa7375a862ed3322dc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a524aab8ae356b3ef35392fa7375a862ed3322dc

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Sun Dec 20 19:41:50 2009 -0800

Moar docs, mostly context.

---

 src/gallium/docs/source/context.rst        |   73 +++++++++++++++++++++++++++-
 src/gallium/docs/source/cso/blend.rst      |    2 +
 src/gallium/docs/source/cso/dsa.rst        |    2 +
 src/gallium/docs/source/cso/rasterizer.rst |    2 +
 src/gallium/docs/source/cso/sampler.rst    |    2 +
 src/gallium/docs/source/cso/shader.rst     |    2 +
 src/gallium/docs/source/screen.rst         |   32 ++++++++++++-
 7 files changed, 113 insertions(+), 2 deletions(-)

diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst
index c2e23a1..6470e8f 100644
--- a/src/gallium/docs/source/context.rst
+++ b/src/gallium/docs/source/context.rst
@@ -7,4 +7,75 @@ of the device's 3D rendering pipeline.
 Methods
 -------
 
-XXX
+CSO State
+^^^^^^^^^
+
+All CSO state is created, bound, and destroyed, with triplets of methods that
+all follow a specific naming scheme. For example, ``create_blend_state``,
+``bind_blend_state``, and ``destroy_blend_state``.
+
+CSO objects handled by the context object:
+
+* :ref:`Blend`: ``*_blend_state``
+* :ref:`Sampler`: These are special; they can be bound to either vertex or
+  fragment samplers, and they are bound in groups.
+  ``bind_fragment_sampler_states``, ``bind_vertex_sampler_states``
+* :ref:`Rasterizer`: ``*_rasterizer_state``
+* :ref:`Depth, Stencil, & Alpha`: ``*_depth_stencil_alpha_state``
+* :ref:`Shader`: These have two sets of methods. ``*_fs_state`` is for
+  fragment shaders, and ``*_vs_state`` is for vertex shaders.
+
+Non-CSO State
+^^^^^^^^^^^^^
+
+These pieces of state are too small, variable, and/or trivial to have CSO
+objects. They all follow simple, one-method binding calls, e.g.
+``set_edgeflags``.
+
+* ``set_edgeflags``
+* ``set_blend_color``
+* ``set_clip_state``
+* ``set_constant_buffer``
+* ``set_framebuffer_state``
+* ``set_polygon_stipple``
+* ``set_scissor_state``
+* ``set_viewport_state``
+* ``set_fragment_sampler_textures``
+* ``set_vertex_sampler_textures``
+* ``set_vertex_buffers``
+* ``set_vertex_elements``
+
+Queries
+^^^^^^^
+
+Queries can be created with ``create_query`` and deleted with
+``destroy_query``. To enable a query, use ``begin_query``, and when finished,
+use ``end_query`` to stop the query. Finally, ``get_query_result`` is used
+to retrieve the results.
+
+VBO Drawing
+^^^^^^^^^^^
+
+``draw_arrays``
+
+``draw_elements``
+
+``draw_range_elements``
+
+``flush``
+
+Surface Drawing
+^^^^^^^^^^^^^^^
+
+These methods emulate classic blitter controls. They are not guaranteed to be
+available; if they are set to NULL, then they are not present.
+
+``surface_fill`` performs a fill operation on a section of a surface.
+
+``surface_copy`` blits a region of a surface to a region of another surface,
+provided that both surfaces are the same format. The source and destination
+may be the same surface, and overlapping blits are permitted.
+
+``clear`` initializes entire buffers to an RGBA, depth, or stencil value,
+depending on the formats of the buffers. Use ``set_framebuffer_state`` to
+specify the buffers to clear.
diff --git a/src/gallium/docs/source/cso/blend.rst b/src/gallium/docs/source/cso/blend.rst
index 608f369..fd9e4a1 100644
--- a/src/gallium/docs/source/cso/blend.rst
+++ b/src/gallium/docs/source/cso/blend.rst
@@ -1,3 +1,5 @@
+.. _blend:
+
 Blend
 =====
 
diff --git a/src/gallium/docs/source/cso/dsa.rst b/src/gallium/docs/source/cso/dsa.rst
index 0be7af5..12abaa9 100644
--- a/src/gallium/docs/source/cso/dsa.rst
+++ b/src/gallium/docs/source/cso/dsa.rst
@@ -1,3 +1,5 @@
+.. _depth,stencil,&alpha:
+
 Depth, Stencil, & Alpha
 =======================
 
diff --git a/src/gallium/docs/source/cso/rasterizer.rst b/src/gallium/docs/source/cso/rasterizer.rst
index b87d121..0686bff 100644
--- a/src/gallium/docs/source/cso/rasterizer.rst
+++ b/src/gallium/docs/source/cso/rasterizer.rst
@@ -1,3 +1,5 @@
+.. _rasterizer:
+
 Rasterizer
 ==========
 
diff --git a/src/gallium/docs/source/cso/sampler.rst b/src/gallium/docs/source/cso/sampler.rst
index 3a63ac6..e3f1757 100644
--- a/src/gallium/docs/source/cso/sampler.rst
+++ b/src/gallium/docs/source/cso/sampler.rst
@@ -1,3 +1,5 @@
+.. _sampler:
+
 Sampler
 =======
 
diff --git a/src/gallium/docs/source/cso/shader.rst b/src/gallium/docs/source/cso/shader.rst
index 9e1cb35..0ee42c8 100644
--- a/src/gallium/docs/source/cso/shader.rst
+++ b/src/gallium/docs/source/cso/shader.rst
@@ -1,3 +1,5 @@
+.. _shader:
+
 Shader
 ======
 
diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
index 1877718..9631e69 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -6,4 +6,34 @@ A screen is an object representing the context-independent part of a device.
 Methods
 -------
 
-XXX
+XXX moar; got bored
+
+get_name
+^^^^^^^^
+
+Returns an identifying name for the screen.
+
+get_vendor
+^^^^^^^^^^
+
+Returns the screen vendor.
+
+get_param
+^^^^^^^^^
+
+Get an integer/boolean screen parameter.
+
+get_paramf
+^^^^^^^^^^
+
+Get a floating-point screen parameter.
+
+is_format_supported
+^^^^^^^^^^^^^^^^^^^
+
+See if a format can be used in a specific manner.
+
+texture_create
+^^^^^^^^^^^^^^
+
+Given a template of texture setup, create a BO-backed texture.



More information about the mesa-commit mailing list