diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 26 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_compile_operation.h | 2 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_simplify.c | 14 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_typeinfo.c | 36 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_typeinfo.h | 12 |
5 files changed, 45 insertions, 45 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index d972118de62..295292e0761 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1284,20 +1284,20 @@ _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, /* compare parameter / argument types */ for (j = 0; j < num_args; j++) { - slang_assembly_typeinfo ti; + slang_typeinfo ti; - if (!slang_assembly_typeinfo_construct(&ti)) + if (!slang_typeinfo_construct(&ti)) return NULL; if (!_slang_typeof_operation_(&args[j], space, &ti, atoms)) { - slang_assembly_typeinfo_destruct(&ti); + slang_typeinfo_destruct(&ti); return NULL; } if (!slang_type_specifier_equal(&ti.spec, &f->parameters->variables[j/* + haveRetValue*/]->type.specifier)) { - slang_assembly_typeinfo_destruct(&ti); + slang_typeinfo_destruct(&ti); break; } - slang_assembly_typeinfo_destruct(&ti); + slang_typeinfo_destruct(&ti); /* "out" and "inout" formal parameter requires the actual parameter to be l-value */ if (!ti.can_be_referenced && @@ -1667,14 +1667,14 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) slang_ir_node *altLab, *endLab; slang_ir_node *tree, *tmpDecl, *tmpVar, *cond, *cjump, *jump; slang_ir_node *bodx, *body, *assignx, *assigny; - slang_assembly_typeinfo type; + slang_typeinfo type; int size; assert(oper->type == slang_oper_select); assert(oper->num_children == 3); /* size of x or y's type */ - slang_assembly_typeinfo_construct(&type); + slang_typeinfo_construct(&type); _slang_typeof_operation(A, &oper->children[1], &type); size = _slang_sizeof_type_specifier(&type.spec); assert(size > 0); @@ -2110,9 +2110,9 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) static slang_ir_node * _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) { - slang_assembly_typeinfo ti; + slang_typeinfo ti; - slang_assembly_typeinfo_construct(&ti); + slang_typeinfo_construct(&ti); _slang_typeof_operation(A, &oper->children[0], &ti); if (_slang_type_is_vector(ti.spec.type)) { @@ -2167,10 +2167,10 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) static slang_ir_node * _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) { - slang_assembly_typeinfo array_ti; + slang_typeinfo array_ti; /* get array's type info */ - slang_assembly_typeinfo_construct(&array_ti); + slang_typeinfo_construct(&array_ti); _slang_typeof_operation(A, &oper->children[0], &array_ti); if (_slang_type_is_vector(array_ti.spec.type)) { @@ -2201,12 +2201,12 @@ _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) } else { /* conventional array */ - slang_assembly_typeinfo elem_ti; + slang_typeinfo elem_ti; slang_ir_node *elem, *array, *index; GLint elemSize; /* size of array element */ - slang_assembly_typeinfo_construct(&elem_ti); + slang_typeinfo_construct(&elem_ti); _slang_typeof_operation(A, oper, &elem_ti); elemSize = _slang_sizeof_type_specifier(&elem_ti.spec); assert(elemSize >= 1); diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index ad52b6690d5..0ce9bbad811 100644 --- a/src/mesa/shader/slang/slang_compile_operation.h +++ b/src/mesa/shader/slang/slang_compile_operation.h @@ -122,7 +122,7 @@ typedef struct slang_operation_ struct slang_function_ *fun; /**< If type == slang_oper_call */ struct slang_variable_ *var; /**< If type == slang_oper_identier */ slang_fully_specified_type *datatype; /**< Type of this operation */ - slang_assembly_typeinfo ti; + slang_typeinfo ti; } slang_operation; diff --git a/src/mesa/shader/slang/slang_simplify.c b/src/mesa/shader/slang/slang_simplify.c index bf6afe45322..ef8b2fedd80 100644 --- a/src/mesa/shader/slang/slang_simplify.c +++ b/src/mesa/shader/slang/slang_simplify.c @@ -294,15 +294,15 @@ _slang_adapt_call(slang_operation *callOper, const slang_function *fun, * into individual floats/ints and try to match the function params. */ for (i = 0; i < numParams; i++) { - slang_assembly_typeinfo argType; + slang_typeinfo argType; GLint argSz, j; /* Get type of arg[i] */ - if (!slang_assembly_typeinfo_construct(&argType)) + if (!slang_typeinfo_construct(&argType)) return GL_FALSE; if (!_slang_typeof_operation_(&callOper->children[i], space, &argType, atoms)) { - slang_assembly_typeinfo_destruct(&argType); + slang_typeinfo_destruct(&argType); return GL_FALSE; } @@ -369,15 +369,15 @@ _slang_adapt_call(slang_operation *callOper, const slang_function *fun, * x = foo(int(3.15), bool(9)) */ for (i = 0; i < numParams; i++) { - slang_assembly_typeinfo argType; + slang_typeinfo argType; slang_variable *paramVar = fun->parameters->variables[i]; /* Get type of arg[i] */ - if (!slang_assembly_typeinfo_construct(&argType)) + if (!slang_typeinfo_construct(&argType)) return GL_FALSE; if (!_slang_typeof_operation_(&callOper->children[i], space, &argType, atoms)) { - slang_assembly_typeinfo_destruct(&argType); + slang_typeinfo_destruct(&argType); return GL_FALSE; } @@ -398,7 +398,7 @@ _slang_adapt_call(slang_operation *callOper, const slang_function *fun, callOper->children[i].children = child; } - slang_assembly_typeinfo_destruct(&argType); + slang_typeinfo_destruct(&argType); } if (dbg) { diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index d48113a14a4..cfed54276d7 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -230,7 +230,7 @@ slang_type_specifier_equal(const slang_type_specifier * x, GLboolean -slang_assembly_typeinfo_construct(slang_assembly_typeinfo * ti) +slang_typeinfo_construct(slang_typeinfo * ti) { slang_type_specifier_ctr(&ti->spec); ti->array_len = 0; @@ -238,7 +238,7 @@ slang_assembly_typeinfo_construct(slang_assembly_typeinfo * ti) } GLvoid -slang_assembly_typeinfo_destruct(slang_assembly_typeinfo * ti) +slang_typeinfo_destruct(slang_typeinfo * ti) { slang_type_specifier_dtr(&ti->spec); } @@ -274,7 +274,7 @@ typeof_existing_function(const char *name, const slang_operation * params, GLboolean _slang_typeof_operation(const slang_assemble_ctx * A, const slang_operation * op, - slang_assembly_typeinfo * ti) + slang_typeinfo * ti) { return _slang_typeof_operation_(op, &A->space, ti, A->atoms); } @@ -291,7 +291,7 @@ _slang_typeof_operation(const slang_assemble_ctx * A, GLboolean _slang_typeof_operation_(const slang_operation * op, const slang_name_space * space, - slang_assembly_typeinfo * ti, + slang_typeinfo * ti, slang_atom_pool * atoms) { ti->can_be_referenced = GL_FALSE; @@ -415,30 +415,30 @@ _slang_typeof_operation_(const slang_operation * op, /*case slang_oper_complement: */ case slang_oper_subscript: { - slang_assembly_typeinfo _ti; + slang_typeinfo _ti; - if (!slang_assembly_typeinfo_construct(&_ti)) + if (!slang_typeinfo_construct(&_ti)) RETURN_NIL(); if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_NIL(); } ti->can_be_referenced = _ti.can_be_referenced; if (_ti.spec.type == slang_spec_array) { if (!slang_type_specifier_copy(&ti->spec, _ti.spec._array)) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_NIL(); } } else { if (!_slang_type_is_vector(_ti.spec.type) && !_slang_type_is_matrix(_ti.spec.type)) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_ERROR("cannot index a non-array type", 0); } ti->spec.type = _slang_type_base(_ti.spec.type); } - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); } break; case slang_oper_call: @@ -480,12 +480,12 @@ _slang_typeof_operation_(const slang_operation * op, break; case slang_oper_field: { - slang_assembly_typeinfo _ti; + slang_typeinfo _ti; - if (!slang_assembly_typeinfo_construct(&_ti)) + if (!slang_typeinfo_construct(&_ti)) RETURN_NIL(); if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_NIL(); } if (_ti.spec.type == slang_spec_struct) { @@ -494,11 +494,11 @@ _slang_typeof_operation_(const slang_operation * op, field = _slang_locate_variable(_ti.spec._struct->fields, op->a_id, GL_FALSE); if (field == NULL) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_NIL(); } if (!slang_type_specifier_copy(&ti->spec, &field->type.specifier)) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_NIL(); } ti->can_be_referenced = _ti.can_be_referenced; @@ -511,14 +511,14 @@ _slang_typeof_operation_(const slang_operation * op, /* determine the swizzle of the field expression */ #if 000 if (!_slang_type_is_vector(_ti.spec.type)) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_ERROR("Can't swizzle scalar expression", 0); } #endif rows = _slang_type_dim(_ti.spec.type); swizzle = slang_atom_pool_id(atoms, op->a_id); if (!_slang_is_swizzle(swizzle, rows, &ti->swz)) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_ERROR("Bad swizzle", 0); } ti->is_swizzled = GL_TRUE; @@ -585,7 +585,7 @@ _slang_typeof_operation_(const slang_operation * op, break; } } - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); } break; case slang_oper_postincrement: diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h index 267f9abe7bb..71ed9b7a531 100644 --- a/src/mesa/shader/slang/slang_typeinfo.h +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -143,20 +143,20 @@ slang_type_specifier_equal(const slang_type_specifier *, const slang_type_specifier *); -typedef struct slang_assembly_typeinfo_ +typedef struct slang_typeinfo_ { GLboolean can_be_referenced; GLboolean is_swizzled; slang_swizzle swz; slang_type_specifier spec; GLuint array_len; -} slang_assembly_typeinfo; +} slang_typeinfo; extern GLboolean -slang_assembly_typeinfo_construct(slang_assembly_typeinfo *); +slang_typeinfo_construct(slang_typeinfo *); extern GLvoid -slang_assembly_typeinfo_destruct(slang_assembly_typeinfo *); +slang_typeinfo_destruct(slang_typeinfo *); /** @@ -167,12 +167,12 @@ slang_assembly_typeinfo_destruct(slang_assembly_typeinfo *); extern GLboolean _slang_typeof_operation(const slang_assemble_ctx *, const struct slang_operation_ *, - slang_assembly_typeinfo *); + slang_typeinfo *); extern GLboolean _slang_typeof_operation_(const struct slang_operation_ *, const slang_name_space *, - slang_assembly_typeinfo *, slang_atom_pool *); + slang_typeinfo *, slang_atom_pool *); /** * Retrieves type of a function prototype, if one exists. |