mirror of
				https://github.com/hedge-dev/XenosRecomp.git
				synced 2025-10-30 07:12:17 +00:00 
			
		
		
		
	Initial vertex IO fixes
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
This commit is contained in:
		
							parent
							
								
									790c8be91b
								
							
						
					
					
						commit
						6c7c8fa87d
					
				
					 1 changed files with 12 additions and 5 deletions
				
			
		|  | @ -1360,13 +1360,15 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi | ||||||
| 
 | 
 | ||||||
|     out += "#if __air__\n"; |     out += "#if __air__\n"; | ||||||
| 
 | 
 | ||||||
|     out += "struct StageIn\n"; |     if (isPixelShader) { | ||||||
|     out += "{\n"; |         out += "struct StageIn\n"; | ||||||
|  |         out += "{\n"; | ||||||
| 
 | 
 | ||||||
|     for (auto& [usage, usageIndex] : INTERPOLATORS) |         for (auto& [usage, usageIndex] : INTERPOLATORS) | ||||||
|         println("\tfloat4 i{}{};", USAGE_VARIABLES[uint32_t(usage)], usageIndex); |             println("\tfloat4 i{}{};", USAGE_VARIABLES[uint32_t(usage)], usageIndex); | ||||||
| 
 | 
 | ||||||
|     out += "};\n"; |         out += "};\n"; | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|     if (isPixelShader) |     if (isPixelShader) | ||||||
|         out += "[[fragment]]\n"; |         out += "[[fragment]]\n"; | ||||||
|  | @ -1479,8 +1481,13 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi | ||||||
|     #ifdef UNLEASHED_RECOMP |     #ifdef UNLEASHED_RECOMP | ||||||
|         if (hasIndexCount) |         if (hasIndexCount) | ||||||
|         { |         { | ||||||
|  |             out += "#ifdef __air__\n"; | ||||||
|  |             out += "\tuint iVertexId [[vertex_id]],\n"; | ||||||
|  |             out += "\tuint iInstanceId [[instance_id]],\n"; | ||||||
|  |             out += "#else\n"; | ||||||
|             out += "\tin uint iVertexId : SV_VertexID,\n"; |             out += "\tin uint iVertexId : SV_VertexID,\n"; | ||||||
|             out += "\tin uint iInstanceId : SV_InstanceID,\n"; |             out += "\tin uint iInstanceId : SV_InstanceID,\n"; | ||||||
|  |             out += "#endif\n"; | ||||||
|         } |         } | ||||||
|     #endif |     #endif | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Isaac Marovitz
						Isaac Marovitz