summaryrefslogtreecommitdiff
path: root/src/glsl/linker.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2014-07-24 14:05:40 -0700
committerKenneth Graunke <kenneth@whitecape.org>2014-08-04 15:47:06 -0700
commit21129d4de300f1a934d02e30347c465520afef9e (patch)
tree499101703099b43852ce4119507131f9fd95550b /src/glsl/linker.cpp
parentf82f2fb3dc770902f1657ab1c22e6004faa3afab (diff)
glsl: Make it possible to ignore built-ins when matching signatures.
Historically, we've implemented the rules for overriding built-in functions by creating multiple ir_functions and relying on the symbol table to hide the one containing built-in functions. That works, but has a few drawbacks, so the next patch will change it. Instead, we'll have a single ir_function for a particular name, which will contain both built-in and user-defined signatures. Passing an extra parameter to matching_signature makes it easy to ignore built-ins when they're supposed to be hidden. I didn't add the parameter to exact_matching_signature since it wasn't necessary. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r--src/glsl/linker.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index d588bc63ec4..0096fb023dc 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -1129,7 +1129,8 @@ get_main_function_signature(gl_shader *sh)
* We don't have to check for multiple definitions of main (in multiple
* shaders) because that would have already been caught above.
*/
- ir_function_signature *sig = f->matching_signature(NULL, &void_parameters);
+ ir_function_signature *sig =
+ f->matching_signature(NULL, &void_parameters, false);
if ((sig != NULL) && sig->is_defined) {
return sig;
}