aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hw
diff options
context:
space:
mode:
authorGravatar tfarley <tfarleygithub@gmail.com>2015-05-18 21:21:33 -0700
committerGravatar tfarley <tfarleygithub@gmail.com>2015-05-22 15:51:18 -0700
commit05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2 (patch)
treed080c1efd3b928bda551cb9eee304547e66a4351 /src/core/hw
parent6d995b1ff654483f830b6c285629545263393d7e (diff)
OpenGL renderer
Diffstat (limited to 'src/core/hw')
-rw-r--r--src/core/hw/gpu.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index 8ef1f70d..ddc5d647 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;
}