Data Structures |
| struct | slang_parse_ctx |
| struct | slang_output_ctx |
Defines |
| #define | TYPE_SPECIFIER_COUNT 32 |
| #define | RETURN0 |
| #define | REVISION 5 |
| #define | FIELD_NONE 0 |
| #define | FIELD_NEXT 1 |
| #define | FIELD_ARRAY 2 |
| #define | TYPE_VARIANT 90 |
| #define | TYPE_INVARIANT 91 |
| #define | TYPE_CENTER 95 |
| #define | TYPE_CENTROID 96 |
| #define | TYPE_QUALIFIER_NONE 0 |
| #define | TYPE_QUALIFIER_CONST 1 |
| #define | TYPE_QUALIFIER_ATTRIBUTE 2 |
| #define | TYPE_QUALIFIER_VARYING 3 |
| #define | TYPE_QUALIFIER_UNIFORM 4 |
| #define | TYPE_QUALIFIER_FIXEDOUTPUT 5 |
| #define | TYPE_QUALIFIER_FIXEDINPUT 6 |
| #define | TYPE_SPECIFIER_VOID 0 |
| #define | TYPE_SPECIFIER_BOOL 1 |
| #define | TYPE_SPECIFIER_BVEC2 2 |
| #define | TYPE_SPECIFIER_BVEC3 3 |
| #define | TYPE_SPECIFIER_BVEC4 4 |
| #define | TYPE_SPECIFIER_INT 5 |
| #define | TYPE_SPECIFIER_IVEC2 6 |
| #define | TYPE_SPECIFIER_IVEC3 7 |
| #define | TYPE_SPECIFIER_IVEC4 8 |
| #define | TYPE_SPECIFIER_FLOAT 9 |
| #define | TYPE_SPECIFIER_VEC2 10 |
| #define | TYPE_SPECIFIER_VEC3 11 |
| #define | TYPE_SPECIFIER_VEC4 12 |
| #define | TYPE_SPECIFIER_MAT2 13 |
| #define | TYPE_SPECIFIER_MAT3 14 |
| #define | TYPE_SPECIFIER_MAT4 15 |
| #define | TYPE_SPECIFIER_SAMPLER1D 16 |
| #define | TYPE_SPECIFIER_SAMPLER2D 17 |
| #define | TYPE_SPECIFIER_SAMPLER3D 18 |
| #define | TYPE_SPECIFIER_SAMPLERCUBE 19 |
| #define | TYPE_SPECIFIER_SAMPLER1DSHADOW 20 |
| #define | TYPE_SPECIFIER_SAMPLER2DSHADOW 21 |
| #define | TYPE_SPECIFIER_SAMPLER2DRECT 22 |
| #define | TYPE_SPECIFIER_SAMPLER2DRECTSHADOW 23 |
| #define | TYPE_SPECIFIER_STRUCT 24 |
| #define | TYPE_SPECIFIER_TYPENAME 25 |
| #define | TYPE_SPECIFIER_MAT23 26 |
| #define | TYPE_SPECIFIER_MAT32 27 |
| #define | TYPE_SPECIFIER_MAT24 28 |
| #define | TYPE_SPECIFIER_MAT42 29 |
| #define | TYPE_SPECIFIER_MAT34 30 |
| #define | TYPE_SPECIFIER_MAT43 31 |
| #define | TYPE_SPECIFIER_COUNT 32 |
| #define | TYPE_SPECIFIER_NONARRAY 0 |
| #define | TYPE_SPECIFIER_ARRAY 1 |
| #define | PRECISION_DEFAULT 0 |
| #define | PRECISION_LOW 1 |
| #define | PRECISION_MEDIUM 2 |
| #define | PRECISION_HIGH 3 |
| #define | OP_END 0 |
| #define | OP_BLOCK_BEGIN_NO_NEW_SCOPE 1 |
| #define | OP_BLOCK_BEGIN_NEW_SCOPE 2 |
| #define | OP_DECLARE 3 |
| #define | OP_ASM 4 |
| #define | OP_BREAK 5 |
| #define | OP_CONTINUE 6 |
| #define | OP_DISCARD 7 |
| #define | OP_RETURN 8 |
| #define | OP_EXPRESSION 9 |
| #define | OP_IF 10 |
| #define | OP_WHILE 11 |
| #define | OP_DO 12 |
| #define | OP_FOR 13 |
| #define | OP_PUSH_VOID 14 |
| #define | OP_PUSH_BOOL 15 |
| #define | OP_PUSH_INT 16 |
| #define | OP_PUSH_FLOAT 17 |
| #define | OP_PUSH_IDENTIFIER 18 |
| #define | OP_SEQUENCE 19 |
| #define | OP_ASSIGN 20 |
| #define | OP_ADDASSIGN 21 |
| #define | OP_SUBASSIGN 22 |
| #define | OP_MULASSIGN 23 |
| #define | OP_DIVASSIGN 24 |
| #define | OP_SELECT 31 |
| #define | OP_LOGICALOR 32 |
| #define | OP_LOGICALXOR 33 |
| #define | OP_LOGICALAND 34 |
| #define | OP_EQUAL 38 |
| #define | OP_NOTEQUAL 39 |
| #define | OP_LESS 40 |
| #define | OP_GREATER 41 |
| #define | OP_LESSEQUAL 42 |
| #define | OP_GREATEREQUAL 43 |
| #define | OP_ADD 46 |
| #define | OP_SUBTRACT 47 |
| #define | OP_MULTIPLY 48 |
| #define | OP_DIVIDE 49 |
| #define | OP_PREINCREMENT 51 |
| #define | OP_PREDECREMENT 52 |
| #define | OP_PLUS 53 |
| #define | OP_MINUS 54 |
| #define | OP_NOT 56 |
| #define | OP_SUBSCRIPT 57 |
| #define | OP_CALL 58 |
| #define | OP_FIELD 59 |
| #define | OP_POSTINCREMENT 60 |
| #define | OP_POSTDECREMENT 61 |
| #define | OP_PRECISION 62 |
| #define | OP_METHOD 63 |
| #define | FUNCTION_CALL_NONARRAY 0 |
| #define | FUNCTION_CALL_ARRAY 1 |
| #define | PARAM_QUALIFIER_IN 0 |
| #define | PARAM_QUALIFIER_OUT 1 |
| #define | PARAM_QUALIFIER_INOUT 2 |
| #define | PARAMETER_ARRAY_NOT_PRESENT 0 |
| #define | PARAMETER_ARRAY_PRESENT 1 |
| #define | FUNCTION_ORDINARY 0 |
| #define | FUNCTION_CONSTRUCTOR 1 |
| #define | FUNCTION_OPERATOR 2 |
| #define | PARAMETER_NONE 0 |
| #define | PARAMETER_NEXT 1 |
| #define | OPERATOR_ADDASSIGN 1 |
| #define | OPERATOR_SUBASSIGN 2 |
| #define | OPERATOR_MULASSIGN 3 |
| #define | OPERATOR_DIVASSIGN 4 |
| #define | OPERATOR_LOGICALXOR 11 |
| #define | OPERATOR_LESS 15 |
| #define | OPERATOR_GREATER 16 |
| #define | OPERATOR_LESSEQUAL 17 |
| #define | OPERATOR_GREATEREQUAL 18 |
| #define | OPERATOR_MULTIPLY 21 |
| #define | OPERATOR_DIVIDE 22 |
| #define | OPERATOR_INCREMENT 24 |
| #define | OPERATOR_DECREMENT 25 |
| #define | OPERATOR_PLUS 26 |
| #define | OPERATOR_MINUS 27 |
| #define | OPERATOR_NOT 29 |
| #define | DECLARATOR_NONE 0 |
| #define | DECLARATOR_NEXT 1 |
| #define | VARIABLE_NONE 0 |
| #define | VARIABLE_IDENTIFIER 1 |
| #define | VARIABLE_INITIALIZER 2 |
| #define | VARIABLE_ARRAY_EXPLICIT 3 |
| #define | VARIABLE_ARRAY_UNKNOWN 4 |
| #define | DECLARATION_FUNCTION_PROTOTYPE 1 |
| #define | DECLARATION_INIT_DECLARATOR_LIST 2 |
| #define | EXTERNAL_NULL 0 |
| #define | EXTERNAL_FUNCTION_DEFINITION 1 |
| #define | EXTERNAL_DECLARATION 2 |
| #define | DEFAULT_PRECISION 3 |
| #define | INVARIANT_STMT 4 |
Functions |
| static GLboolean | legal_identifier (slang_atom name) |
| GLvoid | _slang_code_unit_ctr (slang_code_unit *self, struct slang_code_object_ *object) |
| GLvoid | _slang_code_unit_dtr (slang_code_unit *self) |
| GLvoid | _slang_code_object_ctr (slang_code_object *self) |
| GLvoid | _slang_code_object_dtr (slang_code_object *self) |
| static void | parse_identifier_str (slang_parse_ctx *C, char **id) |
| static slang_atom | parse_identifier (slang_parse_ctx *C) |
| static int | parse_number (slang_parse_ctx *C, int *number) |
| static int | parse_float (slang_parse_ctx *C, float *number) |
| static int | check_revision (slang_parse_ctx *C) |
| static int | parse_statement (slang_parse_ctx *, slang_output_ctx *, slang_operation *) |
| static int | parse_expression (slang_parse_ctx *, slang_output_ctx *, slang_operation *) |
| static int | parse_type_specifier (slang_parse_ctx *, slang_output_ctx *, slang_type_specifier *) |
| static int | parse_type_array_size (slang_parse_ctx *C, slang_output_ctx *O, GLint *array_len) |
| static GLboolean | parse_array_len (slang_parse_ctx *C, slang_output_ctx *O, GLuint *len) |
| static GLboolean | calculate_var_size (slang_parse_ctx *C, slang_output_ctx *O, slang_variable *var) |
| static void | promote_type_to_array (slang_parse_ctx *C, slang_fully_specified_type *type, GLint array_len) |
| static GLboolean | convert_to_array (slang_parse_ctx *C, slang_variable *var, const slang_type_specifier *sp) |
| static GLboolean | parse_struct_field_var (slang_parse_ctx *C, slang_output_ctx *O, slang_variable *var, slang_atom a_name, const slang_type_specifier *sp, GLuint array_len) |
| static int | parse_struct_field (slang_parse_ctx *C, slang_output_ctx *O, slang_struct *st, slang_type_specifier *sp) |
| static int | parse_struct (slang_parse_ctx *C, slang_output_ctx *O, slang_struct **st) |
| static int | parse_type_variant (slang_parse_ctx *C, slang_type_variant *variant) |
| static int | parse_type_centroid (slang_parse_ctx *C, slang_type_centroid *centroid) |
| static int | parse_type_qualifier (slang_parse_ctx *C, slang_type_qualifier *qual) |
| static int | parse_type_precision (slang_parse_ctx *C, slang_type_precision *precision) |
| static int | parse_fully_specified_type (slang_parse_ctx *C, slang_output_ctx *O, slang_fully_specified_type *type) |
| static int | parse_child_operation (slang_parse_ctx *C, slang_output_ctx *O, slang_operation *oper, GLboolean statement) |
| static int | parse_declaration (slang_parse_ctx *C, slang_output_ctx *O) |
| static int | handle_nary_expression (slang_parse_ctx *C, slang_operation *op, slang_operation **ops, unsigned int *total_ops, unsigned int n) |
| static int | is_constructor_name (const char *name, slang_atom a_name, slang_struct_scope *structs) |
| static int | parse_parameter_declaration (slang_parse_ctx *C, slang_output_ctx *O, slang_variable *param) |
| static slang_atom | parse_operator_name (slang_parse_ctx *C) |
| static int | parse_function_prototype (slang_parse_ctx *C, slang_output_ctx *O, slang_function *func) |
| static int | parse_function_definition (slang_parse_ctx *C, slang_output_ctx *O, slang_function *func) |
| static GLboolean | initialize_global (slang_assemble_ctx *A, slang_variable *var) |
| static int | parse_init_declarator (slang_parse_ctx *C, slang_output_ctx *O, const slang_fully_specified_type *type) |
| static int | parse_init_declarator_list (slang_parse_ctx *C, slang_output_ctx *O) |
| static GLboolean | parse_function (slang_parse_ctx *C, slang_output_ctx *O, int definition, slang_function **parsed_func_ret) |
| static int | parse_default_precision (slang_parse_ctx *C, slang_output_ctx *O) |
| static void | init_default_precision (slang_output_ctx *O, slang_unit_type type) |
| static int | parse_invariant (slang_parse_ctx *C, slang_output_ctx *O) |
| static GLboolean | parse_code_unit (slang_parse_ctx *C, slang_code_unit *unit, struct gl_shader *shader) |
| static GLboolean | compile_binary (const byte *prod, slang_code_unit *unit, GLuint version, slang_unit_type type, slang_info_log *infolog, slang_code_unit *builtin, slang_code_unit *downlink, struct gl_shader *shader) |
| static GLboolean | compile_with_grammar (grammar id, const char *source, slang_code_unit *unit, slang_unit_type type, slang_info_log *infolog, slang_code_unit *builtin, struct gl_shader *shader, const struct gl_extensions *extensions, struct gl_sl_pragmas *pragmas) |
| static GLboolean | compile_object (grammar *id, const char *source, slang_code_object *object, slang_unit_type type, slang_info_log *infolog, struct gl_shader *shader, const struct gl_extensions *extensions, struct gl_sl_pragmas *pragmas) |
| static GLboolean | compile_shader (GLcontext *ctx, slang_code_object *object, slang_unit_type type, slang_info_log *infolog, struct gl_shader *shader) |
| GLboolean | _slang_compile (GLcontext *ctx, struct gl_shader *shader) |
Variables |
| struct { |
| unsigned int o_code |
| const char * o_name |
| } | operator_names [] |
| static LONGSTRING const char * | slang_shader_syn |
| static const byte | slang_core_gc [] |
| static const byte | slang_120_core_gc [] |
| static const byte | slang_120_fragment_gc [] |
| static const byte | slang_common_builtin_gc [] |
| static const byte | slang_fragment_builtin_gc [] |
| static const byte | slang_vertex_builtin_gc [] |
slang front-end compiler
- Author:
- Michal Krol
Definition in file slang_compile.c.