void _mesa_meta_fb_tex_blit_end(struct gl_context *ctx, GLenum target, struct fb_tex_blit_state *blit) { /* Restore texture object state, the texture binding will * be restored by _mesa_meta_end(). */ if (target != GL_TEXTURE_RECTANGLE_ARB) { _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, blit->baseLevelSave); _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, blit->maxLevelSave); if (ctx->Extensions.ARB_stencil_texturing) { const struct gl_texture_object *texObj = _mesa_get_current_tex_object(ctx, target); if (texObj->StencilSampling != blit->stencilSamplingSave) _mesa_TexParameteri(target, GL_DEPTH_STENCIL_TEXTURE_MODE, blit->stencilSamplingSave ? GL_STENCIL_INDEX : GL_DEPTH_COMPONENT); } } _mesa_BindSampler(ctx->Texture.CurrentUnit, blit->samplerSave); _mesa_DeleteSamplers(1, &blit->sampler); if (blit->tempTex) _mesa_DeleteTextures(1, &blit->tempTex); }
void _mesa_meta_glsl_generate_mipmap_cleanup(struct gen_mipmap_state *mipmap) { if (mipmap->VAO == 0) return; _mesa_DeleteVertexArrays(1, &mipmap->VAO); mipmap->VAO = 0; _mesa_DeleteBuffers(1, &mipmap->VBO); mipmap->VBO = 0; _mesa_DeleteSamplers(1, &mipmap->Sampler); mipmap->Sampler = 0; _mesa_meta_blit_shader_table_cleanup(&mipmap->shaders); }
void _mesa_meta_glsl_generate_mipmap_cleanup(struct gl_context *ctx, struct gen_mipmap_state *mipmap) { if (mipmap->VAO == 0) return; _mesa_DeleteVertexArrays(1, &mipmap->VAO); mipmap->VAO = 0; _mesa_reference_buffer_object(ctx, &mipmap->buf_obj, NULL); _mesa_DeleteSamplers(1, &mipmap->Sampler); mipmap->Sampler = 0; if (mipmap->FBO != 0) { _mesa_DeleteFramebuffers(1, &mipmap->FBO); mipmap->FBO = 0; } _mesa_meta_blit_shader_table_cleanup(&mipmap->shaders); }