The renderer uses the following GPU paths for advanced state on color target 0. Blend enable and ordinary logic-op state still control whether that state applies. NVN advanced blending supports one color target, target 0. Multiple active color targets have undefined API behavior and are not a missing MRT feature. Shader and pipeline keys retain the effective equation and its parameters.
| Path | Supported behavior | Restrictions |
|---|---|---|
| Ordinary blend reduction | PLUS, MINUS and RED/GREEN/BLUE selectors. With normalized destination values: ZERO/SRC/DST, premultiplied uncorrelated Porter-Duff modes and SCREEN, plus nonpremultiplied SRC and SRC_OVER. | Only the parameter combinations with an exact fixed-function equation qualify. Other correlated Porter-Duff and artistic equations need another path. |
| Native advanced blend | Maps all 46 NVN advanced modes to VK_EXT_blend_operation_advanced, including artistic/HSL operations and disjoint/conjoint overlap. | The device must provide coherent operations. Its limits must permit the attachment count, operation, source premultiplication and overlap. Without advancedBlendAllOperations, only the extension's required operation subset qualifies. |
| Ordered shader blend | Computes the 46 equations with an ordered destination read/modify/write under fragment shader interlock. Supports source premultiplication, all three overlap modes, component masks, array layers, sRGB transfer and multisample storage images. Guest storage images use separate bindings. Indexed texture tables retain target-feedback checks. | Requires pixel interlock, fragment storage writes and storage-image reads/writes without format. The target must be storage-capable. MSAA also requires multisample storage images and a supported raster sample count. Depth/stencil uses safe early tests with PostDepthCoverage for multisample masks, or the guarded late-shadow subset below. Mixed-sample coverage, alpha-to-coverage and alpha-to-one remain outside this shader blend path. |
| Ordered late D32F/S8 shadow | Copies native depth and optional stencil aspects to a GPU-only buffer. Original guest stages run as one draw; fragment side effects precede ordered late depth/stencil tests and conditional advanced color updates. The GPU copies changed aspects back after the draw. | One color target and one D32F or D32FS8 depth target, one sample/layer, the ordinary viewport depth range and no guest FragDepth, early-test mode, active queries, predication, depth clamp, depth bias, conservative rasterization or layer/viewport exports. Depth feedback aliases are rejected. Requires ordered pixel interlock, fragment storage writes, sufficient storage-buffer descriptors, unrestricted depth range and signed-zero/infinity/NaN preservation; advanced color keeps its storage-image requirements. |
| Source capture and resolve | Runs the original fragment shader into host-only source and validity attachments, with native late depth/stencil, discard, alpha tests and guest storage side effects. A compute shader then applies the advanced equation to surviving samples before the next primitive. | Direct point, line and triangle lists, including indexed lists without restart, with direct instances. Complete nonindexed lists also retain transform feedback and vertex storage writes. Tessellation, geometry shaders, indirect draws and indexed vertex side effects remain outside this path. The target must support storage access; multisample targets need multisample storage images. Only the first color output is supported. |
The late-shadow path also rejects textures in stages before the fragment shader, indexed fragment texture tables and texel-buffer images in any stage. These resource paths need a complete depth/stencil alias proof before they can use the shadow path.
The advanced interlock shader path rejects integer targets, volume targets, additional fragment outputs and depth/sample-mask outputs. The blend attachment occupies the image binding after the guest storage images, so both must fit the same stage budget. A pipeline without blending retains its ordinary guest image capacity. Indexed tables resolve their entries before applying target-feedback snapshots and ordering. The shader path uses the destination image directly. Ordered interlock preserves overlap between primitives within one draw.
Safe early tests mean that the guest program explicitly requests early tests, or that moving tests earlier cannot change discard, alpha-test or storage side effects. A general late-depth program with discard cannot use this shortcut. Forcing early tests can update depth/stencil for a fragment that later discards. PostDepthCoverage does not remove that semantic difference. The late-shadow subset instead runs those tests after guest discard and alpha decisions. Its stencil fail/depth-fail operations occur before color rejection, and every invocation leaves its interlock before a failed fragment is discarded. Coverage-to-color uses the same tests with a native integer color output; it does not need an integer storage image. Tessellation, geometry, indirect and indexed commands can stay whole on this subset, preserving their original shader invocation and transform-feedback behavior. Fixed-point depth, multisample/layered depth and the other excluded states still need a broader solution. Native advanced blending remains available for supported device and format combinations.
Unpremultiplied sources retain their original RGB values. Premultiplied color normalization preserves exact zero and one endpoints, and HARDMIX compares its threshold before division. This avoids large discontinuous errors from the division accuracy permitted by the Vulkan SPIR-V environment.
NormalizedDst is a value-range hint. It does not select destination premultiplication. Native and shader paths keep
the advanced equations' premultiplied destination interpretation for either value of the hint. The ordinary reduction
path requires the hint only for equations that depend on normalized destination values.
Capture preserves guest late tests instead of forcing early tests. The original fragment shader runs once for each primitive, and its guest image writes are not repeated by the resolve. Source and validity attachments remain outside the guest surface cache and writeback lists. A sampled alias of the real destination uses the original draw's snapshot. Scratch images and tile buffers retire with their frame when the target shape changes. Splitting a draw into primitives also requires a vertex-program proof that excludes subgroup, lane-group and clock dependencies. Indexed lists with vertex writes or transform feedback remain excluded; complete nonindexed lists preserve their original vertex invocation count. The whole-draw late-shadow path does not split those invocations.
An optional tile list restricts resolve work to tiles reached by non-helper fragment invocations. Native late tests can reject every sample in a listed tile; the validity attachment still prevents destination writes. Each resolved tile resets its own flag. An incomplete capture forces a flag clear before reuse. A GPU-only adaptive dispatch is experimental and remains opt-in; its extra dispatch and barrier are not assumed to improve performance.
States outside these gates do not have an exact portable implementation. The native GPU fixture checks only
combinations that the device advertises. The shader fixture disables the native
path to exercise interlock, including two overlapping primitives, component masks and discarded fragments. Numerical
checks use a tolerance of 0.003 for native operations and 0.00005 for the shader path. These account for device
arithmetic precision and do not permit missing equations or ordering errors.
Made from docs/history/gpu-rendering-audit.md at 69237645142c. GPL-3.0-or-later.