mutter/tests/conform
Neil Roberts 6d51a18e7c Add support for per-vertex point sizes
This adds a new function to enable per-vertex point size on a
pipeline. This can be set with
cogl_pipeline_set_per_vertex_point_size(). Once enabled the point size
can be set either by drawing with an attribute named
'cogl_point_size_in' or by writing to the 'cogl_point_size_out'
builtin from a snippet.

There is a feature flag which must be checked for before using
per-vertex point sizes. This will only be set on GL >= 2.0 or on GLES
2.0. GL will only let you set a per-vertex point size from GLSL by
writing to gl_PointSize. This is only available in GL2 and not in the
older GLSL extensions.

The per-vertex point size has its own pipeline state flag so that it
can be part of the state that affects vertex shader generation.

Having to enable the per vertex point size with a separate function is
a bit awkward. Ideally it would work like the color attribute where
you can just set it for every vertex in your primitive with
cogl_pipeline_set_color or set it per-vertex by just using the
attribute. This is harder to get working with the point size because
we need to generate a different vertex shader depending on what
attributes are bound. I think if we wanted to make this work
transparently we would still want to internally have a pipeline
property describing whether the shader was generated with per-vertex
support so that it would work with the shader cache correctly.
Potentially we could make the per-vertex property internal and
automatically make a weak pipeline whenever the attribute is bound.
However we would then also need to automatically detect when an
application is writing to cogl_point_size_out from a snippet.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 8495d9c1c15ce389885a9356d965eabd97758115)

Conflicts:
	cogl/cogl-context.c
	cogl/cogl-pipeline-private.h
	cogl/cogl-pipeline.c
	cogl/cogl-private.h
	cogl/driver/gl/cogl-pipeline-progend-fixed.c
	cogl/driver/gl/gl/cogl-pipeline-progend-fixed-arbfp.c
2013-06-07 16:53:29 +01:00
..
Makefile.am Add support for per-vertex point sizes 2013-06-07 16:53:29 +01:00
test-alpha-test.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-alpha-textures.c Add a conformance test using alpha textures 2013-01-22 17:48:06 +00:00
test-atlas-migration.c Convert the test-atlas-migration test to a standalone Cogl test 2012-08-06 14:27:42 +01:00
test-backface-culling.c Add compiler deprecation warnings 2013-04-24 22:23:50 +01:00
test-blend-strings.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-blend.c conform: Add color attribute based blending test 2013-06-06 21:27:16 +01:00
test-color-mask.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-conform-main.c Add support for per-vertex point sizes 2013-06-07 16:53:29 +01:00
test-copy-replace-texture.c Add test to verify replacing a layer doesn't leak the pipeline parent 2013-03-19 17:53:43 +00:00
test-custom-attributes.c tests: Don't report success when the test is skipped 2013-01-22 17:48:06 +00:00
test-depth-test.c Add compiler deprecation warnings 2013-04-24 22:23:50 +01:00
test-euler-quaternion.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-fence.c Add fence API 2013-05-28 21:36:03 +01:00
test-fixed.c Adds cogl_framebuffer_draw_[*_]rectangle functions 2012-03-20 12:33:40 +00:00
test-fixtures.c Adds cogl_framebuffer_draw_[*_]rectangle functions 2012-03-20 12:33:40 +00:00
test-framebuffer-get-bits.c Add a test for getting the component sizes from different fbs 2013-01-22 17:48:18 +00:00
test-gles2-context.c test-gles2-context: Read pixels using GL_RGBA not GL_RGB 2013-02-08 12:20:33 +00:00
test-just-vertex-shader.c Add compiler deprecation warnings 2013-04-24 22:23:50 +01:00
test-layer-remove.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-map-buffer-range.c Allow propogation of OOM errors to apps 2013-01-22 17:48:07 +00:00
test-materials.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-multitexture.c Adds CoglError api 2013-01-22 17:47:39 +00:00
test-no-gl-header.c Mass rename CLUTTER_COMPILATION to COGL_COMPILATION 2012-08-06 14:27:45 +01:00
test-npot-texture.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-object.c Adds cogl_framebuffer_draw_[*_]rectangle functions 2012-03-20 12:33:40 +00:00
test-offscreen.c Add compiler deprecation warnings 2013-04-24 22:23:50 +01:00
test-path.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-pipeline-cache-unrefs-texture.c Conformance test to check whether the pipeline cache holds textures 2013-04-04 13:37:51 +01:00
test-pipeline-uniforms.c tests: Don't report success when the test is skipped 2013-01-22 17:48:06 +00:00
test-pipeline-user-matrix.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-pixel-buffer.c Fix handling of binding errors when uploading a full texture 2013-01-22 17:48:09 +00:00
test-point-size-attribute.c Add support for per-vertex point sizes 2013-06-07 16:53:29 +01:00
test-point-size.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-point-sprite.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-premult.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-primitive-and-journal.c Add a test to check interleaving primitives and the journal 2013-02-19 11:06:59 +00:00
test-primitive.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-read-texture-formats.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-readpixels.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-snippets.c Add fragment and vertex snippet hooks for global declarations 2013-02-27 14:43:55 +00:00
test-sparse-pipeline.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-sub-texture.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-texture-3d.c tests: Don't report success when the test is skipped 2013-01-22 17:48:06 +00:00
test-texture-get-set-data.c tests: port test-texture-get-set-data to be standalone 2013-01-22 17:48:09 +00:00
test-texture-mipmaps.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-texture-pixmap-x11.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-texture-rectangle.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-version.c Add a cogl-version header 2012-08-06 14:27:40 +01:00
test-vertex-buffer-contiguous.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-vertex-buffer-interleved.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-vertex-buffer-mutability.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-viewport.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-wrap-modes.c Add compiler deprecation warnings 2013-04-24 22:23:50 +01:00
test-wrap-rectangle-textures.c win32: Minor build fixes for building for win32 2013-02-21 15:20:55 +00:00
test-write-texture-formats.c test-write-texture-formats: Add fuzziness to the pixel comparisons 2013-01-22 18:00:11 +00:00