main: check texture target when validating layered framebuffers.
main: check texture target when validating layered framebuffers.

From section 4.4.4 (Framebuffer Completeness) of the GL 3.2 spec:

    If any framebuffer attachment is layered, all populated
    attachments must be layered. Additionally, all populated color
    attachments must be from textures of the same target.

We weren't checking that the attachments were from textures of the
same target.

Reviewed-by: Anuj Phogat <e2026475996c48f0b97fd37e84129b3912980428@gmail.com>
Reviewed-by: Chris Forbes <5dcac483e7a6e31a5cbe89f38cc69dff8ee93dac@ijw.co.nz>

zeux/glsl-optimizer,djreep81/glsl-optimizer,mapbox/glsl-optimizer,mapbox/glsl-optimizer,metora/MesaGLSLCompiler,tokyovigilante/glsl-optimizer,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,metora/MesaGLSLCompiler,jbarczak/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,mapbox/glsl-optimizer,tokyovigilante/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,metora/MesaGLSLCompiler,mapbox/glsl-optimizer,jbarczak/glsl-optimizer,mapbox/glsl-optimizer,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,djreep81/glsl-optimizer,wolf96/glsl-optimizer,benaadams/glsl-optimizer,wolf96/glsl-optimizer,djreep81/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,bkaradzic/glsl-optimizer,dellis1972/glsl-optimizer,dellis1972/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,dellis1972/glsl-optimizer,tokyovigilante/glsl-optimizer,tokyovigilante/glsl-optimizer,zz85/glsl-optimizer,dellis1972/glsl-optimizer,djreep81/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,wolf96/glsl-optimizer,wolf96/glsl-optimizer,mcanthony/glsl-optimizer,zz85/glsl-optimizer,wolf96/glsl-optimizer,jbarczak/glsl-optimizer,mcanthony/glsl-optimizer,zeux/glsl-optimizer,zz85/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,benaadams/glsl-optimizer,benaadams/glsl-optimizer