summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/colortab.c9
-rw-r--r--src/mesa/main/convolve.c8
2 files changed, 16 insertions, 1 deletions
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index fcd54bc5ccd..5447eb18ef9 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -543,7 +543,10 @@ _mesa_CopyColorTable(GLenum target, GLenum internalformat,
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- /* Select buffer to read from */
+ if (!ctx->ReadBuffer->_ColorReadBuffer) {
+ return; /* no readbuffer - OK */
+ }
+
ctx->Driver.CopyColorTable( ctx, target, internalformat, x, y, width );
}
@@ -556,6 +559,10 @@ _mesa_CopyColorSubTable(GLenum target, GLsizei start,
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ if (!ctx->ReadBuffer->_ColorReadBuffer) {
+ return; /* no readbuffer - OK */
+ }
+
ctx->Driver.CopyColorSubTable( ctx, target, start, x, y, width );
}
diff --git a/src/mesa/main/convolve.c b/src/mesa/main/convolve.c
index 70951112a18..bf6f6619d4f 100644
--- a/src/mesa/main/convolve.c
+++ b/src/mesa/main/convolve.c
@@ -482,6 +482,10 @@ _mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLi
return;
}
+ if (!ctx->ReadBuffer->_ColorReadBuffer) {
+ return; /* no readbuffer - OK */
+ }
+
ctx->Driver.CopyConvolutionFilter1D( ctx, target,
internalFormat, x, y, width);
}
@@ -514,6 +518,10 @@ _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLi
return;
}
+ if (!ctx->ReadBuffer->_ColorReadBuffer) {
+ return; /* no readbuffer - OK */
+ }
+
ctx->Driver.CopyConvolutionFilter2D( ctx, target, internalFormat, x, y,
width, height );
}