This state controls blending of the final fragments into the target rendering buffers.
The blend factors largely follow the same pattern as their counterparts in other modern and legacy drawing APIs.
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, also known as logicops, lops, or rops, are supported. Only two-operand logicops are available. When logicops are enabled, all other blend state is ignored, including per-render-target state, so logicops are performed on all render targets.
Warning
The blend_enable flag is ignored for all render targets when logical operations are enabled.
For a source component s and destination component d, the logical operations are defined as taking the bits of each channel of each component, and performing one of the following operations per-channel:
Note
The logical operation names and definitions match those of the OpenGL API, and are similar to the ROP2 and ROP3 definitions of GDI. This is intentional, to ease transitions to Gallium.
These members affect all render targets.
Whether dithering is enabled.
Note
Dithering is completely implementation-dependent. It may be ignored by drivers for any reason, and some render targets may always or never be dithered depending on their format or usage flags.
Whether the blender should perform a logicop instead of blending.
The logicop to use. One of PIPE_LOGICOP.