softpipe: added region assertions in softpipe_get_tex_transfer()

This commit is contained in:
Brian Paul 2010-01-20 17:40:48 -07:00
parent ed9bd82656
commit 074abd889f
1 changed files with 4 additions and 0 deletions

View File

@ -291,6 +291,10 @@ softpipe_get_tex_transfer(struct pipe_screen *screen,
assert(texture);
assert(level <= texture->last_level);
/* make sure the requested region is in the image bounds */
assert(x + w <= u_minify(texture->width0, level));
assert(y + h <= u_minify(texture->height0, level));
spt = CALLOC_STRUCT(softpipe_transfer);
if (spt) {
struct pipe_transfer *pt = &spt->base;