mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-18 02:11:28 +00:00
RSX blending MRT and cellResc 512MB io address space changes
This commit is contained in:
parent
c4360ee834
commit
9ede2d6753
@ -68,6 +68,11 @@ enum
|
||||
CELL_GCM_SMOOTH = 0x1D01,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_GCM_SYSTEM_MODE_IOMAP_512MB = 1,
|
||||
};
|
||||
|
||||
// GCM Texture
|
||||
enum
|
||||
{
|
||||
|
@ -883,7 +883,7 @@ void GLGSRender::ExecCMD()
|
||||
Enable(m_set_depth_test, GL_DEPTH_TEST);
|
||||
Enable(m_set_alpha_test, GL_ALPHA_TEST);
|
||||
Enable(m_set_depth_bounds_test, GL_DEPTH_BOUNDS_TEST_EXT);
|
||||
Enable(m_set_blend, GL_BLEND);
|
||||
Enable(m_set_blend || m_set_blend_mrt1 || m_set_blend_mrt2 || m_set_blend_mrt3, GL_BLEND);
|
||||
Enable(m_set_logic_op, GL_LOGIC_OP);
|
||||
Enable(m_set_cull_face, GL_CULL_FACE);
|
||||
Enable(m_set_dither, GL_DITHER);
|
||||
|
@ -547,11 +547,9 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, mem32_ptr_t& args, const u3
|
||||
|
||||
case NV4097_SET_BLEND_ENABLE_MRT:
|
||||
{
|
||||
if (ARGS(0))
|
||||
LOG_WARNING(RSX, "NV4097_SET_BLEND_ENABLE_MRT: %x", ARGS(0));
|
||||
|
||||
// TODO:
|
||||
// (cmd)[1] = CELL_GCM_ENDIAN_SWAP(((mrt1) << 1) | ((mrt2) << 2) | ((mrt3) << 3));
|
||||
m_set_blend_mrt1 = ARGS(0) & 0x02 ? true : false;
|
||||
m_set_blend_mrt2 = ARGS(0) & 0x04 ? true : false;
|
||||
m_set_blend_mrt3 = ARGS(0) & 0x08 ? true : false;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -269,6 +269,9 @@ public:
|
||||
u8 m_blend_color_g;
|
||||
u8 m_blend_color_b;
|
||||
u8 m_blend_color_a;
|
||||
bool m_set_blend_mrt1;
|
||||
bool m_set_blend_mrt2;
|
||||
bool m_set_blend_mrt3;
|
||||
|
||||
// Stencil Test
|
||||
bool m_set_stencil_test;
|
||||
@ -440,6 +443,9 @@ protected:
|
||||
m_set_alpha_test = false;
|
||||
m_set_depth_bounds_test = false;
|
||||
m_set_blend = false;
|
||||
m_set_blend_mrt1 = false;
|
||||
m_set_blend_mrt2 = false;
|
||||
m_set_blend_mrt3 = false;
|
||||
m_set_logic_op = false;
|
||||
m_set_cull_face = false;
|
||||
m_set_dither = false;
|
||||
@ -518,6 +524,9 @@ protected:
|
||||
m_set_front_polygon_mode = false;
|
||||
m_set_back_polygon_mode = false;
|
||||
m_set_blend = false;
|
||||
m_set_blend_mrt1 = false;
|
||||
m_set_blend_mrt2 = false;
|
||||
m_set_blend_mrt3 = false;
|
||||
m_set_blend_sfactor = false;
|
||||
m_set_blend_dfactor = false;
|
||||
m_set_blend_equation = false;
|
||||
|
@ -16,6 +16,7 @@ extern Module *cellGcmSys = nullptr;
|
||||
|
||||
u32 local_size = 0;
|
||||
u32 local_addr = 0;
|
||||
u32 system_mode = 0;
|
||||
|
||||
enum
|
||||
{
|
||||
@ -311,7 +312,17 @@ int cellGcmInit(u32 context_addr, u32 cmdSize, u32 ioSize, u32 ioAddress)
|
||||
cellGcmSys->Warning("*** local memory(addr=0x%x, size=0x%x)", local_addr, local_size);
|
||||
|
||||
InitOffsetTable();
|
||||
Memory.MemoryBlocks.push_back(Memory.RSXIOMem.SetRange(0x50000000, 0x10000000/*256MB*/));//TODO: implement allocateAdressSpace in memoryBase
|
||||
if (system_mode == CELL_GCM_SYSTEM_MODE_IOMAP_512MB)
|
||||
{
|
||||
cellGcmSys->Warning("cellGcmInit(): 512MB io address space used");
|
||||
Memory.MemoryBlocks.push_back(Memory.RSXIOMem.SetRange(0x50000000, 0x20000000/*512MB*/));//TODO: implement allocateAdressSpace in memoryBase
|
||||
}
|
||||
else
|
||||
{
|
||||
cellGcmSys->Warning("cellGcmInit(): 256MB io address space used");
|
||||
Memory.MemoryBlocks.push_back(Memory.RSXIOMem.SetRange(0x50000000, 0x10000000/*256MB*/));//TODO: implement allocateAdressSpace in memoryBase
|
||||
}
|
||||
|
||||
if(cellGcmMapEaIoAddress(ioAddress, 0, ioSize) != CELL_OK)
|
||||
{
|
||||
Memory.MemoryBlocks.pop_back();
|
||||
@ -729,9 +740,12 @@ u64 cellGcmGetVBlankCount()
|
||||
return Emu.GetGSManager().GetRender().m_vblank_count;
|
||||
}
|
||||
|
||||
int cellGcmInitSystemMode()
|
||||
int cellGcmInitSystemMode(u64 mode)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellGcmSys);
|
||||
cellGcmSys->Log("cellGcmInitSystemMode(mode=0x%x)", mode);
|
||||
|
||||
system_mode = mode;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -537,7 +537,7 @@ void SetupRsxRenderingStates(mem_ptr_t<CellGcmContextData>& cntxt)
|
||||
r.m_set_depth_mask = true; r.m_depth_mask = 0;
|
||||
r.m_set_alpha_test = false;
|
||||
r.m_set_blend = false;
|
||||
//GcmCmdTypePrefix::cellGcmSetBlendEnableMrt(con, CELL_GCM_FALSE, CELL_GCM_FALSE, CELL_GCM_FALSE);
|
||||
r.m_set_blend_mrt1 = r.m_set_blend_mrt2 = r.m_set_blend_mrt3 = false;
|
||||
r.m_set_logic_op = false;
|
||||
r.m_set_cull_face = false;
|
||||
r.m_set_depth_bounds_test = false;
|
||||
|
Loading…
Reference in New Issue
Block a user