Explorar o código

[spirv] Add half as allowed (RW)Buffer element type

Fixes https://github.com/Microsoft/DirectXShaderCompiler/issues/1672
Lei Zhang %!s(int64=6) %!d(string=hai) anos
pai
achega
5fb1e5313f
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      tools/clang/lib/SPIRV/LowerTypeVisitor.cpp

+ 1 - 0
tools/clang/lib/SPIRV/LowerTypeVisitor.cpp

@@ -645,6 +645,7 @@ LowerTypeVisitor::translateSampledTypeToImageFormat(QualType sampledType,
                               : elemCount == 2 ? spv::ImageFormat::Rg32ui
                                                : spv::ImageFormat::Rgba32ui;
       case BuiltinType::Float:
+      case BuiltinType::HalfFloat:
         return elemCount == 1 ? spv::ImageFormat::R32f
                               : elemCount == 2 ? spv::ImageFormat::Rg32f
                                                : spv::ImageFormat::Rgba32f;