mesa: Loosen glBlitFramebuffer restrictions on depthstencil buffers (v2)
mesa: Loosen glBlitFramebuffer restrictions on depthstencil buffers (v2)

This loosens the format validation in glBlitFramebuffer. When blitting
depth bits, don't require an exact match between the depth formats; only
require that the two formats have the same number of depth bits and the
same depth datatype (float vs uint). Ditto for stencil.

Between S8_Z24 buffers, the EXT_framebuffer_blit spec allows
glBlitFramebuffer to blit the depth and stencil bits separately. So I see
no reason to prevent blitting the depth bits between X8_Z24 and S8_Z24 or
the stencil bits between S8 and S8_Z24. However, we of course don't want
to allow blitting from Z32 to Z32_FLOAT.

Fixes Piglit fbo/fbo-blit-d24s8 on Intel drivers with separate stencil
enabled.

The problem was that, on Intel drivers with separate stencil, the default
framebuffer has separate depth and stencil buffers with formats X8_Z24 and
S8. The test attempts to blit the depth bits from a S8_Z24 buffer into the
default framebuffer.

v2: Check that depth datatypes match.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44665
Note: This is a candidate for the 8.0 branch.
Reported-by: Xunx Fang <f5ddf63a0edd0ecdf71b485bebafd6636793fbdf@intel.com>
Reviewed-by: Ian Romanick <2b237cafb16dc45038e85df6c85e74e6d899eba9@intel.com>
Signed-off-by: Chad Versace <a557f7f75bf28dc19ac99107f5cc7cd6b3fbdb1a@linux.intel.com>

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