glsl: subroutine signatures must match exactly
[mesa.git] / src / compiler / glsl / lower_vertex_id.cpp
index 6f46945026c366011a458bff8654a41a6c094625..3b641caa01ee8c09ecf83b34213645c5efcd1c6a 100644 (file)
@@ -37,6 +37,8 @@
 #include "ir_builder.h"
 #include "linker.h"
 #include "program/prog_statevars.h"
+#include "builtin_functions.h"
+#include "main/mtypes.h"
 
 namespace {
 
@@ -122,7 +124,7 @@ lower_vertex_id_visitor::visit(ir_dereference_variable *ir)
 }
 
 bool
-lower_vertex_id(gl_shader *shader)
+lower_vertex_id(gl_linked_shader *shader)
 {
    /* gl_VertexID only exists in the vertex shader.
     */
@@ -130,7 +132,7 @@ lower_vertex_id(gl_shader *shader)
       return false;
 
    ir_function_signature *const main_sig =
-      _mesa_get_main_function_signature(shader);
+      _mesa_get_main_function_signature(shader->symbols);
    if (main_sig == NULL) {
       assert(main_sig != NULL);
       return false;