mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-11-03 16:39:01 -06:00 
			
		
		
		
	gl_shader_decompiler: Check if SetRegister result is ZeroIndex.
This commit is contained in:
		@@ -485,6 +485,12 @@ private:
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    void SetRegister(const Register& reg, u64 elem, const std::string& value,
 | 
					    void SetRegister(const Register& reg, u64 elem, const std::string& value,
 | 
				
			||||||
                     u64 dest_num_components, u64 value_num_components, u64 dest_elem) {
 | 
					                     u64 dest_num_components, u64 value_num_components, u64 dest_elem) {
 | 
				
			||||||
 | 
					        if (reg == Register::ZeroIndex) {
 | 
				
			||||||
 | 
					            LOG_CRITICAL(HW_GPU, "Cannot set Register::ZeroIndex");
 | 
				
			||||||
 | 
					            UNREACHABLE();
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        std::string dest = GetRegister(reg, static_cast<u32>(dest_elem));
 | 
					        std::string dest = GetRegister(reg, static_cast<u32>(dest_elem));
 | 
				
			||||||
        if (dest_num_components > 1) {
 | 
					        if (dest_num_components > 1) {
 | 
				
			||||||
            dest += GetSwizzle(elem);
 | 
					            dest += GetSwizzle(elem);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user