Asserts: break/crash program, fit to style guide; log.h->assert.h

Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)

Also removed some GEKKO cruft.
This commit is contained in:
archshift 2015-01-20 17:16:47 -08:00
parent 168eb27aee
commit ef24e72b26
88 changed files with 135 additions and 217 deletions

View file

@ -3,7 +3,7 @@
// Refer to the license.txt file included.
#include "gl_shader_util.h"
#include "common/log.h"
#include "common/logging/log.h"
#include <vector>
#include <algorithm>

View file

@ -99,15 +99,15 @@ void RendererOpenGL::LoadFBToActiveGLTexture(const GPU::Regs::FramebufferConfig&
const u8* framebuffer_data = Memory::GetPointer(framebuffer_vaddr);
// TODO: Handle other pixel formats
_dbg_assert_msg_(Render_OpenGL, framebuffer.color_format == GPU::Regs::PixelFormat::RGB8,
ASSERT_MSG(framebuffer.color_format == GPU::Regs::PixelFormat::RGB8,
"Unsupported 3DS pixel format.");
size_t pixel_stride = framebuffer.stride / 3;
// OpenGL only supports specifying a stride in units of pixels, not bytes, unfortunately
_dbg_assert_(Render_OpenGL, pixel_stride * 3 == framebuffer.stride);
ASSERT(pixel_stride * 3 == framebuffer.stride);
// Ensure no bad interactions with GL_UNPACK_ALIGNMENT, which by default
// only allows rows to have a memory alignement of 4.
_dbg_assert_(Render_OpenGL, pixel_stride % 4 == 0);
ASSERT(pixel_stride % 4 == 0);
glBindTexture(GL_TEXTURE_2D, texture.handle);
glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint)pixel_stride);