summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-01-20 17:40:48 -0700
committerBrian Paul <brianp@vmware.com>2010-01-21 08:04:15 -0700
commit074abd889f7f5d2c7805a2c0fe118f463101a63d (patch)
tree0d88779903ec86ed5d36940210740cc773ca085b
parented9bd82656eec8ee2e85e828a7b05d93702da6ed (diff)
softpipe: added region assertions in softpipe_get_tex_transfer()
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c
index fae72c81aa1..45e80c54477 100644
--- a/src/gallium/drivers/softpipe/sp_texture.c
+++ b/src/gallium/drivers/softpipe/sp_texture.c
@@ -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;