mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
Merge branch 'master' of https://github.com/DHrpcs3/rpcs3
Conflicts: Utilities/BEType.h
This commit is contained in:
commit
377db4515a
4 changed files with 13 additions and 8 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<u8> 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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue