How to set a uniform struct in GLSL 4.6

For structures the uniform locations are sequential and ascending. See 4.4.3. Uniform Variable Layout Qualifiers:

Locations can be assigned to default-block uniform arrays and structures. The first inner-most scalar, vector or matrix member or element takes the specified location and the compiler assigns the next inner-most member or element the next incremental location value.