diff options
author | Alan Hourihane <alanh@vmware.com> | 2009-01-14 16:53:22 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@vmware.com> | 2009-01-14 16:53:22 +0000 |
commit | 85dfed93fe2a6aace7dd2e08f97760e7062e6eb3 (patch) | |
tree | 9b942ba4709979049a40f7214c7213805f651e98 /src/mesa/state_tracker/st_gen_mipmap.c | |
parent | 1d376ae7c93fb4bb929942e56425c4be6401dff7 (diff) |
mesa: handle some cases of 0x0 render targets
Diffstat (limited to 'src/mesa/state_tracker/st_gen_mipmap.c')
-rw-r--r-- | src/mesa/state_tracker/st_gen_mipmap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c index a15faf732c..9e5c35072a 100644 --- a/src/mesa/state_tracker/st_gen_mipmap.c +++ b/src/mesa/state_tracker/st_gen_mipmap.c @@ -160,9 +160,14 @@ st_generate_mipmap(GLcontext *ctx, GLenum target, struct st_context *st = ctx->st; struct pipe_texture *pt = st_get_texobj_texture(texObj); const uint baseLevel = texObj->BaseLevel; - const uint lastLevel = pt->last_level; + uint lastLevel; uint dstLevel; + if (!pt) + return; + + lastLevel = pt->last_level; + if (!st_render_mipmap(st, target, pt, baseLevel, lastLevel)) { fallback_generate_mipmap(ctx, target, texObj); } |