mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu.git
				synced 2025-05-12 00:45:25 +00:00 
			
		
		
		
	Merge pull request #1027 from bunnei/fix-kil
gl_shader_decompiler: Fix GLSL compiler error with KIL instruction.
This commit is contained in:
		
						commit
						3f81c38c6d
					
				| @ -1667,7 +1667,15 @@ private: | |||||||
|             } |             } | ||||||
|             case OpCode::Id::KIL: { |             case OpCode::Id::KIL: { | ||||||
|                 ASSERT(instr.flow.cond == Tegra::Shader::FlowCondition::Always); |                 ASSERT(instr.flow.cond == Tegra::Shader::FlowCondition::Always); | ||||||
|  | 
 | ||||||
|  |                 // Enclose "discard" in a conditional, so that GLSL compilation does not complain
 | ||||||
|  |                 // about unexecuted instructions that may follow this.
 | ||||||
|  |                 shader.AddLine("if (true) {"); | ||||||
|  |                 ++shader.scope; | ||||||
|                 shader.AddLine("discard;"); |                 shader.AddLine("discard;"); | ||||||
|  |                 --shader.scope; | ||||||
|  |                 shader.AddLine("}"); | ||||||
|  | 
 | ||||||
|                 break; |                 break; | ||||||
|             } |             } | ||||||
|             case OpCode::Id::BRA: { |             case OpCode::Id::BRA: { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 bunnei
						bunnei