summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-10-05 15:17:29 -0700
committerIan Romanick <[email protected]>2012-10-07 20:35:47 -0700
commit751737f4975d922d79ae00f3145832043fcc8bab (patch)
tree8528ee0a6434a059b794a66dbb3d85db6a583b59
parent0e973b7498fc6e120af0d8305273e045fe96d398 (diff)
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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
-rw-r--r--src/mesa/drivers/common/meta.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 8b5cfe44ab3..ba932c78ba6 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -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 {