mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu-mainline.git
				synced 2025-03-21 01:53:15 +00:00 
			
		
		
		
	shader_decode: Implement BRA internal flag
This commit is contained in:
		
							parent
							
								
									210620ff31
								
							
						
					
					
						commit
						6ca31f544a
					
				@ -50,11 +50,15 @@ u32 ShaderIR::DecodeOther(BasicBlock& bb, u32 pc) {
 | 
				
			|||||||
        UNIMPLEMENTED_IF_MSG(instr.bra.constant_buffer != 0,
 | 
					        UNIMPLEMENTED_IF_MSG(instr.bra.constant_buffer != 0,
 | 
				
			||||||
                             "BRA with constant buffers are not implemented");
 | 
					                             "BRA with constant buffers are not implemented");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const Tegra::Shader::ConditionCode cc = instr.flow_condition_code;
 | 
					 | 
				
			||||||
        UNIMPLEMENTED_IF(cc != Tegra::Shader::ConditionCode::T);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        const u32 target = pc + instr.bra.GetBranchTarget();
 | 
					        const u32 target = pc + instr.bra.GetBranchTarget();
 | 
				
			||||||
        bb.push_back(Operation(OperationCode::Bra, Immediate(target)));
 | 
					        const Node branch = Operation(OperationCode::Bra, Immediate(target));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        const Tegra::Shader::ConditionCode cc = instr.flow_condition_code;
 | 
				
			||||||
 | 
					        if (cc != Tegra::Shader::ConditionCode::T) {
 | 
				
			||||||
 | 
					            bb.push_back(Conditional(GetConditionCode(cc), {branch}));
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            bb.push_back(branch);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    case OpCode::Id::SSY: {
 | 
					    case OpCode::Id::SSY: {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user