define CLIP_TILE as in sp_surface.c
authorBrian <brian.paul@tungstengraphics.com>
Tue, 6 Nov 2007 20:52:57 +0000 (13:52 -0700)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 6 Nov 2007 20:52:57 +0000 (13:52 -0700)
src/mesa/pipe/xlib/xm_surface.c

index 6250e75..9969cc7 100644 (file)
@@ -72,6 +72,10 @@ const int xmesa_kernel1[16] = {
 
 #define CLIP_TILE \
    do { \
+      if (x >= ps->width) \
+         return; \
+      if (y >= ps->height) \
+         return; \
       if (x + w > ps->width) \
          w = ps->width - x; \
       if (y + h > ps->height) \