Shader_IR: Implement Injectable Custom Variables to the IR.
This commit is contained in:
parent
2b02f29a2d
commit
3c34678627
5 changed files with 70 additions and 1 deletions
|
@ -39,6 +39,10 @@ Node ShaderIR::GetRegister(Register reg) {
|
|||
return MakeNode<GprNode>(reg);
|
||||
}
|
||||
|
||||
Node ShaderIR::GetCustomVariable(u32 id) {
|
||||
return MakeNode<CustomVarNode>(id);
|
||||
}
|
||||
|
||||
Node ShaderIR::GetImmediate19(Instruction instr) {
|
||||
return Immediate(instr.alu.GetImm20_19());
|
||||
}
|
||||
|
@ -453,4 +457,9 @@ std::size_t ShaderIR::DeclareAmend(Node new_amend) {
|
|||
return id;
|
||||
}
|
||||
|
||||
u32 ShaderIR::NewCustomVariable() {
|
||||
const u32 id = num_custom_variables++;
|
||||
return id;
|
||||
}
|
||||
|
||||
} // namespace VideoCommon::Shader
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue