Pārlūkot izejas kodu

Add NumOpCodes_Dxil_1_1 and ComputeViewIdState pass to hctdb (#300)

Note: changed viewid_state to viewid-state for consistency
Tex Riddell 8 gadi atpakaļ
vecāks
revīzija
261c3f8819

+ 2 - 0
include/dxc/HLSL/DxilConstants.h

@@ -451,6 +451,7 @@ namespace DXIL {
     WaveReadLaneFirst = 118, // returns the value from the first lane
   
     NumOpCodes_Dxil_1_0 = 137,
+    NumOpCodes_Dxil_1_1 = 139,
   
     NumOpCodes = 139 // exclusive last value of enumeration
   };
@@ -608,6 +609,7 @@ namespace DXIL {
     WaveReadLaneFirst,
   
     NumOpClasses_Dxil_1_0 = 93,
+    NumOpClasses_Dxil_1_1 = 95,
   
     NumOpClasses = 95 // exclusive last value of enumeration
   };

+ 2 - 2
lib/HLSL/ComputeViewIdState.cpp

@@ -783,9 +783,9 @@ unsigned DxilViewIdState::Deserialize1(const unsigned *pData, unsigned DataSize,
 
 char ComputeViewIdState::ID = 0;
 
-INITIALIZE_PASS_BEGIN(ComputeViewIdState, "viewid_state",
+INITIALIZE_PASS_BEGIN(ComputeViewIdState, "viewid-state",
                 "Compute information related to ViewID", true, true)
-INITIALIZE_PASS_END(ComputeViewIdState, "viewid_state",
+INITIALIZE_PASS_END(ComputeViewIdState, "viewid-state",
                 "Compute information related to ViewID", true, true)
 
 ComputeViewIdState::ComputeViewIdState() : ModulePass(ID) {

+ 2 - 2
utils/hct/hctdb.py

@@ -1066,8 +1066,7 @@ class db_dxil(object):
         next_op_idx += 1
 
         # End of DXIL 1.1 opcodes.
-        # Uncomment this when 1.1 is final.
-        #self.set_op_count_for_version(1, 1, next_op_idx)
+        self.set_op_count_for_version(1, 1, next_op_idx)
 
         assert next_op_idx == 139, "next operation index is %d rather than 139 and thus opcodes are broken" % next_op_idx
 
@@ -1334,6 +1333,7 @@ class db_dxil(object):
         add_pass('lowerbitsets', 'LowerBitSets', 'Lower bitset metadata', [
             {'n':'lowerbitsets-avoid-reuse', 'i':'AvoidReuse', 't':'bool', 'd':'Try to avoid reuse of byte array addresses using aliases'}])
         add_pass('red', 'ReducibilityAnalysis', 'Reducibility Analysis', [])
+        add_pass('viewid-state', 'ComputeViewIdState', 'Compute information related to ViewID', [])
         # TODO: turn STATISTICS macros into ETW events
         # assert no duplicate names
         self.pass_idx_args = set()