diff options
author | Tony Wasserka <NeoBrainX@gmail.com> | 2014-07-23 14:42:15 +0200 |
---|---|---|
committer | Tony Wasserka <NeoBrainX@gmail.com> | 2014-08-12 13:32:18 +0200 |
commit | bd798390d5c3d1bf9084abe9839597162608f575 (patch) | |
tree | 8b583e8658efd2ee5596b2a135314544b3c3a76b /src/core | |
parent | Merge pull request #38 from neobrain/replace_registerset (diff) | |
download | yuzu-bd798390d5c3d1bf9084abe9839597162608f575.tar yuzu-bd798390d5c3d1bf9084abe9839597162608f575.tar.gz yuzu-bd798390d5c3d1bf9084abe9839597162608f575.tar.bz2 yuzu-bd798390d5c3d1bf9084abe9839597162608f575.tar.lz yuzu-bd798390d5c3d1bf9084abe9839597162608f575.tar.xz yuzu-bd798390d5c3d1bf9084abe9839597162608f575.tar.zst yuzu-bd798390d5c3d1bf9084abe9839597162608f575.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/service/gsp.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/core/hle/service/gsp.cpp b/src/core/hle/service/gsp.cpp index 08e65612e..e2b0a48a7 100644 --- a/src/core/hle/service/gsp.cpp +++ b/src/core/hle/service/gsp.cpp @@ -32,7 +32,7 @@ static inline u8* GetCommandBuffer(u32 thread_id) { if (0 == g_shared_memory) return nullptr; - return Kernel::GetSharedMemoryPointer(g_shared_memory, + return Kernel::GetSharedMemoryPointer(g_shared_memory, 0x800 + (thread_id * sizeof(CommandBuffer))); } @@ -205,8 +205,16 @@ void ExecuteCommand(const Command& command) { break; } - // TODO: Check if texture copies are implemented correctly.. case CommandId::SET_DISPLAY_TRANSFER: + { + auto& params = command.image_copy; + WriteGPURegister(GPU_REG_INDEX(display_transfer_config.input_address), params.in_buffer_address >> 3); + WriteGPURegister(GPU_REG_INDEX(display_transfer_config.output_address), params.out_buffer_address >> 3); + WriteGPURegister(GPU_REG_INDEX(display_transfer_config.input_size), params.in_buffer_size); + WriteGPURegister(GPU_REG_INDEX(display_transfer_config.output_size), params.out_buffer_size); + WriteGPURegister(GPU_REG_INDEX(display_transfer_config.flags), params.flags); + WriteGPURegister(GPU_REG_INDEX(display_transfer_config.trigger), 1); + // TODO(bunnei): Signalling all of these interrupts here is totally wrong, but it seems to // work well enough for running demos. Need to figure out how these all work and trigger // them correctly. @@ -216,7 +224,9 @@ void ExecuteCommand(const Command& command) { SignalInterrupt(InterruptId::P3D); SignalInterrupt(InterruptId::DMA); break; + } + // TODO: Check if texture copies are implemented correctly.. case CommandId::SET_TEXTURE_COPY: { auto& params = command.image_copy; @@ -226,8 +236,7 @@ void ExecuteCommand(const Command& command) { WriteGPURegister(GPU_REG_INDEX(display_transfer_config.output_size), params.out_buffer_size); WriteGPURegister(GPU_REG_INDEX(display_transfer_config.flags), params.flags); - // TODO: Should this only be ORed with 1 for texture copies? - // trigger transfer + // TODO: Should this register be set to 1 or should instead its value be OR-ed with 1? WriteGPURegister(GPU_REG_INDEX(display_transfer_config.trigger), 1); break; } |