浏览代码

Fix x86-only build break and a few warnings (#2702)

Helena Kotas 5 年之前
父节点
当前提交
361f539c59

+ 2 - 2
projects/dxilconv/include/ShaderBinary/ShaderBinary.h

@@ -127,8 +127,8 @@ struct CInstructionInfo
 
 extern CInstructionInfo g_InstructionInfo[D3D10_SB_NUM_OPCODES];
 
-UINT __stdcall GetNumInstructionOperands(D3D10_SB_OPCODE_TYPE OpCode);
-void __stdcall InitInstructionInfo();
+UINT GetNumInstructionOperands(D3D10_SB_OPCODE_TYPE OpCode);
+void InitInstructionInfo();
 
 //*****************************************************************************
 //

+ 4 - 2
projects/dxilconv/lib/DxbcConverter/DxbcConverter.cpp

@@ -743,7 +743,7 @@ void DxbcConverter::ConvertSignature(SignatureHelper &SigHelper, DxilSignature &
         const SignatureHelper::ElementRecord &SigElem = SigHelper.m_ElementRecords[iElement];
         unsigned StartRow = SigElem.StartRow;
         unsigned StartCol = SigElem.StartCol;
-        unsigned Rows     = SigElem.Rows; DXASSERT_NOMSG(Rows == 1);
+        unsigned Rows     = SigElem.Rows; DXASSERT_LOCALVAR_NOMSG(Rows, Rows == 1);
         unsigned Cols     = SigElem.Cols;
         unsigned Stream   = SigElem.Stream;
 
@@ -1099,7 +1099,7 @@ static void AddDxilPipelineStateValidationToDXBC(
   // Set resource binding information
   UINT uResIndex = 0;
   for (auto &&R : pModule->GetCBuffers()) {
-    DXASSERT_NOMSG(uResIndex < uTotalResources);
+    DXASSERT_LOCALVAR_NOMSG(uTotalResources, uResIndex < uTotalResources);
     PSVResourceBindInfo0 *pBindInfo = PSV.GetPSVResourceBindInfo0(uResIndex);
     DXASSERT_NOMSG(pBindInfo);
     pBindInfo->ResType = (UINT)PSVResourceType::CBV;
@@ -1854,9 +1854,11 @@ void DxbcConverter::AnalyzeShader(D3D10ShaderBinary::CShaderCodeParser &Parser)
       DXASSERT_DXBC(Inst.m_NumOperands == 0);
       auto& Iface = m_Interfaces[Inst.m_InterfaceDecl.InterfaceNumber];
       Iface.Tables.assign(Inst.m_InterfaceDecl.pFunctionTableIdentifiers, Inst.m_InterfaceDecl.pFunctionTableIdentifiers + Inst.m_InterfaceDecl.TableLength);
+#ifdef DBG
       for (unsigned TableIdx : Iface.Tables) {
           DXASSERT_DXBC(m_FunctionTables[TableIdx].size() == Inst.m_InterfaceDecl.ExpectedTableSize);
       }
+#endif
       Iface.bDynamicallyIndexed = Inst.m_InterfaceDecl.bDynamicallyIndexed;
       Iface.NumArrayEntries = Inst.m_InterfaceDecl.ArrayLength;
       m_NumIfaces = std::max(m_NumIfaces, Inst.m_InterfaceDecl.InterfaceNumber + Iface.NumArrayEntries);

+ 2 - 2
projects/dxilconv/lib/DxilConvPasses/ScopeNestedCFG.cpp

@@ -1321,7 +1321,7 @@ void ScopeNestedCFG::TransformAcyclicRegion(BasicBlock *pEntry) {
     case BranchKind::LoopBreak: {
       // Connect to loop exit.
       TerminatorInst *pClonedScopeBeginTI = Scope.pClonedScopeBeginBB->getTerminator();
-      DXASSERT_NOMSG(pClonedScopeBeginTI->getNumSuccessors() == 1);
+      DXASSERT_LOCALVAR_NOMSG(pClonedScopeBeginTI, pClonedScopeBeginTI->getNumSuccessors() == 1);
       DXASSERT_NOMSG(m_LoopMap.find(pEntry) != m_LoopMap.end());
       LoopItem &LI = m_LoopMap[pEntry];
       AddEdge(Scope.pClonedScopeBeginBB, 0, LI.pLE, Edges);
@@ -1331,7 +1331,7 @@ void ScopeNestedCFG::TransformAcyclicRegion(BasicBlock *pEntry) {
     case BranchKind::LoopContinue: {
       // Connect to loop latch.
       TerminatorInst *pClonedScopeBeginTI = Scope.pClonedScopeBeginBB->getTerminator();
-      DXASSERT_NOMSG(pClonedScopeBeginTI->getNumSuccessors() == 1);
+      DXASSERT_LOCALVAR_NOMSG(pClonedScopeBeginTI, pClonedScopeBeginTI->getNumSuccessors() == 1);
       DXASSERT_NOMSG(m_LoopMap.find(pEntry) != m_LoopMap.end());
       LoopItem &LI = m_LoopMap[pEntry];
       AddEdge(Scope.pClonedScopeBeginBB, 0, LI.pLL, Edges);