X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fstate_tracker%2Fst_gen_mipmap.c;h=2d587df6055a1c37414567b187551e8f41f43d43;hb=3293bcdc80cdfa20a2381aae2b94505bdf95d857;hp=e656908bedec0cb6a2cd47cdf29d974cc88339b0;hpb=8504c5d931e47765a15fdaec2df2cb6502a1bd5c;p=mesa.git diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c index e656908bede..2d587df6055 100644 --- a/src/mesa/state_tracker/st_gen_mipmap.c +++ b/src/mesa/state_tracker/st_gen_mipmap.c @@ -83,7 +83,7 @@ st_render_mipmap(struct st_context *st, assert(target != GL_TEXTURE_3D); /* not done yet */ /* check if we can render in the texture's format */ - if (!screen->is_format_supported(screen, psv->format, psv->texture->target, + if (!screen->is_format_supported(screen, psv->format, psv->texture->target, 0, PIPE_BIND_RENDER_TARGET, 0)) { return FALSE; } @@ -324,7 +324,11 @@ st_generate_mipmap(GLcontext *ctx, GLenum target, if (!pt) return; - /* find expected last mipmap level to generate */ + /* not sure if this ultimately actually should work, + but we're not supporting multisampled textures yet. */ + assert(pt->nr_samples < 2); + + /* find expected last mipmap level to generate*/ lastLevel = compute_num_levels(ctx, texObj, target) - 1; if (lastLevel == 0)