================
@@ -71,15 +71,30 @@ llvm::Type *DirectXTargetCodeGenInfo::getHLSLType(
         ResAttrs.ResourceDimension != llvm::dxil::ResourceDimension::Unknown;
     assert((!IsRawBuffer || !IsTexture) && "A resource cannot be both a raw "
                                            "buffer and a texture.");
+    bool IsMultiSampledTexture = IsTexture && ResAttrs.IsMultiSampled;
     llvm::StringRef TypeName = "dx.TypedBuffer";
     if (IsRawBuffer)
       TypeName = "dx.RawBuffer";
+    else if (IsMultiSampledTexture)
+      TypeName = "dx.MSTexture";
----------------
bogner wrote:

We seem to be missing docs for `dx.Texture` in `llvm/docs/DXILResources.rst`, 
but I was under the impression from [0037-texture-and-sampler-types] that we 
would only need one `dx.Texture` target type. I guess there are a couple of 
operations that are MS specific, but these aren't different like the raw and 
structured buffer are where loading from them is semantically different. I 
think a single `dx.Texture` type could be parametrized as per the table in 
[0015-resource-attributes-in-dxil-and-spirv.md].

[0037-texture-and-sampler-types]: 
https://github.com/llvm/wg-hlsl/blob/main/proposals/0037-texture-and-sampler-types.md
[0015-resource-attributes-in-dxil-and-spirv.md]: 
https://github.com/llvm/wg-hlsl/blob/main/proposals/0015-resource-attributes-in-dxil-and-spirv.md

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