Using Struct Array as Uniform

Hello,

I am working on my own game engine using OpenGL. I am using unfiorm block to define Light structure arrays, as uniform in my fragment shader. The program works fine on Intel HD Graphics but the struct uniforms are not working on Nvidia Driver.

Here is a little piece of my code:

struct Light {
    int lightType;
    int castsShadow;
    float lightCutOffAngle;
    int shadowmapId;
    vec4 lightRGBI;
    vec4 lightSpecularRGBI;
    vec3 lightPosition;
    vec3 lightAttenuation;
    vec3 lightSpotDirection;
    mat4 lightMatrix;
};

layout (std140) uniform Lights {
    Light u_lights[MAX_NUM_LIGHTS];
};

now, the size of Light struct with alignment is 160 (Thats what I calculated)
so when trying to update second light I am using (lightNumber * 160) as offset for glBufferSubData()
this works fine on Intel HD Graphics but it is not working on Nvidia

“It’s not working” is a little fuzzy as problem description in a developer forum question. ;-)
(And now you edited the code to contain even less information.)

Please provide some more information what the actual error is.
Info log messages after compiling, linking, OpenGL errors, incorrect rendering?

When reporting programming issues please always provide at least the following system information which is required to attempt a repro of the problem:
Exact OS type and version, installed GPU(s), display driver version, any other special settings which might affect the problem.
Same for the configuration which worked.