mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
For ease of use, skip glDisable for any deprecated compat caps
* This is for working with compatibility profiles, which I only plan to do when it's harmless little tweaks like this. Not in a significant way (like supporting the fixed function pipeline, display lists, etc). * The theory here is that glDisable on a deprecated cap is 'harmless' as it's already off by not existing. And maybe when capturing a mostly-core program that has some legacy code or runs in compatibility, it calls glDisable for these caps but never plans to use them. So we can ignore it * If glEnable is called though, we serialise that and it will fire errors and the replay will be wrong. That doesn't change.
This commit is contained in:
@@ -839,6 +839,15 @@ void WrappedOpenGL::glDisable(GLenum cap)
|
||||
|
||||
if(m_State == WRITING_CAPFRAME)
|
||||
{
|
||||
// Skip some compatibility caps purely for the sake of avoiding debug message spam.
|
||||
// We don't explicitly support compatibility, but where it's trivial we try and support it.
|
||||
// If these are enabled anywhere in the program/capture then the replay will probably be
|
||||
// wrong, but some legacy codebases running compatibility might still disable these.
|
||||
// So we don't skip these on glEnable (they will be serialised, and fire an error as
|
||||
// appropriate).
|
||||
if(cap == 0x0B50) return; // GL_LIGHTING
|
||||
if(cap == 0x0BC0) return; // GL_ALPHA_TEST
|
||||
|
||||
SCOPED_SERIALISE_CONTEXT(DISABLE);
|
||||
Serialise_glDisable(cap);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user