diff options
| author | 2019-03-22 18:41:12 -0400 | |
|---|---|---|
| committer | 2019-03-22 18:41:12 -0400 | |
| commit | e5893db3e618fd276733a24eebc0606c5fd1e7f2 (patch) | |
| tree | 5a3ae98bb04d3fb3f513a51504b63940e70c5130 /src/video_core/gpu.cpp | |
| parent | Merge pull request #2277 from bunnei/fix-smo-transitions (diff) | |
| parent | memory_manager: Cleanup FindFreeRegion. (diff) | |
| download | yuzu-e5893db3e618fd276733a24eebc0606c5fd1e7f2.tar.gz yuzu-e5893db3e618fd276733a24eebc0606c5fd1e7f2.tar.xz yuzu-e5893db3e618fd276733a24eebc0606c5fd1e7f2.zip | |
Merge pull request #2256 from bunnei/gpu-vmm
gpu: Rewrite MemoryManager based on the VMManager implementation.
Diffstat (limited to 'src/video_core/gpu.cpp')
| -rw-r--r-- | src/video_core/gpu.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 66c690494..267a03f2d 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include "video_core/engines/maxwell_3d.h" | 12 | #include "video_core/engines/maxwell_3d.h" |
| 13 | #include "video_core/engines/maxwell_dma.h" | 13 | #include "video_core/engines/maxwell_dma.h" |
| 14 | #include "video_core/gpu.h" | 14 | #include "video_core/gpu.h" |
| 15 | #include "video_core/memory_manager.h" | ||
| 15 | #include "video_core/renderer_base.h" | 16 | #include "video_core/renderer_base.h" |
| 16 | 17 | ||
| 17 | namespace Tegra { | 18 | namespace Tegra { |
| @@ -287,7 +288,7 @@ void GPU::ProcessSemaphoreTriggerMethod() { | |||
| 287 | block.timestamp = Core::System::GetInstance().CoreTiming().GetTicks(); | 288 | block.timestamp = Core::System::GetInstance().CoreTiming().GetTicks(); |
| 288 | memory_manager->WriteBlock(regs.smaphore_address.SmaphoreAddress(), &block, sizeof(block)); | 289 | memory_manager->WriteBlock(regs.smaphore_address.SmaphoreAddress(), &block, sizeof(block)); |
| 289 | } else { | 290 | } else { |
| 290 | const u32 word{memory_manager->Read32(regs.smaphore_address.SmaphoreAddress())}; | 291 | const u32 word{memory_manager->Read<u32>(regs.smaphore_address.SmaphoreAddress())}; |
| 291 | if ((op == GpuSemaphoreOperation::AcquireEqual && word == regs.semaphore_sequence) || | 292 | if ((op == GpuSemaphoreOperation::AcquireEqual && word == regs.semaphore_sequence) || |
| 292 | (op == GpuSemaphoreOperation::AcquireGequal && | 293 | (op == GpuSemaphoreOperation::AcquireGequal && |
| 293 | static_cast<s32>(word - regs.semaphore_sequence) > 0) || | 294 | static_cast<s32>(word - regs.semaphore_sequence) > 0) || |
| @@ -314,11 +315,11 @@ void GPU::ProcessSemaphoreTriggerMethod() { | |||
| 314 | } | 315 | } |
| 315 | 316 | ||
| 316 | void GPU::ProcessSemaphoreRelease() { | 317 | void GPU::ProcessSemaphoreRelease() { |
| 317 | memory_manager->Write32(regs.smaphore_address.SmaphoreAddress(), regs.semaphore_release); | 318 | memory_manager->Write<u32>(regs.smaphore_address.SmaphoreAddress(), regs.semaphore_release); |
| 318 | } | 319 | } |
| 319 | 320 | ||
| 320 | void GPU::ProcessSemaphoreAcquire() { | 321 | void GPU::ProcessSemaphoreAcquire() { |
| 321 | const u32 word = memory_manager->Read32(regs.smaphore_address.SmaphoreAddress()); | 322 | const u32 word = memory_manager->Read<u32>(regs.smaphore_address.SmaphoreAddress()); |
| 322 | const auto value = regs.semaphore_acquire; | 323 | const auto value = regs.semaphore_acquire; |
| 323 | if (word != value) { | 324 | if (word != value) { |
| 324 | regs.acquire_active = true; | 325 | regs.acquire_active = true; |