Go to file
Laszlo Agocs e6de661a8a rhi: gl: Handle struct and array of struct uniforms
We have intentionally limited support for advanced things like
arrays in a uniform block. There is one very common case however:
a one dimensional array of a struct.

Typical example for Qt Quick 3D:

struct LightSource
{
    vec4 position;
    ...
};

layout (std140, binding = 1) uniform cbBufferLights
{
    int uNumLights;
    LightSource lights[MAX_NUM_LIGHTS];
};

With GLSL (uniform blocks disabled) this gets turned into two structs
where one has a 'lights' member that is an array of the other struct.

Teach the OpenGL backend of QRhi how to handle this.

This makes the QRhi port of Qt Quick3D functional with the OpenGL
backend as well.

Change-Id: I6a09b93276794f7ecdd38f5bfbd3491a9ef58146
Fixes: QTBUG-80628
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-12-10 17:37:28 +01:00
bin Merge remote-tracking branch 'origin/5.13' into 5.14 2019-11-13 07:21:33 +01:00
config.tests Merge remote-tracking branch 'origin/5.14' into 5.15 2019-10-16 01:00:49 +02:00
dist Add changes file for Qt 5.13.2 2019-10-24 13:59:27 +02:00
doc Doc: Move the common documentation to a qdocinc 2019-11-18 12:34:32 +01:00
examples Merge remote-tracking branch 'origin/5.14' into 5.15 2019-12-10 13:51:40 +02:00
lib
mkspecs Merge remote-tracking branch 'origin/5.14' into 5.15 2019-12-10 13:51:40 +02:00
qmake Merge remote-tracking branch 'origin/5.14' into 5.15 2019-12-10 13:51:40 +02:00
src rhi: gl: Handle struct and array of struct uniforms 2019-12-10 17:37:28 +01:00
tests Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-12-10 17:53:06 +02:00
util Unicode tables: minor prettification 2019-11-28 11:04:39 +01:00
.gitattributes
.gitignore qfloat16: Check in the tables to Git 2019-06-03 10:42:53 -07:00
.qmake.conf Bump version 2019-10-14 09:44:06 +02:00
.tag
config_help.txt configure: Add sanitizer "fuzzer-no-link" 2019-11-14 15:45:02 +01:00
configure Android: remove remaining reference to -android-toolchain-version 2019-11-18 14:13:32 +01:00
configure.bat Configure: simplify logic 2019-03-14 12:13:58 +00:00
configure.json configure: Add sanitizer "fuzzer-no-link" 2019-11-14 15:45:02 +01:00
configure.pri Merge remote-tracking branch 'origin/5.14' into 5.15 2019-11-15 16:29:40 +01:00
header.BSD Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.FDL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL-EXCEPT Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3-COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-NOGPL2 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-ONLY Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.MIT qsimd: add support for new x86 CPU features 2018-05-05 06:20:07 +00:00
INSTALL INSTALL: Remove outdated reference to Windows CE 2019-02-13 13:01:57 +00:00
LICENSE.FDL
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Remove LICENSE.GPLv3, LICENSE.LGPLv21, LGPL_EXCEPTION.txt 2018-04-16 11:02:14 +00:00
LICENSE.QT-LICENSE-AGREEMENT-4.0 Replace commercial preview license with Qt License Agreement 4.0 2018-06-21 11:39:15 +00:00
qtbase.pro nuke configure -host-option 2016-12-13 18:55:59 +00:00
sync.profile CMake: Add support for auto-importing plugins in CMake 2019-08-12 18:23:58 +02:00