Changed handling of uniforms of arrays of structs 18/273618/1
authorDavid Steele <david.steele@samsung.com>
Fri, 8 Apr 2022 16:02:56 +0000 (17:02 +0100)
committerDavid Steele <david.steele@samsung.com>
Fri, 8 Apr 2022 16:02:56 +0000 (17:02 +0100)
commitdf66eaa6145d1d1ec9c43f49b7595b9cb359d336
tree8578eaa6c6735a03b169b56bd30bdef073893348
parentbeccefce103877b896aef8c460d71aac3e7d0d3d
Changed handling of uniforms of arrays of structs

A) For uniforms of the form "basename[index].element", the array index handling
didn't work.

In GL (on Ubuntu) the shader reflection for such uniforms provides
individual locations for each element of the array/struct;

B) For uniforms of the form "basename[index]", where basename is a basic
type (float/vecN, etc), the GL shader reflection produces only 1 location
for the basename, and provides the element count.

Mapping properties to such uniforms is done by having a Property per
element. For the first case, no index/array handling is needed.
For the second case, each property needs to match to the basename without
the array subscript, and also store it's array index.

Modified property setup to remove array index for properties of the first type.

Modified uniform lookup to handle the different hashes appropriately.

Modified test graphics to ensure the uniform reflection can be set up in the
same way as GL provides.

Change-Id: I4be92f3e6933ff1b9b4a7d48e97f5629930c0b4c
Signed-off-by: David Steele <david.steele@samsung.com>
automated-tests/src/dali/dali-test-suite-utils/test-gl-abstraction.h
automated-tests/src/dali/dali-test-suite-utils/test-graphics-reflection.cpp
automated-tests/src/dali/utc-Dali-Renderer.cpp
dali/internal/render/renderers/render-renderer.cpp
dali/internal/render/renderers/render-renderer.h
dali/internal/render/shaders/program.cpp
dali/internal/render/shaders/program.h
dali/internal/update/common/uniform-map.h