From c95fc0f662f8df6533f6961cc003a2fe2fb739fb Mon Sep 17 00:00:00 2001 From: Paul Lemire Date: Thu, 30 Jul 2020 10:57:00 +0200 Subject: [PATCH] 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 --- src/gui/rhi/qrhigles2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 "