mutter/tests/conform
Neil Roberts a2aa04f219 texture-2d-slice: Fix the foreach_sub_texture_in_region implementation
There were a few problems with the sub texture iterating code of
sliced textures which were causing some conformance tests to fail when
NPOT textures are disabled:

• The spans are stored in un-normalized coordinates and the
  coordinates passed to the foreach function are normalized. The
  function was trying to un-normalize them before passing them to the
  span iterator code but it was using the wrong factor which was
  causing it to actually doubley normalize them.

• The shim function to renormalize the coordinates before passing them
  to the callback was renormalizing the sub-texture coordinates
  instead of the virtual coordinates. The sub-texture coordinates are
  already in the right scale for whatever is the underlying texture so
  we don't need to touch them. Instead we need to normalize the
  virtual coordinates because these are coming from the un-normalized
  coordinates that we passed to the span iterating code.

• The normalize factors passed to the span iterating were always 1.
  The code uses this normalizing factor to round the incoming
  coordinates to the nearest multiple of a full texture. It divides
  the coordinates by the factor rather than multiplying so it looks
  like we should be passing the virtual texture size here.

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

(cherry picked from commit c9773566b0ec0a17b34c440090529de8cff9609e)
2013-01-22 17:48:18 +00:00
..
config.env.in tests: Improve thoroughness and reporting of make test 2012-02-24 14:42:31 +00:00
Makefile.am tests: port test-texture-get-set-data to be standalone 2013-01-22 17:48:09 +00:00
run-tests.sh tests: Differentiate between known failures and missing requirements 2013-01-22 17:48:06 +00: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 tests: update inline with master 2013-01-22 17:48:06 +00:00
test-bitmask.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-blend-strings.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-color-mask.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-conform-main.c texture-2d-slice: Fix the foreach_sub_texture_in_region implementation 2013-01-22 17:48:18 +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 tests: update inline with master 2013-01-22 17:48:06 +00:00
test-euler-quaternion.c tests: update inline with master 2013-01-22 17:48:06 +00: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-gles2-context.c Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
test-just-vertex-shader.c tests: Don't report success when the test is skipped 2013-01-22 17:48:06 +00:00
test-launcher.sh.in tests: Improve thoroughness and reporting of make test 2012-02-24 14:42:31 +00: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 Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
test-path.c tests: update inline with master 2013-01-22 17:48:06 +00: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.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.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 tests: Don't report success when the test is skipped 2013-01-22 17:48:06 +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-utils.c Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
test-utils.h tests: Differentiate between known failures and missing requirements 2013-01-22 17:48:06 +00: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 tests: update inline with master 2013-01-22 17:48:06 +00:00
test-write-texture-formats.c tests: update inline with master 2013-01-22 17:48:06 +00:00