RSX: Remove using namespace ps3 in header

This commit is contained in:
Vincent Lejeune 2015-10-08 02:43:37 +02:00
parent d86469c2f5
commit 0138a95567
7 changed files with 26 additions and 28 deletions

View File

@ -346,7 +346,7 @@ void D3D12GSRender::FillPixelShaderConstantsBuffer()
}
if (!isCommandBufferSetConstant)
{
auto data = vm::ptr<u32>::make(m_cur_fragment_prog->addr + (u32)offsetInFP);
auto data = vm::ps3::ptr<u32>::make(m_cur_fragment_prog->addr + (u32)offsetInFP);
u32 c0 = (data[0] >> 16 | data[0] << 16);
u32 c1 = (data[1] >> 16 | data[1] << 16);

View File

@ -1183,7 +1183,7 @@ void D3D12GSRender::semaphorePGRAPHBackendRelease(u32 offset, u32 value)
}
}
vm::write32(m_label_addr + offset, value);
vm::ps3::write32(m_label_addr + offset, value);
}
void D3D12GSRender::semaphorePFIFOAcquire(u32 offset, u32 value)
@ -1191,7 +1191,7 @@ void D3D12GSRender::semaphorePFIFOAcquire(u32 offset, u32 value)
const std::chrono::time_point<std::chrono::system_clock> enterWait = std::chrono::system_clock::now();
while (true)
{
volatile u32 val = vm::read32(m_label_addr + offset);
volatile u32 val = vm::ps3::read32(m_label_addr + offset);
if (val == value) break;
std::chrono::time_point<std::chrono::system_clock> waitPoint = std::chrono::system_clock::now();
long long elapsedTime = std::chrono::duration_cast<std::chrono::seconds>(waitPoint - enterWait).count();

View File

@ -1,7 +1,5 @@
#pragma once
namespace vm { using namespace ps3; }
enum
{
CELL_GCM_DISPLAY_HSYNC = 1,
@ -324,14 +322,14 @@ struct CellGcmConfig
struct CellGcmContextData;
typedef s32(CellGcmContextCallback)(vm::ptr<CellGcmContextData>, u32);
typedef s32(CellGcmContextCallback)(vm::ps3::ptr<CellGcmContextData>, u32);
struct CellGcmContextData
{
vm::bptr<u32> begin;
vm::bptr<u32> end;
vm::bptr<u32> current;
vm::bptr<CellGcmContextCallback> callback;
vm::ps3::bptr<u32> begin;
vm::ps3::bptr<u32> end;
vm::ps3::bptr<u32> current;
vm::ps3::bptr<CellGcmContextCallback> callback;
};
struct gcmInfo

View File

@ -1090,7 +1090,7 @@ void GLGSRender::InitFragmentData()
const std::vector<size_t> &fragmentOffset = m_prog_buffer.getFragmentConstantOffsetsCache(m_cur_fragment_prog);
for (size_t offsetInFP : fragmentOffset)
{
auto data = vm::ptr<u32>::make(m_cur_fragment_prog->addr + (u32)offsetInFP);
auto data = vm::ps3::ptr<u32>::make(m_cur_fragment_prog->addr + (u32)offsetInFP);
u32 c0 = (data[0] >> 16 | data[0] << 16);
u32 c1 = (data[1] >> 16 | data[1] << 16);
@ -2142,12 +2142,12 @@ void GLGSRender::Flip()
void GLGSRender::semaphorePGRAPHTextureReadRelease(u32 offset, u32 value)
{
vm::write32(m_label_addr + offset, value);
vm::ps3::write32(m_label_addr + offset, value);
}
void GLGSRender::semaphorePGRAPHBackendRelease(u32 offset, u32 value)
{
vm::write32(m_label_addr + offset, value);
vm::ps3::write32(m_label_addr + offset, value);
}
void GLGSRender::semaphorePFIFOAcquire(u32 offset, u32 value)

View File

@ -139,7 +139,7 @@ u32 RSXVertexData::GetTypeSize() const
u32 RSXThread::OutOfArgsCount(const uint x, const u32 cmd, const u32 count, const u32 args_addr)
{
auto args = vm::ptr<u32>::make(args_addr);
auto args = vm::ps3::ptr<u32>::make(args_addr);
std::string debug = GetMethodName(cmd);
debug += "(";
for (u32 i = 0; i < count; ++i) debug += (i ? ", " : "") + fmt::format("0x%x", ARGS(i));
@ -170,7 +170,7 @@ u32 RSXThread::OutOfArgsCount(const uint x, const u32 cmd, const u32 count, cons
void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const u32 count)
{
auto args = vm::ptr<u32>::make(args_addr);
auto args = vm::ps3::ptr<u32>::make(args_addr);
#if CMD_DEBUG
std::string debug = GetMethodName(cmd);
@ -981,12 +981,12 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
switch(m_indexed_array.m_type)
{
case CELL_GCM_DRAW_INDEX_ARRAY_TYPE_32:
index = vm::read32(m_indexed_array.m_addr + i * 4);
index = vm::ps3::read32(m_indexed_array.m_addr + i * 4);
*(u32*)&m_indexed_array.m_data[i * 4] = index;
break;
case CELL_GCM_DRAW_INDEX_ARRAY_TYPE_16:
index = vm::read16(m_indexed_array.m_addr + i * 2);
index = vm::ps3::read16(m_indexed_array.m_addr + i * 2);
*(u16*)&m_indexed_array.m_data[i * 2] = index;
break;
}
@ -1847,9 +1847,9 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
//dma_write32(dma_report, offset + 0x8, value);
//dma_write32(dma_report, offset + 0xc, 0);
vm::write64(m_local_mem_addr + offset + 0x0, timestamp);
vm::write32(m_local_mem_addr + offset + 0x8, value);
vm::write32(m_local_mem_addr + offset + 0xc, 0);
vm::ps3::write64(m_local_mem_addr + offset + 0x0, timestamp);
vm::ps3::write32(m_local_mem_addr + offset + 0x8, value);
vm::ps3::write32(m_local_mem_addr + offset + 0xc, 0);
break;
}
@ -2584,7 +2584,7 @@ void RSXThread::Task()
continue;
}
auto args = vm::ptr<u32>::make((u32)RSXIOMem.RealAddr(get + 4));
auto args = vm::ps3::ptr<u32>::make((u32)RSXIOMem.RealAddr(get + 4));
for (u32 i = 0; i < count; i++)
{

View File

@ -157,10 +157,10 @@ public:
std::mutex m_cs_main;
semaphore_t m_sem_flip;
u64 m_last_flip_time;
vm::ptr<void(u32)> m_flip_handler;
vm::ptr<void(u32)> m_user_handler;
vm::ps3::ptr<void(u32)> m_flip_handler;
vm::ps3::ptr<void(u32)> m_user_handler;
u64 m_vblank_count;
vm::ptr<void(u32)> m_vblank_handler;
vm::ps3::ptr<void(u32)> m_vblank_handler;
public:
// Dither

View File

@ -269,7 +269,7 @@ void RSXDebugger::OnScrollMemory(wxMouseEvent& event)
u32 offset;
if(vm::check_addr(m_addr))
{
u32 cmd = vm::read32(m_addr);
u32 cmd = vm::ps3::read32(m_addr);
u32 count = (cmd & (CELL_GCM_METHOD_FLAG_JUMP | CELL_GCM_METHOD_FLAG_CALL))
|| cmd == CELL_GCM_METHOD_FLAG_RETURN ? 0 : (cmd >> 18) & 0x7ff;
@ -296,7 +296,7 @@ void RSXDebugger::OnClickBuffer(wxMouseEvent& event)
{
if (!RSXReady()) return;
const GSRender& render = Emu.GetGSManager().GetRender();
const auto buffers = vm::ptr<CellGcmDisplayInfo>::make(render.m_gcm_buffers_addr);
const auto buffers = vm::ps3::ptr<CellGcmDisplayInfo>::make(render.m_gcm_buffers_addr);
if(!buffers)
return;
@ -383,7 +383,7 @@ void RSXDebugger::GetMemory()
if (isReady && vm::check_addr(addr))
{
u32 cmd = vm::read32(addr);
u32 cmd = vm::ps3::read32(addr);
u32 count = (cmd >> 18) & 0x7ff;
m_list_commands->SetItem(i, 1, wxString::Format("%08x", cmd));
m_list_commands->SetItem(i, 3, wxString::Format("%d", count));
@ -832,7 +832,7 @@ wxString RSXDebugger::DisAsmCommand(u32 cmd, u32 count, u32 currentAddr, u32 ioA
}
else if(!(cmd & (CELL_GCM_METHOD_FLAG_JUMP | CELL_GCM_METHOD_FLAG_CALL)) && cmd != CELL_GCM_METHOD_FLAG_RETURN)
{
auto args = vm::ptr<u32>::make(currentAddr + 4);
auto args = vm::ps3::ptr<u32>::make(currentAddr + 4);
u32 index = 0;
switch(cmd & 0x3ffff)