From 678e455b4f62343a32bd3d44ebec63ff8ffbdd43 Mon Sep 17 00:00:00 2001 From: elisha464 Date: Fri, 31 Jan 2014 22:44:35 +0200 Subject: [PATCH] fixed fragment decompiler when adding a const, I added a check to see if it already exists --- rpcs3/Emu/GS/GL/GLFragmentProgram.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rpcs3/Emu/GS/GL/GLFragmentProgram.cpp b/rpcs3/Emu/GS/GL/GLFragmentProgram.cpp index 18e231a338..45554e620a 100644 --- a/rpcs3/Emu/GS/GL/GLFragmentProgram.cpp +++ b/rpcs3/Emu/GS/GL/GLFragmentProgram.cpp @@ -123,6 +123,11 @@ std::string GLFragmentDecompilerThread::AddCond(int fp16) std::string GLFragmentDecompilerThread::AddConst() { + if(m_parr.HasParam(PARAM_UNIFORM, "vec4", std::string("fc") + std::to_string(m_size + 4 * 4))) + { + return std::string("fc") + std::to_string(m_size + 4 * 4); + } + mem32_ptr_t data(m_addr + m_size + m_offset); m_offset += 4 * 4;