mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-09 01:28:41 +00:00
translate: Correct instance id fetch in local shader (#3309)
This commit is contained in:
parent
824d332d0f
commit
93b06ba2da
1 changed files with 5 additions and 1 deletions
|
@ -92,8 +92,12 @@ void Translator::EmitPrologue(IR::Block* first_block) {
|
|||
if (runtime_info.num_input_vgprs > 0) {
|
||||
ir.SetVectorReg(dst_vreg++, ir.Imm32(0));
|
||||
}
|
||||
// v2: instance ID
|
||||
// v2: unknown
|
||||
if (runtime_info.num_input_vgprs > 1) {
|
||||
++dst_vreg;
|
||||
}
|
||||
// v3: instance ID, plain
|
||||
if (runtime_info.num_input_vgprs > 2) {
|
||||
ir.SetVectorReg(dst_vreg++, ir.GetAttributeU32(IR::Attribute::InstanceId));
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue