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>bb10
parent
c19bafc60c
commit
c95fc0f662
|
|
@ -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 "
|
||||
|
|
|
|||
Loading…
Reference in New Issue