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

- likely bug still where multiple HS share patch constant function
This commit is contained in:
Tex Riddell 2018-02-02 15:56:31 -08:00
Родитель 03179abb36
Коммит ef8a94b23f
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -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);
}