[clang] Create Texture Dimension attribute in HLSL (PR #104239)
Justin Bogner via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 15 14:15:36 PDT 2024
bogner wrote:
> You're right, a single integer won't be able to match to all those dimension kinds. I propose we make an enum, much like llvm::ResourceKind, called TextureDimensionKind, that enumerates all the texture kinds you listed above. Then I can make the attribute take a single enum argument, whether that be "1D", or "1DArray", and that should cover all texture dimension kinds. Thoughts?
If we're just going to use an enum we should probably just stick with `llvm::ResourceKind`. It's a bit annoying to have some invalid or redundant values there but probably better than duplicating most of the enum. The value of doing something different would be if we can come up with something that's simpler, more understandable, or better abstracts the information we're trying to convey across the DirectX and SPIR-V targets.
https://github.com/llvm/llvm-project/pull/104239
More information about the cfe-commits
mailing list