1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-15 07:29:17 +01:00

[dbxc] Actually fix callc implementation

Yeah maybe we should close our blocks properly. There seems to be
no way to generate a callc instruction with fxc so this is untested.
This commit is contained in:
Philip Rebohle 2019-09-22 22:36:42 +02:00
parent 94ce76da6b
commit f38cfd592e
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -4214,20 +4214,21 @@ namespace dxvk {
// We basically have to wrap this into an 'if' block // We basically have to wrap this into an 'if' block
const uint32_t callLabel = m_module.allocateId(); const uint32_t callLabel = m_module.allocateId();
const uint32_t continueLabel = m_module.allocateId(); const uint32_t skipLabel = m_module.allocateId();
m_module.opSelectionMerge(continueLabel, m_module.opSelectionMerge(skipLabel,
spv::SelectionControlMaskNone); spv::SelectionControlMaskNone);
m_module.opBranchConditional( m_module.opBranchConditional(
zeroTest.id, callLabel, continueLabel); zeroTest.id, callLabel, skipLabel);
m_module.opLabel(callLabel); m_module.opLabel(callLabel);
m_module.opFunctionCall( m_module.opFunctionCall(
m_module.defVoidType(), m_module.defVoidType(),
functionId, 0, nullptr); functionId, 0, nullptr);
m_module.opLabel(continueLabel); m_module.opBranch(skipLabel);
m_module.opLabel(skipLabel);
} }