Shader_IR: add the ability to amend code in the shader ir.
This commit introduces a mechanism by which shader IR code can be amended and extended. This useful for track algorithms where certain information can derived from before the track such as indexes to array samplers.
This commit is contained in:
parent
f846e3d6d0
commit
b3371ed09e
5 changed files with 72 additions and 3 deletions
|
@ -446,4 +446,10 @@ Node ShaderIR::BitfieldInsert(Node base, Node insert, u32 offset, u32 bits) {
|
|||
Immediate(bits));
|
||||
}
|
||||
|
||||
u32 ShaderIR::DeclareAmend(Node new_amend) {
|
||||
const u32 id = static_cast<u32>(amend_code.size());
|
||||
amend_code.push_back(new_amend);
|
||||
return id;
|
||||
}
|
||||
|
||||
} // namespace VideoCommon::Shader
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue