[Mesa-dev] [PATCH 2/6] mesa: Fix GL error generation in glBlitFramebuffer()
Anuj Phogat
anuj.phogat at gmail.com
Wed Dec 12 15:25:47 PST 2012
Signed-off-by: Anuj Phogat <anuj.phogat at 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 4b7d4ab..9e32836 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -2856,7 +2856,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/ES 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
More information about the mesa-dev
mailing list