summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-03-14 11:25:48 +0000
committerKeith Whitwell <keithw@vmware.com>2010-03-14 11:25:48 +0000
commitbfda4f2eb34498e4b7f3c608d30fccff6bb9651b (patch)
treef72fe32909ecba8caa6ec1bf20b2dfb65e7c758a
parentf5ef219c3bed62b6a0da842e675fae16268e0fbe (diff)
util: get clip_tile working again
-rw-r--r--src/gallium/auxiliary/util/u_tile.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gallium/auxiliary/util/u_tile.h b/src/gallium/auxiliary/util/u_tile.h
index e8bacadee4..986eee0743 100644
--- a/src/gallium/auxiliary/util/u_tile.h
+++ b/src/gallium/auxiliary/util/u_tile.h
@@ -32,25 +32,26 @@
struct pipe_transfer;
-#if 0
/**
* Clip tile against transfer dims.
+ *
+ * XXX: this only clips width and height!
+ *
* \return TRUE if tile is totally clipped, FALSE otherwise
*/
static INLINE boolean
-pipe_clip_tile(uint x, uint y, uint *w, uint *h, const struct pipe_transfer *pt)
+u_clip_tile(uint x, uint y, uint *w, uint *h, const struct pipe_box *box)
{
- if (x >= pt->width)
+ if (x >= box->width)
return TRUE;
- if (y >= pt->height)
+ if (y >= box->height)
return TRUE;
- if (x + *w > pt->width)
- *w = pt->width - x;
- if (y + *h > pt->height)
- *h = pt->height - y;
+ if (x + *w > box->width)
+ *w = box->width - x;
+ if (y + *h > box->height)
+ *h = box->height - y;
return FALSE;
}
-#endif
#ifdef __cplusplus
extern "C" {