Hello community,

here is the log from the commit of package cogl for openSUSE:Factory checked in 
at 2014-01-23 14:03:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cogl (Old)
 and      /work/SRC/openSUSE:Factory/.cogl.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cogl"

Changes:
--------
--- /work/SRC/openSUSE:Factory/cogl/cogl.changes        2013-09-27 
17:07:34.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.cogl.new/cogl.changes   2014-01-23 
15:40:55.000000000 +0100
@@ -1,0 +2,25 @@
+Wed Jan 22 04:02:14 CET 2014 - [email protected]
+
+- Add cogl-bgo709827-per-framebuffer-depth-writing-api.patch, which
+  adds API to optionally disable depth buffer writing on a
+  per-framebuffer basis. This allows for faster rendering when
+  the depth buffer is not needed.
+
+-------------------------------------------------------------------
+Mon Jan 20 18:30:56 UTC 2014 - [email protected]
+
+- Update to version 1.16.2:
+  + YV12/I420 support in cogl-gst is fixed.
+  + cogl_framebuffer_push_path_clip is fixed.
+  + MSVC build updates.
+  + Bugs fixed:
+    - bgo#706808: "Unable to locate required kms libraries" message
+      is really uninformative.
+    - bgo#710135: Fix build on big endian.
+    - bgo#710926: Build fails without declaration of wl_resource.
+    - bgo#719582: cogl-framebuffer: Don't mark the clear clip dirty
+      from the journal.
+    - bgo#721450: Re-enable swap_region for mesa 10.1+
+      llvmpipe / swrast.
+
+-------------------------------------------------------------------

Old:
----
  cogl-1.16.0.tar.xz

New:
----
  cogl-1.16.2.tar.xz
  cogl-bgo709827-per-framebuffer-depth-writing-api.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cogl.spec ++++++
--- /var/tmp/diff_new_pack.ZoniUJ/_old  2014-01-23 15:40:57.000000000 +0100
+++ /var/tmp/diff_new_pack.ZoniUJ/_new  2014-01-23 15:40:57.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package cogl
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -20,7 +20,7 @@
 %define with_GLES2 0
 
 Name:           cogl
-Version:        1.16.0
+Version:        1.16.2
 Release:        0
 Summary:        An object oriented GL/GLES Abstraction/Utility Layer
 License:        LGPL-2.1+
@@ -28,6 +28,8 @@
 Url:            http://clutter-project.org/
 Source0:        
http://download.gnome.org/sources/cogl/1.16/%{name}-%{version}.tar.xz
 Source99:       baselibs.conf
+# PATCH-FEATURE-UPSTREAM 
cogl-bgo709827-per-framebuffer-depth-writing-api.patch bgo#709827 [email protected] 
-- Add API to allow disabling depth buffer writing
+Patch1:         cogl-bgo709827-per-framebuffer-depth-writing-api.patch
 BuildRequires:  fdupes
 BuildRequires:  gtk-doc >= 1.13
 BuildRequires:  pkgconfig(cairo) >= 1.10
@@ -127,6 +129,7 @@
 %lang_package
 %prep
 %setup -q
+%patch1 -p1
 
 %build
 %configure \

++++++ cogl-1.16.0.tar.xz -> cogl-1.16.2.tar.xz ++++++
++++ 16301 lines of diff (skipped)

++++++ cogl-bgo709827-per-framebuffer-depth-writing-api.patch ++++++
commit a8e04a7d6b71662d4380a6431b1b11d401934a61
Author: Hans Petter Jansson <[email protected]>
Date:   Thu Oct 10 18:10:52 2013 +0200

    Add API to control per-framebuffer depth writing
    
    Add framebuffer methods cogl_framebuffer_[gs]et_depth_write_enabled()
    and backend bits to pass the state on to glDepthMask().
    
    This allows us to enable or disable depth writing per-framebuffer, which
    if disabled saves us some work in glClear(). When rendering, the flag
    is combined with the pipeline's depth writing flag using a logical AND.
    
    Depth writing is enabled by default.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=709827
    
    Reviewed-by: Robert Bragg <[email protected]>
    (cherry picked from commit 71406438c5357eb4e0ef03e940c5456a536602a0)

diff --git a/cogl/cogl-framebuffer-private.h b/cogl/cogl-framebuffer-private.h
index 233f1c5..b180b75 100644
--- a/cogl/cogl-framebuffer-private.h
+++ b/cogl/cogl-framebuffer-private.h
@@ -78,7 +78,8 @@ typedef enum _CoglFramebufferStateIndex
   COGL_FRAMEBUFFER_STATE_INDEX_PROJECTION         = 5,
   COGL_FRAMEBUFFER_STATE_INDEX_COLOR_MASK         = 6,
   COGL_FRAMEBUFFER_STATE_INDEX_FRONT_FACE_WINDING = 7,
-  COGL_FRAMEBUFFER_STATE_INDEX_MAX                = 8
+  COGL_FRAMEBUFFER_STATE_INDEX_DEPTH_WRITE        = 8,
+  COGL_FRAMEBUFFER_STATE_INDEX_MAX                = 9
 } CoglFramebufferStateIndex;
 
 typedef enum _CoglFramebufferState
@@ -90,7 +91,8 @@ typedef enum _CoglFramebufferState
   COGL_FRAMEBUFFER_STATE_MODELVIEW          = 1<<4,
   COGL_FRAMEBUFFER_STATE_PROJECTION         = 1<<5,
   COGL_FRAMEBUFFER_STATE_COLOR_MASK         = 1<<6,
-  COGL_FRAMEBUFFER_STATE_FRONT_FACE_WINDING = 1<<7
+  COGL_FRAMEBUFFER_STATE_FRONT_FACE_WINDING = 1<<7,
+  COGL_FRAMEBUFFER_STATE_DEPTH_WRITE        = 1<<8
 } CoglFramebufferState;
 
 #define COGL_FRAMEBUFFER_STATE_ALL ((1<<COGL_FRAMEBUFFER_STATE_INDEX_MAX) - 1)
@@ -143,6 +145,7 @@ struct _CoglFramebuffer
   CoglClipState       clip_state;
 
   CoglBool            dither_enabled;
+  CoglBool            depth_writing_enabled;
   CoglColorMask       color_mask;
 
   /* We journal the textured rectangles we want to submit to OpenGL so
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index 20863ff..4957b38 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -114,6 +114,7 @@ _cogl_framebuffer_init (CoglFramebuffer *framebuffer,
   framebuffer->viewport_age = 0;
   framebuffer->viewport_age_for_scissor_workaround = -1;
   framebuffer->dither_enabled = TRUE;
+  framebuffer->depth_writing_enabled = TRUE;
 
   framebuffer->modelview_stack = cogl_matrix_stack_new (ctx);
   framebuffer->projection_stack = cogl_matrix_stack_new (ctx);
@@ -1103,6 +1104,14 @@ _cogl_framebuffer_compare_front_face_winding_state 
(CoglFramebuffer *a,
     return 0;
 }
 
+static unsigned long
+_cogl_framebuffer_compare_depth_write_state (CoglFramebuffer *a,
+                                             CoglFramebuffer *b)
+{
+  return a->depth_writing_enabled != b->depth_writing_enabled ?
+    COGL_FRAMEBUFFER_STATE_DEPTH_WRITE : 0;
+}
+
 unsigned long
 _cogl_framebuffer_compare (CoglFramebuffer *a,
                            CoglFramebuffer *b,
@@ -1151,6 +1160,10 @@ _cogl_framebuffer_compare (CoglFramebuffer *a,
           differences |=
             _cogl_framebuffer_compare_front_face_winding_state (a, b);
           break;
+        case COGL_FRAMEBUFFER_STATE_INDEX_DEPTH_WRITE:
+          differences |=
+            _cogl_framebuffer_compare_depth_write_state (a, b);
+          break;
         default:
           g_warn_if_reached ();
         }
@@ -1262,6 +1275,29 @@ cogl_framebuffer_set_color_mask (CoglFramebuffer 
*framebuffer,
 }
 
 CoglBool
+cogl_framebuffer_get_depth_write_enabled (CoglFramebuffer *framebuffer)
+{
+  return framebuffer->depth_writing_enabled;
+}
+
+void
+cogl_framebuffer_set_depth_write_enabled (CoglFramebuffer *framebuffer,
+                                          CoglBool depth_write_enabled)
+{
+  if (framebuffer->depth_writing_enabled == depth_write_enabled)
+    return;
+
+  /* XXX: Currently depth write changes don't go through the journal */
+  _cogl_framebuffer_flush_journal (framebuffer);
+
+  framebuffer->depth_writing_enabled = depth_write_enabled;
+
+  if (framebuffer->context->current_draw_buffer == framebuffer)
+    framebuffer->context->current_draw_buffer_changes |=
+      COGL_FRAMEBUFFER_STATE_DEPTH_WRITE;
+}
+
+CoglBool
 cogl_framebuffer_get_dither_enabled (CoglFramebuffer *framebuffer)
 {
   return framebuffer->dither_enabled;
diff --git a/cogl/cogl-framebuffer.h b/cogl/cogl-framebuffer.h
index e3dad9f..45f0157 100644
--- a/cogl/cogl-framebuffer.h
+++ b/cogl/cogl-framebuffer.h
@@ -758,6 +758,39 @@ cogl_framebuffer_set_dither_enabled (CoglFramebuffer 
*framebuffer,
                                      CoglBool dither_enabled);
 
 /**
+ * cogl_framebuffer_get_depth_write_enabled:
+ * @framebuffer: a pointer to a #CoglFramebuffer
+ *
+ * Queries whether depth buffer writing is enabled for @framebuffer. This
+ * can be controlled via cogl_framebuffer_set_depth_write_enabled().
+ *
+ * Return value: %TRUE if depth writing is enabled or %FALSE if not.
+ * Since: 1.18
+ * Stability: unstable
+ */
+CoglBool
+cogl_framebuffer_get_depth_write_enabled (CoglFramebuffer *framebuffer);
+
+/**
+ * cogl_framebuffer_set_depth_write_enabled:
+ * @framebuffer: a pointer to a #CoglFramebuffer
+ * @depth_write_enabled: %TRUE to enable depth writing or %FALSE to disable
+ *
+ * Enables or disables depth buffer writing when rendering to @framebuffer.
+ * If depth writing is enabled for both the framebuffer and the rendering
+ * pipeline, and the framebuffer has an associated depth buffer, depth
+ * information will be written to this buffer during rendering.
+ *
+ * Depth buffer writing is enabled by default.
+ *
+ * Since: 1.18
+ * Stability: unstable
+ */
+void
+cogl_framebuffer_set_depth_write_enabled (CoglFramebuffer *framebuffer,
+                                          CoglBool depth_write_enabled);
+
+/**
  * cogl_framebuffer_get_color_mask:
  * @framebuffer: a pointer to a #CoglFramebuffer
  *
diff --git a/cogl/driver/gl/cogl-framebuffer-gl.c 
b/cogl/driver/gl/cogl-framebuffer-gl.c
index efb82e3..9e23f86 100644
--- a/cogl/driver/gl/cogl-framebuffer-gl.c
+++ b/cogl/driver/gl/cogl-framebuffer-gl.c
@@ -368,6 +368,10 @@ _cogl_framebuffer_gl_flush_state (CoglFramebuffer 
*draw_buffer,
         case COGL_FRAMEBUFFER_STATE_INDEX_FRONT_FACE_WINDING:
           _cogl_framebuffer_gl_flush_front_face_winding_state (draw_buffer);
           break;
+        case COGL_FRAMEBUFFER_STATE_INDEX_DEPTH_WRITE:
+          /* Nothing to do for depth write state change; the state will always
+           * be taken into account when flushing the pipeline's depth state. */
+          break;
         default:
           g_warn_if_reached ();
         }
@@ -916,11 +920,11 @@ _cogl_framebuffer_gl_clear (CoglFramebuffer *framebuffer,
     {
       gl_buffers |= GL_DEPTH_BUFFER_BIT;
 
-      if (ctx->depth_writing_enabled_cache != TRUE)
+      if (ctx->depth_writing_enabled_cache != 
framebuffer->depth_writing_enabled)
         {
-          GE( ctx, glDepthMask (TRUE));
+          GE( ctx, glDepthMask (framebuffer->depth_writing_enabled));
 
-          ctx->depth_writing_enabled_cache = TRUE;
+          ctx->depth_writing_enabled_cache = 
framebuffer->depth_writing_enabled;
 
           /* Make sure the DepthMask is updated when the next primitive is 
drawn */
           ctx->current_pipeline_changes_since_flush |=
diff --git a/cogl/driver/gl/cogl-pipeline-opengl.c 
b/cogl/driver/gl/cogl-pipeline-opengl.c
index cc3b93c..8cc5276 100644
--- a/cogl/driver/gl/cogl-pipeline-opengl.c
+++ b/cogl/driver/gl/cogl-pipeline-opengl.c
@@ -407,6 +407,11 @@ static void
 flush_depth_state (CoglContext *ctx,
                    CoglDepthState *depth_state)
 {
+  CoglBool depth_writing_enabled = depth_state->write_enabled;
+
+  if (ctx->current_draw_buffer)
+    depth_writing_enabled &= ctx->current_draw_buffer->depth_writing_enabled;
+
   if (ctx->depth_test_enabled_cache != depth_state->test_enabled)
     {
       if (depth_state->test_enabled == TRUE)
@@ -423,11 +428,11 @@ flush_depth_state (CoglContext *ctx,
       ctx->depth_test_function_cache = depth_state->test_function;
     }
 
-  if (ctx->depth_writing_enabled_cache != depth_state->write_enabled)
+  if (ctx->depth_writing_enabled_cache != depth_writing_enabled)
     {
-      GE (ctx, glDepthMask (depth_state->write_enabled ?
+      GE (ctx, glDepthMask (depth_writing_enabled ?
                             GL_TRUE : GL_FALSE));
-      ctx->depth_writing_enabled_cache = depth_state->write_enabled;
+      ctx->depth_writing_enabled_cache = depth_writing_enabled;
     }
 
   if (ctx->driver != COGL_DRIVER_GLES1 &&
diff --git a/tests/conform/test-depth-test.c b/tests/conform/test-depth-test.c
index 1d8ab45..bfa9d0e 100644
--- a/tests/conform/test-depth-test.c
+++ b/tests/conform/test-depth-test.c
@@ -30,6 +30,7 @@ typedef struct
   CoglBool              test_enable;
   CoglDepthTestFunction test_function;
   CoglBool              write_enable;
+  CoglBool              fb_write_enable;
   float                 range_near;
   float                 range_far;
 } TestDepthState;
@@ -67,6 +68,8 @@ draw_rectangle (TestState *state,
     {
       cogl_pipeline_set_color4ub (pipeline, Cr, Cg, Cb, Ca);
 
+      cogl_framebuffer_set_depth_write_enabled (test_fb,
+                                                rect_state->fb_write_enable);
       cogl_framebuffer_push_matrix (test_fb);
       cogl_framebuffer_translate (test_fb, 0, 0, rect_state->depth);
       cogl_framebuffer_draw_rectangle (test_fb,
@@ -140,6 +143,7 @@ paint (TestState *state)
       FALSE, /* depth test enable */
       COGL_DEPTH_TEST_FUNCTION_ALWAYS,
       TRUE, /* depth write enable */
+      TRUE, /* FB depth write enable */
       0, 1 /* depth range */
     };
     /* Furthest */
@@ -149,6 +153,7 @@ paint (TestState *state)
       TRUE, /* depth test enable */
       COGL_DEPTH_TEST_FUNCTION_ALWAYS,
       TRUE, /* depth write enable */
+      TRUE, /* FB depth write enable */
       0, 1 /* depth range */
     };
     /* In the middle */
@@ -158,6 +163,7 @@ paint (TestState *state)
       TRUE, /* depth test enable */
       COGL_DEPTH_TEST_FUNCTION_NEVER,
       TRUE, /* depth write enable */
+      TRUE, /* FB depth write enable */
       0, 1 /* depth range */
     };
 
@@ -190,6 +196,21 @@ paint (TestState *state)
                 &rect0_state, &rect1_state, &rect2_state,
                 FALSE, /* legacy mode */
                 0x0000ffff); /* expected */
+
+    rect1_state.write_enable = TRUE;
+    rect1_state.fb_write_enable = FALSE;
+    test_depth (state, 4, 0, /* position */
+                &rect0_state, &rect1_state, &rect2_state,
+                FALSE, /* legacy mode */
+                0x0000ffff); /* expected */
+
+    /* Re-enable FB depth writing to verify state flush */
+    rect1_state.write_enable = TRUE;
+    rect1_state.fb_write_enable = TRUE;
+    test_depth (state, 4, 0, /* position */
+                &rect0_state, &rect1_state, &rect2_state,
+                FALSE, /* legacy mode */
+                0x00ff00ff); /* expected */
   }
 
   /* Check that the depth buffer values can be mapped into different
@@ -203,6 +224,7 @@ paint (TestState *state)
       TRUE, /* depth test enable */
       COGL_DEPTH_TEST_FUNCTION_ALWAYS,
       TRUE, /* depth write enable */
+      TRUE, /* FB depth write enable */
       0.5, 1 /* depth range */
     };
     /* Furthest by depth, nearest by depth range */
@@ -212,6 +234,7 @@ paint (TestState *state)
       TRUE, /* depth test enable */
       COGL_DEPTH_TEST_FUNCTION_GREATER,
       TRUE, /* depth write enable */
+      TRUE, /* FB depth write enable */
       0, 0.5 /* depth range */
     };
 
@@ -232,6 +255,7 @@ paint (TestState *state)
       FALSE, /* depth test enable */
       COGL_DEPTH_TEST_FUNCTION_LESS,
       TRUE, /* depth write enable */
+      TRUE, /* FB depth write enable */
       0, 1 /* depth range */
     };
     /* Furthest */
@@ -241,6 +265,7 @@ paint (TestState *state)
       FALSE, /* depth test enable */
       COGL_DEPTH_TEST_FUNCTION_LESS,
       TRUE, /* depth write enable */
+      TRUE, /* FB depth write enable */
       0, 1 /* depth range */
     };
 
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to