Add missing 'else's to fix extension processing
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 23 Apr 2010 20:32:23 +0000 (13:32 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 23 Apr 2010 20:32:23 +0000 (13:32 -0700)
The missing else-statements caused all of the extensions execpt
GL_ARB_texture_rectangle to be unsupported.

This causes the following tests to pass:

     glslparsertest/glsl2/draw_buffers-04.frag

glsl_parser_extras.cpp

index f7ee891eeb6c87b490c8780a7301baea8380cf7b..1f74cbb39dcea1906604e5b2251317bd101c15df 100644 (file)
@@ -129,7 +129,7 @@ _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp,
                          ? "enable" : "require");
         return false;
       }
-   } if (strcmp(name, "GL_ARB_draw_buffers") == 0) {
+   } else if (strcmp(name, "GL_ARB_draw_buffers") == 0) {
       /* This extension is only supported in fragment shaders.
        */
       if (state->target != fragment_shader) {
@@ -138,7 +138,7 @@ _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp,
         state->ARB_draw_buffers_enable = (ext_mode != extension_disable);
         state->ARB_draw_buffers_warn = (ext_mode == extension_warn);
       }
-   } if (strcmp(name, "GL_ARB_texture_rectangle") == 0) {
+   } else if (strcmp(name, "GL_ARB_texture_rectangle") == 0) {
       state->ARB_texture_rectangle_enable = (ext_mode != extension_disable);
       state->ARB_texture_rectangle_warn = (ext_mode == extension_warn);
    } else {