Vulkan » Driver workarounds new in Git master

List of Vulkan driver workarounds used by Magnum.

Driver workarounds used by a particular app are listed in the engine startup log such as here:

Device: SwiftShader Device (LLVM 10.0.0)
Device version: Vulkan 1.1
Enabled device extensions:
    VK_KHR_create_renderpass2
    ...
Using driver workarounds:
    swiftshader-image-copy-extent-instead-of-layers
    ...

These identifiers correspond to the strings in the listing below. For debugging and diagnostic purposes it's possible to disable particular workarounds by passing their identifier string to the --magnum-disable-workarounds command-line option. See Command-line options for more information.

/* For layered image copies, SwiftShader (5.0? the version reporting is messy)
   expects the layer offsets/counts to be included as second/third dimension of
   the image offset/extent instead. Actually, having the Vulkan API contain
   just 3D offset and extent with no layer offset/count would make more sense
   to me as well -- the last dimension can be either in the offset/extent or
   layer offset/count, but never in both, so the extra fields feel redundant.
   Or maybe it's reserving space for layered 3D images? */
"swiftshader-image-copy-extent-instead-of-layers"_s,

/* Multi-entrypoint SPIR-V modules that use the same location indices for
   vertex outputs and fragment outputs (for example passing interpolated vertex
   color through location 0 and having fragment output at location 0 as well)
   will cause the fragment output to be always zero. Happens only when such a
   multi-entrypoint SPIR-V module is used for the vertex shader, doesn't happen
   with single-entrypoint modules. The fix is remapping the vertex/fragment
   interface to not use the same location IDs as the fragment output. That
   however causes SwiftShader to complain about zero format in the now-unused
   location 0 such as

    SwiftShader/src/Vulkan/VkFormat.cpp:1351 WARNING: UNSUPPORTED: Format: 0
    SwiftShader/src/Pipeline/VertexRoutine.cpp:494 WARNING: UNSUPPORTED: stream.format 0

   but apart from this noise everything works as expected. */
"swiftshader-spirv-multi-entrypoint-conflicting-locations"_s,