diff options
| author | 2014-07-16 09:19:42 +0200 | |
|---|---|---|
| committer | 2014-07-23 00:33:08 +0200 | |
| commit | 9b96407e8e4879663e0678e22df569b9193397b5 (patch) | |
| tree | 94522cdea06009288e76142c89a815c5dc7d7adf /src | |
| parent | GPU: Interface cleanup. (diff) | |
| download | yuzu-9b96407e8e4879663e0678e22df569b9193397b5.tar.gz yuzu-9b96407e8e4879663e0678e22df569b9193397b5.tar.xz yuzu-9b96407e8e4879663e0678e22df569b9193397b5.zip | |
Renderer: Add a few TODOs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 70af47c59..064f47e3b 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -61,10 +61,11 @@ void RendererOpenGL::FlipFramebuffer(const u8* in, u8* out) { | |||
| 61 | int in_coord = 0; | 61 | int in_coord = 0; |
| 62 | for (int x = 0; x < VideoCore::kScreenTopWidth; x++) { | 62 | for (int x = 0; x < VideoCore::kScreenTopWidth; x++) { |
| 63 | for (int y = VideoCore::kScreenTopHeight-1; y >= 0; y--) { | 63 | for (int y = VideoCore::kScreenTopHeight-1; y >= 0; y--) { |
| 64 | // TODO: Properly support other framebuffer formats | ||
| 64 | int out_coord = (x + y * VideoCore::kScreenTopWidth) * 3; | 65 | int out_coord = (x + y * VideoCore::kScreenTopWidth) * 3; |
| 65 | out[out_coord] = in[in_coord]; | 66 | out[out_coord] = in[in_coord]; // blue? |
| 66 | out[out_coord + 1] = in[in_coord + 1]; | 67 | out[out_coord + 1] = in[in_coord + 1]; // green? |
| 67 | out[out_coord + 2] = in[in_coord + 2]; | 68 | out[out_coord + 2] = in[in_coord + 2]; // red? |
| 68 | in_coord+=3; | 69 | in_coord+=3; |
| 69 | } | 70 | } |
| 70 | } | 71 | } |
| @@ -77,6 +78,12 @@ void RendererOpenGL::FlipFramebuffer(const u8* in, u8* out) { | |||
| 77 | */ | 78 | */ |
| 78 | void RendererOpenGL::RenderXFB(const common::Rect& src_rect, const common::Rect& dst_rect) { | 79 | void RendererOpenGL::RenderXFB(const common::Rect& src_rect, const common::Rect& dst_rect) { |
| 79 | 80 | ||
| 81 | DEBUG_LOG(GPU, "RenderXFB: %x bytes from %x(%xx%x), fmt %x", | ||
| 82 | GPU::g_regs.top_framebuffer.stride * GPU::g_regs.top_framebuffer.height, | ||
| 83 | GPU::GetFramebufferAddr(GPU::g_regs.framebuffer_top_left_1), (int)GPU::g_regs.top_framebuffer.width, | ||
| 84 | (int)GPU::g_regs.top_framebuffer.height, (int)GPU::g_regs.top_framebuffer.format); | ||
| 85 | |||
| 86 | // TODO: This should consider the GPU registers for framebuffer width, height and stride. | ||
| 80 | FlipFramebuffer(GPU::GetFramebufferPointer(GPU::g_regs.framebuffer_top_left_1), m_xfb_top_flipped); | 87 | FlipFramebuffer(GPU::GetFramebufferPointer(GPU::g_regs.framebuffer_top_left_1), m_xfb_top_flipped); |
| 81 | FlipFramebuffer(GPU::GetFramebufferPointer(GPU::g_regs.framebuffer_sub_left_1), m_xfb_bottom_flipped); | 88 | FlipFramebuffer(GPU::GetFramebufferPointer(GPU::g_regs.framebuffer_sub_left_1), m_xfb_bottom_flipped); |
| 82 | 89 | ||