Mesa (master): glsl: Allow overloading of built-ins without hiding in GLSL ES.

Kenneth Graunke kwg at kemper.freedesktop.org
Wed Sep 8 00:46:15 UTC 2010


Module: Mesa
Branch: master
Commit: a98d5a5ac8b61edc14f60836e5a997bb88fc5c80
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a98d5a5ac8b61edc14f60836e5a997bb88fc5c80

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sun Sep  5 01:51:28 2010 -0700

glsl: Allow overloading of built-ins without hiding in GLSL ES.

The rules are explicitly different from desktop GLSL.

---

 src/glsl/ast_to_hir.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index b8a01b8..8322dbf 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -2279,7 +2279,7 @@ ast_function::hir(exec_list *instructions,
     * that the previously seen signature does not have an associated definition.
     */
    f = state->symbols->get_function(name);
-   if (f != NULL && !f->has_builtin_signature()) {
+   if (f != NULL && (state->es_shader || !f->has_builtin_signature())) {
       sig = f->exact_matching_signature(&hir_parameters);
       if (sig != NULL) {
 	 const char *badvar = sig->qualifiers_match(&hir_parameters);




More information about the mesa-commit mailing list