mesa: more glsl function renaming
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 12 Dec 2008 17:32:56 +0000 (10:32 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 6 Jan 2009 16:09:56 +0000 (09:09 -0700)
(cherry picked from commit d5367622a3f1cffe67af0fb6fca99ad02eefd374)

src/mesa/shader/slang/slang_codegen.c
src/mesa/shader/slang/slang_compile_function.c
src/mesa/shader/slang/slang_simplify.c
src/mesa/shader/slang/slang_typeinfo.c
src/mesa/shader/slang/slang_typeinfo.h

index 9a5980c1e90b212fe7ad2d537357c8b13d42e36e..04ed8496e64e136d38da5145b8f45fa917378731 100644 (file)
@@ -67,11 +67,11 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper);
  * Returns GL_FALSE otherwise.
  */
 static GLboolean
-_slang_typeof_operation(const struct slang_assemble_ctx_ * A,
+typeof_operation(const struct slang_assemble_ctx_ * A,
                         slang_operation * op,
                         slang_typeinfo * ti)
 {
-   return _slang_typeof_operation_(op, &A->space, ti, A->atoms, A->log);
+   return _slang_typeof_operation(op, &A->space, ti, A->atoms, A->log);
 }
 
 
@@ -2061,7 +2061,7 @@ _slang_gen_function_call_name(slang_assemble_ctx *A, const char *name,
       slang_typeinfo t0;
 
       slang_typeinfo_construct(&t0);
-      _slang_typeof_operation(A, dest, &t0);
+      typeof_operation(A, dest, &t0);
 
       if (!slang_type_specifier_equal(&t0.spec, &fun->header.type.specifier)) {
          slang_info_log_error(A->log,
@@ -2155,7 +2155,7 @@ _slang_is_scalar_or_boolean(slang_assemble_ctx *A, slang_operation *oper)
    GLint size;
 
    slang_typeinfo_construct(&type);
-   _slang_typeof_operation(A, oper, &type);
+   typeof_operation(A, oper, &type);
    size = _slang_sizeof_type_specifier(&type.spec);
    slang_typeinfo_destruct(&type);
    return size == 1;
@@ -2172,7 +2172,7 @@ _slang_is_boolean(slang_assemble_ctx *A, slang_operation *oper)
    GLboolean isBool;
 
    slang_typeinfo_construct(&type);
-   _slang_typeof_operation(A, oper, &type);
+   typeof_operation(A, oper, &type);
    isBool = (type.spec.type == SLANG_SPEC_BOOL);
    slang_typeinfo_destruct(&type);
    return isBool;
@@ -2653,7 +2653,7 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper)
 
    /* type of children[0] must be boolean */
    slang_typeinfo_construct(&type0);
-   _slang_typeof_operation(A, &oper->children[0], &type0);
+   typeof_operation(A, &oper->children[0], &type0);
    isBool = (type0.spec.type == SLANG_SPEC_BOOL);
    slang_typeinfo_destruct(&type0);
    if (!isBool) {
@@ -2663,8 +2663,8 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper)
 
    slang_typeinfo_construct(&type1);
    slang_typeinfo_construct(&type2);
-   _slang_typeof_operation(A, &oper->children[1], &type1);
-   _slang_typeof_operation(A, &oper->children[2], &type2);
+   typeof_operation(A, &oper->children[1], &type1);
+   typeof_operation(A, &oper->children[2], &type2);
    isEqual = slang_type_specifier_equal(&type1.spec, &type2.spec);
    slang_typeinfo_destruct(&type1);
    slang_typeinfo_destruct(&type2);
@@ -2878,10 +2878,10 @@ _slang_assignment_compatible(slang_assemble_ctx *A,
    }
 
    slang_typeinfo_construct(&t0);
-   _slang_typeof_operation(A, op0, &t0);
+   typeof_operation(A, op0, &t0);
 
    slang_typeinfo_construct(&t1);
-   _slang_typeof_operation(A, op1, &t1);
+   typeof_operation(A, op1, &t1);
 
    sz0 = _slang_sizeof_type_specifier(&t0.spec);
    sz1 = _slang_sizeof_type_specifier(&t1.spec);
@@ -3167,7 +3167,7 @@ _slang_gen_struct_field(slang_assemble_ctx * A, slang_operation *oper)
 
    /* type of struct */
    slang_typeinfo_construct(&ti);
-   _slang_typeof_operation(A, &oper->children[0], &ti);
+   typeof_operation(A, &oper->children[0], &ti);
 
    if (_slang_type_is_vector(ti.spec.type)) {
       /* the field should be a swizzle */
@@ -3219,7 +3219,7 @@ _slang_gen_struct_field(slang_assemble_ctx * A, slang_operation *oper)
 
       /* type of field */
       slang_typeinfo_construct(&field_ti);
-      _slang_typeof_operation(A, oper, &field_ti);
+      typeof_operation(A, oper, &field_ti);
 
       fieldSize = _slang_sizeof_type_specifier(&field_ti.spec);
       if (fieldSize > 0)
@@ -3270,7 +3270,7 @@ _slang_gen_array_element(slang_assemble_ctx * A, slang_operation *oper)
 
    /* get array's type info */
    slang_typeinfo_construct(&array_ti);
-   _slang_typeof_operation(A, &oper->children[0], &array_ti);
+   typeof_operation(A, &oper->children[0], &array_ti);
 
    if (_slang_type_is_vector(array_ti.spec.type)) {
       /* indexing a simple vector type: "vec4 v; v[0]=p;" */
@@ -3306,7 +3306,7 @@ _slang_gen_array_element(slang_assemble_ctx * A, slang_operation *oper)
 
       /* size of array element */
       slang_typeinfo_construct(&elem_ti);
-      _slang_typeof_operation(A, oper, &elem_ti);
+      typeof_operation(A, oper, &elem_ti);
       elemSize = _slang_sizeof_type_specifier(&elem_ti.spec);
 
       if (_slang_type_is_matrix(array_ti.spec.type))
@@ -3371,10 +3371,10 @@ _slang_gen_compare(slang_assemble_ctx *A, slang_operation *oper,
    slang_ir_node *n;
    
    slang_typeinfo_construct(&t0);
-   _slang_typeof_operation(A, &oper->children[0], &t0);
+   typeof_operation(A, &oper->children[0], &t0);
 
    slang_typeinfo_construct(&t1);
-   _slang_typeof_operation(A, &oper->children[0], &t1);
+   typeof_operation(A, &oper->children[0], &t1);
 
    if (t0.spec.type == SLANG_SPEC_ARRAY ||
        t1.spec.type == SLANG_SPEC_ARRAY) {
index c460627a41775cd0aae4ddfb952de6c0e50c5290..4dd885176d445d920ecfd02e18a83752c02f48c3 100644 (file)
@@ -210,7 +210,7 @@ _slang_function_locate(const slang_function_scope * funcs, slang_atom a_name,
    for (i = 0; i < num_args; i++) {
       if (!slang_typeinfo_construct(&arg_ti[i]))
          return NULL;
-      if (!_slang_typeof_operation_(&args[i], space, &arg_ti[i], atoms, log)) {
+      if (!_slang_typeof_operation(&args[i], space, &arg_ti[i], atoms, log)) {
          return NULL;
       }
    }
index 969130b978915e7ae738573f3e0c48910580e9d5..b8a21f642cb1375cf5938c26bb51e45e534e33b4 100644 (file)
@@ -380,7 +380,7 @@ _slang_cast_func_params(slang_operation *callOper, const slang_function *fun,
       /* Get type of arg[i] */
       if (!slang_typeinfo_construct(&argType))
          return GL_FALSE;
-      if (!_slang_typeof_operation_(&callOper->children[i], space,
+      if (!_slang_typeof_operation(&callOper->children[i], space,
                                     &argType, atoms, log)) {
          slang_typeinfo_destruct(&argType);
          return GL_FALSE;
@@ -464,7 +464,7 @@ _slang_adapt_call(slang_operation *callOper, const slang_function *fun,
          /* Get type of arg[i] */
          if (!slang_typeinfo_construct(&argType))
             return GL_FALSE;
-         if (!_slang_typeof_operation_(&callOper->children[i], space,
+         if (!_slang_typeof_operation(&callOper->children[i], space,
                                        &argType, atoms, log)) {
             slang_typeinfo_destruct(&argType);
             return GL_FALSE;
index 5ee54c3a1197ce3c3221a4c8ed8fdeafda945e05..3978df751d1d3d80676f4f6d50aff3e804cea8d2 100644 (file)
@@ -490,7 +490,7 @@ typeof_math_call(const char *name, slang_operation *call,
  * \return GL_TRUE for success, GL_FALSE if failure
  */
 GLboolean
-_slang_typeof_operation_(slang_operation * op,
+_slang_typeof_operation(slang_operation * op,
                          const slang_name_space * space,
                          slang_typeinfo * ti,
                          slang_atom_pool * atoms,
@@ -522,7 +522,7 @@ _slang_typeof_operation_(slang_operation * op,
    case SLANG_OPER_DIVASSIGN:
    case SLANG_OPER_PREINCREMENT:
    case SLANG_OPER_PREDECREMENT:
-      if (!_slang_typeof_operation_(op->children, space, ti, atoms, log))
+      if (!_slang_typeof_operation(op->children, space, ti, atoms, log))
          return GL_FALSE;
       break;
    case SLANG_OPER_LITERAL_BOOL:
@@ -605,7 +605,7 @@ _slang_typeof_operation_(slang_operation * op,
       break;
    case SLANG_OPER_SEQUENCE:
       /* TODO: check [0] and [1] if they match */
-      if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms, log)) {
+      if (!_slang_typeof_operation(&op->children[1], space, ti, atoms, log)) {
          return GL_FALSE;
       }
       ti->can_be_referenced = GL_FALSE;
@@ -619,7 +619,7 @@ _slang_typeof_operation_(slang_operation * op,
       /*case SLANG_OPER_ANDASSIGN: */
    case SLANG_OPER_SELECT:
       /* TODO: check [1] and [2] if they match */
-      if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms, log)) {
+      if (!_slang_typeof_operation(&op->children[1], space, ti, atoms, log)) {
          return GL_FALSE;
       }
       ti->can_be_referenced = GL_FALSE;
@@ -652,7 +652,7 @@ _slang_typeof_operation_(slang_operation * op,
       break;
    /*case SLANG_OPER_MODULUS: */
    case SLANG_OPER_PLUS:
-      if (!_slang_typeof_operation_(op->children, space, ti, atoms, log))
+      if (!_slang_typeof_operation(op->children, space, ti, atoms, log))
          return GL_FALSE;
       ti->can_be_referenced = GL_FALSE;
       ti->is_swizzled = GL_FALSE;
@@ -669,7 +669,7 @@ _slang_typeof_operation_(slang_operation * op,
 
          if (!slang_typeinfo_construct(&_ti))
             return GL_FALSE;
-         if (!_slang_typeof_operation_(op->children, space, &_ti, atoms, log)) {
+         if (!_slang_typeof_operation(op->children, space, &_ti, atoms, log)) {
             slang_typeinfo_destruct(&_ti);
             return GL_FALSE;
          }
@@ -763,7 +763,7 @@ _slang_typeof_operation_(slang_operation * op,
 
          if (!slang_typeinfo_construct(&_ti))
             return GL_FALSE;
-         if (!_slang_typeof_operation_(op->children, space, &_ti, atoms, log)) {
+         if (!_slang_typeof_operation(op->children, space, &_ti, atoms, log)) {
             slang_typeinfo_destruct(&_ti);
             return GL_FALSE;
          }
@@ -869,7 +869,7 @@ _slang_typeof_operation_(slang_operation * op,
       break;
    case SLANG_OPER_POSTINCREMENT:
    case SLANG_OPER_POSTDECREMENT:
-      if (!_slang_typeof_operation_(op->children, space, ti, atoms, log))
+      if (!_slang_typeof_operation(op->children, space, ti, atoms, log))
          return GL_FALSE;
       ti->can_be_referenced = GL_FALSE;
       ti->is_swizzled = GL_FALSE;
index 383715926173e5ea36fee6cb219c906e0a2f8b27..e6fecd350af05b2766ea5d302b15bf7f8fddede7 100644 (file)
@@ -213,7 +213,7 @@ slang_typeinfo_destruct(slang_typeinfo *);
 
 
 extern GLboolean
-_slang_typeof_operation_(struct slang_operation_ *,
+_slang_typeof_operation(struct slang_operation_ *,
                          const struct slang_name_space_ *,
                          slang_typeinfo *, slang_atom_pool *,
                          slang_info_log *log);