summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_imaging.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2006-06-14 10:48:09 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2006-06-14 10:48:09 +0000
commitd048b7d36e502a3013b19be894d0db6c68414955 (patch)
tree6e4e386b2a85138638c8371cd6a8e9b1f4c39064 /src/mesa/swrast/s_imaging.c
parent4f68411e770573d396cdac45ebdc516661212618 (diff)
Protect _swrast_read_rgba_span with RENDER_START/FINISH
Diffstat (limited to 'src/mesa/swrast/s_imaging.c')
-rw-r--r--src/mesa/swrast/s_imaging.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_imaging.c b/src/mesa/swrast/s_imaging.c
index 43e955c6a7..ac69d270b8 100644
--- a/src/mesa/swrast/s_imaging.c
+++ b/src/mesa/swrast/s_imaging.c
@@ -38,6 +38,7 @@ _swrast_CopyColorTable( GLcontext *ctx,
GLenum target, GLenum internalformat,
GLint x, GLint y, GLsizei width)
{
+ SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLchan data[MAX_WIDTH][4];
struct gl_buffer_object *bufferSave;
@@ -49,10 +50,14 @@ _swrast_CopyColorTable( GLcontext *ctx,
if (width > MAX_WIDTH)
width = MAX_WIDTH;
+ RENDER_START( swrast, ctx );
+
/* read the data from framebuffer */
_swrast_read_rgba_span( ctx, ctx->ReadBuffer->_ColorReadBuffer,
width, x, y, data );
+ RENDER_FINISH(swrast,ctx);
+
/* save PBO binding */
bufferSave = ctx->Unpack.BufferObj;
ctx->Unpack.BufferObj = ctx->Array.NullBufferObj;
@@ -68,6 +73,7 @@ void
_swrast_CopyColorSubTable( GLcontext *ctx,GLenum target, GLsizei start,
GLint x, GLint y, GLsizei width)
{
+ SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLchan data[MAX_WIDTH][4];
struct gl_buffer_object *bufferSave;
@@ -79,10 +85,14 @@ _swrast_CopyColorSubTable( GLcontext *ctx,GLenum target, GLsizei start,
if (width > MAX_WIDTH)
width = MAX_WIDTH;
+ RENDER_START( swrast, ctx );
+
/* read the data from framebuffer */
_swrast_read_rgba_span( ctx, ctx->ReadBuffer->_ColorReadBuffer,
width, x, y, data );
+ RENDER_FINISH(swrast,ctx);
+
/* save PBO binding */
bufferSave = ctx->Unpack.BufferObj;
ctx->Unpack.BufferObj = ctx->Array.NullBufferObj;