diff options
author | tfarley <tfarleygithub@gmail.com> | 2015-05-19 06:21:33 +0200 |
---|---|---|
committer | tfarley <tfarleygithub@gmail.com> | 2015-05-23 00:51:18 +0200 |
commit | 05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2 (patch) | |
tree | d080c1efd3b928bda551cb9eee304547e66a4351 /src/core/hw/gpu.cpp | |
parent | INI hw/sw renderer toggle (diff) | |
download | yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.gz yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.bz2 yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.lz yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.xz yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.zst yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.zip |
Diffstat (limited to 'src/core/hw/gpu.cpp')
-rw-r--r-- | src/core/hw/gpu.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp index 8ef1f70df..ddc5d647e 100644 --- a/src/core/hw/gpu.cpp +++ b/src/core/hw/gpu.cpp @@ -106,6 +106,8 @@ inline void Write(u32 addr, const T data) { } else { GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PSC1); } + + VideoCore::g_renderer->hw_rasterizer->NotifyFlush(config.GetStartAddress(), config.GetEndAddress() - config.GetStartAddress()); } break; } @@ -129,19 +131,25 @@ inline void Write(u32 addr, const T data) { u32 output_width = config.output_width / horizontal_scale; u32 output_height = config.output_height / vertical_scale; + u32 input_size = config.input_width * config.input_height * GPU::Regs::BytesPerPixel(config.input_format); + u32 output_size = output_width * output_height * GPU::Regs::BytesPerPixel(config.output_format); + + VideoCore::g_renderer->hw_rasterizer->NotifyPreRead(config.GetPhysicalInputAddress(), input_size); + if (config.raw_copy) { // Raw copies do not perform color conversion nor tiled->linear / linear->tiled conversions // TODO(Subv): Verify if raw copies perform scaling - memcpy(dst_pointer, src_pointer, config.output_width * config.output_height * - GPU::Regs::BytesPerPixel(config.output_format)); + memcpy(dst_pointer, src_pointer, output_size); LOG_TRACE(HW_GPU, "DisplayTriggerTransfer: 0x%08x bytes from 0x%08x(%ux%u)-> 0x%08x(%ux%u), output format: %x, flags 0x%08X, Raw copy", - config.output_height * output_width * GPU::Regs::BytesPerPixel(config.output_format), + output_size, config.GetPhysicalInputAddress(), config.input_width.Value(), config.input_height.Value(), config.GetPhysicalOutputAddress(), config.output_width.Value(), config.output_height.Value(), config.output_format.Value(), config.flags); GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PPF); + + VideoCore::g_renderer->hw_rasterizer->NotifyFlush(config.GetPhysicalOutputAddress(), output_size); break; } @@ -247,6 +255,8 @@ inline void Write(u32 addr, const T data) { config.output_format.Value(), config.flags); GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PPF); + + VideoCore::g_renderer->hw_rasterizer->NotifyFlush(config.GetPhysicalOutputAddress(), output_size); } break; } |