diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2020-07-30 10:57:00 +0200 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2020-07-31 15:43:20 +0200 |
commit | c95fc0f662f8df6533f6961cc003a2fe2fb739fb (patch) | |
tree | 07b3d6e2fe8a72d92b5f0e5151f3fd431b983428 /src | |
parent | c19bafc60c1c2e9a73cb3d212293462a1be4eb47 (diff) |
rhi: QRhiGLes2::gatherUniforms fix gathering in struct
In the case we don't have an array of structs, structPrefix needs to be
suffixed with a dot to get the proper uniform names.
Change-Id: I50ed54c2f7c3cc4556ed1854419bc4fe3a2989f7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/rhi/qrhigles2.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp index fc339878e7..ad98619145 100644 --- a/src/gui/rhi/qrhigles2.cpp +++ b/src/gui/rhi/qrhigles2.cpp @@ -3459,7 +3459,8 @@ void QRhiGles2::gatherUniforms(GLuint program, const int baseOffset = blockMember.offset; if (blockMember.arrayDims.isEmpty()) { for (const QShaderDescription::BlockVariable &structMember : blockMember.structMembers) - registerUniformIfActive(structMember, structPrefix, ub.binding, baseOffset, program, dst); + registerUniformIfActive(structMember, structPrefix + ".", ub.binding, + baseOffset, program, dst); } else { if (blockMember.arrayDims.count() > 1) { qWarning("Array of struct '%s' has more than one dimension. Only the first " |