1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 10:24:10 +01:00

[dxso] Keep track of the current instruction index in a decoding context

This commit is contained in:
Joshua Ashton 2019-12-22 17:44:30 +00:00
parent abf74299e9
commit 4d6fbacd3a
2 changed files with 7 additions and 1 deletions

View File

@ -175,6 +175,8 @@ namespace dxvk {
bool DxsoDecodeContext::decodeInstruction(DxsoCodeIter& iter) {
uint32_t token = iter.read();
m_ctx.instructionIdx++;
m_ctx.instruction.opcode = static_cast<DxsoOpcode>(
token & 0x0000ffff);

View File

@ -193,6 +193,8 @@ namespace dxvk {
};
struct DxsoInstructionContext {
uint32_t instructionIdx;
DxsoShaderInstruction instruction;
DxsoRegister pred;
@ -212,7 +214,9 @@ namespace dxvk {
public:
DxsoDecodeContext(const DxsoProgramInfo& programInfo)
: m_programInfo( programInfo ) { }
: m_programInfo( programInfo ) {
m_ctx.instructionIdx = 0;
}
/**
* \brief Retrieves current instruction context