diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-10-19 12:10:59 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-10-19 12:10:59 -0400 |
commit | 620270c76e7241fe4c391e31e3706468d708fe69 (patch) | |
tree | da8664d287043ab9db78500609f460d2c6d0b59d /src/mesa/drivers/dri/radeon | |
parent | 35b98e2884bd7c76c43fa08d5bb0a8f1396d3298 (diff) | |
parent | 16e21191e26084848c7e6e3ffd9e15ef670855c5 (diff) |
Merge branch 'mesa_7_6_branch' of git+ssh://agd5f@git.freedesktop.org/git/mesa/mesa
regenerated lex.yy.c
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_bo_legacy.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_fbo.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c index 3e7547d2f9..ce60a2f7ea 100644 --- a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c +++ b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c @@ -710,6 +710,10 @@ int radeon_bo_legacy_validate(struct radeon_bo *bo, bo, bo->size, bo_legacy->map_count); return -EINVAL; } + if(bo->size == 0) { + fprintf(stderr, "bo(%p) has size 0.\n", bo); + return -EINVAL; + } if (bo_legacy->static_bo || bo_legacy->validated) { *soffset = bo_legacy->offset; *eoffset = bo_legacy->offset + bo->size; diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c index 7ac53ec0ca..0ae906a6ce 100644 --- a/src/mesa/drivers/dri/radeon/radeon_fbo.c +++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c @@ -445,7 +445,6 @@ restart: goto restart; } - rrb->pitch = texImage->Width * rrb->cpp; rrb->base.InternalFormat = rrb->base._ActualFormat; rrb->base.Width = texImage->Width; rrb->base.Height = texImage->Height; @@ -555,8 +554,10 @@ radeon_render_texture(GLcontext * ctx, imageOffset += offsets[att->Zoffset]; } - /* store that offset in the region */ + /* store that offset in the region, along with the correct pitch for + * the image we are rendering to */ rrb->draw_offset = imageOffset; + rrb->pitch = radeon_image->mt->levels[att->TextureLevel].rowstride; /* update drawing region, etc */ radeon_draw_buffer(ctx, fb); |