diff options
author | Neil Roberts <neil@linux.intel.com> | 2013-06-27 09:30:04 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2013-08-23 16:49:59 +0100 |
commit | e7b50a6cba02195060b27a7a4aa1efe340bbc7f2 (patch) | |
tree | 9288c57075d89f03936492f90b0cd7b2d5975a61 /cogl/cogl-renderer.c | |
parent | 627e518da0bfe1c42a79e2bb313006657cd333c5 (diff) | |
download | cogl-e7b50a6cba02195060b27a7a4aa1efe340bbc7f2.tar.gz |
renderer: Only check certain constraints when selecting a driver
Only COGL_RENDERER_CONSTRAINT_SUPPORTS_COGL_GLES2 affects the driver
selection and all of the the other constraints are only relevant to
the winsys selection. However Cogl was trying to apply all of the
constraints to the driver selection which meant that if any other
constraint was specified then it would always fail. This patch makes
the driver selection filter out all other constraints based on a mask
defined in cogl-renderer-private.h.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit f07febc8913b97fb828e7f2cc2857813af2d3657)
Diffstat (limited to 'cogl/cogl-renderer.c')
-rw-r--r-- | cogl/cogl-renderer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cogl/cogl-renderer.c b/cogl/cogl-renderer.c index ada3c3ba..8136fe1e 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)) |