Browse Source

Add new feature info names to disassembler (#474)

- also update ShaderFeatureInfoCount and static_assert that the
count matches in disassembler
Tex Riddell 8 years ago
parent
commit
b4e2a8b57d

+ 1 - 1
include/dxc/HLSL/DxilContainer.h

@@ -106,7 +106,7 @@ static const uint64_t ShaderFeatureInfo_Int64Ops = 0x8000;
 static const uint64_t ShaderFeatureInfo_ViewID = 0x10000;
 static const uint64_t ShaderFeatureInfo_Barycentrics = 0x20000;
 
-static const unsigned ShaderFeatureInfoCount = 16;
+static const unsigned ShaderFeatureInfoCount = 18;
 
 struct DxilShaderFeatureInfo {
   uint64_t FeatureFlags;

+ 3 - 0
tools/clang/tools/dxcompiler/dxcompilerobj.cpp

@@ -1095,7 +1095,10 @@ static PCSTR g_pFeatureInfoNames[] =
     "SV_RenderTargetArrayIndex or SV_ViewportArrayIndex from any shader feeding rasterizer",
     "Wave level operations",
     "64-Bit integer",
+    "View Instancing",
+    "Barycentrics",
 };
+static_assert(_countof(g_pFeatureInfoNames) == ShaderFeatureInfoCount, "g_pFeatureInfoNames needs to be updated");
 
 static void PrintFeatureInfo(const DxilShaderFeatureInfo* pFeatureInfo, raw_string_ostream &OS, StringRef comment) {
   uint64_t featureFlags = pFeatureInfo->FeatureFlags;