summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-10-26 04:53:22 -0400
committerLioncash <mathew1800@gmail.com>2014-10-26 04:54:58 -0400
commit49b94e52858e5869ea2872ed75810ba075cfa0eb (patch)
tree39f2911237486cd32287ea2b528710e5997ee22c /Source/Core
parentf895648eb95369e2d302ba93cc4354d3880a7337 (diff)
OGL: Get rid of error macros
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoBackends/OGL/FramebufferManager.cpp3
-rw-r--r--Source/Core/VideoBackends/OGL/GLUtil.cpp43
-rw-r--r--Source/Core/VideoBackends/OGL/GLUtil.h14
-rw-r--r--Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp2
-rw-r--r--Source/Core/VideoBackends/OGL/Render.cpp59
-rw-r--r--Source/Core/VideoBackends/OGL/TextureCache.cpp22
-rw-r--r--Source/Core/VideoBackends/OGL/TextureConverter.cpp12
-rw-r--r--Source/Core/VideoBackends/OGL/VertexManager.cpp7
-rw-r--r--Source/Core/VideoBackends/OGL/main.cpp1
-rw-r--r--Source/Core/VideoBackends/Software/HwRasterizer.cpp8
-rw-r--r--Source/Core/VideoBackends/Software/RasterFont.cpp4
-rw-r--r--Source/Core/VideoBackends/Software/SWRenderer.cpp4
12 files changed, 18 insertions, 161 deletions
diff --git a/Source/Core/VideoBackends/OGL/FramebufferManager.cpp b/Source/Core/VideoBackends/OGL/FramebufferManager.cpp
index c356be9c61..a8441952e9 100644
--- a/Source/Core/VideoBackends/OGL/FramebufferManager.cpp
+++ b/Source/Core/VideoBackends/OGL/FramebufferManager.cpp
@@ -135,7 +135,6 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms
glBindFramebuffer(GL_FRAMEBUFFER, m_resolvedFramebuffer);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_resolvedColorTexture, 0);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, m_resolvedDepthTexture, 0);
- GL_REPORT_FBO_ERROR();
}
// Create XFB framebuffer; targets will be created elsewhere.
@@ -146,7 +145,6 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms
glBindFramebuffer(GL_FRAMEBUFFER, m_efbFramebuffer);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, m_textureType, m_efbColor, 0);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, m_textureType, m_efbDepth, 0);
- GL_REPORT_FBO_ERROR();
// EFB framebuffer is currently bound, make sure to clear its alpha value to 1.f
glViewport(0, 0, m_targetWidth, m_targetHeight);
@@ -400,7 +398,6 @@ void XFBSource::CopyEFB(float Gamma)
// Bind texture.
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, 0);
- GL_REPORT_FBO_ERROR();
glBlitFramebuffer(
0, 0, texWidth, texHeight,
diff --git a/Source/Core/VideoBackends/OGL/GLUtil.cpp b/Source/Core/VideoBackends/OGL/GLUtil.cpp
index c90d114426..bfd6170839 100644
--- a/Source/Core/VideoBackends/OGL/GLUtil.cpp
+++ b/Source/Core/VideoBackends/OGL/GLUtil.cpp
@@ -113,46 +113,3 @@ GLuint OpenGL_CompileProgram(const char* vertexShader, const char* fragmentShade
return programID;
}
-
-GLenum OpenGL_ReportGLError(const char *function, const char *file, int line)
-{
- GLenum err = glGetError();
- if (err != GL_NO_ERROR)
- {
- ERROR_LOG(VIDEO, "%s:%d: (%s) OpenGL error 0x%x\n",
- file, line, function, err);
- }
- return err;
-}
-
-bool OpenGL_ReportFBOError(const char *function, const char *file, int line)
-{
- GLenum fbo_status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
- if (fbo_status != GL_FRAMEBUFFER_COMPLETE)
- {
- const char *error = "unknown error";
- switch (fbo_status)
- {
- case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
- error = "INCOMPLETE_ATTACHMENT";
- break;
- case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:
- error = "INCOMPLETE_MISSING_ATTACHMENT";
- break;
- case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:
- error = "INCOMPLETE_DRAW_BUFFER";
- break;
- case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER:
- error = "INCOMPLETE_READ_BUFFER";
- break;
- case GL_FRAMEBUFFER_UNSUPPORTED:
- error = "UNSUPPORTED";
- break;
- }
- ERROR_LOG(VIDEO, "%s:%d: (%s) OpenGL FBO error - %s\n",
- file, line, function, error);
- return false;
- }
- return true;
-}
-
diff --git a/Source/Core/VideoBackends/OGL/GLUtil.h b/Source/Core/VideoBackends/OGL/GLUtil.h
index 33be8a5d9e..8bcfb06886 100644
--- a/Source/Core/VideoBackends/OGL/GLUtil.h
+++ b/Source/Core/VideoBackends/OGL/GLUtil.h
@@ -18,20 +18,6 @@ void InitInterface();
// Helpers
GLuint OpenGL_CompileProgram(const char *vertexShader, const char *fragmentShader);
-// Error reporting - use the convenient macros.
-GLenum OpenGL_ReportGLError(const char *function, const char *file, int line);
-bool OpenGL_ReportFBOError(const char *function, const char *file, int line);
-
-#if defined(_DEBUG) || defined(DEBUGFAST)
-#define GL_REPORT_ERROR() OpenGL_ReportGLError(__FUNCTION__, __FILE__, __LINE__)
-#define GL_REPORT_ERRORD() OpenGL_ReportGLError(__FUNCTION__, __FILE__, __LINE__)
-#define GL_REPORT_FBO_ERROR() OpenGL_ReportFBOError(__FUNCTION__, __FILE__, __LINE__)
-#else
-__forceinline GLenum GL_REPORT_ERROR() { return GL_NO_ERROR; }
-#define GL_REPORT_ERRORD() (void)GL_NO_ERROR
-#define GL_REPORT_FBO_ERROR() (void)true
-#endif
-
// this should be removed in future, but as long as glsl is unstable, we should really read this messages
#if defined(_DEBUG) || defined(DEBUGFAST)
#define DEBUG_GLSL 1
diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
index 743fc6507c..1b0d8db5b8 100644
--- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
+++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
@@ -357,7 +357,7 @@ GLuint ProgramShaderCache::CompileSingleShader(GLuint type, const char* code)
glDeleteShader(result);
return 0;
}
- (void)GL_REPORT_ERROR();
+
return result;
}
diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp
index 2920d33c78..7feba47baa 100644
--- a/Source/Core/VideoBackends/OGL/Render.cpp
+++ b/Source/Core/VideoBackends/OGL/Render.cpp
@@ -878,8 +878,6 @@ void Renderer::RenderText(const std::string& text, int left, int top, u32 color)
left * 2.0f / (float)nBackbufferWidth - 1,
1 - top * 2.0f / (float)nBackbufferHeight,
0, nBackbufferWidth, nBackbufferHeight, color);
-
- GL_REPORT_ERRORD();
}
TargetRectangle Renderer::ConvertEFBRectangle(const EFBRectangle& rc)
@@ -1015,7 +1013,6 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
glReadPixels(targetPixelRc.left, targetPixelRc.bottom, targetPixelRcWidth, targetPixelRcHeight,
GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, depthMap);
- GL_REPORT_ERRORD();
UpdateEFBCache(type, cacheRectIdx, efbPixelRc, targetPixelRc, depthMap);
@@ -1073,7 +1070,6 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
else
glReadPixels(targetPixelRc.left, targetPixelRc.bottom, targetPixelRcWidth, targetPixelRcHeight,
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, colorMap);
- GL_REPORT_ERRORD();
UpdateEFBCache(type, cacheRectIdx, efbPixelRc, targetPixelRc, colorMap);
@@ -1409,8 +1405,6 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
std::swap(flipped_trc.top, flipped_trc.bottom);
}
- GL_REPORT_ERRORD();
-
// Copy the framebuffer to screen.
const XFBSource* xfbSource = nullptr;
@@ -1501,7 +1495,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
}
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glReadPixels(flipped_trc.left, flipped_trc.bottom, w, h, GL_BGR, GL_UNSIGNED_BYTE, &frame_data[0]);
- if (GL_REPORT_ERROR() == GL_NO_ERROR && w > 0 && h > 0)
+ if (w > 0 && h > 0)
{
if (!bLastFrameDumped)
{
@@ -1559,29 +1553,27 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
frame_data.resize(3 * w * h);
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glReadPixels(GetTargetRectangle().left, GetTargetRectangle().bottom, w, h, GL_BGR, GL_UNSIGNED_BYTE, &frame_data[0]);
- if (GL_REPORT_ERROR() == GL_NO_ERROR)
+
+ if (!bLastFrameDumped)
{
- if (!bLastFrameDumped)
+ movie_file_name = File::GetUserPath(D_DUMPFRAMES_IDX) + "framedump.raw";
+ pFrameDump.Open(movie_file_name, "wb");
+ if (!pFrameDump)
{
- movie_file_name = File::GetUserPath(D_DUMPFRAMES_IDX) + "framedump.raw";
- pFrameDump.Open(movie_file_name, "wb");
- if (!pFrameDump)
- {
- OSD::AddMessage("Error opening framedump.raw for writing.", 2000);
- }
- else
- {
- OSD::AddMessage(StringFromFormat("Dumping Frames to \"%s\" (%dx%d RGB24)", movie_file_name.c_str(), w, h), 2000);
- }
+ OSD::AddMessage("Error opening framedump.raw for writing.", 2000);
}
- if (pFrameDump)
+ else
{
- FlipImageData(&frame_data[0], w, h);
- pFrameDump.WriteBytes(&frame_data[0], w * 3 * h);
- pFrameDump.Flush();
+ OSD::AddMessage(StringFromFormat("Dumping Frames to \"%s\" (%dx%d RGB24)", movie_file_name.c_str(), w, h), 2000);
}
- bLastFrameDumped = true;
}
+ if (pFrameDump)
+ {
+ FlipImageData(&frame_data[0], w, h);
+ pFrameDump.WriteBytes(&frame_data[0], w * 3 * h);
+ pFrameDump.Flush();
+ }
+ bLastFrameDumped = true;
}
else
{
@@ -1638,32 +1630,24 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
// ---------------------------------------------------------------------
if (!DriverDetails::HasBug(DriverDetails::BUG_BROKENSWAP))
{
- GL_REPORT_ERRORD();
-
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
DrawDebugInfo();
DrawDebugText();
- GL_REPORT_ERRORD();
-
// Do our OSD callbacks
OSD::DoCallbacks(OSD::OSD_ONFRAME);
OSD::DrawMessages();
- GL_REPORT_ERRORD();
}
// Copy the rendered frame to the real window
GLInterface->Swap();
- GL_REPORT_ERRORD();
-
// Clear framebuffer
if (!DriverDetails::HasBug(DriverDetails::BUG_BROKENSWAP))
{
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
- GL_REPORT_ERRORD();
}
if (s_vsync != g_ActiveConfig.IsVSync())
@@ -1678,11 +1662,8 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
// Render to the framebuffer.
FramebufferManager::SetFramebuffer(0);
- GL_REPORT_ERRORD();
-
RestoreAPIState();
- GL_REPORT_ERRORD();
g_Config.iSaveTargetId = 0;
UpdateActiveConfig();
@@ -1875,14 +1856,6 @@ bool Renderer::SaveScreenshot(const std::string &filename, const TargetRectangle
glReadPixels(back_rc.left, back_rc.bottom, W, H, GL_RGBA, GL_UNSIGNED_BYTE, data);
- // Show failure message
- if (GL_REPORT_ERROR() != GL_NO_ERROR)
- {
- delete[] data;
- OSD::AddMessage("Error capturing or saving screenshot.", 2000);
- return false;
- }
-
// Turn image upside down
FlipImageData(data, W, H, 4);
bool success = TextureToPng(data, W*4, filename, W, H, false);
diff --git a/Source/Core/VideoBackends/OGL/TextureCache.cpp b/Source/Core/VideoBackends/OGL/TextureCache.cpp
index 0915f24937..4170480336 100644
--- a/Source/Core/VideoBackends/OGL/TextureCache.cpp
+++ b/Source/Core/VideoBackends/OGL/TextureCache.cpp
@@ -60,13 +60,6 @@ bool SaveTexture(const std::string& filename, u32 textarget, u32 tex, int virtua
glBindTexture(textarget, 0);
TextureCache::SetStage();
- const GLenum err = GL_REPORT_ERROR();
- if (GL_NO_ERROR != err)
- {
- PanicAlert("Can't save texture, GL Error: %d", err);
- return false;
- }
-
return TextureToPng(data.data(), width * 4, filename, width, height, true);
}
@@ -91,7 +84,6 @@ TextureCache::TCacheEntry::~TCacheEntry()
TextureCache::TCacheEntry::TCacheEntry()
{
glGenTextures(1, &texture);
- GL_REPORT_ERRORD();
framebuffer = 0;
}
@@ -214,7 +206,6 @@ void TextureCache::TCacheEntry::Load(unsigned int width, unsigned int height,
//width, height, 0, expanded_width * expanded_height/2, temp);
}
TextureCache::SetStage();
- GL_REPORT_ERRORD();
}
TextureCache::TCacheEntryBase* TextureCache::CreateRenderTargetTexture(
@@ -223,7 +214,6 @@ TextureCache::TCacheEntryBase* TextureCache::CreateRenderTargetTexture(
TCacheEntry *const entry = new TCacheEntry;
glActiveTexture(GL_TEXTURE0+9);
glBindTexture(GL_TEXTURE_2D, entry->texture);
- GL_REPORT_ERRORD();
const GLenum
gl_format = GL_RGBA,
@@ -238,12 +228,9 @@ TextureCache::TCacheEntryBase* TextureCache::CreateRenderTargetTexture(
glGenFramebuffers(1, &entry->framebuffer);
FramebufferManager::SetFramebuffer(entry->framebuffer);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, entry->texture, 0);
- GL_REPORT_FBO_ERROR();
SetStage();
- GL_REPORT_ERRORD();
-
return entry;
}
@@ -259,14 +246,10 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
FramebufferManager::ResolveAndGetDepthTarget(srcRect) :
FramebufferManager::ResolveAndGetRenderTarget(srcRect);
- GL_REPORT_ERRORD();
-
if (type != TCET_EC_DYNAMIC || g_ActiveConfig.bCopyEFBToTexture)
{
FramebufferManager::SetFramebuffer(framebuffer);
- GL_REPORT_ERRORD();
-
glActiveTexture(GL_TEXTURE0+9);
glBindTexture(GL_TEXTURE_2D, read_texture);
@@ -293,11 +276,8 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
TargetRectangle R = g_renderer->ConvertEFBRectangle(srcRect);
glUniform4f(uniform_location, static_cast<float>(R.left), static_cast<float>(R.top),
static_cast<float>(R.right), static_cast<float>(R.bottom));
- GL_REPORT_ERRORD();
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
-
- GL_REPORT_ERRORD();
}
if (false == g_ActiveConfig.bCopyEFBToTexture)
@@ -325,8 +305,6 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
FramebufferManager::SetFramebuffer(0);
- GL_REPORT_ERRORD();
-
if (g_ActiveConfig.bDumpEFBTarget)
{
static int count = 0;
diff --git a/Source/Core/VideoBackends/OGL/TextureConverter.cpp b/Source/Core/VideoBackends/OGL/TextureConverter.cpp
index e4888ea2e5..79cf9122b2 100644
--- a/Source/Core/VideoBackends/OGL/TextureConverter.cpp
+++ b/Source/Core/VideoBackends/OGL/TextureConverter.cpp
@@ -221,7 +221,6 @@ static void EncodeToRamUsingShader(GLuint srcTexture,
// switch to texture converter frame buffer
// attach render buffer as color destination
FramebufferManager::SetFramebuffer(s_texConvFrameBuffer[0]);
- GL_REPORT_ERRORD();
// set source texture
glActiveTexture(GL_TEXTURE0+9);
@@ -238,14 +237,10 @@ static void EncodeToRamUsingShader(GLuint srcTexture,
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
}
- GL_REPORT_ERRORD();
-
glViewport(0, 0, (GLsizei)dstWidth, (GLsizei)dstHeight);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
- GL_REPORT_ERRORD();
-
// .. and then read back the results.
// TODO: make this less slow.
@@ -280,9 +275,6 @@ static void EncodeToRamUsingShader(GLuint srcTexture,
{
glReadPixels(0, 0, (GLsizei)dstWidth, (GLsizei)dstHeight, GL_BGRA, GL_UNSIGNED_BYTE, destAddr);
}
-
- GL_REPORT_ERRORD();
-
}
int EncodeToRamFromTexture(u32 address,GLuint source_texture, bool bFromZBuffer, bool bIsIntensityFmt, u32 copyfmt, int bScaleByHalf, const EFBRectangle& source)
@@ -355,7 +347,6 @@ void EncodeToRamYUYV(GLuint srcTexture, const TargetRectangle& sourceRc, u8* des
FramebufferManager::SetFramebuffer(0);
TextureCache::DisableStage(0);
g_renderer->RestoreAPIState();
- GL_REPORT_ERRORD();
}
@@ -376,8 +367,6 @@ void DecodeToTexture(u32 xfbAddr, int srcWidth, int srcHeight, GLuint destTextur
FramebufferManager::SetFramebuffer(s_texConvFrameBuffer[1]);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, destTexture, 0);
- GL_REPORT_FBO_ERROR();
-
// activate source texture
// set srcAddr as data for source texture
glActiveTexture(GL_TEXTURE0+9);
@@ -392,7 +381,6 @@ void DecodeToTexture(u32 xfbAddr, int srcWidth, int srcHeight, GLuint destTextur
FramebufferManager::SetFramebuffer(0);
g_renderer->RestoreAPIState();
- GL_REPORT_ERRORD();
}
} // namespace
diff --git a/Source/Core/VideoBackends/OGL/VertexManager.cpp b/Source/Core/VideoBackends/OGL/VertexManager.cpp
index 325d018e91..0fbcefa83f 100644
--- a/Source/Core/VideoBackends/OGL/VertexManager.cpp
+++ b/Source/Core/VideoBackends/OGL/VertexManager.cpp
@@ -63,14 +63,11 @@ void VertexManager::CreateDeviceObjects()
void VertexManager::DestroyDeviceObjects()
{
- GL_REPORT_ERRORD();
glBindBuffer(GL_ARRAY_BUFFER, 0 );
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0 );
- GL_REPORT_ERROR();
delete s_vertexBuffer;
delete s_indexBuffer;
- GL_REPORT_ERROR();
}
void VertexManager::PrepareDrawBuffers(u32 stride)
@@ -140,7 +137,6 @@ void VertexManager::vFlush(bool useDstAlpha)
}
PrepareDrawBuffers(stride);
- GL_REPORT_ERRORD();
// Makes sure we can actually do Dual source blending
bool dualSourcePossible = g_ActiveConfig.backend_info.bSupportsDualSourceBlend;
@@ -161,7 +157,6 @@ void VertexManager::vFlush(bool useDstAlpha)
// setup the pointers
nativeVertexFmt->SetupVertexPointers();
- GL_REPORT_ERRORD();
Draw(stride);
@@ -214,8 +209,6 @@ void VertexManager::vFlush(bool useDstAlpha)
g_Config.iSaveTargetId++;
ClearEFBCache();
-
- GL_REPORT_ERRORD();
}
diff --git a/Source/Core/VideoBackends/OGL/main.cpp b/Source/Core/VideoBackends/OGL/main.cpp
index 472bb19f43..810509b0a9 100644
--- a/Source/Core/VideoBackends/OGL/main.cpp
+++ b/Source/Core/VideoBackends/OGL/main.cpp
@@ -203,7 +203,6 @@ void VideoBackend::Video_Prepare()
g_texture_cache = new TextureCache();
g_sampler_cache = new SamplerCache();
Renderer::Init();
- GL_REPORT_ERRORD();
VertexLoaderManager::Init();
TextureConverter::Init();
diff --git a/Source/Core/VideoBackends/Software/HwRasterizer.cpp b/Source/Core/VideoBackends/Software/HwRasterizer.cpp
index 6847372691..60f97cb14d 100644
--- a/Source/Core/VideoBackends/Software/HwRasterizer.cpp
+++ b/Source/Core/VideoBackends/Software/HwRasterizer.cpp
@@ -152,8 +152,6 @@ namespace HwRasterizer
texType = GL_TEXTURE_RECTANGLE;
else
texType = GL_TEXTURE_2D;
-
- GL_REPORT_ERRORD();
}
static float width, height;
static void LoadTexture()
@@ -178,7 +176,6 @@ namespace HwRasterizer
glBindTexture(texType, cacheEntry.texture);
glTexParameteri(texType, GL_TEXTURE_MAG_FILTER, texUnit.texMode0[0].mag_filter ? GL_LINEAR : GL_NEAREST);
glTexParameteri(texType, GL_TEXTURE_MIN_FILTER, (texUnit.texMode0[0].min_filter >= 4) ? GL_LINEAR : GL_NEAREST);
- GL_REPORT_ERRORD();
}
void BeginTriangles()
@@ -247,7 +244,6 @@ namespace HwRasterizer
glDisableVertexAttribArray(col_atex);
glDisableVertexAttribArray(col_apos);
}
- GL_REPORT_ERRORD();
}
static void DrawTextureVertex(OutputVertexData *v0, OutputVertexData *v1, OutputVertexData *v2)
@@ -295,7 +291,6 @@ namespace HwRasterizer
glDisableVertexAttribArray(tex_atex);
glDisableVertexAttribArray(tex_apos);
}
- GL_REPORT_ERRORD();
}
void DrawTriangleFrontFace(OutputVertexData *v0, OutputVertexData *v1, OutputVertexData *v2)
@@ -332,7 +327,6 @@ namespace HwRasterizer
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
glDisableVertexAttribArray(col_apos);
}
- GL_REPORT_ERRORD();
}
TexCacheEntry::TexCacheEntry()
@@ -358,8 +352,6 @@ namespace HwRasterizer
glGenTextures(1, (GLuint *)&texture);
glBindTexture(texType, texture);
glTexImage2D(texType, 0, GL_RGBA, (GLsizei)image_width, (GLsizei)image_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, temp);
-
- GL_REPORT_ERRORD();
}
void TexCacheEntry::Destroy()
diff --git a/Source/Core/VideoBackends/Software/RasterFont.cpp b/Source/Core/VideoBackends/Software/RasterFont.cpp
index 8aefd89599..83e1165d48 100644
--- a/Source/Core/VideoBackends/Software/RasterFont.cpp
+++ b/Source/Core/VideoBackends/Software/RasterFont.cpp
@@ -148,14 +148,12 @@ void RasterFont::printString(const char *s, double x, double y, double z)
// go to the right spot
glRasterPos3d(x, y, z);
- GL_REPORT_ERRORD();
glPushAttrib (GL_LIST_BIT);
glListBase(fontOffset);
glCallLists((GLsizei)strlen(s2), GL_UNSIGNED_BYTE, (GLubyte *) s2);
- GL_REPORT_ERRORD();
+
glPopAttrib();
- GL_REPORT_ERRORD();
}
void RasterFont::printCenteredString(const char *s, double y, int screen_width, double z)
diff --git a/Source/Core/VideoBackends/Software/SWRenderer.cpp b/Source/Core/VideoBackends/Software/SWRenderer.cpp
index 3289736214..fab1db041f 100644
--- a/Source/Core/VideoBackends/Software/SWRenderer.cpp
+++ b/Source/Core/VideoBackends/Software/SWRenderer.cpp
@@ -103,7 +103,6 @@ void SWRenderer::Prepare()
s_pfont = new RasterFont();
glEnable(GL_TEXTURE_2D);
}
- GL_REPORT_ERRORD();
}
void SWRenderer::SetScreenshot(const char *_szFilename)
@@ -271,7 +270,6 @@ void SWRenderer::DrawTexture(u8 *texture, int width, int height)
glDisableVertexAttribArray(attr_tex);
glBindTexture(GL_TEXTURE_2D, 0);
- GL_REPORT_ERRORD();
}
void SWRenderer::SwapBuffer()
@@ -288,6 +286,4 @@ void SWRenderer::SwapBuffer()
swstats.ResetFrame();
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- GL_REPORT_ERRORD();
}