diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-12-25 07:32:16 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-19 03:12:30 +0100 |
commit | 0a2536a0df1f4aea406f2132d3edda0430acc9d1 (patch) | |
tree | c0ad53890581c9c7e180c5ccb3b66e3c63e3ba64 /src/video_core/engines/maxwell_dma.cpp | |
parent | SMMU: Implement backing CPU page protect/unprotect (diff) | |
download | yuzu-0a2536a0df1f4aea406f2132d3edda0430acc9d1.tar yuzu-0a2536a0df1f4aea406f2132d3edda0430acc9d1.tar.gz yuzu-0a2536a0df1f4aea406f2132d3edda0430acc9d1.tar.bz2 yuzu-0a2536a0df1f4aea406f2132d3edda0430acc9d1.tar.lz yuzu-0a2536a0df1f4aea406f2132d3edda0430acc9d1.tar.xz yuzu-0a2536a0df1f4aea406f2132d3edda0430acc9d1.tar.zst yuzu-0a2536a0df1f4aea406f2132d3edda0430acc9d1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/engines/maxwell_dma.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp index 56fbff306..4bf461fb0 100644 --- a/src/video_core/engines/maxwell_dma.cpp +++ b/src/video_core/engines/maxwell_dma.cpp @@ -11,6 +11,7 @@ #include "core/memory.h" #include "video_core/engines/maxwell_3d.h" #include "video_core/engines/maxwell_dma.h" +#include "video_core/guest_memory.h" #include "video_core/memory_manager.h" #include "video_core/renderer_base.h" #include "video_core/textures/decoders.h" @@ -133,8 +134,8 @@ void MaxwellDMA::Launch() { UNIMPLEMENTED_IF(regs.offset_out % 16 != 0); read_buffer.resize_destructive(16); for (u32 offset = 0; offset < regs.line_length_in; offset += 16) { - Core::Memory::GpuGuestMemoryScoped< - u8, Core::Memory::GuestMemoryFlags::SafeReadCachedWrite> + Tegra::Memory::GpuGuestMemoryScoped< + u8, Tegra::Memory::GuestMemoryFlags::SafeReadCachedWrite> tmp_write_buffer(memory_manager, convert_linear_2_blocklinear_addr(regs.offset_in + offset), 16, &read_buffer); @@ -146,16 +147,16 @@ void MaxwellDMA::Launch() { UNIMPLEMENTED_IF(regs.offset_out % 16 != 0); read_buffer.resize_destructive(16); for (u32 offset = 0; offset < regs.line_length_in; offset += 16) { - Core::Memory::GpuGuestMemoryScoped< - u8, Core::Memory::GuestMemoryFlags::SafeReadCachedWrite> + Tegra::Memory::GpuGuestMemoryScoped< + u8, Tegra::Memory::GuestMemoryFlags::SafeReadCachedWrite> tmp_write_buffer(memory_manager, regs.offset_in + offset, 16, &read_buffer); tmp_write_buffer.SetAddressAndSize( convert_linear_2_blocklinear_addr(regs.offset_out + offset), 16); } } else { if (!accelerate.BufferCopy(regs.offset_in, regs.offset_out, regs.line_length_in)) { - Core::Memory::GpuGuestMemoryScoped< - u8, Core::Memory::GuestMemoryFlags::SafeReadCachedWrite> + Tegra::Memory::GpuGuestMemoryScoped< + u8, Tegra::Memory::GuestMemoryFlags::SafeReadCachedWrite> tmp_write_buffer(memory_manager, regs.offset_in, regs.line_length_in, &read_buffer); tmp_write_buffer.SetAddressAndSize(regs.offset_out, regs.line_length_in); @@ -226,9 +227,9 @@ void MaxwellDMA::CopyBlockLinearToPitch() { const size_t dst_size = dst_operand.pitch * regs.line_count; - Core::Memory::GpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead> tmp_read_buffer( + Tegra::Memory::GpuGuestMemory<u8, Tegra::Memory::GuestMemoryFlags::SafeRead> tmp_read_buffer( memory_manager, src_operand.address, src_size, &read_buffer); - Core::Memory::GpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::UnsafeReadCachedWrite> + Tegra::Memory::GpuGuestMemoryScoped<u8, Tegra::Memory::GuestMemoryFlags::UnsafeReadCachedWrite> 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, @@ -290,9 +291,9 @@ void MaxwellDMA::CopyPitchToBlockLinear() { GPUVAddr src_addr = regs.offset_in; GPUVAddr dst_addr = regs.offset_out; - Core::Memory::GpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead> tmp_read_buffer( + Tegra::Memory::GpuGuestMemory<u8, Tegra::Memory::GuestMemoryFlags::SafeRead> tmp_read_buffer( memory_manager, src_addr, src_size, &read_buffer); - Core::Memory::GpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::UnsafeReadCachedWrite> + Tegra::Memory::GpuGuestMemoryScoped<u8, Tegra::Memory::GuestMemoryFlags::UnsafeReadCachedWrite> 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. @@ -344,9 +345,9 @@ void MaxwellDMA::CopyBlockLinearToBlockLinear() { intermediate_buffer.resize_destructive(mid_buffer_size); - Core::Memory::GpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead> tmp_read_buffer( + Tegra::Memory::GpuGuestMemory<u8, Tegra::Memory::GuestMemoryFlags::SafeRead> tmp_read_buffer( memory_manager, regs.offset_in, src_size, &read_buffer); - Core::Memory::GpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::SafeReadCachedWrite> + Tegra::Memory::GpuGuestMemoryScoped<u8, Tegra::Memory::GuestMemoryFlags::SafeReadCachedWrite> tmp_write_buffer(memory_manager, regs.offset_out, dst_size, &write_buffer); UnswizzleSubrect(intermediate_buffer, tmp_read_buffer, bytes_per_pixel, src_width, src.height, |