From 7a6b71ef2944bae1718e8167b2faaceb8422071c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 13 Mar 2004 18:21:40 +0000 Subject: Implementation of GL_EXT_pixel_buffer_object extension. Note: extension may not be finalized yet - subject to change! Note: implementation not fully suitable for h/w implementation yet. --- src/mesa/drivers/x11/xm_dd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/mesa/drivers/x11/xm_dd.c') diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index f54003bc85..1178b71b74 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -843,6 +843,12 @@ xmesa_DrawPixels_8R8G8B( GLcontext *ctx, int srcX = unpack->SkipPixels; int srcY = unpack->SkipRows; int rowLength = unpack->RowLength ? unpack->RowLength : width; + + pixels = _swrast_validate_pbo_access(unpack, width, height, 1, + format, type, (GLvoid *) pixels); + if (!pixels) + return; + if (_swrast_clip_pixelrect(ctx, &dstX, &dstY, &w, &h, &srcX, &srcY)) { /* This is a little tricky since all coordinates up to now have * been in the OpenGL bottom-to-top orientation. X is top-to-bottom @@ -918,6 +924,12 @@ xmesa_DrawPixels_5R6G5B( GLcontext *ctx, int srcX = unpack->SkipPixels; int srcY = unpack->SkipRows; int rowLength = unpack->RowLength ? unpack->RowLength : width; + + pixels = _swrast_validate_pbo_access(unpack, width, height, 1, + format, type, (GLvoid *) pixels); + if (!pixels) + return; + if (_swrast_clip_pixelrect(ctx, &dstX, &dstY, &w, &h, &srcX, &srcY)) { /* This is a little tricky since all coordinates up to now have * been in the OpenGL bottom-to-top orientation. X is top-to-bottom -- cgit v1.2.3