projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b401948
)
mesa: more glsl function renaming
author
Brian Paul
<brian.paul@tungstengraphics.com>
Fri, 12 Dec 2008 17:32:56 +0000
(10:32 -0700)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Fri, 12 Dec 2008 17:32:56 +0000
(10:32 -0700)
src/mesa/shader/slang/slang_codegen.c
patch
|
blob
|
history
src/mesa/shader/slang/slang_compile_function.c
patch
|
blob
|
history
src/mesa/shader/slang/slang_simplify.c
patch
|
blob
|
history
src/mesa/shader/slang/slang_typeinfo.c
patch
|
blob
|
history
src/mesa/shader/slang/slang_typeinfo.h
patch
|
blob
|
history
diff --git
a/src/mesa/shader/slang/slang_codegen.c
b/src/mesa/shader/slang/slang_codegen.c
index f52d8b40e24484e1be4b95d09a4c1546b263130f..3f31f956fa550b6a3d004513795ff3d6e3e5b19a 100644
(file)
--- a/
src/mesa/shader/slang/slang_codegen.c
+++ b/
src/mesa/shader/slang/slang_codegen.c
@@
-67,11
+67,11
@@
_slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper);
* Returns GL_FALSE otherwise.
*/
static GLboolean
* 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)
{
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);
}
}
@@
-2064,7
+2064,7
@@
_slang_gen_function_call_name(slang_assemble_ctx *A, const char *name,
slang_typeinfo t0;
slang_typeinfo_construct(&t0);
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,
if (!slang_type_specifier_equal(&t0.spec, &fun->header.type.specifier)) {
slang_info_log_error(A->log,
@@
-2158,7
+2158,7
@@
_slang_is_scalar_or_boolean(slang_assemble_ctx *A, slang_operation *oper)
GLint size;
slang_typeinfo_construct(&type);
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;
size = _slang_sizeof_type_specifier(&type.spec);
slang_typeinfo_destruct(&type);
return size == 1;
@@
-2175,7
+2175,7
@@
_slang_is_boolean(slang_assemble_ctx *A, slang_operation *oper)
GLboolean isBool;
slang_typeinfo_construct(&type);
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;
isBool = (type.spec.type == SLANG_SPEC_BOOL);
slang_typeinfo_destruct(&type);
return isBool;
@@
-2656,7
+2656,7
@@
_slang_gen_select(slang_assemble_ctx *A, slang_operation *oper)
/* type of children[0] must be boolean */
slang_typeinfo_construct(&type0);
/* 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) {
isBool = (type0.spec.type == SLANG_SPEC_BOOL);
slang_typeinfo_destruct(&type0);
if (!isBool) {
@@
-2666,8
+2666,8
@@
_slang_gen_select(slang_assemble_ctx *A, slang_operation *oper)
slang_typeinfo_construct(&type1);
slang_typeinfo_construct(&type2);
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);
isEqual = slang_type_specifier_equal(&type1.spec, &type2.spec);
slang_typeinfo_destruct(&type1);
slang_typeinfo_destruct(&type2);
@@
-2881,10
+2881,10
@@
_slang_assignment_compatible(slang_assemble_ctx *A,
}
slang_typeinfo_construct(&t0);
}
slang_typeinfo_construct(&t0);
-
_slang_
typeof_operation(A, op0, &t0);
+ typeof_operation(A, op0, &t0);
slang_typeinfo_construct(&t1);
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);
sz0 = _slang_sizeof_type_specifier(&t0.spec);
sz1 = _slang_sizeof_type_specifier(&t1.spec);
@@
-3170,7
+3170,7
@@
_slang_gen_struct_field(slang_assemble_ctx * A, slang_operation *oper)
/* type of struct */
slang_typeinfo_construct(&ti);
/* 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 */
if (_slang_type_is_vector(ti.spec.type)) {
/* the field should be a swizzle */
@@
-3222,7
+3222,7
@@
_slang_gen_struct_field(slang_assemble_ctx * A, slang_operation *oper)
/* type of field */
slang_typeinfo_construct(&field_ti);
/* 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)
fieldSize = _slang_sizeof_type_specifier(&field_ti.spec);
if (fieldSize > 0)
@@
-3273,7
+3273,7
@@
_slang_gen_array_element(slang_assemble_ctx * A, slang_operation *oper)
/* get array's type info */
slang_typeinfo_construct(&array_ti);
/* 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;" */
if (_slang_type_is_vector(array_ti.spec.type)) {
/* indexing a simple vector type: "vec4 v; v[0]=p;" */
@@
-3309,7
+3309,7
@@
_slang_gen_array_element(slang_assemble_ctx * A, slang_operation *oper)
/* size of array element */
slang_typeinfo_construct(&elem_ti);
/* 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))
elemSize = _slang_sizeof_type_specifier(&elem_ti.spec);
if (_slang_type_is_matrix(array_ti.spec.type))
@@
-3374,10
+3374,10
@@
_slang_gen_compare(slang_assemble_ctx *A, slang_operation *oper,
slang_ir_node *n;
slang_typeinfo_construct(&t0);
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_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) {
if (t0.spec.type == SLANG_SPEC_ARRAY ||
t1.spec.type == SLANG_SPEC_ARRAY) {
diff --git
a/src/mesa/shader/slang/slang_compile_function.c
b/src/mesa/shader/slang/slang_compile_function.c
index c460627a41775cd0aae4ddfb952de6c0e50c5290..4dd885176d445d920ecfd02e18a83752c02f48c3 100644
(file)
--- a/
src/mesa/shader/slang/slang_compile_function.c
+++ b/
src/mesa/shader/slang/slang_compile_function.c
@@
-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;
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;
}
}
return NULL;
}
}
diff --git
a/src/mesa/shader/slang/slang_simplify.c
b/src/mesa/shader/slang/slang_simplify.c
index 969130b978915e7ae738573f3e0c48910580e9d5..b8a21f642cb1375cf5938c26bb51e45e534e33b4 100644
(file)
--- a/
src/mesa/shader/slang/slang_simplify.c
+++ b/
src/mesa/shader/slang/slang_simplify.c
@@
-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;
/* 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;
&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;
/* 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;
&argType, atoms, log)) {
slang_typeinfo_destruct(&argType);
return GL_FALSE;
diff --git
a/src/mesa/shader/slang/slang_typeinfo.c
b/src/mesa/shader/slang/slang_typeinfo.c
index 5ee54c3a1197ce3c3221a4c8ed8fdeafda945e05..3978df751d1d3d80676f4f6d50aff3e804cea8d2 100644
(file)
--- a/
src/mesa/shader/slang/slang_typeinfo.c
+++ b/
src/mesa/shader/slang/slang_typeinfo.c
@@
-490,7
+490,7
@@
typeof_math_call(const char *name, slang_operation *call,
* \return GL_TRUE for success, GL_FALSE if failure
*/
GLboolean
* \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,
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:
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:
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 */
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;
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 */
/*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;
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:
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;
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_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;
}
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_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;
}
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:
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;
return GL_FALSE;
ti->can_be_referenced = GL_FALSE;
ti->is_swizzled = GL_FALSE;
diff --git
a/src/mesa/shader/slang/slang_typeinfo.h
b/src/mesa/shader/slang/slang_typeinfo.h
index 383715926173e5ea36fee6cb219c906e0a2f8b27..e6fecd350af05b2766ea5d302b15bf7f8fddede7 100644
(file)
--- a/
src/mesa/shader/slang/slang_typeinfo.h
+++ b/
src/mesa/shader/slang/slang_typeinfo.h
@@
-213,7
+213,7
@@
slang_typeinfo_destruct(slang_typeinfo *);
extern GLboolean
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);
const struct slang_name_space_ *,
slang_typeinfo *, slang_atom_pool *,
slang_info_log *log);