[cogl/wip/rib/cogl-1.12: 92/101] framebuffer: Only remember offscreen allocate flags when !COGL_OFFSCREEN_DISABLE_DEPTH_AND_STENCIL
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/rib/cogl-1.12: 92/101] framebuffer: Only remember offscreen allocate flags when !COGL_OFFSCREEN_DISABLE_DEPTH_AND_STENCIL
- Date: Mon, 6 Aug 2012 13:08:47 +0000 (UTC)
commit 0840d42cfb9b3db5128346604d9a6d8900dc50ef
Author: Tomeu Vizoso <tomeu vizoso collabora com>
Date: Tue Jun 26 17:19:14 2012 +0200
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)
cogl/cogl-framebuffer.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index f4bb304..7acf1ed 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]