Keenuts added inline comments.
================ Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4146 if (Opts.HLSL) { - bool SupportedTarget = (T.getArch() == llvm::Triple::dxil || - T.getArch() == llvm::Triple::spirv) && - T.getOS() == llvm::Triple::ShaderModel; - if (!SupportedTarget) + if (T.isDXIL() || T.isSPIRV) { + enum { ShaderModel, ShaderStage }; ---------------- bogner wrote: > @Keenuts Does this look right, or do we want something like > `T.isSPIRVLogical` here? Thanks for asking! I think `isSPIRVLogical()` would be better here, as other SPIR-V flavors are not compatible with graphics (including compute shaders). Ideally you could also add a `TODO: revisit this once we figured out how to handle PhysicalStorageBuffer64 memory model`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159103/new/ https://reviews.llvm.org/D159103 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits