17.3. Clear Values

Color clear values are taken from the VkClearColorValue union based on
the format of the image or attachment. Floating point, unorm, snorm,
uscaled, packed float, and sRGB images use the float32 member,
unsigned integer formats use the uint32 member, and signed integer
formats use the int32 member. Floating point values are automatically
converted to the format of the image, with the clear value being treated as
linear if the image is sRGB.

Unsigned integer values are converted to the format of the image by casting
to the integer type with fewer bits. Signed integer values are converted to
the format of the image by casting to the smaller type (with negative 32-bit
values mapping to negative values in the smaller type). If the integer clear
value is not representable in the target type (e.g. would overflow in
conversion to that type), the clear value is undefined.

The four array elements of the clear color map to R, G, B, and A components
of image formats, in order.

If the image has more than one sample, the same value is written to all
samples for any pixels being cleared.