[clang] [HLSL] Add SPIR-V target type for RWStructuredBuffers (PR #133468)

Nathan Gauër via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 28 10:01:56 PDT 2025


================
@@ -386,13 +386,22 @@ llvm::Type *CommonSPIRTargetCodeGenInfo::getHLSLType(
     if (ContainedTy.isNull())
       return nullptr;
 
-    assert(!ResAttrs.RawBuffer &&
-           "Raw buffers handles are not implemented for SPIR-V yet");
     assert(!ResAttrs.IsROV &&
            "Rasterizer order views not implemented for SPIR-V yet");
 
-    // convert element type
     llvm::Type *ElemType = CGM.getTypes().ConvertType(ContainedTy);
+    if (ResAttrs.RawBuffer) {
----------------
Keenuts wrote:

nit nit nit: you can flip the condition and un-nest.

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


More information about the cfe-commits mailing list