The vulkan Specification clearly states that we should clamp the fixed-point(such as VK_FORMAT_R8_SNORM) blend factor.
Vulkan® 1.1.284 - A Specification: 27.1.3. Blend Operations
If the color attachment is fixed-point, the components of the source and destination values and
blend factors are each clamped to [0,1] or [-1,1] respectively for an unsigned normalized or signed
normalized color attachment prior to evaluating the blend operations. If the color attachment is
floating-point, no clamping occurs.
The Spec
The vulkan Specification clearly states that we should clamp the fixed-point(such as
VK_FORMAT_R8_SNORM
) blend factor.Vulkan® 1.1.284 - A Specification: 27.1.3. Blend Operations
Mesa3d blend factor clamp
The processing of mesa3d should confirm this. https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/compiler/nir/nir_lower_blend.c?ref_type=heads#L216
But CTS referencerenderer
But there is no clamp on blendfactor in render. https://github.com/KhronosGroup/VK-GL-CTS/blob/13344922ae81cd0033e869dabcb92d2f8bf006f8/framework/referencerenderer/rrFragmentOperations.cpp#L359
Failed case example
What matters is that I failed:
The failure occurred at
VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR
, specifically1-(-0.2205) = 1.2205
.Please how should I understand.
Thanks!