diff options
author | Brian <[email protected]> | 2007-11-08 13:17:43 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-11-08 13:17:43 -0700 |
commit | cee1d1328aadc501935f60f32cc2c8f8199ff57c (patch) | |
tree | 42caa6148cbcfe0181d171ee91e04357fb20c049 /src/mesa/pipe/softpipe/sp_clear.c | |
parent | ae9fe0f981377cb25bc3fe6f23a6ee7e3b73d0c2 (diff) |
fix bad width/height code in softpipe_clear()
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_clear.c')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_clear.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/pipe/softpipe/sp_clear.c b/src/mesa/pipe/softpipe/sp_clear.c index 078b6a7964d..87f850b6fd9 100644 --- a/src/mesa/pipe/softpipe/sp_clear.c +++ b/src/mesa/pipe/softpipe/sp_clear.c @@ -51,9 +51,6 @@ softpipe_clear(struct pipe_context *pipe, struct pipe_surface *ps, softpipe_update_derived(softpipe); /* not needed?? */ - w = softpipe->framebuffer.cbufs[0]->width; - h = softpipe->framebuffer.cbufs[0]->height; - /* Use the X coord to trick region_fill() into filling at an offset * from the start of the region. Perhaps pipe_region should have the * 'offset' field, not pipe_surface??? @@ -61,6 +58,8 @@ softpipe_clear(struct pipe_context *pipe, struct pipe_surface *ps, assert(ps->offset % ps->region->cpp == 0); x = ps->offset / ps->region->cpp; y = 0; + w = ps->width; + h = ps->height; assert(w <= ps->region->pitch); assert(h <= ps->region->height); |