aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-23 08:37:42 +0100
committermarha <marha@users.sourceforge.net>2012-01-23 08:37:42 +0100
commit6b7b7d9ce2264b35d19ecec6bf1f28894dbcada7 (patch)
treee151dcf34c7fa60fcf9bde9963638f3c20a567f6 /mesalib/src/mesa/main/fbobject.c
parentdc56d736fcd8ee767f76674981abbb506a1d69d5 (diff)
parent45e3694d529b052f4122262c9bdff5476219b2b4 (diff)
downloadvcxsrv-6b7b7d9ce2264b35d19ecec6bf1f28894dbcada7.tar.gz
vcxsrv-6b7b7d9ce2264b35d19ecec6bf1f28894dbcada7.tar.bz2
vcxsrv-6b7b7d9ce2264b35d19ecec6bf1f28894dbcada7.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/fbobject.c')
-rw-r--r--mesalib/src/mesa/main/fbobject.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c
index 052495907..2b3ac2e25 100644
--- a/mesalib/src/mesa/main/fbobject.c
+++ b/mesalib/src/mesa/main/fbobject.c
@@ -2709,9 +2709,13 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
if ((readRb == NULL) || (drawRb == NULL)) {
mask &= ~GL_STENCIL_BUFFER_BIT;
}
- else if (readRb->Format != drawRb->Format) {
+ else if (_mesa_get_format_bits(readRb->Format, GL_STENCIL_BITS) !=
+ _mesa_get_format_bits(drawRb->Format, GL_STENCIL_BITS)) {
+ /* There is no need to check the stencil datatype here, because
+ * there is only one: GL_UNSIGNED_INT.
+ */
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glBlitFramebufferEXT(stencil buffer format mismatch)");
+ "glBlitFramebufferEXT(stencil buffer size mismatch)");
return;
}
}
@@ -2731,7 +2735,10 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
if ((readRb == NULL) || (drawRb == NULL)) {
mask &= ~GL_DEPTH_BUFFER_BIT;
}
- else if (readRb->Format != drawRb->Format) {
+ else if ((_mesa_get_format_bits(readRb->Format, GL_DEPTH_BITS) !=
+ _mesa_get_format_bits(drawRb->Format, GL_DEPTH_BITS)) ||
+ (_mesa_get_format_datatype(readRb->Format) !=
+ _mesa_get_format_datatype(drawRb->Format))) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBlitFramebufferEXT(depth buffer format mismatch)");
return;