Commit bfda4f2e authored by Keith Whitwell's avatar Keith Whitwell

util: get clip_tile working again

parent f5ef219c
......@@ -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" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment