diff --git a/Utilities/BEType.h b/Utilities/BEType.h index 7711716114..2f940c1e80 100644 --- a/Utilities/BEType.h +++ b/Utilities/BEType.h @@ -50,10 +50,11 @@ class be_t public: typedef T type; -#ifdef __GNUG__ - be_t() noexcept = default; -#else + +#ifdef _WIN32 be_t(){} +#else + be_t() noexcept = default #endif be_t(const T& value) diff --git a/Utilities/GNU.h b/Utilities/GNU.h index a21c99c726..e928c1ee6f 100644 --- a/Utilities/GNU.h +++ b/Utilities/GNU.h @@ -15,5 +15,5 @@ #define InterlockedCompareExchange64(ptr,new_val,old_val) __sync_val_compare_and_swap(ptr,old_val,new_val) #define _aligned_malloc(size,alignment) aligned_alloc(alignment,size) #define _aligned_free(pointer) free(pointer) -#define DWORD int64_t +#define DWORD int32_t #endif diff --git a/rpcs3/Emu/Cell/PPUInterpreter.h b/rpcs3/Emu/Cell/PPUInterpreter.h index daba8dccef..8f2e11ba1d 100644 --- a/rpcs3/Emu/Cell/PPUInterpreter.h +++ b/rpcs3/Emu/Cell/PPUInterpreter.h @@ -2665,7 +2665,7 @@ private: if (lock.tid == reservation.owner && reservation.addr == addr && reservation.size == 4) { // Memory.Write32(addr, CPU.GPR[rs]); - CPU.SetCR_EQ(0, InterlockedCompareExchange((volatile long*)(Memory + addr), (u32)CPU.GPR[rs], reservation.data32) == reservation.data32); + CPU.SetCR_EQ(0, InterlockedCompareExchange((volatile long*) (Memory + addr), re((u32) CPU.GPR[rs]), re(reservation.data32)) == re(reservation.data32)); reservation.clear(); } else @@ -2718,7 +2718,7 @@ private: if (lock.tid == reservation.owner && reservation.addr == addr && reservation.size == 8) { // Memory.Write64(addr, CPU.GPR[rs]); - CPU.SetCR_EQ(0, InterlockedCompareExchange64((volatile long long*)(Memory + addr), CPU.GPR[rs], reservation.data64) == reservation.data64); + CPU.SetCR_EQ(0, InterlockedCompareExchange64((volatile long long*)(Memory + addr), re(CPU.GPR[rs]), re(reservation.data64)) == re(reservation.data64)); reservation.clear(); } else diff --git a/rpcs3/Emu/GS/GL/GLGSRender.cpp b/rpcs3/Emu/GS/GL/GLGSRender.cpp index 442942f881..9e1b4a6fd0 100644 --- a/rpcs3/Emu/GS/GL/GLGSRender.cpp +++ b/rpcs3/Emu/GS/GL/GLGSRender.cpp @@ -1013,7 +1013,7 @@ void GLGSRender::ExecCMD() if(m_set_alpha_func && m_set_alpha_ref) { - glAlphaFunc(m_alpha_func, m_alpha_ref); + glAlphaFunc(m_alpha_func, m_alpha_ref/255.0f); checkForGlError("glAlphaFunc"); } @@ -1115,9 +1115,11 @@ void GLGSRender::Flip() static u8* src_buffer = nullptr; static u32 width = 0; static u32 height = 0; + GLenum format = GL_RGBA; if(m_read_buffer) { + format = GL_BGRA; gcmBuffer* buffers = (gcmBuffer*)Memory.GetMemFromAddr(m_gcm_buffers_addr); u32 addr = GetAddress(re(buffers[m_gcm_current_buffer].offset), CELL_GCM_LOCATION_LOCAL); @@ -1134,6 +1136,7 @@ void GLGSRender::Flip() } else if(m_fbo.IsCreated()) { + format = GL_RGBA; static Array pixels; pixels.SetCount(RSXThread::m_width * RSXThread::m_height * 4); m_fbo.Bind(GL_READ_FRAMEBUFFER); @@ -1150,7 +1153,8 @@ void GLGSRender::Flip() { glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, g_flip_tex); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, src_buffer); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, format, GL_UNSIGNED_INT_8_8_8_8, src_buffer); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, GL_ONE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);