diff options
| author | 2015-05-18 21:21:33 -0700 | |
|---|---|---|
| committer | 2015-05-22 15:51:18 -0700 | |
| commit | 05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2 (patch) | |
| tree | d080c1efd3b928bda551cb9eee304547e66a4351 /src/core/hw/gpu.cpp | |
| parent | INI hw/sw renderer toggle (diff) | |
| download | yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.gz yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.xz yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.zip | |
OpenGL renderer
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) { | |||
| 106 | } else { | 106 | } else { |
| 107 | GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PSC1); | 107 | GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PSC1); |
| 108 | } | 108 | } |
| 109 | |||
| 110 | VideoCore::g_renderer->hw_rasterizer->NotifyFlush(config.GetStartAddress(), config.GetEndAddress() - config.GetStartAddress()); | ||
| 109 | } | 111 | } |
| 110 | break; | 112 | break; |
| 111 | } | 113 | } |
| @@ -129,19 +131,25 @@ inline void Write(u32 addr, const T data) { | |||
| 129 | u32 output_width = config.output_width / horizontal_scale; | 131 | u32 output_width = config.output_width / horizontal_scale; |
| 130 | u32 output_height = config.output_height / vertical_scale; | 132 | u32 output_height = config.output_height / vertical_scale; |
| 131 | 133 | ||
| 134 | u32 input_size = config.input_width * config.input_height * GPU::Regs::BytesPerPixel(config.input_format); | ||
| 135 | u32 output_size = output_width * output_height * GPU::Regs::BytesPerPixel(config.output_format); | ||
| 136 | |||
| 137 | VideoCore::g_renderer->hw_rasterizer->NotifyPreRead(config.GetPhysicalInputAddress(), input_size); | ||
| 138 | |||
| 132 | if (config.raw_copy) { | 139 | if (config.raw_copy) { |
| 133 | // Raw copies do not perform color conversion nor tiled->linear / linear->tiled conversions | 140 | // Raw copies do not perform color conversion nor tiled->linear / linear->tiled conversions |
| 134 | // TODO(Subv): Verify if raw copies perform scaling | 141 | // TODO(Subv): Verify if raw copies perform scaling |
| 135 | memcpy(dst_pointer, src_pointer, config.output_width * config.output_height * | 142 | memcpy(dst_pointer, src_pointer, output_size); |
| 136 | GPU::Regs::BytesPerPixel(config.output_format)); | ||
| 137 | 143 | ||
| 138 | 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", | 144 | 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", |
| 139 | config.output_height * output_width * GPU::Regs::BytesPerPixel(config.output_format), | 145 | output_size, |
| 140 | config.GetPhysicalInputAddress(), config.input_width.Value(), config.input_height.Value(), | 146 | config.GetPhysicalInputAddress(), config.input_width.Value(), config.input_height.Value(), |
| 141 | config.GetPhysicalOutputAddress(), config.output_width.Value(), config.output_height.Value(), | 147 | config.GetPhysicalOutputAddress(), config.output_width.Value(), config.output_height.Value(), |
| 142 | config.output_format.Value(), config.flags); | 148 | config.output_format.Value(), config.flags); |
| 143 | 149 | ||
| 144 | GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PPF); | 150 | GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PPF); |
| 151 | |||
| 152 | VideoCore::g_renderer->hw_rasterizer->NotifyFlush(config.GetPhysicalOutputAddress(), output_size); | ||
| 145 | break; | 153 | break; |
| 146 | } | 154 | } |
| 147 | 155 | ||
| @@ -247,6 +255,8 @@ inline void Write(u32 addr, const T data) { | |||
| 247 | config.output_format.Value(), config.flags); | 255 | config.output_format.Value(), config.flags); |
| 248 | 256 | ||
| 249 | GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PPF); | 257 | GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PPF); |
| 258 | |||
| 259 | VideoCore::g_renderer->hw_rasterizer->NotifyFlush(config.GetPhysicalOutputAddress(), output_size); | ||
| 250 | } | 260 | } |
| 251 | break; | 261 | break; |
| 252 | } | 262 | } |