summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-11-10 10:45:50 -0700
committerBrian Paul <[email protected]>2008-11-10 12:39:36 -0700
commit242c0cb543183682f4f023a6f1948630dc5bae09 (patch)
tree43cb9e5a24d3017476beaba302f2c0b368cd8bd3 /src/mesa/shader
parent80c8017a643dfb655e4e1500e1c57e3908529c27 (diff)
mesa: fix logic error in GLSL linker when looking for main() shaders
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/slang/slang_link.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index 511e7406159..4361efc56e5 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -465,12 +465,17 @@ _slang_link(GLcontext *ctx,
fragProg = NULL;
for (i = 0; i < shProg->NumShaders; i++) {
struct gl_shader *shader = shProg->Shaders[i];
- if (shader->Type == GL_VERTEX_SHADER && shader->Main)
- vertProg = vertex_program(shader->Program);
- else if (shader->Type == GL_FRAGMENT_SHADER && shader->Main)
- fragProg = fragment_program(shader->Program);
- else
+ if (shader->Type == GL_VERTEX_SHADER) {
+ if (shader->Main)
+ vertProg = vertex_program(shader->Program);
+ }
+ else if (shader->Type == GL_FRAGMENT_SHADER) {
+ if (shader->Main)
+ fragProg = fragment_program(shader->Program);
+ }
+ else {
_mesa_problem(ctx, "unexpected shader target in slang_link()");
+ }
}
#if FEATURE_es2_glsl