summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-08 16:07:28 -0600
committerBrian <[email protected]>2007-08-08 16:10:40 -0600
commited227b7b8ddc3aad6ed764124e94caae6b98d182 (patch)
tree13e715ac4c17aa2420e67529af43455c00408dda /src/mesa/pipe
parent6dc212ce49bd2939e905ea0bb8f2fa162cd67df6 (diff)
added assertion
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_surface.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/pipe/softpipe/sp_surface.c b/src/mesa/pipe/softpipe/sp_surface.c
index 85e1fcfa38f..174dcc01692 100644
--- a/src/mesa/pipe/softpipe/sp_surface.c
+++ b/src/mesa/pipe/softpipe/sp_surface.c
@@ -323,6 +323,8 @@ a8r8g8b8_get_tile(struct pipe_surface *ps,
const GLuint *src
= ((const GLuint *) ps->region->map) + y * ps->region->pitch + x;
GLuint i, j;
+ assert(x + w <= ps->width);
+ assert(y + h <= ps->height);
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
p[0] = UBYTE_TO_FLOAT((src[j] >> 16) & 0xff);