mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
commit
cc1efd2a46
3 changed files with 17 additions and 4 deletions
|
@ -14,8 +14,9 @@ void data_cache::store_and_protect_data(u64 key, u32 start, size_t size, u8 form
|
|||
void data_cache::protect_data(u64 key, u32 start, size_t size)
|
||||
{
|
||||
/// align start to 4096 byte
|
||||
u32 protected_range_start = align(start, 4096);
|
||||
u32 protected_range_size = (u32)align(size, 4096);
|
||||
static const u32 memory_page_size = 4096;
|
||||
u32 protected_range_start = start & ~(memory_page_size - 1);
|
||||
u32 protected_range_size = (u32)align(size, memory_page_size);
|
||||
m_protected_ranges.push_back(std::make_tuple(key, protected_range_start, protected_range_size));
|
||||
vm::page_protect(protected_range_start, protected_range_size, 0, 0, vm::page_writable);
|
||||
}
|
||||
|
|
|
@ -654,6 +654,8 @@ namespace rsx
|
|||
|
||||
method_registers[NV4097_SET_ZSTENCIL_CLEAR_VALUE] = 0xffffffff;
|
||||
|
||||
method_registers[NV4097_SET_CONTEXT_DMA_REPORT] = CELL_GCM_CONTEXT_DMA_TO_MEMORY_GET_REPORT;
|
||||
|
||||
// Reset vertex attrib array
|
||||
for (int i = 0; i < limits::vertex_count; i++)
|
||||
{
|
||||
|
|
|
@ -269,9 +269,19 @@ namespace rsx
|
|||
{
|
||||
u8 type = arg >> 24;
|
||||
u32 offset = arg & 0xffffff;
|
||||
u32 report_dma = method_registers[NV4097_SET_CONTEXT_DMA_REPORT];
|
||||
u32 location;
|
||||
|
||||
//TODO: use DMA
|
||||
vm::ps3::ptr<CellGcmReportData> result = { rsx->local_mem_addr + offset, vm::addr };
|
||||
switch (report_dma)
|
||||
{
|
||||
case CELL_GCM_CONTEXT_DMA_TO_MEMORY_GET_REPORT: location = CELL_GCM_LOCATION_LOCAL; break;
|
||||
case CELL_GCM_CONTEXT_DMA_REPORT_LOCATION_MAIN: location = CELL_GCM_LOCATION_MAIN; break;
|
||||
default:
|
||||
LOG_WARNING(RSX, "nv4097::get_report: bad report dma: 0x%x", report_dma);
|
||||
return;
|
||||
}
|
||||
|
||||
vm::ps3::ptr<CellGcmReportData> result = { get_address(offset, location), vm::addr };
|
||||
|
||||
result->timer = rsx->timestamp();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue