aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/xm_dd.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-03-13 18:21:40 +0000
committerBrian Paul <[email protected]>2004-03-13 18:21:40 +0000
commit7a6b71ef2944bae1718e8167b2faaceb8422071c (patch)
tree3fb3435f3728f09486d455f6060f06dd42fe0e80 /src/mesa/drivers/x11/xm_dd.c
parent5498e8b9f34718aba506421988116ccb1e5e3de7 (diff)
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.
Diffstat (limited to 'src/mesa/drivers/x11/xm_dd.c')
-rw-r--r--src/mesa/drivers/x11/xm_dd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index f54003bc852..1178b71b74f 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