mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-27 01:34:24 +01:00
shader/decode: Implement S2R Tic
This commit is contained in:
parent
f601f25bcc
commit
104641db07
@ -68,6 +68,13 @@ u32 ShaderIR::DecodeOther(NodeBlock& bb, u32 pc) {
|
|||||||
case SystemVariable::InvocationInfo:
|
case SystemVariable::InvocationInfo:
|
||||||
LOG_WARNING(HW_GPU, "MOV_SYS instruction with InvocationInfo is incomplete");
|
LOG_WARNING(HW_GPU, "MOV_SYS instruction with InvocationInfo is incomplete");
|
||||||
return Immediate(0u);
|
return Immediate(0u);
|
||||||
|
case SystemVariable::Tid: {
|
||||||
|
Node value = Immediate(0);
|
||||||
|
value = BitfieldInsert(value, Operation(OperationCode::LocalInvocationIdX), 0, 9);
|
||||||
|
value = BitfieldInsert(value, Operation(OperationCode::LocalInvocationIdY), 16, 9);
|
||||||
|
value = BitfieldInsert(value, Operation(OperationCode::LocalInvocationIdZ), 26, 5);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
case SystemVariable::TidX:
|
case SystemVariable::TidX:
|
||||||
return Operation(OperationCode::LocalInvocationIdX);
|
return Operation(OperationCode::LocalInvocationIdX);
|
||||||
case SystemVariable::TidY:
|
case SystemVariable::TidY:
|
||||||
|
@ -405,4 +405,9 @@ Node ShaderIR::BitfieldExtract(Node value, u32 offset, u32 bits) {
|
|||||||
Immediate(offset), Immediate(bits));
|
Immediate(offset), Immediate(bits));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Node ShaderIR::BitfieldInsert(Node base, Node insert, u32 offset, u32 bits) {
|
||||||
|
return Operation(OperationCode::UBitfieldInsert, NO_PRECISE, base, insert, Immediate(offset),
|
||||||
|
Immediate(bits));
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace VideoCommon::Shader
|
} // namespace VideoCommon::Shader
|
||||||
|
@ -279,6 +279,9 @@ private:
|
|||||||
/// Extracts a sequence of bits from a node
|
/// Extracts a sequence of bits from a node
|
||||||
Node BitfieldExtract(Node value, u32 offset, u32 bits);
|
Node BitfieldExtract(Node value, u32 offset, u32 bits);
|
||||||
|
|
||||||
|
/// Inserts a sequence of bits from a node
|
||||||
|
Node BitfieldInsert(Node base, Node insert, u32 offset, u32 bits);
|
||||||
|
|
||||||
void WriteTexInstructionFloat(NodeBlock& bb, Tegra::Shader::Instruction instr,
|
void WriteTexInstructionFloat(NodeBlock& bb, Tegra::Shader::Instruction instr,
|
||||||
const Node4& components);
|
const Node4& components);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user