* Get the function signature for main from a shader
*/
ir_function_signature *
-_mesa_get_main_function_signature(gl_shader *sh)
+_mesa_get_main_function_signature(glsl_symbol_table *symbols)
{
- ir_function *const f = sh->symbols->get_function("main");
+ ir_function *const f = symbols->get_function("main");
if (f != NULL) {
exec_list void_parameters;
if (shader->Stage == MESA_SHADER_COMPUTE &&
ctx->Const.LowerCsDerivedVariables) {
ir_function_signature *const main_sig =
- _mesa_get_main_function_signature(shader);
+ _mesa_get_main_function_signature(shader->symbols);
if (main_sig != NULL)
initialize_cs_derived_variables(shader, main_sig);
_mesa_glsl_get_builtin_function_shader(void);
extern ir_function_signature *
-_mesa_get_main_function_signature(gl_shader *sh);
+_mesa_get_main_function_signature(glsl_symbol_table *symbols);
extern void
_mesa_glsl_release_functions(void);
*/
gl_shader *main = NULL;
for (unsigned i = 0; i < num_shaders; i++) {
- if (_mesa_get_main_function_signature(shader_list[i]) != NULL) {
+ if (!_mesa_get_main_function_signature(shader_list[i]->symbols)) {
main = shader_list[i];
break;
}
* copy of the original shader that contained the main function).
*/
ir_function_signature *const main_sig =
- _mesa_get_main_function_signature(linked);
+ _mesa_get_main_function_signature(linked->symbols);
/* Move any instructions other than variable declarations or function
* declarations into main.
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;