extern "C" {
#endif
+typedef struct slang_name_space_
+{
+ struct slang_function_scope_ *funcs;
+ struct slang_struct_scope_ *structs;
+ struct slang_variable_scope_ *vars;
+} slang_name_space;
+
typedef enum slang_unit_type_
{
SLANG_UNIT_FRAGMENT_SHADER,
_slang_locate_function(const struct slang_function_scope_ *funcs,
slang_atom name, struct slang_operation_ *params,
GLuint num_params,
- const slang_name_space *space,
+ const struct slang_name_space_ *space,
slang_atom_pool *atoms, slang_info_log *log,
GLboolean *error);
#ifndef SLANG_COMPILE_VARIABLE_H
#define SLANG_COMPILE_VARIABLE_H
-#if defined __cplusplus
-extern "C" {
-#endif
-
struct slang_ir_storage_;
GLboolean all);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* SLANG_COMPILE_VARIABLE_H */
* do not have duplicated fields. Returns GL_TRUE if this is a
* swizzle mask. Returns GL_FALSE otherwise
*/
-GLboolean
+static GLboolean
_slang_is_swizzle_mask(const slang_swizzle * swz, GLuint rows)
{
GLuint i, c = 0;
* Combines (multiplies) two swizzles to form single swizzle.
* Example: "vec.wzyx.yx" --> "vec.zw".
*/
-GLvoid
+static void
_slang_multiply_swizzles(slang_swizzle * dst, const slang_swizzle * left,
const slang_swizzle * right)
{
struct slang_operation_;
+struct slang_name_space_;
+
+
/**
* Holds complete information about vector swizzle - the <swizzle>
GLuint swizzle[4];
} slang_swizzle;
-typedef struct slang_name_space_
-{
- struct slang_function_scope_ *funcs;
- struct slang_struct_scope_ *structs;
- struct slang_variable_scope_ *vars;
-} slang_name_space;
-
-
-struct slang_assemble_ctx_;
-
-
extern GLboolean
_slang_is_swizzle(const char *field, GLuint rows, slang_swizzle *swz);
-extern GLboolean
-_slang_is_swizzle_mask(const slang_swizzle *swz, GLuint rows);
-
-extern GLvoid
-_slang_multiply_swizzles(slang_swizzle *, const slang_swizzle *,
- const slang_swizzle *);
-
typedef enum slang_type_variant_
{
extern GLboolean
_slang_typeof_operation_(struct slang_operation_ *,
- const slang_name_space *,
+ const struct slang_name_space_ *,
slang_typeinfo *, slang_atom_pool *,
slang_info_log *log);