diff --git a/cogl/cogl-renderer-private.h b/cogl/cogl-renderer-private.h index 9e4b339e0..8b8d2bfed 100644 --- a/cogl/cogl-renderer-private.h +++ b/cogl/cogl-renderer-private.h @@ -90,6 +90,11 @@ struct _CoglRenderer void *winsys; }; +/* Mask of constraints that effect driver selection. All of the other + * constraints effect only the winsys selection */ +#define COGL_RENDERER_DRIVER_CONSTRAINTS \ + COGL_RENDERER_CONSTRAINT_SUPPORTS_COGL_GLES2 + typedef CoglFilterReturn (* CoglNativeFilterFunc) (void *native_event, void *data); diff --git a/cogl/cogl-renderer.c b/cogl/cogl-renderer.c index ada3c3baf..8136fe1e8 100644 --- a/cogl/cogl-renderer.c +++ b/cogl/cogl-renderer.c @@ -469,6 +469,11 @@ satisfy_constraints (CoglDriverDescription *description, { CoglRendererConstraint constraint = GPOINTER_TO_UINT (l->data); + /* Most of the constraints only affect the winsys selection so + * we'll filter them out */ + if (!(constraint & COGL_RENDERER_DRIVER_CONSTRAINTS)) + continue; + /* If the driver doesn't satisfy any constraint then continue * to the next driver description */ if (!(constraint & description->constraints))