Lines Matching refs:mipmap
351 struct gen_mipmap_state *mipmap);
2783 struct gen_mipmap_state *mipmap = &ctx->Meta->Mipmap; in _mesa_meta_check_generate_mipmap_fallback() local
2814 if (!mipmap->FBO) in _mesa_meta_check_generate_mipmap_fallback()
2815 _mesa_GenFramebuffersEXT(1, &mipmap->FBO); in _mesa_meta_check_generate_mipmap_fallback()
2816 _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, mipmap->FBO); in _mesa_meta_check_generate_mipmap_fallback()
3007 struct gen_mipmap_state *mipmap) in setup_ff_generate_mipmap() argument
3013 if (mipmap->ArrayObj == 0) { in setup_ff_generate_mipmap()
3016 _mesa_GenVertexArraysAPPLE(1, &mipmap->ArrayObj); in setup_ff_generate_mipmap()
3017 _mesa_BindVertexArrayAPPLE(mipmap->ArrayObj); in setup_ff_generate_mipmap()
3020 _mesa_GenBuffersARB(1, &mipmap->VBO); in setup_ff_generate_mipmap()
3021 _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, mipmap->VBO); in setup_ff_generate_mipmap()
3037 setup_texture_sampler(GLenum target, struct gen_mipmap_state *mipmap) in setup_texture_sampler() argument
3041 mipmap->sampler_1d.type = "sampler1D"; in setup_texture_sampler()
3042 mipmap->sampler_1d.func = "texture1D"; in setup_texture_sampler()
3043 mipmap->sampler_1d.texcoords = "texCoords.x"; in setup_texture_sampler()
3044 return &mipmap->sampler_1d; in setup_texture_sampler()
3046 mipmap->sampler_2d.type = "sampler2D"; in setup_texture_sampler()
3047 mipmap->sampler_2d.func = "texture2D"; in setup_texture_sampler()
3048 mipmap->sampler_2d.texcoords = "texCoords.xy"; in setup_texture_sampler()
3049 return &mipmap->sampler_2d; in setup_texture_sampler()
3054 mipmap->sampler_3d.type = "sampler3D"; in setup_texture_sampler()
3055 mipmap->sampler_3d.func = "texture3D"; in setup_texture_sampler()
3056 mipmap->sampler_3d.texcoords = "texCoords"; in setup_texture_sampler()
3057 return &mipmap->sampler_3d; in setup_texture_sampler()
3059 mipmap->sampler_cubemap.type = "samplerCube"; in setup_texture_sampler()
3060 mipmap->sampler_cubemap.func = "textureCube"; in setup_texture_sampler()
3061 mipmap->sampler_cubemap.texcoords = "texCoords"; in setup_texture_sampler()
3062 return &mipmap->sampler_cubemap; in setup_texture_sampler()
3064 mipmap->sampler_1d_array.type = "sampler1DArray"; in setup_texture_sampler()
3065 mipmap->sampler_1d_array.func = "texture1DArray"; in setup_texture_sampler()
3066 mipmap->sampler_1d_array.texcoords = "texCoords.xy"; in setup_texture_sampler()
3067 return &mipmap->sampler_1d_array; in setup_texture_sampler()
3069 mipmap->sampler_2d_array.type = "sampler2DArray"; in setup_texture_sampler()
3070 mipmap->sampler_2d_array.func = "texture2DArray"; in setup_texture_sampler()
3071 mipmap->sampler_2d_array.texcoords = "texCoords"; in setup_texture_sampler()
3072 return &mipmap->sampler_2d_array; in setup_texture_sampler()
3083 struct gen_mipmap_state *mipmap, in setup_glsl_generate_mipmap() argument
3096 if (mipmap->ArrayObj == 0) { in setup_glsl_generate_mipmap()
3099 _mesa_GenVertexArrays(1, &mipmap->ArrayObj); in setup_glsl_generate_mipmap()
3100 _mesa_BindVertexArray(mipmap->ArrayObj); in setup_glsl_generate_mipmap()
3103 _mesa_GenBuffersARB(1, &mipmap->VBO); in setup_glsl_generate_mipmap()
3104 _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, mipmap->VBO); in setup_glsl_generate_mipmap()
3114 sampler = setup_texture_sampler(target, mipmap); in setup_glsl_generate_mipmap()
3117 mipmap->ShaderProg = sampler->shader_prog; in setup_glsl_generate_mipmap()
3185 mipmap->ShaderProg = _mesa_CreateProgramObjectARB(); in setup_glsl_generate_mipmap()
3186 _mesa_AttachShader(mipmap->ShaderProg, fs); in setup_glsl_generate_mipmap()
3188 _mesa_AttachShader(mipmap->ShaderProg, vs); in setup_glsl_generate_mipmap()
3190 _mesa_BindAttribLocationARB(mipmap->ShaderProg, 0, "position"); in setup_glsl_generate_mipmap()
3191 _mesa_BindAttribLocationARB(mipmap->ShaderProg, 1, "texcoords"); in setup_glsl_generate_mipmap()
3194 link_program_with_debug(ctx, mipmap->ShaderProg); in setup_glsl_generate_mipmap()
3195 sampler->shader_prog = mipmap->ShaderProg; in setup_glsl_generate_mipmap()
3202 struct gen_mipmap_state *mipmap) in meta_glsl_generate_mipmap_cleanup() argument
3204 if (mipmap->ArrayObj == 0) in meta_glsl_generate_mipmap_cleanup()
3206 _mesa_DeleteVertexArraysAPPLE(1, &mipmap->ArrayObj); in meta_glsl_generate_mipmap_cleanup()
3207 mipmap->ArrayObj = 0; in meta_glsl_generate_mipmap_cleanup()
3208 _mesa_DeleteBuffersARB(1, &mipmap->VBO); in meta_glsl_generate_mipmap_cleanup()
3209 mipmap->VBO = 0; in meta_glsl_generate_mipmap_cleanup()
3211 _mesa_DeleteObjectARB(mipmap->sampler_1d.shader_prog); in meta_glsl_generate_mipmap_cleanup()
3212 _mesa_DeleteObjectARB(mipmap->sampler_2d.shader_prog); in meta_glsl_generate_mipmap_cleanup()
3213 _mesa_DeleteObjectARB(mipmap->sampler_3d.shader_prog); in meta_glsl_generate_mipmap_cleanup()
3214 _mesa_DeleteObjectARB(mipmap->sampler_cubemap.shader_prog); in meta_glsl_generate_mipmap_cleanup()
3215 _mesa_DeleteObjectARB(mipmap->sampler_1d_array.shader_prog); in meta_glsl_generate_mipmap_cleanup()
3216 _mesa_DeleteObjectARB(mipmap->sampler_2d_array.shader_prog); in meta_glsl_generate_mipmap_cleanup()
3218 mipmap->sampler_1d.shader_prog = 0; in meta_glsl_generate_mipmap_cleanup()
3219 mipmap->sampler_2d.shader_prog = 0; in meta_glsl_generate_mipmap_cleanup()
3220 mipmap->sampler_3d.shader_prog = 0; in meta_glsl_generate_mipmap_cleanup()
3221 mipmap->sampler_cubemap.shader_prog = 0; in meta_glsl_generate_mipmap_cleanup()
3222 mipmap->sampler_1d_array.shader_prog = 0; in meta_glsl_generate_mipmap_cleanup()
3223 mipmap->sampler_2d_array.shader_prog = 0; in meta_glsl_generate_mipmap_cleanup()
3236 struct gen_mipmap_state *mipmap = &ctx->Meta->Mipmap; in _mesa_meta_GenerateMipmap() local
3276 setup_glsl_generate_mipmap(ctx, mipmap, target); in _mesa_meta_GenerateMipmap()
3277 _mesa_UseProgramObjectARB(mipmap->ShaderProg); in _mesa_meta_GenerateMipmap()
3280 setup_ff_generate_mipmap(ctx, mipmap); in _mesa_meta_GenerateMipmap()
3284 _mesa_BindVertexArray(mipmap->ArrayObj); in _mesa_meta_GenerateMipmap()
3285 _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, mipmap->VBO); in _mesa_meta_GenerateMipmap()
3293 if (!mipmap->FBO) { in _mesa_meta_GenerateMipmap()
3294 _mesa_GenFramebuffersEXT(1, &mipmap->FBO); in _mesa_meta_GenerateMipmap()
3297 if (!mipmap->Sampler) { in _mesa_meta_GenerateMipmap()
3298 _mesa_GenSamplers(1, &mipmap->Sampler); in _mesa_meta_GenerateMipmap()
3299 _mesa_BindSampler(ctx->Texture.CurrentUnit, mipmap->Sampler); in _mesa_meta_GenerateMipmap()
3301 _mesa_SamplerParameteri(mipmap->Sampler, in _mesa_meta_GenerateMipmap()
3304 _mesa_SamplerParameteri(mipmap->Sampler, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in _mesa_meta_GenerateMipmap()
3305 _mesa_SamplerParameteri(mipmap->Sampler, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); in _mesa_meta_GenerateMipmap()
3306 _mesa_SamplerParameteri(mipmap->Sampler, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); in _mesa_meta_GenerateMipmap()
3307 _mesa_SamplerParameteri(mipmap->Sampler, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); in _mesa_meta_GenerateMipmap()
3314 _mesa_SamplerParameteri(mipmap->Sampler, GL_TEXTURE_SRGB_DECODE_EXT, in _mesa_meta_GenerateMipmap()
3319 _mesa_BindSampler(ctx->Texture.CurrentUnit, mipmap->Sampler); in _mesa_meta_GenerateMipmap()
3322 _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, mipmap->FBO); in _mesa_meta_GenerateMipmap()