nir/vtn: Handle integer sampling coordinates
[mesa.git] / src / compiler / glsl / link_functions.cpp
index e4f77be717fa2c6503736710579b332c2c16c5be..4998d39dc597a16e99f411fc28566c83a52ef836 100644 (file)
@@ -21,7 +21,6 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include "main/core.h"
 #include "glsl_symbol_table.h"
 #include "glsl_parser_extras.h"
 #include "ir.h"
@@ -29,6 +28,7 @@
 #include "util/set.h"
 #include "util/hash_table.h"
 #include "linker.h"
+#include "main/mtypes.h"
 
 static ir_function_signature *
 find_matching_signature(const char *name, const exec_list *actual_parameters,
@@ -47,8 +47,7 @@ public:
       this->success = true;
       this->linked = linked;
 
-      this->locals = _mesa_set_create(NULL, _mesa_hash_pointer,
-                                      _mesa_key_pointer_equal);
+      this->locals = _mesa_pointer_set_create(NULL);
    }
 
    ~call_link_visitor()
@@ -75,7 +74,7 @@ public:
       const char *const name = callee->function_name();
 
       /* We don't actually need to find intrinsics; they're not real */
-      if (callee->is_intrinsic)
+      if (callee->is_intrinsic())
          return visit_continue;
 
       /* Determine if the requested function signature already exists in the
@@ -148,8 +147,7 @@ public:
        * replace signature stored in a function.  One could easily be added,
        * but this avoids the need.
        */
-      struct hash_table *ht = _mesa_hash_table_create(NULL, _mesa_hash_pointer,
-                                                      _mesa_key_pointer_equal);
+      struct hash_table *ht = _mesa_pointer_hash_table_create(NULL);
 
       exec_list formal_parameters;
       foreach_in_list(const ir_instruction, original, &sig->parameters) {
@@ -161,7 +159,7 @@ public:
 
       linked_sig->replace_parameters(&formal_parameters);
 
-      linked_sig->is_intrinsic = sig->is_intrinsic;
+      linked_sig->intrinsic_id = sig->intrinsic_id;
 
       if (sig->is_defined) {
          foreach_in_list(const ir_instruction, original, &sig->body) {
@@ -322,7 +320,7 @@ find_matching_signature(const char *name, const exec_list *actual_parameters,
       ir_function_signature *sig =
          f->matching_signature(NULL, actual_parameters, false);
 
-      if (sig && (sig->is_defined || sig->is_intrinsic))
+      if (sig && (sig->is_defined || sig->is_intrinsic()))
          return sig;
    }