Are we going to have separate error codes for each missing feature? Or could we e.g. have VKD3D_SHADER_ERROR_SPV_UNSUPPORTED_FEATURE? I suppose we have precedent in VKD3D_SHADER_ERROR_SPV_DESCRIPTOR_IDX_UNSUPPORTED and VKD3D_SHADER_ERROR_SPV_STENCIL_EXPORT_UNSUPPORTED, but in theory we could e.g. decide to rename VKD3D_SHADER_ERROR_SPV_STENCIL_EXPORT_UNSUPPORTED to VKD3D_SHADER_ERROR_SPV_UNSUPPORTED_FEATURE and then use that going forward.
How much do we care about API stability? Maybe we should retain the old name as an alias?
The error code is externally visible, but that's not true for the name of the enum element; that's internal.
This is not the first test to use doubles, but the preceding commit makes the issue here perhaps more obvious: doubles aren't universally supported. Direct3D 12 has D3D12_FEATURE_DATA_D3D12_OPTIONS.DoublePrecisionFloatShaderOps, Direct3D 11 has D3D11_FEATURE_DATA_DOUBLES.DoublePrecisionFloatShaderOps, Vulkan has VkPhysicalDeviceFeatures.shaderFloat64, and OpenGL has GL_ARB_gpu_shader_fp64.
Right now the code only checks in Vulkan, maybe we should check in the other backends too.
Yes, we should. I don't mind doing that in a separate MR though, as long as it actually happens.