mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
mesa: glsl: generate error for main(any args)
This commit is contained in:
parent
ab0d13dd60
commit
bf3040d476
1 changed files with 6 additions and 0 deletions
|
|
@ -2025,6 +2025,12 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit,
|
|||
A.vartable = o.vartable;
|
||||
A.log = C->L;
|
||||
|
||||
/* main() takes no parameters */
|
||||
if (mainFunc->param_count > 0) {
|
||||
slang_info_log_error(A.log, "main() takes no arguments");
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
_slang_codegen_function(&A, mainFunc);
|
||||
|
||||
shader->Main = GL_TRUE; /* this shader defines main() */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue