+ if (flags & VKD3DSGF_ENABLE_INT64) + { + FIXME("Unsupported 64-bit integer ops.\n"); + spirv_compiler_error(compiler, VKD3D_SHADER_ERROR_SPV_INT64_UNSUPPORTED, + "Support for 64-bit integers is not implemented."); + flags &= ~VKD3DSGF_ENABLE_INT64; + }
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.
+[require] +shader model >= 5.0 + +[pixel shader todo] +uniform double2 a; + +float4 main() : SV_TARGET +{ + double x = a.x; + double y = a.y; + return float4(x + y, x - y, x * y, x / y); +}
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.