Re-instating test cases from old graphics backend 00/272100/4
authorDavid Steele <david.steele@samsung.com>
Tue, 8 Mar 2022 18:43:27 +0000 (18:43 +0000)
committerDavid Steele <david.steele@samsung.com>
Fri, 11 Mar 2022 10:35:41 +0000 (10:35 +0000)
commit7a89f514e362aa247816f35ed9e630ce7bf1b2b0
tree744c41144005d518339c1ca134f7b2b6c59dff5c
parentded68bd82415ca96ae7ec9926cdd3cda8bc05707
Re-instating test cases from old graphics backend

Some test cases were partially or completely commented out during
development of the new graphics backend, and have never been fully
recovered.

This patch attempts to re-instate the test cases, and fix issues
with the test harness & new graphics backend.

Main fix: Testing uniforms by explicit name, including for array
based uniforms.

  Test harness has the capability to check what value was written
  to any uniform - it records the uniform name and value in a set
  of maps, for later query.

  DALi implementation of array based uniforms in a shader is to
  record the location of the first index, and store the basename
  in the graphics reflection. The TestGraphicsReflection has to
  perform the same way, so that the hashing implementations don't
  use the "[N]" code.

  Uniform locations were working by happy accident; have changed
  this to now record the locations as returned by the GL side of
  the test abstraction into the test graphics reflection.

  Modified the uniform buffer write to also handle array based
  uniforms. Now, as arrays have their length encoded in the test
  reflection, each element can be written to the GL abstraction.

  Fixed off-by-one error for location values.

  Modified the semantics for custom uniforms in test cases. Instead
  of providing the first element only, the array notation indicates
  the size of the array.

Some TCs used to test for caching of GL capabilites by DALi core,
however, caching is now done in the GL backend in adaptor, which
the toolkit test harness does not use, so these caching tests are
no longer valid.

Change-Id: I4b2d372a95653fd62117e61e5b57a1c66b17092c
Signed-off-by: David Steele <david.steele@samsung.com>
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-buffer.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-program.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-reflection.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-reflection.h
automated-tests/src/dali-toolkit/utc-Dali-BubbleEmitter.cpp
automated-tests/src/dali-toolkit/utc-Dali-GaussianBlurView.cpp
automated-tests/src/dali-toolkit/utc-Dali-ImageVisual.cpp
automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp