[GPU] Check page access only once for specific range
This commit is contained in:
parent
1864f3d9f2
commit
feb88ee6b1
|
@ -420,7 +420,8 @@ bool D3D12SharedMemory::UploadRanges(
|
|||
uint32_t upload_range_length = upload_range.second;
|
||||
trace_writer_.WriteMemoryRead(upload_range_start << page_size_log2(),
|
||||
upload_range_length << page_size_log2());
|
||||
while (upload_range_length != 0) {
|
||||
|
||||
if (upload_range_length > 0) {
|
||||
// Hacky handling for certain games (494707D4, 55530874) that crashes due
|
||||
// to accessing unallocated pages
|
||||
const uint32_t upload_range_last_page =
|
||||
|
@ -436,7 +437,9 @@ bool D3D12SharedMemory::UploadRanges(
|
|||
XELOGE("Invalid upload range for GPU: {:08X}", upload_range_start);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
while (upload_range_length != 0) {
|
||||
ID3D12Resource* upload_buffer;
|
||||
size_t upload_buffer_offset, upload_buffer_size;
|
||||
uint8_t* upload_buffer_mapping = upload_buffer_pool_->RequestPartial(
|
||||
|
|
Loading…
Reference in New Issue