diff options
author | marha <marha@users.sourceforge.net> | 2011-06-08 08:28:34 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-06-08 08:28:34 +0200 |
commit | 414e95994496b7026621c7e4f6d01b364b5252b7 (patch) | |
tree | 23c211fb0873aaf6eb1be02a37c467f02e3bd40b /mesalib/src/mesa/main/fbobject.c | |
parent | 4dc4001b1b78cc236548d9a01365ee4c04ee22a3 (diff) | |
parent | adeb8256da9b636648178f729d7b3316a0a8e990 (diff) | |
download | vcxsrv-414e95994496b7026621c7e4f6d01b364b5252b7.tar.gz vcxsrv-414e95994496b7026621c7e4f6d01b364b5252b7.tar.bz2 vcxsrv-414e95994496b7026621c7e4f6d01b364b5252b7.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
libX11/specs/libX11/AppC.xml
libX11/specs/libX11/AppD.xml
libX11/specs/libX11/CH02.xml
libX11/specs/libX11/CH03.xml
libX11/specs/libX11/CH04.xml
libX11/specs/libX11/CH05.xml
libX11/specs/libX11/CH06.xml
libX11/specs/libX11/CH07.xml
libX11/specs/libX11/CH08.xml
libX11/specs/libX11/CH09.xml
libX11/specs/libX11/CH11.xml
libX11/specs/libX11/CH13.xml
libX11/specs/libX11/CH14.xml
libX11/specs/libX11/CH15.xml
libX11/specs/libX11/CH16.xml
mesalib/src/mesa/main/fbobject.c
xorg-server/Xi/exevents.c
xorg-server/dix/events.c
xorg-server/dix/getevents.c
xorg-server/test/input.c
xorg-server/xkb/xkbfmisc.c
Diffstat (limited to 'mesalib/src/mesa/main/fbobject.c')
-rw-r--r-- | mesalib/src/mesa/main/fbobject.c | 45 |
1 files changed, 37 insertions, 8 deletions
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c index 2cc791682..3da7a126e 100644 --- a/mesalib/src/mesa/main/fbobject.c +++ b/mesalib/src/mesa/main/fbobject.c @@ -2429,6 +2429,17 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, if (mask & GL_COLOR_BUFFER_BIT) {
colorReadRb = readFb->_ColorReadBuffer;
colorDrawRb = drawFb->_ColorDrawBuffers[0];
+
+ /* From the EXT_framebuffer_object spec:
+ *
+ * "If a buffer is specified in <mask> and does not exist in both
+ * the read and draw framebuffers, the corresponding bit is silently
+ * ignored."
+ */
+ if ((colorReadRb == NULL) || (colorDrawRb == NULL)) {
+ colorReadRb = colorDrawRb = NULL;
+ mask &= ~GL_COLOR_BUFFER_BIT;
+ }
}
else {
colorReadRb = colorDrawRb = NULL;
@@ -2437,10 +2448,19 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, if (mask & GL_STENCIL_BUFFER_BIT) {
struct gl_renderbuffer *readRb = readFb->_StencilBuffer;
struct gl_renderbuffer *drawRb = drawFb->_StencilBuffer;
- if (!readRb ||
- !drawRb ||
- _mesa_get_format_bits(readRb->Format, GL_STENCIL_BITS) !=
- _mesa_get_format_bits(drawRb->Format, GL_STENCIL_BITS)) {
+
+ /* From the EXT_framebuffer_object spec:
+ *
+ * "If a buffer is specified in <mask> and does not exist in both
+ * the read and draw framebuffers, the corresponding bit is silently
+ * ignored."
+ */
+ if ((readRb == NULL) || (drawRb == NULL)) {
+ readRb = drawRb = NULL;
+ 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_error(ctx, GL_INVALID_OPERATION,
"glBlitFramebufferEXT(stencil buffer size mismatch)");
return;
@@ -2450,10 +2470,19 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, if (mask & GL_DEPTH_BUFFER_BIT) {
struct gl_renderbuffer *readRb = readFb->_DepthBuffer;
struct gl_renderbuffer *drawRb = drawFb->_DepthBuffer;
- if (!readRb ||
- !drawRb ||
- _mesa_get_format_bits(readRb->Format, GL_DEPTH_BITS) !=
- _mesa_get_format_bits(drawRb->Format, GL_DEPTH_BITS)) {
+
+ /* From the EXT_framebuffer_object spec:
+ *
+ * "If a buffer is specified in <mask> and does not exist in both
+ * the read and draw framebuffers, the corresponding bit is silently
+ * ignored."
+ */
+ if ((readRb == NULL) || (drawRb == NULL)) {
+ readRb = drawRb = NULL;
+ mask &= ~GL_DEPTH_BUFFER_BIT;
+ }
+ else if (_mesa_get_format_bits(readRb->Format, GL_DEPTH_BITS) !=
+ _mesa_get_format_bits(drawRb->Format, GL_DEPTH_BITS)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBlitFramebufferEXT(depth buffer size mismatch)");
return;
|