Comment 0 for bug 1051290

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

We make lots (99%) of redundant state changes which are easily avoidable. These make up about 7% of all calls into openGL. They include:

glDisable (GL_BLEND);
glDisable (GL_STENCIL_TEST);
glDisable (GL_DEPTH_TEST);
glTexEnvi (GL_TEXTURE_MODE, GL_REPLACE, ...)
glStencilMask (0);

Most of these can be tracked and avoided. If we are doing it to work around bugs in plugins those plugins should be fixed. Calling into openGL to set these redundant states involves calling directly into the driver to get context data, which can involve waiting on the driver until its ready to return this structure into the openGL library.