mirror of
				https://github.com/hedge-dev/XenosRecomp.git
				synced 2025-10-30 07:12:17 +00:00 
			
		
		
		
	Fix incorrect “FLT_MIN”
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
This commit is contained in:
		
							parent
							
								
									06fab7d08e
								
							
						
					
					
						commit
						8752326f1c
					
				
					 2 changed files with 3 additions and 4 deletions
				
			
		|  | @ -13,7 +13,6 @@ | |||
| #if defined(__air__) || !defined(__cplusplus) || defined(__INTELLISENSE__) | ||||
| 
 | ||||
| #ifndef __air__ | ||||
| #define FLT_MIN asfloat(0xff7fffff) | ||||
| #define FLT_MAX asfloat(0x7f7fffff) | ||||
| #endif | ||||
| 
 | ||||
|  |  | |||
|  | @ -1085,19 +1085,19 @@ void ShaderRecompiler::recompile(const AluInstruction& instr) | |||
| 
 | ||||
|         case AluScalarOpcode::Logc: | ||||
|         case AluScalarOpcode::Log: | ||||
|             print("clamp(log2({}), FLT_MIN, FLT_MAX)", op(SCALAR_0).expression); | ||||
|             print("clamp(log2({}), -FLT_MAX, FLT_MAX)", op(SCALAR_0).expression); | ||||
|             break; | ||||
| 
 | ||||
|         case AluScalarOpcode::Rcpc: | ||||
|         case AluScalarOpcode::Rcpf: | ||||
|         case AluScalarOpcode::Rcp: | ||||
|             print("clamp(rcp({}), FLT_MIN, FLT_MAX)", op(SCALAR_0).expression); | ||||
|             print("clamp(rcp({}), -FLT_MAX, FLT_MAX)", op(SCALAR_0).expression); | ||||
|             break; | ||||
| 
 | ||||
|         case AluScalarOpcode::Rsqc: | ||||
|         case AluScalarOpcode::Rsqf: | ||||
|         case AluScalarOpcode::Rsq: | ||||
|             print("clamp(rsqrt({}), FLT_MIN, FLT_MAX)", op(SCALAR_0).expression); | ||||
|             print("clamp(rsqrt({}), -FLT_MAX, FLT_MAX)", op(SCALAR_0).expression); | ||||
|             break; | ||||
| 
 | ||||
|         case AluScalarOpcode::Subs: | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Isaac Marovitz
						Isaac Marovitz