1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-12 13:54:14 +01:00
dxvk/src/dxso/dxso_analysis.h
Joshua Ashton e0b83b13b5 [dxso] Only track co-issue parent opcode rather than the full context
Tracking the full instruction ctx is slow and unnecessary
2019-12-25 18:00:46 +00:00

41 lines
674 B
C++

#pragma once
#include "dxso_modinfo.h"
#include "dxso_decoder.h"
namespace dxvk {
struct DxsoAnalysisInfo {
uint32_t bytecodeByteLength;
bool usesDerivatives = false;
bool usesKill = false;
std::vector<DxsoInstructionContext> coissues;
};
class DxsoAnalyzer {
public:
DxsoAnalyzer(
DxsoAnalysisInfo& analysis);
/**
* \brief Processes a single instruction
* \param [in] ins The instruction
*/
void processInstruction(
const DxsoInstructionContext& ctx);
void finalize(size_t tokenCount);
private:
DxsoAnalysisInfo* m_analysis = nullptr;
DxsoOpcode m_parentOpcode;
};
}