mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
Check for GL_EXT_packed_depth_stencil
The GL_DEPTH_STENCIL format for renderbuffers is defined in a separate extension from GL_EXT_framebuffer_object so we probably shouldn't being trying to use it unless that extension is advertised. This just replaces the check for whether the driver is GL for a check for a private feature flag before trying GL_DEPTH_STENCIL. The private feature flag is set if the extension is available on GL. Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
parent
d3e6f2bc83
commit
b52d24c933
@ -1006,10 +1006,9 @@ _cogl_offscreen_allocate (CoglOffscreen *offscreen,
|
||||
{
|
||||
if ((have_working_flags &&
|
||||
try_creating_fbo (offscreen, flags)) ||
|
||||
#ifdef HAVE_COGL_GL
|
||||
(ctx->driver == COGL_DRIVER_GL &&
|
||||
((ctx->private_feature_flags &
|
||||
COGL_PRIVATE_FEATURE_EXT_PACKED_DEPTH_STENCIL) &&
|
||||
try_creating_fbo (offscreen, flags = _TRY_DEPTH_STENCIL)) ||
|
||||
#endif
|
||||
try_creating_fbo (offscreen, flags = _TRY_DEPTH | _TRY_STENCIL) ||
|
||||
try_creating_fbo (offscreen, flags = _TRY_STENCIL) ||
|
||||
try_creating_fbo (offscreen, flags = _TRY_DEPTH) ||
|
||||
|
@ -105,7 +105,8 @@ typedef enum
|
||||
COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT = 1L<<3,
|
||||
COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES = 1L<<4,
|
||||
COGL_PRIVATE_FEATURE_PBOS = 1L<<5,
|
||||
COGL_PRIVATE_FEATURE_VBOS = 1L<<6
|
||||
COGL_PRIVATE_FEATURE_VBOS = 1L<<6,
|
||||
COGL_PRIVATE_FEATURE_EXT_PACKED_DEPTH_STENCIL = 1L<<7
|
||||
} CoglPrivateFeatureFlags;
|
||||
|
||||
/* Sometimes when evaluating pipelines, either during comparisons or
|
||||
|
@ -266,6 +266,9 @@ _cogl_gl_update_features (CoglContext *context,
|
||||
if (context->glEGLImageTargetTexture2D)
|
||||
private_flags |= COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE;
|
||||
|
||||
if (_cogl_check_extension ("GL_EXT_packed_depth_stencil", gl_extensions))
|
||||
private_flags |= COGL_PRIVATE_FEATURE_EXT_PACKED_DEPTH_STENCIL;
|
||||
|
||||
/* Cache features */
|
||||
context->private_feature_flags |= private_flags;
|
||||
context->feature_flags |= flags;
|
||||
|
Loading…
Reference in New Issue
Block a user