projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed9bd82
)
softpipe: added region assertions in softpipe_get_tex_transfer()
author
Brian Paul
<brianp@vmware.com>
Thu, 21 Jan 2010 00:40:48 +0000
(17:40 -0700)
committer
Brian Paul
<brianp@vmware.com>
Thu, 21 Jan 2010 15:04:15 +0000
(08:04 -0700)
src/gallium/drivers/softpipe/sp_texture.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/softpipe/sp_texture.c
b/src/gallium/drivers/softpipe/sp_texture.c
index fae72c81aa16256f48401b64a335908af53fa981..45e80c544775b237b0d84ea7a225fff140d91090 100644
(file)
--- 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;