summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2012-06-26 17:19:14 +0200
committerRobert Bragg <robert@linux.intel.com>2012-08-06 18:51:31 +0100
commit053845f796b4a004055e5883050a93b14d67ece5 (patch)
treef0a788b3dd9eaf4d0c9d89c37fa22846c794b6bc
parent1686e754a70bce09781adb3c18118d27f36f0bee (diff)
downloadcogl-053845f796b4a004055e5883050a93b14d67ece5.tar.gz
framebuffer: Only remember offscreen allocate flags when !COGL_OFFSCREEN_DISABLE_DEPTH_AND_STENCIL
Otherwise, if a texture is created before all the other FBOs, a new atlas will be created, with a FBO with COGL_OFFSCREEN_DISABLE_DEPTH_AND_STENCIL causing last_offscreen_allocate_flags to be 0. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 7d2156785da8196e129eb393efb0d09093c4783e)
-rw-r--r--cogl/cogl-framebuffer.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index f4bb304a..7acf1edb 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -1133,10 +1133,13 @@ _cogl_offscreen_allocate (CoglOffscreen *offscreen,
{
fb->samples_per_pixel = gl_framebuffer->samples_per_pixel;
- /* Record that the last set of flags succeeded so that we can
- try that set first next time */
- ctx->last_offscreen_allocate_flags = flags;
- ctx->have_last_offscreen_allocate_flags = TRUE;
+ if (!offscreen->create_flags & COGL_OFFSCREEN_DISABLE_DEPTH_AND_STENCIL)
+ {
+ /* Record that the last set of flags succeeded so that we can
+ try that set first next time */
+ ctx->last_offscreen_allocate_flags = flags;
+ ctx->have_last_offscreen_allocate_flags = TRUE;
+ }
/* Save the flags we managed so successfully allocate the
* renderbuffers with in case we need to make renderbuffers for a