mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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) {
|
const DxsoInstructionContext& ctx) {
|
||||||
DxsoOpcode opcode = ctx.instruction.opcode;
|
DxsoOpcode opcode = ctx.instruction.opcode;
|
||||||
|
|
||||||
|
if (opcode == DxsoOpcode::Cnd && ctx.instruction.coissue)
|
||||||
|
m_analysis->coissues.push_back(ctx);
|
||||||
|
|
||||||
if (opcode == DxsoOpcode::TexKill)
|
if (opcode == DxsoOpcode::TexKill)
|
||||||
m_analysis->usesKill = true;
|
m_analysis->usesKill = true;
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@ namespace dxvk {
|
|||||||
|
|
||||||
bool usesDerivatives = false;
|
bool usesDerivatives = false;
|
||||||
bool usesKill = false;
|
bool usesKill = false;
|
||||||
|
|
||||||
|
std::vector<DxsoInstructionContext> coissues;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DxsoAnalyzer {
|
class DxsoAnalyzer {
|
||||||
|
@ -74,9 +74,19 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
void DxsoCompiler::processInstruction(
|
void DxsoCompiler::processInstruction(
|
||||||
const DxsoInstructionContext& ctx) {
|
const DxsoInstructionContext& ctx,
|
||||||
|
uint32_t currentCoissueIdx) {
|
||||||
const DxsoOpcode opcode = ctx.instruction.opcode;
|
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) {
|
switch (opcode) {
|
||||||
case DxsoOpcode::Nop:
|
case DxsoOpcode::Nop:
|
||||||
return;
|
return;
|
||||||
|
@ -231,7 +231,8 @@ namespace dxvk {
|
|||||||
* \param [in] ins The instruction
|
* \param [in] ins The instruction
|
||||||
*/
|
*/
|
||||||
void processInstruction(
|
void processInstruction(
|
||||||
const DxsoInstructionContext& ctx);
|
const DxsoInstructionContext& ctx,
|
||||||
|
uint32_t currentCoissueIdx = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Finalizes the shader
|
* \brief Finalizes the shader
|
||||||
|
Loading…
x
Reference in New Issue
Block a user