180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru/*
380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * Copyright 2011 Google Inc.
480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * Use of this source code is governed by a BSD-style license that can be
680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * found in the LICENSE file.
780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru */
880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
1080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
1180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#ifndef GrGLConfig_DEFINED
1280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#define GrGLConfig_DEFINED
1380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
1480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#include "GrTypes.h"
1580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
1680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru/**
1780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * Optional GL config file.
1880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru */
1980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#ifdef GR_GL_CUSTOM_SETUP_HEADER
2080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    #include GR_GL_CUSTOM_SETUP_HEADER
2180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
2280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
2380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#if !defined(GR_GL_FUNCTION_TYPE)
2480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    #define GR_GL_FUNCTION_TYPE
2580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
2680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
2780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru/**
2880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * The following are optional defines that can be enabled at the compiler
2980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * command line, in a IDE project, in a GrUserConfig.h file, or in a GL custom
3080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * file (if one is in use). If a GR_GL_CUSTOM_SETUP_HEADER is used they can
3180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * also be placed there.
3280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
3380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * GR_GL_LOG_CALLS: if 1 Gr can print every GL call using GrPrintf. Defaults to
3480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * 0. Logging can be enabled and disabled at runtime using a debugger via to
3580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * global gLogCallsGL. The initial value of gLogCallsGL is controlled by
3680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * GR_GL_LOG_CALLS_START.
3780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
3880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * GR_GL_LOG_CALLS_START: controls the initial value of gLogCallsGL when
3980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * GR_GL_LOG_CALLS is 1. Defaults to 0.
4080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
4180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * GR_GL_CHECK_ERROR: if enabled Gr can do a glGetError() after every GL call.
4280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * Defaults to 1 if GR_DEBUG is set, otherwise 0. When GR_GL_CHECK_ERROR is 1
4380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * this can be toggled in a debugger using the gCheckErrorGL global. The initial
4480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * value of gCheckErrorGL is controlled by by GR_GL_CHECK_ERROR_START.
4580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
4680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * GR_GL_CHECK_ERROR_START: controls the initial value of gCheckErrorGL
4780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * when GR_GL_CHECK_ERROR is 1.  Defaults to 1.
4880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
4980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * GR_GL_NO_CONSTANT_ATTRIBUTES: if this evaluates to true then the GL backend
5080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * will use uniforms instead of attributes in all cases when there is not
5180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * per-vertex data. This is important when the underlying GL implementation
5280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * doesn't actually support immediate style attribute values (e.g. when
5380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * the GL stream is converted to DX as in ANGLE on Chrome). Defaults to 0.
5480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
5580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * GR_GL_USE_BUFFER_DATA_NULL_HINT: When specifing new data for a vertex/index
5680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * buffer that replaces old data Ganesh can give a hint to the driver that the
5780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * previous data will not be used in future draws like this:
5880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *  glBufferData(GL_..._BUFFER, size, NULL, usage);       //<--hint, NULL means
5980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *  glBufferSubData(GL_..._BUFFER, 0, lessThanSize, data) //   old data can't be
6080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *                                                        //   used again.
6180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * However, this can be an unoptimization on some platforms, esp. Chrome.
6280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * Chrome's cmd buffer will create a new allocation and memset the whole thing
6380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * to zero (for security reasons). Defaults to 1 (enabled).
6480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
6580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * GR_GL_PER_GL_FUNC_CALLBACK: When set to 1 the GrGLInterface object provides
6680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * a function pointer that is called just before every gl function. The ptr must
6780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * be valid (i.e. there is no NULL check). However, by default the callback will
6880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * be set to a function that does nothing. The signature of the function is:
6980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *    void function(const GrGLInterface*)
7080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * It is not extern "C".
7180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * The GrGLInterface field fCallback specifies the function ptr and there is an
7280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * additional field fCallbackData of type intptr_t for client data.
7380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
7480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * GR_GL_RGBA_8888_PIXEL_OPS_SLOW: Set this to 1 if it is known that performing
7580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * glReadPixels / glTex(Sub)Image with format=GL_RGBA, type=GL_UNISIGNED_BYTE is
7680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * significantly slower than format=GL_BGRA, type=GL_UNISIGNED_BYTE.
7780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
7880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL: Set this to 1 if calling
7980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * glReadPixels to read the entire framebuffer is faster than calling it with
8080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * the same sized rectangle but with a framebuffer bound that is larger than
8180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * the rectangle read.
8280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
8380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * GR_GL_CHECK_ALLOC_WITH_GET_ERROR: If set to 1 this will then glTexImage,
8480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * glBufferData, glRenderbufferStorage, etc will be checked for errors. This
8580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * amounts to ensuring the error is GL_NO_ERROR, calling the allocating
8680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * function, and then checking that the error is still GL_NO_ERROR. When the
8780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * value is 0 we will assume no error was generated without checking.
8880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
8980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT: We will normally check the FBO status
9080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * every time we bind a texture or renderbuffer to an FBO. However, in some
9180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * environments CheckFrameBufferStatus is very expensive. If this is set we will
9280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * check the first time we use a color format or a combination of color /
9380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * stencil formats as attachments. If the FBO is complete we will assume
9480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * subsequent attachments with the same formats are complete as well.
9580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
9680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * GR_GL_USE_NV_PATH_RENDERING: Enable experimental support for
9780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * GL_NV_path_rendering. There are known issues with clipping, non-AA paths, and
9880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * perspective.
99096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger *
100096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger * GR_GL_MUST_USE_VBO: Indicates that all vertices and indices must be rendered
101096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger * from VBOs. Chromium's command buffer doesn't allow glVertexAttribArray with
102096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger * ARARY_BUFFER 0 bound or glDrawElements with ELEMENT_ARRAY_BUFFER 0 bound.
103096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger *
104096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger * GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE is for compatibility with the new version
105096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger * of the OpenGLES2.0 headers from Khronos.  glShaderSource now takes a const char * const *,
106096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger * instead of a const char
10780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru */
10880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
10980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#if !defined(GR_GL_LOG_CALLS)
11080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    #define GR_GL_LOG_CALLS                             GR_DEBUG
11180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
11280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
11380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#if !defined(GR_GL_LOG_CALLS_START)
11480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    #define GR_GL_LOG_CALLS_START                       0
11580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
11680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
11780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#if !defined(GR_GL_CHECK_ERROR)
11880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    #define GR_GL_CHECK_ERROR                           GR_DEBUG
11980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
12080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
12180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#if !defined(GR_GL_CHECK_ERROR_START)
12280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    #define GR_GL_CHECK_ERROR_START                     1
12380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
12480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
12580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#if !defined(GR_GL_NO_CONSTANT_ATTRIBUTES)
12680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    #define GR_GL_NO_CONSTANT_ATTRIBUTES                0
12780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
12880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
12980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#if !defined(GR_GL_USE_BUFFER_DATA_NULL_HINT)
13080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    #define GR_GL_USE_BUFFER_DATA_NULL_HINT             1
13180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
13280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
13380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#if !defined(GR_GL_PER_GL_FUNC_CALLBACK)
13480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    #define GR_GL_PER_GL_FUNC_CALLBACK                  0
13580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
13680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
13780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#if !defined(GR_GL_RGBA_8888_PIXEL_OPS_SLOW)
13880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    #define GR_GL_RGBA_8888_PIXEL_OPS_SLOW              0
13980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
14080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
14180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#if !defined(GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL)
14280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    #define GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL   0
14380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
14480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
14580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#if !defined(GR_GL_CHECK_ALLOC_WITH_GET_ERROR)
14680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR            1
14780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
14880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
14980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#if !defined(GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT)
15080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    #define GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT      0
15180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
15280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
15380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#if !defined(GR_GL_USE_NV_PATH_RENDERING)
15480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    #define GR_GL_USE_NV_PATH_RENDERING                 0
15580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
15680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
157096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger#if !defined(GR_GL_MUST_USE_VBO)
158096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger    #define GR_GL_MUST_USE_VBO                          0
159096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger#endif
160096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger
161096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger#if !defined(GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE)
162096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger    #define GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE       0
163096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger#endif
164096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger
16580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru/**
16680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * There is a strange bug that occurs on Macs with NVIDIA GPUs. We don't
16780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * fully understand it. When (element) array buffers are continually
16880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * respecified using glBufferData performance can fall off of a cliff. The
16980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * driver winds up performing many DMA mapping / unmappings and chews up ~50% of
17080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * the core. However, it has been observed that occaisonally respecifiying the
17180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * buffer using glBufferData and then writing data using glBufferSubData
17280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * prevents the bad behavior.
17380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
17480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * There is a lot of uncertainty around this issue. In Chrome backgrounding
17580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * the tab somehow initiates this behavior and we don't know what the connection
17680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * is. Another observation is that Chrome's cmd buffer server will actually
17780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * create a buffer full of zeros when it sees a NULL data param (for security
17880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * reasons). If this is disabled and NULL is actually passed all the way to the
17980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * driver then the workaround doesn't help.
18080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
18180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * The issue is tracked at:
18280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * http://code.google.com/p/chromium/issues/detail?id=114865
18380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
18480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * When the workaround is enabled we will use the glBufferData / glBufferSubData
18580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * trick every 128 array buffer uploads.
18680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
18780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * Hopefully we will understand this better and have a cleaner fix or get a
18880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * OS/driver level fix.
18980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru */
19080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#define GR_GL_MAC_BUFFER_OBJECT_PERFOMANCE_WORKAROUND   \
19180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    (GR_MAC_BUILD &&                                    \
19280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru     !GR_GL_USE_BUFFER_DATA_NULL_HINT)
19380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
19480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
195