Browse Source

Don't directly lower patch constant signatures (indirect through HS)

- likely bug still where multiple HS share patch constant function
Tex Riddell 7 years ago
parent
commit
ef8a94b23f
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lib/HLSL/DxilGenerationPass.cpp

+ 3 - 2
lib/HLSL/DxilGenerationPass.cpp

@@ -237,12 +237,13 @@ public:
     } else {
       for (auto It = M.begin(); It != M.end();) {
         Function &F = *(It++);
-        // Lower signature for each entry function.
-        if (m_pHLModule->IsEntryThatUsesSignatures(&F)) {
+        // Lower signature for each graphics or compute entry function.
+        if (m_pHLModule->IsGraphicsShader(&F) || m_pHLModule->IsComputeShader(&F)) {
           DxilFunctionProps &props = m_pHLModule->GetDxilFunctionProps(&F);
           std::unique_ptr<DxilEntrySignature> pSig =
               llvm::make_unique<DxilEntrySignature>(props.shaderKind, m_pHLModule->GetHLOptions().bUseMinPrecision);
           HLSignatureLower sigLower(&F, *m_pHLModule, *pSig);
+          // TODO: BUG: This will lower patch constant function sigs twice if used by two hull shaders!
           sigLower.Run();
           DxilEntrySignatureMap[&F] = std::move(pSig);
         }