[Mesa-dev] [PATCH] mesa: set GLSL 1.20 for the fixed-function fragment shader
Marek Olšák
maraeo at gmail.com
Sat Jan 7 14:51:43 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
This fixes broken depth texturing after:
commit 22639a6e19f95902aef23474ad672bf489231ea7
Author: Timothy Arceri <timothy.arceri at collabora.com>
Date: Mon Nov 21 00:29:29 2016 +1100
st/mesa: get Version from gl_program rather than gl_shader_program
---
src/mesa/main/ff_fragment_shader.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
index 48b84e8..a13a5de 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -1215,21 +1215,22 @@ create_new_program(struct gl_context *ctx, struct state_key *key)
p.shader_program = _mesa_new_shader_program(0);
/* Tell the linker to ignore the fact that we're building a
* separate shader, in case we're in a GLES2 context that would
* normally reject that. The real problem is that we're building a
* fixed function program in a GLES2 context at all, but that's a
* big mess to clean up.
*/
p.shader_program->SeparateShader = GL_TRUE;
- state->language_version = 130;
+ /* Don't use 1.30, because depth texturing behaves differently there. */
+ state->language_version = 120;
state->es_shader = false;
if (_mesa_is_gles(ctx) && ctx->Extensions.OES_EGL_image_external)
state->OES_EGL_image_external_enable = true;
_mesa_glsl_initialize_types(state);
_mesa_glsl_initialize_variables(p.instructions, state);
for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {
p.src_texture[unit] = NULL;
p.texcoord_tex[unit] = NULL;
}
--
2.7.4
More information about the mesa-dev
mailing list