mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[dxso] Track and prioritize co-issued CNDs above their parent ops
This commit is contained in:
parent
4d6fbacd3a
commit
3ff9c4cc43
@ -10,6 +10,9 @@ namespace dxvk {
|
||||
const DxsoInstructionContext& ctx) {
|
||||
DxsoOpcode opcode = ctx.instruction.opcode;
|
||||
|
||||
if (opcode == DxsoOpcode::Cnd && ctx.instruction.coissue)
|
||||
m_analysis->coissues.push_back(ctx);
|
||||
|
||||
if (opcode == DxsoOpcode::TexKill)
|
||||
m_analysis->usesKill = true;
|
||||
|
||||
|
@ -10,6 +10,8 @@ namespace dxvk {
|
||||
|
||||
bool usesDerivatives = false;
|
||||
bool usesKill = false;
|
||||
|
||||
std::vector<DxsoInstructionContext> coissues;
|
||||
};
|
||||
|
||||
class DxsoAnalyzer {
|
||||
|
@ -74,9 +74,19 @@ namespace dxvk {
|
||||
|
||||
|
||||
void DxsoCompiler::processInstruction(
|
||||
const DxsoInstructionContext& ctx) {
|
||||
const DxsoInstructionContext& ctx,
|
||||
uint32_t currentCoissueIdx) {
|
||||
const DxsoOpcode opcode = ctx.instruction.opcode;
|
||||
|
||||
for (const auto& coissue : m_analysis->coissues) {
|
||||
if (coissue.instructionIdx == ctx.instructionIdx &&
|
||||
coissue.instructionIdx != currentCoissueIdx)
|
||||
return;
|
||||
|
||||
if (coissue.instructionIdx == ctx.instructionIdx + 1)
|
||||
processInstruction(coissue, coissue.instructionIdx);
|
||||
}
|
||||
|
||||
switch (opcode) {
|
||||
case DxsoOpcode::Nop:
|
||||
return;
|
||||
|
@ -231,7 +231,8 @@ namespace dxvk {
|
||||
* \param [in] ins The instruction
|
||||
*/
|
||||
void processInstruction(
|
||||
const DxsoInstructionContext& ctx);
|
||||
const DxsoInstructionContext& ctx,
|
||||
uint32_t currentCoissueIdx = 0);
|
||||
|
||||
/**
|
||||
* \brief Finalizes the shader
|
||||
|
Loading…
x
Reference in New Issue
Block a user