mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-01 16:24:12 +01:00
[dxso] Keep track of the current instruction index in a decoding context
This commit is contained in:
parent
abf74299e9
commit
4d6fbacd3a
@ -175,6 +175,8 @@ namespace dxvk {
|
|||||||
bool DxsoDecodeContext::decodeInstruction(DxsoCodeIter& iter) {
|
bool DxsoDecodeContext::decodeInstruction(DxsoCodeIter& iter) {
|
||||||
uint32_t token = iter.read();
|
uint32_t token = iter.read();
|
||||||
|
|
||||||
|
m_ctx.instructionIdx++;
|
||||||
|
|
||||||
m_ctx.instruction.opcode = static_cast<DxsoOpcode>(
|
m_ctx.instruction.opcode = static_cast<DxsoOpcode>(
|
||||||
token & 0x0000ffff);
|
token & 0x0000ffff);
|
||||||
|
|
||||||
|
@ -193,6 +193,8 @@ namespace dxvk {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct DxsoInstructionContext {
|
struct DxsoInstructionContext {
|
||||||
|
uint32_t instructionIdx;
|
||||||
|
|
||||||
DxsoShaderInstruction instruction;
|
DxsoShaderInstruction instruction;
|
||||||
|
|
||||||
DxsoRegister pred;
|
DxsoRegister pred;
|
||||||
@ -212,7 +214,9 @@ namespace dxvk {
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
DxsoDecodeContext(const DxsoProgramInfo& programInfo)
|
DxsoDecodeContext(const DxsoProgramInfo& programInfo)
|
||||||
: m_programInfo( programInfo ) { }
|
: m_programInfo( programInfo ) {
|
||||||
|
m_ctx.instructionIdx = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Retrieves current instruction context
|
* \brief Retrieves current instruction context
|
||||||
|
Loading…
Reference in New Issue
Block a user