diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 10 | ||||
| -rw-r--r-- | src/video_core/utils.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 2fabf5cab..5e78723a2 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -57,7 +57,7 @@ uniform sampler2D color_texture; | |||
| 57 | void main() { | 57 | void main() { |
| 58 | // Swap RGBA -> ABGR so we don't have to do this on the CPU. This needs to change if we have to | 58 | // Swap RGBA -> ABGR so we don't have to do this on the CPU. This needs to change if we have to |
| 59 | // support more framebuffer pixel formats. | 59 | // support more framebuffer pixel formats. |
| 60 | color = texture(color_texture, frag_tex_coord).abgr; | 60 | color = texture(color_texture, frag_tex_coord); |
| 61 | } | 61 | } |
| 62 | )"; | 62 | )"; |
| 63 | 63 | ||
| @@ -311,10 +311,10 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x, | |||
| 311 | } | 311 | } |
| 312 | 312 | ||
| 313 | std::array<ScreenRectVertex, 4> vertices = {{ | 313 | std::array<ScreenRectVertex, 4> vertices = {{ |
| 314 | ScreenRectVertex(x, y, texcoords.top, right), | 314 | ScreenRectVertex(x, y, texcoords.top, left), |
| 315 | ScreenRectVertex(x + w, y, texcoords.bottom, right), | 315 | ScreenRectVertex(x + w, y, texcoords.bottom, left), |
| 316 | ScreenRectVertex(x, y + h, texcoords.top, left), | 316 | ScreenRectVertex(x, y + h, texcoords.top, right), |
| 317 | ScreenRectVertex(x + w, y + h, texcoords.bottom, left), | 317 | ScreenRectVertex(x + w, y + h, texcoords.bottom, right), |
| 318 | }}; | 318 | }}; |
| 319 | 319 | ||
| 320 | state.texture_units[0].texture_2d = screen_info.display_texture; | 320 | state.texture_units[0].texture_2d = screen_info.display_texture; |
diff --git a/src/video_core/utils.h b/src/video_core/utils.h index be0f7e22b..e0a14d48f 100644 --- a/src/video_core/utils.h +++ b/src/video_core/utils.h | |||
| @@ -151,7 +151,7 @@ static inline void MortonCopyPixels128(u32 width, u32 height, u32 bytes_per_pixe | |||
| 151 | const u32 coarse_y = y & ~127; | 151 | const u32 coarse_y = y & ~127; |
| 152 | u32 morton_offset = | 152 | u32 morton_offset = |
| 153 | GetMortonOffset128(x, y, bytes_per_pixel) + coarse_y * width * bytes_per_pixel; | 153 | GetMortonOffset128(x, y, bytes_per_pixel) + coarse_y * width * bytes_per_pixel; |
| 154 | u32 gl_pixel_index = (x + (height - 1 - y) * width) * gl_bytes_per_pixel; | 154 | u32 gl_pixel_index = (x + y * width) * gl_bytes_per_pixel; |
| 155 | 155 | ||
| 156 | data_ptrs[morton_to_gl] = morton_data + morton_offset; | 156 | data_ptrs[morton_to_gl] = morton_data + morton_offset; |
| 157 | data_ptrs[!morton_to_gl] = &gl_data[gl_pixel_index]; | 157 | data_ptrs[!morton_to_gl] = &gl_data[gl_pixel_index]; |