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 6250e75de8eb6e4b63f4ed10e9b07b20f258c4b6..9969cc728d7fc38a0295ccb66626f68759e16eab 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) \