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