diff options
author | Mario Sanchez Prada <mario@endlessm.com> | 2017-04-17 12:21:16 +0100 |
---|---|---|
committer | Mario Sanchez Prada <mario@endlessm.com> | 2017-04-17 12:58:52 +0100 |
commit | e435cf301f78971f3d4965468f53ccad7ab1b2f8 (patch) | |
tree | 82a16a2c6d923aca1cea73cfd3969f038ac60c5e /cogl | |
parent | 0608ae2d4e8e69a7dbfa92f5e5313da8b7a6197b (diff) | |
download | mutter-e435cf301f78971f3d4965468f53ccad7ab1b2f8.tar.gz |
Define new tokens from the ARB_robustness extension if needed
The ARB_robustness extension defined the following tokens as
returned by GetGraphicsResetStatusARB (see spec at [1]):
GUILTY_CONTEXT_RESET_ARB 0x8253
INNOCENT_CONTEXT_RESET_ARB 0x8254
UNKNOWN_CONTEXT_RESET_ARB 0x8255
These tokens might not be defined in some GL implementations,
such as Mesa 13's implementation of GLES 2.0, so we need to
define them ourselves not to break those builds.
[1] https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_robustness.txt
https://bugzilla.gnome.org/show_bug.cgi?id=781398
Diffstat (limited to 'cogl')
-rw-r--r-- | cogl/cogl/cogl-context.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cogl/cogl/cogl-context.c b/cogl/cogl/cogl-context.c index c45c9b44b..70d220659 100644 --- a/cogl/cogl/cogl-context.c +++ b/cogl/cogl/cogl-context.c @@ -81,6 +81,19 @@ #define GL_PURGED_CONTEXT_RESET_NV 0x92BB #endif +/* These aren't defined in the GLES2 headers */ +#ifndef GL_GUILTY_CONTEXT_RESET_ARB +#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 +#endif + +#ifndef GL_INNOCENT_CONTEXT_RESET_ARB +#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 +#endif + +#ifndef GL_UNKNOWN_CONTEXT_RESET_ARB +#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 +#endif + static void _cogl_context_free (CoglContext *context); COGL_OBJECT_DEFINE (Context, context); |