summaryrefslogtreecommitdiff
path: root/recipes/clutter/files/0001-clutter-gst-videosink-guard-GL-calls-with-ifdef-CL.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2009-06-16 16:12:54 +0200
committerKoen Kooi <koen@openembedded.org>2009-06-16 16:12:54 +0200
commit4dae7ed553b33d7a51308a75022879b98aba8ffd (patch)
tree9165b544434de81281ba94b1a7a0dcc1396efbde /recipes/clutter/files/0001-clutter-gst-videosink-guard-GL-calls-with-ifdef-CL.patch
parentaa91f7575e8ecd18732b5a3f672ba2085314398d (diff)
clutter 0.9: update SRCREV, fix gtk-doc properly
Diffstat (limited to 'recipes/clutter/files/0001-clutter-gst-videosink-guard-GL-calls-with-ifdef-CL.patch')
-rw-r--r--recipes/clutter/files/0001-clutter-gst-videosink-guard-GL-calls-with-ifdef-CL.patch96
1 files changed, 69 insertions, 27 deletions
diff --git a/recipes/clutter/files/0001-clutter-gst-videosink-guard-GL-calls-with-ifdef-CL.patch b/recipes/clutter/files/0001-clutter-gst-videosink-guard-GL-calls-with-ifdef-CL.patch
index d73ebe5877..e373bca181 100644
--- a/recipes/clutter/files/0001-clutter-gst-videosink-guard-GL-calls-with-ifdef-CL.patch
+++ b/recipes/clutter/files/0001-clutter-gst-videosink-guard-GL-calls-with-ifdef-CL.patch
@@ -1,60 +1,102 @@
-From 69f75d284caed6c38ccbdc4479f69fb16bb3ec46 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Fri, 5 Jun 2009 14:21:34 +0200
-Subject: [PATCH] clutter-gst videosink: guard GL calls with #ifdef CLUTTER_COGL_HAS_GL so it can be compiled against the GLES backend
+From 0677f1e6b5221caf78d50d94d2d0611e7f4b0abc Mon Sep 17 00:00:00 2001
+From: Damien Lespiau <damien.lespiau@intel.com>
+Date: Sun, 14 Jun 2009 15:30:04 +0100
+Subject: [PATCH] Fix compilation with OpenGL ES backends
+* Don't try to compile ARB fp1.0 shaders on non GL platforms,
+* Use CGL_MAX_COMBINED_TEXTURE_IMAGE_UNITS to query the number of
+ texture units one can use in a shader in a portable fashion.
---
- clutter-gst/clutter-gst-video-sink.c | 8 ++++++++
- 1 files changed, 8 insertions(+), 0 deletions(-)
+ clutter-gst/clutter-gst-video-sink.c | 14 ++++++++++++--
+ 1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c
-index c20fbd7..2f2d27b 100644
+index d6eb6a3..516a42c 100644
--- a/clutter-gst/clutter-gst-video-sink.c
+++ b/clutter-gst/clutter-gst-video-sink.c
-@@ -245,6 +245,8 @@ _string_array_to_char_array (char *dst,
+@@ -236,6 +236,7 @@ _string_array_to_char_array (char *dst,
*dst = '\0';
}
+#ifdef CLUTTER_COGL_HAS_GL
-+
static void
clutter_gst_video_sink_fp_paint (ClutterActor *actor,
ClutterGstVideoSink *sink)
-@@ -284,6 +286,8 @@ clutter_gst_video_sink_set_fp_shader (ClutterGstVideoSink *sink,
+@@ -274,6 +275,7 @@ clutter_gst_video_sink_set_fp_shader (ClutterGstVideoSink *sink,
+ priv->shaders_init = TRUE;
}
++#endif
-+#endif /* CLUTTER_COGL_HAS_GL */
-+
static void
clutter_gst_video_sink_paint (ClutterActor *actor,
- ClutterGstVideoSink *sink)
-@@ -746,14 +750,17 @@ clutter_gst_build_renderers_list (ClutterGstSymbols *syms)
- {
+@@ -532,6 +534,7 @@ static ClutterGstRenderer yv12_glsl_renderer =
+ * 8 bit Y plane followed by 8 bit 2x2 subsampled V and U planes.
+ */
+
++#ifdef CLUTTER_COGL_HAS_GL
+ static void
+ clutter_gst_yv12_fp_init (ClutterActor *actor,
+ ClutterGstVideoSink *sink)
+@@ -573,6 +576,7 @@ static ClutterGstRenderer yv12_fp_renderer =
+ clutter_gst_yv12_paint,
+ clutter_gst_yv12_fp_post_paint,
+ };
++#endif
+
+ /*
+ * I420
+@@ -620,6 +624,7 @@ static ClutterGstRenderer i420_glsl_renderer =
+ * Basically the same as YV12, but with the 2 chroma planes switched.
+ */
+
++#ifdef CLUTTER_COGL_HAS_GL
+ static void
+ clutter_gst_i420_fp_init (ClutterActor *actor,
+ ClutterGstVideoSink *sink)
+@@ -646,6 +651,7 @@ static ClutterGstRenderer i420_fp_renderer =
+ clutter_gst_yv12_paint,
+ clutter_gst_yv12_fp_post_paint,
+ };
++#endif
+
+ /*
+ * AYUV
+@@ -707,9 +713,11 @@ clutter_gst_build_renderers_list (ClutterGstSymbols *syms)
&rgb24_renderer,
&rgb32_renderer,
-+#ifdef CLUTTER_COGL_HAS_GL
&yv12_glsl_renderer,
- &yv12_fp_renderer,
+- &yv12_fp_renderer,
&i420_glsl_renderer,
++#ifdef CLUTTER_COGL_HAS_GL
++ &yv12_fp_renderer,
&i420_fp_renderer,
++#endif
&ayuv_glsl_renderer,
-+#endif /* CLUTTER_COGL_HAS_GL */
NULL
};
-
-+#ifdef CLUTTER_COGL_HAS_GL
+@@ -717,11 +725,12 @@ clutter_gst_build_renderers_list (ClutterGstSymbols *syms)
/* get the features */
gl_extensions = (const gchar*) glGetString (GL_EXTENSIONS);
- if (cogl_check_extension ("GL_ARB_multitexture", gl_extensions))
-@@ -773,6 +780,7 @@ clutter_gst_build_renderers_list (ClutterGstSymbols *syms)
- features |= CLUTTER_GST_MULTI_TEXTURE;
- }
- }
-+#endif /* CLUTTER_COGL_HAS_GL */
+- glGetIntegerv (GL_MAX_TEXTURE_UNITS, &nb_texture_units);
++ glGetIntegerv (CGL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &nb_texture_units);
+
+ if (nb_texture_units >= 3)
+ features |= CLUTTER_GST_MULTI_TEXTURE;
+
++#ifdef CLUTTER_COGL_HAS_GL
if (cogl_check_extension ("GL_ARB_fragment_program", gl_extensions))
{
+ /* the shaders we'll feed to the GPU are simple enough, we don't need
+@@ -741,6 +750,7 @@ clutter_gst_build_renderers_list (ClutterGstSymbols *syms)
+ features |= CLUTTER_GST_FP;
+ }
+ }
++#endif
+
+ if (cogl_features_available (COGL_FEATURE_SHADERS_GLSL))
+ features |= CLUTTER_GST_GLSL;
--
-1.6.1
+1.6.3