linker: Remove redundant check for 'main' in shaders
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 16 Jul 2010 22:52:40 +0000 (15:52 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 19 Jul 2010 21:50:43 +0000 (14:50 -0700)
This is now handled in link_intrastage_shaders.

src/glsl/linker.cpp

index 4933686b5e9bac8d847c46023067eb192c79ce73..a4776b1941cd0807c4388397ee996fa14b3057bd 100644 (file)
@@ -192,11 +192,6 @@ validate_vertex_shader_executable(struct gl_shader_program *prog,
    if (shader == NULL)
       return true;
 
-   if (!shader->symbols->get_function("main")) {
-      linker_error_printf(prog, "vertex shader lacks `main'\n");
-      return false;
-   }
-
    find_assignment_visitor find("gl_Position");
    find.run(shader->ir);
    if (!find.variable_found()) {
@@ -221,11 +216,6 @@ validate_fragment_shader_executable(struct gl_shader_program *prog,
    if (shader == NULL)
       return true;
 
-   if (!shader->symbols->get_function("main")) {
-      linker_error_printf(prog, "fragment shader lacks `main'\n");
-      return false;
-   }
-
    find_assignment_visitor frag_color("gl_FragColor");
    find_assignment_visitor frag_data("gl_FragData");