If blitting using GL_STENCIL_BUFFER_BIT between buffers of formats GL_DEPTH24_STENCIL8 and GL_DEPTH32F_STENCIL8, GL_INVALID_OPERATION is expected by GLES3 conformance test. But no GL error is expected if blitting between buffers of formats GL_DEPTH24_STENCIL8 and GL_STENCIL_INDEX.
Makes framebuffer_blit_error_depth_or_stencil_buffers_mismatched_formats.test in gles3 conformance pass. Signed-off-by: Anuj Phogat <anuj.pho...@gmail.com> --- src/mesa/main/fbobject.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 804be0a..c0aa69f 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2937,7 +2937,15 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, mask &= ~GL_STENCIL_BUFFER_BIT; } else if (_mesa_get_format_bits(readRb->Format, GL_STENCIL_BITS) != - _mesa_get_format_bits(drawRb->Format, GL_STENCIL_BITS)) { + _mesa_get_format_bits(drawRb->Format, GL_STENCIL_BITS) || + /* OpenGL/ES3 specification is not very clear about it. But GLES3 + * conformance test expects GL_INVALID_OPERATION in case of below + * listed combination of formats for read/draw buffers. + */ + (readRb->InternalFormat == GL_DEPTH32F_STENCIL8 && + drawRb->InternalFormat == GL_DEPTH24_STENCIL8) || + (readRb->InternalFormat == GL_DEPTH24_STENCIL8 && + drawRb->InternalFormat == GL_DEPTH32F_STENCIL8)) { /* There is no need to check the stencil datatype here, because * there is only one: GL_UNSIGNED_INT. */ -- 1.7.7.6 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev