50
typedef struct slang_name_space_
52
struct slang_function_scope_ *funcs;
53
struct slang_struct_scope_ *structs;
54
struct slang_variable_scope_ *vars;
58
typedef struct slang_assemble_ctx_
60
slang_atom_pool *atoms;
61
slang_name_space space;
62
struct gl_program *program;
63
slang_var_table *vartable;
65
struct slang_label_ *curFuncEndLabel;
66
struct slang_ir_node_ *CurLoop;
67
struct slang_function_ *CurFunction;
71
extern struct slang_function_ *
72
_slang_locate_function(const struct slang_function_scope_ *funcs,
73
slang_atom name, struct slang_operation_ *params,
75
const slang_name_space *space,
76
slang_atom_pool *atoms, slang_info_log *log,
81
54
_slang_is_swizzle(const char *field, GLuint rows, slang_swizzle *swz);
84
_slang_is_swizzle_mask(const slang_swizzle *swz, GLuint rows);
87
_slang_multiply_swizzles(slang_swizzle *, const slang_swizzle *,
88
const slang_swizzle *);
57
typedef enum slang_type_variant_
59
SLANG_VARIANT, /* the default */
60
SLANG_INVARIANT /* indicates the "invariant" keyword */
64
typedef enum slang_type_centroid_
66
SLANG_CENTER, /* the default */
67
SLANG_CENTROID /* indicates the "centroid" keyword */
68
} slang_type_centroid;
71
typedef enum slang_type_qualifier_
80
SLANG_QUAL_FIXEDOUTPUT, /* internal */
81
SLANG_QUAL_FIXEDINPUT /* internal */
82
} slang_type_qualifier;
85
typedef enum slang_type_precision_
91
} slang_type_precision;
128
131
} slang_type_specifier_type;
134
extern slang_type_specifier_type
135
slang_type_specifier_type_from_string(const char *);
138
slang_type_specifier_type_to_string(slang_type_specifier_type);
132
142
* Describes more sophisticated types, like structs and arrays.
134
144
typedef struct slang_type_specifier_
136
146
slang_type_specifier_type type;
137
struct slang_struct_ *_struct; /**< used if type == spec_struct */
138
struct slang_type_specifier_ *_array; /**< used if type == spec_array */
147
struct slang_struct_ *_struct; /**< if type == SLANG_SPEC_STRUCT */
148
struct slang_type_specifier_ *_array; /**< if type == SLANG_SPEC_ARRAY */
139
149
} slang_type_specifier;
146
156
slang_type_specifier_dtr(slang_type_specifier *);
158
extern slang_type_specifier *
159
slang_type_specifier_new(slang_type_specifier_type type,
160
struct slang_struct_ *_struct,
161
struct slang_type_specifier_ *_array);
149
165
slang_type_specifier_copy(slang_type_specifier *, const slang_type_specifier *);
153
169
const slang_type_specifier *);
173
slang_type_specifier_compatible(const slang_type_specifier * x,
174
const slang_type_specifier * y);
177
typedef struct slang_fully_specified_type_
179
slang_type_qualifier qualifier;
180
slang_type_specifier specifier;
181
slang_type_precision precision;
182
slang_type_variant variant;
183
slang_type_centroid centroid;
184
GLint array_len; /**< -1 if not an array type */
185
} slang_fully_specified_type;
188
slang_fully_specified_type_construct(slang_fully_specified_type *);
191
slang_fully_specified_type_destruct(slang_fully_specified_type *);
194
slang_fully_specified_type_copy(slang_fully_specified_type *,
195
const slang_fully_specified_type *);
156
199
typedef struct slang_typeinfo_
158
201
GLboolean can_be_referenced;
169
212
slang_typeinfo_destruct(slang_typeinfo *);
173
* Retrieves type information about an operation.
174
* Returns GL_TRUE on success.
175
* Returns GL_FALSE otherwise.
178
_slang_typeof_operation(const slang_assemble_ctx *,
179
struct slang_operation_ *,
183
_slang_typeof_operation_(struct slang_operation_ *,
184
const slang_name_space *,
216
_slang_typeof_operation(struct slang_operation_ *,
217
const struct slang_name_space_ *,
185
218
slang_typeinfo *, slang_atom_pool *,
186
219
slang_info_log *log);