From fa44b74f4ec1a51fcbe656c5da94b0635defa992 Mon Sep 17 00:00:00 2001
From: Brian <brian.paul@tungstengraphics.com>
Date: Tue, 6 Nov 2007 13:52:57 -0700
Subject: define CLIP_TILE as in sp_surface.c

---
 src/mesa/pipe/xlib/xm_surface.c | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'src/mesa')

diff --git a/src/mesa/pipe/xlib/xm_surface.c b/src/mesa/pipe/xlib/xm_surface.c
index 6250e75de8..9969cc728d 100644
--- a/src/mesa/pipe/xlib/xm_surface.c
+++ b/src/mesa/pipe/xlib/xm_surface.c
@@ -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) \
-- 
cgit v1.2.3