Remove most calls to checkGLError()

...and rely on KHR_debug/GL_ARB_debug_output instead.
This commit is contained in:
Fredrik Höglund 2014-11-19 19:02:57 +01:00
parent c0deadfaad
commit 6ac7371113
9 changed files with 3 additions and 28 deletions

View file

@ -376,7 +376,6 @@ bool CubeEffect::loadShader()
sphereShader->setUniform("width", (float)rect.width() * 0.5f); sphereShader->setUniform("width", (float)rect.width() * 0.5f);
sphereShader->setUniform("height", (float)rect.height() * 0.5f); sphereShader->setUniform("height", (float)rect.height() * 0.5f);
sphereShader->setUniform("u_offset", QVector2D(0, 0)); sphereShader->setUniform("u_offset", QVector2D(0, 0));
checkGLError("Loading Sphere Shader");
} }
return true; return true;
} }

View file

@ -360,7 +360,6 @@ void LogoutEffect::renderBlurTexture()
blurTexture->render(infiniteRegion(), effects->virtualScreenGeometry()); blurTexture->render(infiniteRegion(), effects->virtualScreenGeometry());
blurTexture->unbind(); blurTexture->unbind();
glDisable(GL_BLEND); glDisable(GL_BLEND);
checkGLError("Render blur texture");
} }
void LogoutEffect::slotPropertyNotify(EffectWindow* w, long a) void LogoutEffect::slotPropertyNotify(EffectWindow* w, long a)

View file

@ -65,7 +65,6 @@ EglWaylandBackend::EglWaylandBackend()
EglWaylandBackend::~EglWaylandBackend() EglWaylandBackend::~EglWaylandBackend()
{ {
cleanupGL(); cleanupGL();
checkGLError("Cleanup");
doneCurrent(); doneCurrent();
eglDestroyContext(m_display, m_context); eglDestroyContext(m_display, m_context);
eglDestroySurface(m_display, m_surface); eglDestroySurface(m_display, m_surface);
@ -433,7 +432,6 @@ bool EglWaylandTexture::loadTexture(xcb_pixmap_t pix, const QSize &size, xcb_vis
#endif #endif
q->unbind(); q->unbind();
checkGLError("load texture");
q->setYInverted(true); q->setYInverted(true);
m_size = size; m_size = size;
updateMatrix(); updateMatrix();
@ -470,7 +468,6 @@ bool EglWaylandTexture::update(const QRegion &damage)
#endif #endif
q->unbind(); q->unbind();
checkGLError("update texture");
return true; return true;
} }

View file

@ -53,7 +53,6 @@ EglOnXBackend::~EglOnXBackend()
m_overlayWindow->destroy(); m_overlayWindow->destroy();
} }
cleanupGL(); cleanupGL();
checkGLError("Cleanup");
doneCurrent(); doneCurrent();
eglDestroyContext(dpy, ctx); eglDestroyContext(dpy, ctx);
eglDestroySurface(dpy, surface); eglDestroySurface(dpy, surface);
@ -523,7 +522,6 @@ bool EglTexture::loadTexture(xcb_pixmap_t pix, const QSize &size, xcb_visualid_t
} }
glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, (GLeglImageOES)m_image); glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, (GLeglImageOES)m_image);
q->unbind(); q->unbind();
checkGLError("load texture");
q->setYInverted(true); q->setYInverted(true);
m_size = size; m_size = size;
updateMatrix(); updateMatrix();

View file

@ -120,7 +120,6 @@ GlxBackend::~GlxBackend()
// TODO: cleanup in error case // TODO: cleanup in error case
// do cleanup after initBuffer() // do cleanup after initBuffer()
cleanupGL(); cleanupGL();
checkGLError("Cleanup");
doneCurrent(); doneCurrent();
if (ctx) if (ctx)

View file

@ -590,11 +590,8 @@ bool ColorCorrectionPrivate::setupCCTextures()
return success; return success;
} }
bool ColorCorrectionPrivate::deleteCCTextures() void ColorCorrectionPrivate::deleteCCTextures()
{ {
// Clear any previous GL errors
checkGLError("deleteCCTextures-clearErrors");
// Delete dummy texture // Delete dummy texture
if (m_dummyCCTexture) { if (m_dummyCCTexture) {
glDeleteTextures(1, &m_dummyCCTexture); glDeleteTextures(1, &m_dummyCCTexture);
@ -606,8 +603,6 @@ bool ColorCorrectionPrivate::deleteCCTextures()
glDeleteTextures(m_outputCCTextures.size(), m_outputCCTextures.data()); glDeleteTextures(m_outputCCTextures.size(), m_outputCCTextures.data());
m_outputCCTextures.clear(); m_outputCCTextures.clear();
} }
return !checkGLError("deleteCCTextures");
} }
bool ColorCorrectionPrivate::setupCCTexture(GLuint texture, const Clut& clut) bool ColorCorrectionPrivate::setupCCTexture(GLuint texture, const Clut& clut)

View file

@ -82,7 +82,7 @@ public:
virtual ~ColorCorrectionPrivate(); virtual ~ColorCorrectionPrivate();
bool setupCCTextures(); bool setupCCTextures();
bool deleteCCTextures(); void deleteCCTextures();
static bool setupCCTexture(GLuint texture, const Clut &clut); static bool setupCCTexture(GLuint texture, const Clut &clut);
public Q_SLOTS: public Q_SLOTS:

View file

@ -263,7 +263,7 @@ void GLTexture::update(const QImage &image, const QPoint &offset, const QRect &s
bind(); bind();
glTexSubImage2D(d->m_target, 0, offset.x(), offset.y(), width, height, glTexSubImage2D(d->m_target, 0, offset.x(), offset.y(), width, height,
GLTexturePrivate::s_textureFormat, GL_UNSIGNED_BYTE, img.bits()); GLTexturePrivate::s_textureFormat, GL_UNSIGNED_BYTE, img.bits());
checkGLError("update texture");
unbind(); unbind();
setDirty(); setDirty();
if (!src.isNull() && d->s_supportsUnpack) { if (!src.isNull() && d->s_supportsUnpack) {

View file

@ -57,10 +57,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <unistd.h> #include <unistd.h>
#include <stddef.h> #include <stddef.h>
// turns on checks for opengl errors in various places (for easier finding of them)
// normally only few of them are enabled
//#define CHECK_GL_ERROR
#include <qpainter.h> #include <qpainter.h>
#include <QDBusConnection> #include <QDBusConnection>
#include <QDBusConnectionInterface> #include <QDBusConnectionInterface>
@ -642,9 +638,6 @@ qint64 SceneOpenGL::paint(QRegion damage, ToplevelList toplevels)
} }
int mask = 0; int mask = 0;
#ifdef CHECK_GL_ERROR
checkGLError("Paint1");
#endif
// After this call, updateRegion will contain the damaged region in the // After this call, updateRegion will contain the damaged region in the
// back buffer. This is the region that needs to be posted to repair // back buffer. This is the region that needs to be posted to repair
@ -668,10 +661,6 @@ qint64 SceneOpenGL::paint(QRegion damage, ToplevelList toplevels)
} }
#endif #endif
#ifdef CHECK_GL_ERROR
checkGLError("Paint2");
#endif
m_backend->endRenderingFrame(validRegion, updateRegion); m_backend->endRenderingFrame(validRegion, updateRegion);
if (m_currentFence) { if (m_currentFence) {
@ -686,7 +675,6 @@ qint64 SceneOpenGL::paint(QRegion damage, ToplevelList toplevels)
// do cleanup // do cleanup
clearStackingOrder(); clearStackingOrder();
checkGLError("PostPaint");
return m_backend->renderTime(); return m_backend->renderTime();
} }