================
@@ -297,6 +297,24 @@ static BuiltinTypeDeclBuilder 
setupRWTextureType(CXXRecordDecl *Decl, Sema &S,
       .addStaticInitializationFunctions(false);
 }
 
+/// Set up Texture2DMS (multisampled) type: SRV texture with only operator[]
+/// and sample-indexed Load. It does not support sampling, gather, LOD, or 
mips.
+static BuiltinTypeDeclBuilder setupMSTextureType(CXXRecordDecl *Decl, Sema &S,
+                                                 bool IsArray,
+                                                 ResourceDimension Dim) {
+  return BuiltinTypeDeclBuilder(S, Decl)
+      .addTextureHandle(ResourceClass::SRV, /*IsROV=*/false, IsArray, Dim,
+                        /*IsMultiSampled=*/true)
+      .addTextureLoadMSMethods(Dim, IsArray)
+      .addArraySubscriptOperators(Dim, IsArray)
+      // TODO: Add MS-specific GetDimensions (with a NumberOfSamples output);
+      // the generic addGetDimensionsMethods is mip-based and unsuitable here.
----------------
bogner wrote:

I assume we have an issue for this - can we link it here?

https://github.com/llvm/llvm-project/pull/211972
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to