summaryrefslogtreecommitdiff
path: root/src/gallium/docs
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2010-04-26 19:50:57 +0200
committerRoland Scheidegger <sroland@vmware.com>2010-04-26 19:51:25 +0200
commitaac2cccccfd701ae8d7ce0813c28c64498d4a076 (patch)
tree31cbcdddf4263d086f376798a710eb2cb4e9ad5b /src/gallium/docs
parent06574e45b418dab1ec106773c92b7d9e5af45c81 (diff)
gallium: interface changes for multisampling
add function to set sample mask, and state for alpha-to-coverage and alpha-to-one. Also make it possible to query for supported sample count with is_msaa_supported(). Use explicit resource_resolve() to resolve a resource. Note that it is illegal to bind a unresolved resource as a sampler view, must be resolved first (as per d3d10 and OGL APIs, binding unresolved resource would mean that special texture fetch functions need to be used which give explicit control over what samples to fetch, which isn't supported yet). Also change surface_fill() and surface_copy() to operate directly on resources. Blits should operate directly on resources, most often state trackers just used get_tex_surface() then did a blit. Note this also means the blit bind flags are gone, if a driver implements this functionality it is expected to handle it for all resources having depth_stencil/render_target/sampler_view bind flags (might even require it for all bind flags?). Might want to introduce quality levels for MSAA later. Might need to revisit this for hw which does instant resolve.
Diffstat (limited to 'src/gallium/docs')
-rw-r--r--src/gallium/docs/source/context.rst16
-rw-r--r--src/gallium/docs/source/screen.rst13
2 files changed, 21 insertions, 8 deletions
diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst
index c82e681a25..374711b3c5 100644
--- a/src/gallium/docs/source/context.rst
+++ b/src/gallium/docs/source/context.rst
@@ -54,6 +54,7 @@ objects. They all follow simple, one-method binding calls, e.g.
* ``set_stencil_ref`` sets the stencil front and back reference values
which are used as comparison values in stencil test.
* ``set_blend_color``
+* ``set_sample_mask``
* ``set_clip_state``
* ``set_polygon_stipple``
* ``set_scissor_state`` sets the bounds for the scissor test, which culls
@@ -255,15 +256,20 @@ Blitting
These methods emulate classic blitter controls. They are not guaranteed to be
available; if they are set to NULL, then they are not present.
-These methods operate directly on ``pipe_surface`` objects, and stand
+These methods operate directly on ``pipe_resource`` objects, and stand
apart from any 3D state in the context. Blitting functionality may be
moved to a separate abstraction at some point in the future.
-``surface_fill`` performs a fill operation on a section of a surface.
+``resource_fill_region`` performs a fill operation on a section of a resource.
-``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.
+``resource_copy_region`` blits a region of a subresource of a resource to a
+region of another subresource of a resource, provided that both resources have the
+same format. The source and destination may be the same resource, and overlapping
+blits are permitted.
+
+``resource_resolve`` resolves a multisampled resource into a non-multisampled
+one. Formats and dimensions must match. This function must be present if a driver
+supports multisampling.
The interfaces to these calls are likely to change to make it easier
for a driver to batch multiple blits with the same source and
diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
index c5815f8939..2a8f6967ea 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -128,9 +128,6 @@ resources might be created and handled quite differently.
* ``PIPE_BIND_VERTEX_BUFFER``: A vertex buffer.
* ``PIPE_BIND_INDEX_BUFFER``: An vertex index/element buffer.
* ``PIPE_BIND_CONSTANT_BUFFER``: A buffer of shader constants.
-* ``PIPE_BIND_BLIT_SOURCE``: A blit source, as given to surface_copy.
-* ``PIPE_BIND_BLIT_DESTINATION``: A blit destination, as given to surface_copy
- and surface_fill.
* ``PIPE_BIND_TRANSFER_WRITE``: A transfer object which will be written to.
* ``PIPE_BIND_TRANSFER_READ``: A transfer object which will be read from.
* ``PIPE_BIND_CUSTOM``:
@@ -223,6 +220,16 @@ Determine if a resource in the given format can be used in a specific manner.
Returns TRUE if all usages can be satisfied.
+is_msaa_supported
+^^^^^^^^^^^^^^^^^
+
+Determine if a format supports multisampling with a given number of samples.
+
+**format** the resource format
+
+**sample_count** the number of samples. Valid query range is 2-32.
+
+Returns TRUE if sample_count number of samples is supported with this format.
.. _resource_create: