mutter/cogl
Damien Leone 895055c836 cogl-winsys-glx: fix texture format detection
The previous detection was based on color depth only to determine the
texture format to use in GLX. If that worked fine at depths 24 (RGB8)
and 32 (ARGB8), that would fail at depth 30 (BGR10) and fallback to
software instead of using the TFP extension.

This commit uses an efficient population count implementation to
compare the number of 1-bits in color masks against the color depth
requested by the X client. If they are not equal this means that an
alpha channel has been requested.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-10-01 16:44:55 +01:00
..
driver Add the missing check for COGL_FEATURE_POINT_SPRITE on the GL driver 2011-08-01 14:05:09 +01:00
tesselator
winsys cogl-winsys-glx: fix texture format detection 2011-10-01 16:44:55 +01:00
cogl2-clip-state.c
cogl2-clip-state.h
cogl2-experimental.h 2.0: Add cogl2-experimental.h + don't pollute .pc CFLAGS 2011-09-09 15:06:31 +01:00
cogl2-path.c Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl2-path.h
cogl-1.0.pc.in
cogl-2.0-experimental.pc.in 2.0: Add cogl2-experimental.h + don't pollute .pc CFLAGS 2011-09-09 15:06:31 +01:00
cogl-atlas-texture-private.h
cogl-atlas-texture.c Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl-atlas.c
cogl-atlas.h
cogl-attribute-buffer-private.h
cogl-attribute-buffer.c
cogl-attribute-buffer.h
cogl-attribute-private.h attributes: avoid g_strdup in cogl_attribute_new 2011-09-21 15:39:46 +01:00
cogl-attribute.c attributes: optimize validation of tex_coord%d_in names 2011-09-21 15:50:13 +01:00
cogl-attribute.h
cogl-bitmap-fallback.c
cogl-bitmap-pixbuf.c
cogl-bitmap-private.h Export API for uploading a tex subregion from a CoglBuffer 2011-07-25 22:45:24 +01:00
cogl-bitmap.c Export API for uploading a tex subregion from a CoglBuffer 2011-07-25 22:45:24 +01:00
cogl-bitmap.h Export API for uploading a tex subregion from a CoglBuffer 2011-07-25 22:45:24 +01:00
cogl-bitmask.c
cogl-bitmask.h
cogl-blend-string.c blend-strings: Make braces around blend factor optional 2011-09-05 17:54:46 +01:00
cogl-blend-string.h
cogl-blit.c Add internal _cogl_push_source to optionally disable legacy state 2011-09-19 16:40:06 +01:00
cogl-blit.h
cogl-buffer-private.h buffer: make the COGL_BUFFER casting macro public 2011-08-12 15:28:43 +01:00
cogl-buffer.c
cogl-buffer.h buffer: make the COGL_BUFFER casting macro public 2011-08-12 15:28:43 +01:00
cogl-clip-stack.c Add internal _cogl_push_source to optionally disable legacy state 2011-09-19 16:40:06 +01:00
cogl-clip-stack.h framebuffer: don't reference default fb in _clear apis 2011-08-12 15:28:43 +01:00
cogl-clip-state-private.h framebuffer: don't reference default fb in _clear apis 2011-08-12 15:28:43 +01:00
cogl-clip-state.c framebuffer: don't reference default fb in _clear apis 2011-08-12 15:28:43 +01:00
cogl-clip-state.h
cogl-clutter.c
cogl-clutter.h
cogl-color-private.h
cogl-color.c
cogl-color.h
cogl-config-private.h cogl: Add support for reading a cogl.conf config file 2011-08-12 15:28:42 +01:00
cogl-config.c cogl: Add support for reading a cogl.conf config file 2011-08-12 15:28:42 +01:00
cogl-context-private.h pipeline: optimize _compare_differences functions 2011-09-21 17:28:32 +01:00
cogl-context.c pipeline: optimize _compare_differences functions 2011-09-21 17:28:32 +01:00
cogl-context.h context: Add an accessor to get display associated with the context 2011-09-05 17:54:46 +01:00
cogl-debug-options.h
cogl-debug.c cogl: Add support for reading a cogl.conf config file 2011-08-12 15:28:42 +01:00
cogl-debug.h cogl: Add support for reading a cogl.conf config file 2011-08-12 15:28:42 +01:00
cogl-defines.h.in
cogl-deprecated.h
cogl-depth-state-private.h
cogl-depth-state.c
cogl-depth-state.h
cogl-display-private.h egl-gdl: struct gdl_plane never was a valid type 2011-07-29 11:50:15 +01:00
cogl-display.c display: always ensure we have an onscreen_template 2011-09-05 19:02:05 +01:00
cogl-display.h Fix typo in cogl/cogl-display.h 2011-09-06 11:19:20 +01:00
cogl-enum-types.c.in
cogl-enum-types.h.in
cogl-euler.c
cogl-euler.h
cogl-ext-functions.h Make backface culling be part of the legacy state 2011-09-19 16:40:07 +01:00
cogl-feature-private.c Don't use the 'NULL' GModule to resolve GL symbols 2011-07-27 16:10:02 +01:00
cogl-feature-private.h Don't use the 'NULL' GModule to resolve GL symbols 2011-07-27 16:10:02 +01:00
cogl-fixed.c Fix testing of undefined macro constants to check for definedness instead 2011-07-27 18:46:36 +01:00
cogl-fixed.h
cogl-flags.h
cogl-framebuffer-private.h Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl-framebuffer.c Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl-framebuffer.h framebuffer: Add a getter for the framebuffer format 2011-09-05 19:02:05 +01:00
cogl-glx-display-private.h
cogl-glx-renderer-private.h Don't use the 'NULL' GModule to resolve GL symbols 2011-07-27 16:10:02 +01:00
cogl-gtype-private.h
cogl-handle.h
cogl-index-buffer-private.h
cogl-index-buffer.c
cogl-index-buffer.h
cogl-indices-private.h
cogl-indices.c
cogl-indices.h
cogl-internal.h pipeline: Split more code out from cogl-pipeline.c 2011-09-21 17:03:10 +01:00
cogl-journal-private.h Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl-journal.c Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl-material-compat.c
cogl-material-compat.h
cogl-matrix-private.h
cogl-matrix-stack.c
cogl-matrix-stack.h
cogl-matrix.c matrix: Add cogl_matrix_look_at 2011-08-12 15:28:44 +01:00
cogl-matrix.h matrix: Add cogl_matrix_look_at 2011-08-12 15:28:44 +01:00
cogl-node-private.h pipeline: Split more code out from cogl-pipeline.c 2011-09-21 17:03:10 +01:00
cogl-node.c pipeline: Split more code out from cogl-pipeline.c 2011-09-21 17:03:10 +01:00
cogl-object-private.h
cogl-object.c
cogl-object.h
cogl-offscreen.h Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl-onscreen-template-private.h
cogl-onscreen-template.c
cogl-onscreen-template.h
cogl-pango.h
cogl-path-private.h
cogl-path.c
cogl-path.h
cogl-pipeline-cache.c cogl-pipeline/cogl-pango: Added forgotten includes 2011-09-26 15:53:30 +01:00
cogl-pipeline-cache.h
cogl-pipeline-debug.c pipeline: Split more code out from cogl-pipeline.c 2011-09-21 17:03:10 +01:00
cogl-pipeline-fragend-arbfp-private.h
cogl-pipeline-fragend-arbfp.c cogl-pipeline/cogl-pango: Added forgotten includes 2011-09-26 15:53:30 +01:00
cogl-pipeline-fragend-fixed-private.h
cogl-pipeline-fragend-fixed.c cogl-pipeline/cogl-pango: Added forgotten includes 2011-09-26 15:53:30 +01:00
cogl-pipeline-fragend-glsl-private.h
cogl-pipeline-fragend-glsl.c cogl-pipeline/cogl-pango: Added forgotten includes 2011-09-26 15:53:30 +01:00
cogl-pipeline-layer-private.h pipeline: Split more code out from cogl-pipeline.c 2011-09-21 17:03:10 +01:00
cogl-pipeline-layer-state-private.h pipeline: Split more code out from cogl-pipeline.c 2011-09-21 17:03:10 +01:00
cogl-pipeline-layer-state.c cogl-pipeline/cogl-pango: Added forgotten includes 2011-09-26 15:53:30 +01:00
cogl-pipeline-layer-state.h Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl-pipeline-layer.c cogl-pipeline/cogl-pango: Added forgotten includes 2011-09-26 15:53:30 +01:00
cogl-pipeline-opengl-private.h
cogl-pipeline-opengl.c Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl-pipeline-private.h pipeline: Split more code out from cogl-pipeline.c 2011-09-21 17:03:10 +01:00
cogl-pipeline-progend-glsl-private.h
cogl-pipeline-progend-glsl.c cogl-pipeline/cogl-pango: Added forgotten includes 2011-09-26 15:53:30 +01:00
cogl-pipeline-state-private.h Make backface culling be part of the legacy state 2011-09-19 16:40:07 +01:00
cogl-pipeline-state.c Make backface culling be part of the legacy state 2011-09-19 16:40:07 +01:00
cogl-pipeline-state.h pipeline: split out all core state apis 2011-09-19 16:35:59 +01:00
cogl-pipeline-vertend-fixed-private.h
cogl-pipeline-vertend-fixed.c cogl-pipeline/cogl-pango: Added forgotten includes 2011-09-26 15:53:30 +01:00
cogl-pipeline-vertend-glsl-private.h
cogl-pipeline-vertend-glsl.c cogl-pipeline/cogl-pango: Added forgotten includes 2011-09-26 15:53:30 +01:00
cogl-pipeline.c pipeline: optimize _compare_differences functions 2011-09-21 17:28:32 +01:00
cogl-pipeline.h pipeline: Split more code out from cogl-pipeline.c 2011-09-21 17:03:10 +01:00
cogl-pixel-buffer-private.h
cogl-pixel-buffer.c
cogl-pixel-buffer.h
cogl-point-in-poly-private.h
cogl-point-in-poly.c
cogl-primitive-private.h primitive: micro optimize primitive allocations 2011-09-21 15:50:08 +01:00
cogl-primitive.c primitive: micro optimize primitive allocations 2011-09-21 15:50:08 +01:00
cogl-primitive.h
cogl-primitives-private.h
cogl-primitives.c Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl-primitives.h
cogl-private.h Add internal _cogl_push_source to optionally disable legacy state 2011-09-19 16:40:06 +01:00
cogl-profile.c
cogl-profile.h
cogl-program-private.h
cogl-program.c
cogl-quaternion-private.h
cogl-quaternion.c quaternion: fix init_from_array and get_rotation_axis 2011-07-27 18:21:27 +01:00
cogl-quaternion.h
cogl-queue.h
cogl-rectangle-map.c
cogl-rectangle-map.h
cogl-renderer-private.h Fix testing of undefined macro constants to check for definedness instead 2011-07-27 18:46:36 +01:00
cogl-renderer.c renderer: Add cogl_renderer_get_n_fragment_texture_units() 2011-09-05 17:54:46 +01:00
cogl-renderer.h renderer: Add cogl_renderer_get_n_fragment_texture_units() 2011-09-05 17:54:46 +01:00
cogl-shader-boilerplate.h
cogl-shader-private.h
cogl-shader.c
cogl-shader.h
cogl-spans.c
cogl-spans.h
cogl-sub-texture-private.h
cogl-sub-texture.c Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl-swap-chain-private.h
cogl-swap-chain.c
cogl-swap-chain.h
cogl-texture-2d-private.h
cogl-texture-2d-sliced-private.h
cogl-texture-2d-sliced.c Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl-texture-2d.c texture: Call _cogl_texture_prepare_for_upload in set_region impl 2011-09-05 19:02:04 +01:00
cogl-texture-2d.h texture-2d: move #defines before gtk-doc 2011-09-05 19:02:05 +01:00
cogl-texture-3d-private.h
cogl-texture-3d.c
cogl-texture-3d.h
cogl-texture-driver.h
cogl-texture-private.h Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl-texture-rectangle-private.h
cogl-texture-rectangle.c texture: Call _cogl_texture_prepare_for_upload in set_region impl 2011-09-05 19:02:04 +01:00
cogl-texture.c Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl-texture.h pipeline: Split more code out from cogl-pipeline.c 2011-09-21 17:03:10 +01:00
cogl-types.h winsys-glx: Fix synchronisation behaviour in _cogl_winsys_onscreen_swap_region 2011-09-19 16:40:06 +01:00
cogl-util.c
cogl-util.h
cogl-vector.c
cogl-vector.h
cogl-vertex-buffer-private.h
cogl-vertex-buffer.c
cogl-vertex-buffer.h
cogl-wayland-renderer.h
cogl-win32-renderer.c
cogl-win32-renderer.h
cogl-x11-renderer-private.h
cogl-xlib-display-private.h
cogl-xlib-private.h
cogl-xlib-renderer-private.h
cogl-xlib-renderer.c Starts porting Cogl conformance tests from Clutter 2011-09-08 15:48:07 +01:00
cogl-xlib-renderer.h
cogl-xlib.c
cogl-xlib.h
cogl.c Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl.h Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
Makefile.am Add an option to avoid defining G_DISABLE_DEPRECATED 2011-09-27 10:27:19 +01:00
stb_image.c stb_image: use glib sized types 2011-08-12 15:28:42 +01:00