mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
meta: Always enable GL_EXT_texture_array in mipmap shader
'#extension foo: enable' is harmless. The functionality is only actually enabled if the extension is supported. The shader won't use the functionality if it's not supported, so we're fine. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
parent
0e973b7498
commit
751737f497
1 changed files with 2 additions and 7 deletions
|
|
@ -3102,7 +3102,6 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
|
|||
|
||||
if (ctx->API == API_OPENGLES2 || ctx->Const.GLSLVersion < 130) {
|
||||
const char *fs_template;
|
||||
const char *extension_mode;
|
||||
|
||||
vs_source =
|
||||
"attribute vec2 position;\n"
|
||||
|
|
@ -3114,7 +3113,7 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
|
|||
" gl_Position = vec4(position, 0.0, 1.0);\n"
|
||||
"}\n";
|
||||
fs_template =
|
||||
"#extension GL_EXT_texture_array : %s\n"
|
||||
"#extension GL_EXT_texture_array : enable\n"
|
||||
"uniform %s texSampler;\n"
|
||||
"varying vec3 texCoords;\n"
|
||||
"void main()\n"
|
||||
|
|
@ -3122,12 +3121,8 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
|
|||
" gl_FragColor = %s(texSampler, %s);\n"
|
||||
"}\n";
|
||||
|
||||
extension_mode = ((target == GL_TEXTURE_1D_ARRAY) ||
|
||||
(target == GL_TEXTURE_2D_ARRAY)) ?
|
||||
"require" : "disable";
|
||||
|
||||
fs_source = ralloc_asprintf(mem_ctx, fs_template,
|
||||
extension_mode, sampler->type,
|
||||
sampler->type,
|
||||
sampler->func, sampler->texcoords);
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue