diff options
author | bunnei <bunneidev@gmail.com> | 2014-08-26 23:34:52 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-08-26 23:34:52 +0200 |
commit | 20d169e4a1753bf85c19c2799ace8b50fa2e3fa3 (patch) | |
tree | 9b90eb8eda2a89eeb7302d9fa5af79a466cd695b /src/video_core/rasterizer.cpp | |
parent | Merge pull request #74 from kevinhartman/master (diff) | |
download | yuzu-20d169e4a1753bf85c19c2799ace8b50fa2e3fa3.tar yuzu-20d169e4a1753bf85c19c2799ace8b50fa2e3fa3.tar.gz yuzu-20d169e4a1753bf85c19c2799ace8b50fa2e3fa3.tar.bz2 yuzu-20d169e4a1753bf85c19c2799ace8b50fa2e3fa3.tar.lz yuzu-20d169e4a1753bf85c19c2799ace8b50fa2e3fa3.tar.xz yuzu-20d169e4a1753bf85c19c2799ace8b50fa2e3fa3.tar.zst yuzu-20d169e4a1753bf85c19c2799ace8b50fa2e3fa3.zip |
Diffstat (limited to 'src/video_core/rasterizer.cpp')
-rw-r--r-- | src/video_core/rasterizer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index cdfdb6215..b55391e5e 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp @@ -22,21 +22,21 @@ static void DrawPixel(int x, int y, const Math::Vec4<u8>& color) { u32 value = (color.a() << 24) | (color.r() << 16) | (color.g() << 8) | color.b(); // Assuming RGBA8 format until actual framebuffer format handling is implemented - *(color_buffer + x + y * registers.framebuffer.GetWidth() / 2) = value; + *(color_buffer + x + y * registers.framebuffer.GetWidth()) = value; } static u32 GetDepth(int x, int y) { u16* depth_buffer = (u16*)Memory::GetPointer(registers.framebuffer.GetDepthBufferAddress()); // Assuming 16-bit depth buffer format until actual format handling is implemented - return *(depth_buffer + x + y * registers.framebuffer.GetWidth() / 2); + return *(depth_buffer + x + y * registers.framebuffer.GetWidth()); } static void SetDepth(int x, int y, u16 value) { u16* depth_buffer = (u16*)Memory::GetPointer(registers.framebuffer.GetDepthBufferAddress()); // Assuming 16-bit depth buffer format until actual format handling is implemented - *(depth_buffer + x + y * registers.framebuffer.GetWidth() / 2) = value; + *(depth_buffer + x + y * registers.framebuffer.GetWidth()) = value; } void ProcessTriangle(const VertexShader::OutputVertex& v0, |