[clang] [llvm] [NFC][HLSL][DXIL] Move D3D12.h enums and flags to DXILABI (PR #143041)
Justin Bogner via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 6 12:52:13 PDT 2025
================
@@ -99,6 +99,132 @@ enum class SamplerFeedbackType : uint32_t {
const unsigned MinWaveSize = 4;
const unsigned MaxWaveSize = 128;
+// Definition of the various d3d12.h enumerations and flags. The definitions of
+// all values here correspond to their description in the d3d12.h header and
+// are carried over from their values in DXC. For reference:
+// https://learn.microsoft.com/en-us/windows/win32/api/d3d12/
+
+// D3D12_ROOT_SIGNATURE_FLAGS
+enum class RootFlags : uint32_t {
+ None = 0,
+ AllowInputAssemblerInputLayout = 0x1,
+ DenyVertexShaderRootAccess = 0x2,
+ DenyHullShaderRootAccess = 0x4,
+ DenyDomainShaderRootAccess = 0x8,
+ DenyGeometryShaderRootAccess = 0x10,
+ DenyPixelShaderRootAccess = 0x20,
+ AllowStreamOutput = 0x40,
+ LocalRootSignature = 0x80,
+ DenyAmplificationShaderRootAccess = 0x100,
+ DenyMeshShaderRootAccess = 0x200,
+ CBVSRVUAVHeapDirectlyIndexed = 0x400,
+ SamplerHeapDirectlyIndexed = 0x800,
+ ValidFlags = 0x00000fff
----------------
bogner wrote:
I guess this is cribbed from DXC, but do we really want these "ValidFlags" entries in the enums? Who's going to use them? In general I feel like there are better ways to validate that whatever flags we get match what we expect/can handle, and adding extraneous values to enums makes things like `-Wcovered-switch` less effective.
https://github.com/llvm/llvm-project/pull/143041
More information about the cfe-commits
mailing list