_mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, mipmap->FBO);
- _mesa_TexParameteri(target, GL_GENERATE_MIPMAP, GL_FALSE);
+ if (ctx->API == API_OPENGL || ctx->API == API_OPENGLES)
+ _mesa_TexParameteri(target, GL_GENERATE_MIPMAP, GL_FALSE);
+ else
+ assert(!genMipmapSave);
if (ctx->Extensions.EXT_framebuffer_sRGB) {
_mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB_EXT, GL_FALSE);
_mesa_meta_end(ctx);
_mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, maxLevelSave);
- _mesa_TexParameteri(target, GL_GENERATE_MIPMAP, genMipmapSave);
+ if (genMipmapSave)
+ _mesa_TexParameteri(target, GL_GENERATE_MIPMAP, genMipmapSave);
_mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboSave);
}