Account for an array as the last element of an SSBO struct, when padding

This commit is contained in:
baldurk
2018-06-05 21:08:06 +01:00
parent c36b4e1ef6
commit 21b7c0265a
+3
View File
@@ -1515,6 +1515,9 @@ void MakeShaderReflection(const GLHookSet &gl, GLenum shadType, GLuint sepProg,
if(last->type.descriptor.type == VarType::Double)
size *= 2;
if(last->type.descriptor.elements > 1)
size *= last->type.descriptor.elements;
stride += size;
if(stride < desiredStride)