diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/glslang/register_types.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/glslang/register_types.cpp b/modules/glslang/register_types.cpp index 7fe3a57880..d7e5ddd32c 100644 --- a/modules/glslang/register_types.cpp +++ b/modules/glslang/register_types.cpp @@ -67,6 +67,13 @@ static Vector<uint8_t> _compile_shader_glsl(RenderingDevice::ShaderStage p_stage } else { // use defaults } + } else if (capabilities->device_family == RenderingDevice::DeviceFamily::DEVICE_DIRECTX) { + // NIR-DXIL is Vulkan 1.1-conformant. + ClientVersion = glslang::EShTargetVulkan_1_1; + // The SPIR-V part of Mesa supports 1.6, but: + // - SPIRV-Reflect won't be able to parse the compute workgroup size. + // - We want to play it safe with NIR-DXIL. + TargetVersion = glslang::EShTargetSpv_1_3; } else { // once we support other backends we'll need to do something here if (r_error) { |