[clang] [HLSL][SPIRV] Allow large z value in numthreads (PR #144934)

Nathan Gauër via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 20 02:49:00 PDT 2025


================
@@ -1033,12 +1033,15 @@ void SemaHLSL::handleRootSignatureAttr(Decl *D, const ParsedAttr &AL) {
 void SemaHLSL::handleNumThreadsAttr(Decl *D, const ParsedAttr &AL) {
   llvm::VersionTuple SMVersion =
       getASTContext().getTargetInfo().getTriple().getOSVersion();
+  bool IsDXIL = getASTContext().getTargetInfo().getTriple().getArch() ==
+                llvm::Triple::dxil;
+
   uint32_t ZMax = 1024;
----------------
Keenuts wrote:

Shouldn't we even disable any Xmax/Ymax/Zmax check when targeting SPIR-V/Vk? Seems like those are set by the device limits, so not limited by the vk version

https://github.com/llvm/llvm-project/pull/144934


More information about the cfe-commits mailing list