================ @@ -386,13 +386,29 @@ 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) { + // TODO: Handle types with layout information. + assert((ElemType->isIntegerTy() || ElemType->isFloatingPointTy() || + ElemType->isVectorTy()) && + "The element type for a SPIR-V resource must be a types that does " + "not require layout information."); + llvm::ArrayType *RuntimeArrayType = llvm::ArrayType::get(ElemType, 0); + + uint32_t StorageClass = /* StorageBuffer storage class */ 12; ---------------- Keenuts wrote:
There is `SPIRV::StorageClass::StorageBuffer` defined, and the TD files has the value 12 associated, so might be a way to extract the int from this enum https://github.com/llvm/llvm-project/pull/132027 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits