mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-01 10:54:14 +01:00
[dxbc] Formatting fixes + Hull shader barriers
This commit is contained in:
parent
96ca9fa6ea
commit
4688b2cc5a
@ -372,11 +372,11 @@ namespace dxvk {
|
||||
// be stored in the second operand.
|
||||
const bool hasSv =
|
||||
ins.op == DxbcOpcode::DclInputSgv
|
||||
|| ins.op == DxbcOpcode::DclInputSiv
|
||||
|| ins.op == DxbcOpcode::DclInputPsSgv
|
||||
|| ins.op == DxbcOpcode::DclInputPsSiv
|
||||
|| ins.op == DxbcOpcode::DclOutputSgv
|
||||
|| ins.op == DxbcOpcode::DclOutputSiv;
|
||||
|| ins.op == DxbcOpcode::DclInputSiv
|
||||
|| ins.op == DxbcOpcode::DclInputPsSgv
|
||||
|| ins.op == DxbcOpcode::DclInputPsSiv
|
||||
|| ins.op == DxbcOpcode::DclOutputSgv
|
||||
|| ins.op == DxbcOpcode::DclOutputSiv;
|
||||
|
||||
DxbcSystemValue sv = DxbcSystemValue::None;
|
||||
|
||||
@ -387,7 +387,7 @@ namespace dxvk {
|
||||
// interpolation mode that is part of the op token.
|
||||
const bool hasInterpolationMode =
|
||||
ins.op == DxbcOpcode::DclInputPs
|
||||
|| ins.op == DxbcOpcode::DclInputPsSiv;
|
||||
|| ins.op == DxbcOpcode::DclInputPsSiv;
|
||||
|
||||
DxbcInterpolationMode im = DxbcInterpolationMode::Undefined;
|
||||
|
||||
@ -603,7 +603,6 @@ namespace dxvk {
|
||||
m_interfaceSlots.outputSlots |= 1u << regIdx;
|
||||
}
|
||||
|
||||
|
||||
// Add a new system value mapping if needed
|
||||
if (sv != DxbcSystemValue::None)
|
||||
m_oMappings.push_back({ regIdx, regMask, sv });
|
||||
@ -5122,11 +5121,17 @@ namespace dxvk {
|
||||
void DxbcCompiler::emitHsFinalize() {
|
||||
this->emitHsControlPointPhase(m_hs.cpPhase);
|
||||
|
||||
if (m_hs.forkPhases.size() != 0
|
||||
|| m_hs.joinPhases.size() != 0)
|
||||
this->emitHsPhaseBarrier();
|
||||
|
||||
for (const auto& phase : m_hs.forkPhases)
|
||||
this->emitHsForkJoinPhase(phase);
|
||||
|
||||
for (const auto& phase : m_hs.joinPhases)
|
||||
this->emitHsForkJoinPhase(phase);
|
||||
|
||||
// TODO set up output variables
|
||||
}
|
||||
|
||||
|
||||
@ -5247,6 +5252,15 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void DxbcCompiler::emitHsPhaseBarrier() {
|
||||
uint32_t exeScopeId = m_module.constu32(spv::ScopeWorkgroup);
|
||||
uint32_t memScopeId = m_module.constu32(spv::ScopeInvocation);
|
||||
uint32_t semanticId = m_module.constu32(spv::MemorySemanticsMaskNone);
|
||||
|
||||
m_module.opControlBarrier(exeScopeId, memScopeId, semanticId);
|
||||
}
|
||||
|
||||
|
||||
uint32_t DxbcCompiler::emitNewVariable(const DxbcRegisterInfo& info) {
|
||||
const uint32_t ptrTypeId = this->getPointerTypeId(info);
|
||||
return m_module.newVar(ptrTypeId, info.sclass);
|
||||
|
@ -867,6 +867,8 @@ namespace dxvk {
|
||||
void emitHsForkJoinPhase(
|
||||
const DxbcCompilerHsForkJoinPhase& phase);
|
||||
|
||||
void emitHsPhaseBarrier();
|
||||
|
||||
//////////////
|
||||
// Misc stuff
|
||||
void emitDclInputArray(
|
||||
|
Loading…
x
Reference in New Issue
Block a user