Merge pull request #12543 from FernandoS27/stop-liking-posts-from-ur-friends-ex
VideoCore: A few fixes to DMA and swapchain
This commit is contained in:
commit
15cf34cd62
3 changed files with 5 additions and 4 deletions
|
@ -686,7 +686,8 @@ public:
|
||||||
} else {
|
} else {
|
||||||
this->m_memory.WriteBlockUnsafe(this->m_addr, this->data(), this->size_bytes());
|
this->m_memory.WriteBlockUnsafe(this->m_addr, this->data(), this->size_bytes());
|
||||||
}
|
}
|
||||||
} else if constexpr (FLAGS & GuestMemoryFlags::Safe) {
|
} else if constexpr ((FLAGS & GuestMemoryFlags::Safe) ||
|
||||||
|
(FLAGS & GuestMemoryFlags::Cached)) {
|
||||||
this->m_memory.InvalidateRegion(this->m_addr, this->size_bytes());
|
this->m_memory.InvalidateRegion(this->m_addr, this->size_bytes());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,7 +228,7 @@ void MaxwellDMA::CopyBlockLinearToPitch() {
|
||||||
|
|
||||||
Core::Memory::GpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead> tmp_read_buffer(
|
Core::Memory::GpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead> tmp_read_buffer(
|
||||||
memory_manager, src_operand.address, src_size, &read_buffer);
|
memory_manager, src_operand.address, src_size, &read_buffer);
|
||||||
Core::Memory::GpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::SafeReadCachedWrite>
|
Core::Memory::GpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::UnsafeReadCachedWrite>
|
||||||
tmp_write_buffer(memory_manager, dst_operand.address, dst_size, &write_buffer);
|
tmp_write_buffer(memory_manager, dst_operand.address, dst_size, &write_buffer);
|
||||||
|
|
||||||
UnswizzleSubrect(tmp_write_buffer, tmp_read_buffer, bytes_per_pixel, width, height, depth,
|
UnswizzleSubrect(tmp_write_buffer, tmp_read_buffer, bytes_per_pixel, width, height, depth,
|
||||||
|
@ -292,7 +292,7 @@ void MaxwellDMA::CopyPitchToBlockLinear() {
|
||||||
GPUVAddr dst_addr = regs.offset_out;
|
GPUVAddr dst_addr = regs.offset_out;
|
||||||
Core::Memory::GpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead> tmp_read_buffer(
|
Core::Memory::GpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead> tmp_read_buffer(
|
||||||
memory_manager, src_addr, src_size, &read_buffer);
|
memory_manager, src_addr, src_size, &read_buffer);
|
||||||
Core::Memory::GpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::SafeReadCachedWrite>
|
Core::Memory::GpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::UnsafeReadCachedWrite>
|
||||||
tmp_write_buffer(memory_manager, dst_addr, dst_size, &write_buffer);
|
tmp_write_buffer(memory_manager, dst_addr, dst_size, &write_buffer);
|
||||||
|
|
||||||
// If the input is linear and the output is tiled, swizzle the input and copy it over.
|
// If the input is linear and the output is tiled, swizzle the input and copy it over.
|
||||||
|
|
|
@ -329,7 +329,7 @@ void PresentManager::CopyToSwapchainImpl(Frame* frame) {
|
||||||
// to account for that.
|
// to account for that.
|
||||||
const bool is_suboptimal = swapchain.NeedsRecreation();
|
const bool is_suboptimal = swapchain.NeedsRecreation();
|
||||||
const bool size_changed =
|
const bool size_changed =
|
||||||
swapchain.GetWidth() != frame->width || swapchain.GetHeight() != frame->height;
|
swapchain.GetWidth() < frame->width || swapchain.GetHeight() < frame->height;
|
||||||
if (is_suboptimal || size_changed) {
|
if (is_suboptimal || size_changed) {
|
||||||
RecreateSwapchain(frame);
|
RecreateSwapchain(frame);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue