mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 18:20:10 +01:00
mesa: more glsl function renaming
(cherry picked from commit d5367622a3)
This commit is contained in:
parent
18dd05fbc5
commit
3d7d6cfbc2
5 changed files with 28 additions and 28 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue