From: Jerome Glisse Date: Sun, 12 Apr 2009 13:51:31 +0000 (+0200) Subject: r200: fix texture level for compiz case X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1fd76ae930d20a241d534a86c489d92df9b051d3;p=mesa.git r200: fix texture level for compiz case --- diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c index 9797f77ec4f..15758d767cf 100644 --- a/src/mesa/drivers/dri/r200/r200_texstate.c +++ b/src/mesa/drivers/dri/r200/r200_texstate.c @@ -1422,8 +1422,8 @@ void set_re_cntl_d3d( GLcontext *ctx, int unit, GLboolean use_d3d ) */ static void setup_hardware_state(r200ContextPtr rmesa, radeonTexObj *t) { - const struct gl_texture_image *firstImage = - t->base.Image[0][t->mt->firstLevel]; + int firstlevel = t->mt ? t->mt->firstLevel : 0; + const struct gl_texture_image *firstImage = t->base.Image[0][firstlevel]; GLint log2Width, log2Height, log2Depth, texelBytes; if ( t->bo ) {