gallium/docs: document alpha_to_coverage and alpha_to_one blend state
[mesa.git] / src / gallium / docs / source / cso / blend.rst
index 7bde10c124597e6b428cd76c5b5594b8e4c3c5c3..7316e5c71cf66a90204d8e014b832cb1775bbce8 100644 (file)
@@ -12,7 +12,11 @@ Blend Factors
 The blend factors largely follow the same pattern as their counterparts
 in other modern and legacy drawing APIs.
 
-XXX blurb about dual-source blends
+Dual source blend factors are supported for up to 1 MRT, although
+you can advertise > 1 MRT, the stack cannot handle them for a few reasons.
+There is no definition on how the 1D array of shader outputs should be mapped
+to something that would be a 2D array (location, index). No current hardware
+exposes > 1 MRT, and we should revisit this issue if anyone ever does.
 
 Logical Operations
 ------------------
@@ -84,6 +88,18 @@ independent_blend_enable
    the first member of the rt array contains valid data.
 rt
    Contains the per-rendertarget blend state.
+alpha_to_coverage
+   If enabled, the fragment's alpha value is used to override the fragment's
+   coverage mask.  The coverage mask will be all zeros if the alpha value is
+   zero.  The coverage mask will be all ones if the alpha value is one.
+   Otherwise, the number of bits set in the coverage mask will be proportional
+   to the alpha value.  Note that this step happens regardless of whether
+   multisample is enabled or the destination buffer is multisampled.
+alpha_to_one
+   If enabled, the fragment's alpha value will be set to one.  As with
+   alpha_to_coverage, this step happens regardless of whether multisample
+   is enabled or the destination buffer is multisampled.
+
 
 Per-rendertarget Members
 ------------------------