[mutter] cogl: Remove fixed pipeline support



commit 8f58ad02fb91f5b9ea65f5a1a54a96deafdec5c5
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Mon May 14 18:28:27 2018 +0100

    cogl: Remove fixed pipeline support
    
    We require being able to use shaders so stop supporting a pipeline that
    wouldn't work to begin with.

 cogl/cogl/Makefile.am                              |   8 -
 cogl/cogl/cogl-context.c                           |   4 +-
 cogl/cogl/cogl-debug-options.h                     |   5 -
 cogl/cogl/cogl-debug.c                             |   1 -
 cogl/cogl/cogl-debug.h                             |   1 -
 cogl/cogl/cogl-pipeline-private.h                  |  17 +-
 cogl/cogl/cogl-pipeline.c                          |  28 --
 .../gl/cogl-pipeline-fragend-fixed-private.h       |  42 --
 cogl/cogl/driver/gl/cogl-pipeline-fragend-fixed.c  | 422 ---------------------
 cogl/cogl/driver/gl/cogl-pipeline-opengl.c         |  10 -
 .../gl/cogl-pipeline-progend-fixed-private.h       |  42 --
 cogl/cogl/driver/gl/cogl-pipeline-progend-fixed.c  | 112 ------
 .../gl/cogl-pipeline-vertend-fixed-private.h       |  42 --
 cogl/cogl/driver/gl/cogl-pipeline-vertend-fixed.c  | 121 ------
 .../gl/cogl-pipeline-progend-fixed-arbfp-private.h |  42 --
 .../gl/gl/cogl-pipeline-progend-fixed-arbfp.c      | 121 ------
 cogl/configure.ac                                  |   4 -
 cogl/tests/run-tests.sh                            |   7 +-
 18 files changed, 9 insertions(+), 1020 deletions(-)
---
diff --git a/cogl/cogl/Makefile.am b/cogl/cogl/Makefile.am
index fdbdd7b89..b21d9b935 100644
--- a/cogl/cogl/Makefile.am
+++ b/cogl/cogl/Makefile.am
@@ -173,16 +173,8 @@ cogl_driver_sources += \
        driver/gl/cogl-pipeline-fragend-glsl-private.h \
        driver/gl/gl/cogl-pipeline-fragend-arbfp.c \
        driver/gl/gl/cogl-pipeline-fragend-arbfp-private.h \
-       driver/gl/gl/cogl-pipeline-progend-fixed-arbfp.c \
-       driver/gl/gl/cogl-pipeline-progend-fixed-arbfp-private.h \
-       driver/gl/cogl-pipeline-fragend-fixed.c \
-       driver/gl/cogl-pipeline-fragend-fixed-private.h \
        driver/gl/cogl-pipeline-vertend-glsl.c \
        driver/gl/cogl-pipeline-vertend-glsl-private.h \
-       driver/gl/cogl-pipeline-vertend-fixed.c \
-       driver/gl/cogl-pipeline-vertend-fixed-private.h \
-       driver/gl/cogl-pipeline-progend-fixed.c \
-       driver/gl/cogl-pipeline-progend-fixed-private.h \
        driver/gl/cogl-pipeline-progend-glsl.c \
        driver/gl/cogl-pipeline-progend-glsl-private.h \
        $(NULL)
diff --git a/cogl/cogl/cogl-context.c b/cogl/cogl/cogl-context.c
index 5ddbe3e23..34f2dd90d 100644
--- a/cogl/cogl/cogl-context.c
+++ b/cogl/cogl/cogl-context.c
@@ -373,8 +373,8 @@ cogl_context_new (CoglDisplay *display,
   context->max_texture_units = -1;
   context->max_activateable_texture_units = -1;
 
-  context->current_fragment_program_type = COGL_PIPELINE_PROGRAM_TYPE_FIXED;
-  context->current_vertex_program_type = COGL_PIPELINE_PROGRAM_TYPE_FIXED;
+  context->current_fragment_program_type = COGL_PIPELINE_PROGRAM_TYPE_GLSL;
+  context->current_vertex_program_type = COGL_PIPELINE_PROGRAM_TYPE_GLSL;
   context->current_gl_program = 0;
 
   context->current_gl_dither_enabled = TRUE;
diff --git a/cogl/cogl/cogl-debug-options.h b/cogl/cogl/cogl-debug-options.h
index 0f3b30731..fab521c46 100644
--- a/cogl/cogl/cogl-debug-options.h
+++ b/cogl/cogl/cogl-debug-options.h
@@ -135,11 +135,6 @@ OPT (DISABLE_ARBFP,
      "disable-arbfp",
      N_("Disable arbfp"),
      N_("Disable use of ARB fragment programs"))
-OPT (DISABLE_FIXED,
-     N_("Root Cause"),
-     "disable-fixed",
-     N_("Disable fixed"),
-     N_("Disable use of the fixed function pipeline backend"))
 OPT (DISABLE_GLSL,
      N_("Root Cause"),
      "disable-glsl",
diff --git a/cogl/cogl/cogl-debug.c b/cogl/cogl/cogl-debug.c
index 1ef2fd037..d81f8400f 100644
--- a/cogl/cogl/cogl-debug.c
+++ b/cogl/cogl/cogl-debug.c
@@ -80,7 +80,6 @@ static const GDebugKey cogl_behavioural_debug_keys[] = {
   { "disable-shared-atlas", COGL_DEBUG_DISABLE_SHARED_ATLAS },
   { "disable-texturing", COGL_DEBUG_DISABLE_TEXTURING},
   { "disable-arbfp", COGL_DEBUG_DISABLE_ARBFP},
-  { "disable-fixed", COGL_DEBUG_DISABLE_FIXED},
   { "disable-glsl", COGL_DEBUG_DISABLE_GLSL},
   { "disable-blending", COGL_DEBUG_DISABLE_BLENDING},
   { "disable-npot-textures", COGL_DEBUG_DISABLE_NPOT_TEXTURES},
diff --git a/cogl/cogl/cogl-debug.h b/cogl/cogl/cogl-debug.h
index ae116a26b..dd8fcafb0 100644
--- a/cogl/cogl/cogl-debug.h
+++ b/cogl/cogl/cogl-debug.h
@@ -61,7 +61,6 @@ typedef enum {
   COGL_DEBUG_OPENGL,
   COGL_DEBUG_DISABLE_TEXTURING,
   COGL_DEBUG_DISABLE_ARBFP,
-  COGL_DEBUG_DISABLE_FIXED,
   COGL_DEBUG_DISABLE_GLSL,
   COGL_DEBUG_SHOW_SOURCE,
   COGL_DEBUG_DISABLE_BLENDING,
diff --git a/cogl/cogl/cogl-pipeline-private.h b/cogl/cogl/cogl-pipeline-private.h
index 9aee69588..21da80959 100644
--- a/cogl/cogl/cogl-pipeline-private.h
+++ b/cogl/cogl/cogl-pipeline-private.h
@@ -51,19 +51,15 @@
 
 #ifdef HAVE_COGL_GL
 
-#define COGL_PIPELINE_PROGEND_FIXED_ARBFP 0
-#define COGL_PIPELINE_PROGEND_FIXED       1
-#define COGL_PIPELINE_PROGEND_GLSL        2
-#define COGL_PIPELINE_N_PROGENDS          3
+#define COGL_PIPELINE_PROGEND_GLSL        0
+#define COGL_PIPELINE_N_PROGENDS          1
 
-#define COGL_PIPELINE_VERTEND_FIXED 0
-#define COGL_PIPELINE_VERTEND_GLSL  1
-#define COGL_PIPELINE_N_VERTENDS    2
+#define COGL_PIPELINE_VERTEND_GLSL  0
+#define COGL_PIPELINE_N_VERTENDS    1
 
 #define COGL_PIPELINE_FRAGEND_ARBFP 0
-#define COGL_PIPELINE_FRAGEND_FIXED 1
-#define COGL_PIPELINE_FRAGEND_GLSL  2
-#define COGL_PIPELINE_N_FRAGENDS    3
+#define COGL_PIPELINE_FRAGEND_GLSL  1
+#define COGL_PIPELINE_N_FRAGENDS    2
 
 #else /* HAVE_COGL_GL */
 
@@ -558,7 +554,6 @@ typedef enum
 {
   COGL_PIPELINE_PROGRAM_TYPE_GLSL = 1,
   COGL_PIPELINE_PROGRAM_TYPE_ARBFP,
-  COGL_PIPELINE_PROGRAM_TYPE_FIXED
 } CoglPipelineProgramType;
 
 extern const CoglPipelineFragend *
diff --git a/cogl/cogl/cogl-pipeline.c b/cogl/cogl/cogl-pipeline.c
index da2d2ce7e..211f28145 100644
--- a/cogl/cogl/cogl-pipeline.c
+++ b/cogl/cogl/cogl-pipeline.c
@@ -74,23 +74,11 @@ _cogl_pipeline_progends[MAX (COGL_PIPELINE_N_PROGENDS, 1)];
 #ifdef COGL_PIPELINE_FRAGEND_ARBFP
 #include "cogl-pipeline-fragend-arbfp-private.h"
 #endif
-#ifdef COGL_PIPELINE_FRAGEND_FIXED
-#include "cogl-pipeline-fragend-fixed-private.h"
-#endif
 
 #ifdef COGL_PIPELINE_VERTEND_GLSL
 #include "cogl-pipeline-vertend-glsl-private.h"
 #endif
-#ifdef COGL_PIPELINE_VERTEND_FIXED
-#include "cogl-pipeline-vertend-fixed-private.h"
-#endif
 
-#ifdef COGL_PIPELINE_PROGEND_FIXED_ARBFP
-#include "cogl-pipeline-progend-fixed-arbfp-private.h"
-#endif
-#ifdef COGL_PIPELINE_PROGEND_FIXED
-#include "cogl-pipeline-progend-fixed-private.h"
-#endif
 #ifdef COGL_PIPELINE_PROGEND_GLSL
 #include "cogl-pipeline-progend-glsl-private.h"
 #endif
@@ -131,18 +119,6 @@ _cogl_pipeline_init_default_pipeline (void)
   _cogl_pipeline_fragends[COGL_PIPELINE_FRAGEND_ARBFP] =
     &_cogl_pipeline_arbfp_fragend;
 #endif
-#ifdef COGL_PIPELINE_FRAGEND_FIXED
-  _cogl_pipeline_fragends[COGL_PIPELINE_FRAGEND_FIXED] =
-    &_cogl_pipeline_fixed_fragend;
-#endif
-#ifdef COGL_PIPELINE_PROGEND_FIXED
-  _cogl_pipeline_progends[COGL_PIPELINE_PROGEND_FIXED_ARBFP] =
-    &_cogl_pipeline_fixed_arbfp_progend;
-#endif
-#ifdef COGL_PIPELINE_PROGEND_FIXED
-  _cogl_pipeline_progends[COGL_PIPELINE_PROGEND_FIXED] =
-    &_cogl_pipeline_fixed_progend;
-#endif
 #ifdef COGL_PIPELINE_PROGEND_GLSL
   _cogl_pipeline_progends[COGL_PIPELINE_PROGEND_GLSL] =
     &_cogl_pipeline_glsl_progend;
@@ -152,10 +128,6 @@ _cogl_pipeline_init_default_pipeline (void)
   _cogl_pipeline_vertends[COGL_PIPELINE_VERTEND_GLSL] =
     &_cogl_pipeline_glsl_vertend;
 #endif
-#ifdef COGL_PIPELINE_VERTEND_FIXED
-  _cogl_pipeline_vertends[COGL_PIPELINE_VERTEND_FIXED] =
-    &_cogl_pipeline_fixed_vertend;
-#endif
 
   _cogl_pipeline_node_init (COGL_NODE (pipeline));
 
diff --git a/cogl/cogl/driver/gl/cogl-pipeline-opengl.c b/cogl/cogl/driver/gl/cogl-pipeline-opengl.c
index 23c81047d..13e61c06f 100644
--- a/cogl/cogl/driver/gl/cogl-pipeline-opengl.c
+++ b/cogl/cogl/driver/gl/cogl-pipeline-opengl.c
@@ -289,10 +289,6 @@ _cogl_use_fragment_program (GLuint gl_program, CoglPipelineProgramType type)
           GE( ctx, glDisable (GL_FRAGMENT_PROGRAM_ARB) );
 #endif
           break;
-
-        case COGL_PIPELINE_PROGRAM_TYPE_FIXED:
-          /* don't need to to anything */
-          break;
         }
 
       /* ... and enable the new type */
@@ -305,7 +301,6 @@ _cogl_use_fragment_program (GLuint gl_program, CoglPipelineProgramType type)
           break;
 
         case COGL_PIPELINE_PROGRAM_TYPE_GLSL:
-        case COGL_PIPELINE_PROGRAM_TYPE_FIXED:
           /* don't need to to anything */
           break;
         }
@@ -353,10 +348,6 @@ _cogl_use_vertex_program (GLuint gl_program, CoglPipelineProgramType type)
           /* It doesn't make sense to enable ARBfp for the vertex program */
           g_assert_not_reached ();
           break;
-
-        case COGL_PIPELINE_PROGRAM_TYPE_FIXED:
-          /* don't need to to anything */
-          break;
         }
 
       /* ... and enable the new type */
@@ -368,7 +359,6 @@ _cogl_use_vertex_program (GLuint gl_program, CoglPipelineProgramType type)
           break;
 
         case COGL_PIPELINE_PROGRAM_TYPE_GLSL:
-        case COGL_PIPELINE_PROGRAM_TYPE_FIXED:
           /* don't need to to anything */
           break;
         }
diff --git a/cogl/configure.ac b/cogl/configure.ac
index 99fcc5737..6d1e39353 100644
--- a/cogl/configure.ac
+++ b/cogl/configure.ac
@@ -592,10 +592,6 @@ dnl ================================================================
 AC_PATH_X
 AC_HEADER_STDC
 AC_CHECK_HEADERS(fcntl.h limits.h unistd.h)
-AC_CHECK_HEADER([endian.h],
-                [AC_CHECK_DECL([__FLOAT_WORD_ORDER],
-                               AC_DEFINE([HAVE_FLOAT_WORD_ORDER], [1],
-                                         [Has the __FLOAT_WORD_ORDER macro]))])
 
 dnl ================================================================
 dnl Checks for library functions.
diff --git a/cogl/tests/run-tests.sh b/cogl/tests/run-tests.sh
index 7e62bf0f6..9c9b609d6 100755
--- a/cogl/tests/run-tests.sh
+++ b/cogl/tests/run-tests.sh
@@ -88,7 +88,7 @@ printf $TITLE_FORMAT "Test"
 
 if test $HAVE_GL -eq 1; then
   GL_FORMAT=" %6s %8s %7s %6s %6s"
-  printf "$GL_FORMAT" "GL+FF" "GL+ARBFP" "GL+GLSL" "GL-NPT" "GL3"
+  printf "$GL_FORMAT" GL+ARBFP" "GL+GLSL" "GL-NPT" "GL3"
 fi
 if test $HAVE_GLES2 -eq 1; then
   GLES2_FORMAT=" %6s %7s"
@@ -103,10 +103,6 @@ do
   export COGL_DEBUG=
 
   if test $HAVE_GL -eq 1; then
-    export COGL_DRIVER=gl
-    export COGL_DEBUG=disable-glsl,disable-arbfp
-    run_test $test gl_ff
-
     export COGL_DRIVER=gl
     # NB: we can't explicitly disable fixed + glsl in this case since
     # the arbfp code only supports fragment processing so we need either
@@ -140,7 +136,6 @@ do
   printf $TITLE_FORMAT "$test:"
   if test $HAVE_GL -eq 1; then
     printf "$GL_FORMAT" \
-      "`get_status $gl_ff_result`" \
       "`get_status $gl_arbfp_result`" \
       "`get_status $gl_glsl_result`" \
       "`get_status $gl_npot_result`" \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]