Commit 4d6fbacd authored by Joshua Ashton's avatar Joshua Ashton 🐸

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

parent abf74299
......@@ -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);
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment