I have small problem with shadow maps preview. After binding shadow framebuffer I bind proper texture to store depth in it and then render the whole scene. When I read that values in shader to calculate shadows everything works as I expect on every tested computers. But when I want draw this textures on 2D quads I have it working only on AMD cards. On NVidia all I have is white empty fields. This happens only with cube maps and array texture.
Here is screen:

Creating framebuffer:
if(!_s_buffer)glGenFramebuffers(1, &_s_buffer);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, _s_buffer);
glFramebufferTexture(GL_DRAW_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, _depth.get(), 0); // set anything to framebuffer to avoid "framebuffer incomplete" error
glDrawBuffer(GL_NONE);
glReadBuffer(GL_NONE);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
Could the problem be caused by using one framebuffer for cube map and array texture and switch between them in code (one time depth attachment is cube map - glFramebufferTexture2D with textarget set to proper cube map face - and another time it is array texture - glFramebufferTextureLayer).
Could you help me with this? I'm looking for a solution but without results. Maybe you met with this kind of problem. If more code is need I can post it.