diff --git a/src/dxso/dxso_analysis.cpp b/src/dxso/dxso_analysis.cpp index 33e9bbf7..c16d0f42 100644 --- a/src/dxso/dxso_analysis.cpp +++ b/src/dxso/dxso_analysis.cpp @@ -10,8 +10,13 @@ namespace dxvk { const DxsoInstructionContext& ctx) { DxsoOpcode opcode = ctx.instruction.opcode; - if (opcode == DxsoOpcode::Cnd && ctx.instruction.coissue) + // Co-issued CNDs are issued before their parents, + // except when the parent is a CND. + if (opcode == DxsoOpcode::Cnd && + m_coissueCtx.instruction.opcode != DxsoOpcode::Cnd && + ctx.instruction.coissue) { m_analysis->coissues.push_back(ctx); + } if (opcode == DxsoOpcode::TexKill) m_analysis->usesKill = true; @@ -41,6 +46,8 @@ namespace dxvk { //|| opcode == DxsoOpcode::TexLdl || opcode == DxsoOpcode::TexDepth) m_analysis->usesDerivatives = true; + + m_coissueCtx = ctx; } void DxsoAnalyzer::finalize(size_t tokenCount) { diff --git a/src/dxso/dxso_analysis.h b/src/dxso/dxso_analysis.h index 96fd8e1f..3e1d0076 100644 --- a/src/dxso/dxso_analysis.h +++ b/src/dxso/dxso_analysis.h @@ -34,6 +34,8 @@ namespace dxvk { DxsoAnalysisInfo* m_analysis = nullptr; + DxsoInstructionContext m_coissueCtx; + }; } \ No newline at end of file