mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-11-03 16:39:01 -06:00 
			
		
		
		
	Shader_Ir: Correct tracking to track from right to left
This commit is contained in:
		
				
					committed by
					
						
						FernandoS27
					
				
			
			
				
	
			
			
			
						parent
						
							b56e7f870a
						
					
				
				
					commit
					d614193e49
				
			@@ -57,8 +57,8 @@ std::tuple<Node, u32, u32> ShaderIR::TrackCbuf(Node tracked, const NodeBlock& co
 | 
			
		||||
        return TrackCbuf(source, code, new_cursor);
 | 
			
		||||
    }
 | 
			
		||||
    if (const auto operation = std::get_if<OperationNode>(&*tracked)) {
 | 
			
		||||
        for (std::size_t i = 0; i < operation->GetOperandsCount(); ++i) {
 | 
			
		||||
            if (auto found = TrackCbuf((*operation)[i], code, cursor); std::get<0>(found)) {
 | 
			
		||||
        for (std::size_t i = operation->GetOperandsCount(); i > 0; --i) {
 | 
			
		||||
            if (auto found = TrackCbuf((*operation)[i - 1], code, cursor); std::get<0>(found)) {
 | 
			
		||||
                // Cbuf found in operand.
 | 
			
		||||
                return found;
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user