diff options
author | Keith Whitwell <keithw@vmware.com> | 2009-10-09 13:55:04 +0100 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2009-10-09 13:55:04 +0100 |
commit | b0475a4b0d1eaa1179bc399301ed46b0b8e63497 (patch) | |
tree | c4a86d7e8ad5071b68e9c5bdf283c80115590f59 /src | |
parent | 1928c965b1fb76987cbc834111bd1d1e1f2cda51 (diff) |
llvmpipe: fix crash on init
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index 030a19ef30..2eef63badc 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -229,8 +229,8 @@ begin_binning( struct setup_context *setup ) setup->fb.zsbuf->height); } - setup->tiles_x = align(setup->fb.width, TILESIZE); - setup->tiles_y = align(setup->fb.height, TILESIZE); + setup->tiles_x = align(setup->fb.width, TILESIZE) / TILESIZE; + setup->tiles_y = align(setup->fb.height, TILESIZE) / TILESIZE; if (setup->fb.cbuf) { if (setup->clear.flags & PIPE_CLEAR_COLOR) @@ -312,18 +312,10 @@ lp_setup_bind_framebuffer( struct setup_context *setup, struct pipe_surface *color, struct pipe_surface *zstencil ) { - unsigned width, height; - set_state( setup, SETUP_FLUSHED ); pipe_surface_reference( &setup->fb.cbuf, color ); pipe_surface_reference( &setup->fb.zsbuf, zstencil ); - - width = MAX2( color->width, zstencil->width ); - height = MAX2( color->height, zstencil->height ); - - setup->tiles_x = align( width, TILESIZE ) / TILESIZE; - setup->tiles_y = align( height, TILESIZE ) / TILESIZE; } void |