diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-12-12 10:11:41 -0700 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-12-12 10:11:41 -0700 |
commit | aeeb9bca2712dbf8540486fc584e214a8af4c7c4 (patch) | |
tree | b9f5e2144b7e5d3531dd9ebe9b0d3de25689595f /src/mesa/shader/slang/slang_typeinfo.h | |
parent | ea9dc3879f4cbbaa8ce9e305884a4afdc1fdd28a (diff) |
mesa: move some glsl compiler functions to different files to be more consistant
Diffstat (limited to 'src/mesa/shader/slang/slang_typeinfo.h')
-rw-r--r-- | src/mesa/shader/slang/slang_typeinfo.h | 88 |
1 files changed, 67 insertions, 21 deletions
diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h index 5e57fbb03e..171a899f64 100644 --- a/src/mesa/shader/slang/slang_typeinfo.h +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -55,17 +55,7 @@ typedef struct slang_name_space_ } slang_name_space; -typedef struct slang_assemble_ctx_ -{ - slang_atom_pool *atoms; - slang_name_space space; - struct gl_program *program; - slang_var_table *vartable; - slang_info_log *log; - struct slang_label_ *curFuncEndLabel; - struct slang_ir_node_ *CurLoop; - struct slang_function_ *CurFunction; -} slang_assemble_ctx; +struct slang_assemble_ctx_; extern GLboolean @@ -79,6 +69,43 @@ _slang_multiply_swizzles(slang_swizzle *, const slang_swizzle *, const slang_swizzle *); +typedef enum slang_type_variant_ +{ + SLANG_VARIANT, /* the default */ + SLANG_INVARIANT /* indicates the "invariant" keyword */ +} slang_type_variant; + + +typedef enum slang_type_centroid_ +{ + SLANG_CENTER, /* the default */ + SLANG_CENTROID /* indicates the "centroid" keyword */ +} slang_type_centroid; + + +typedef enum slang_type_qualifier_ +{ + SLANG_QUAL_NONE, + SLANG_QUAL_CONST, + SLANG_QUAL_ATTRIBUTE, + SLANG_QUAL_VARYING, + SLANG_QUAL_UNIFORM, + SLANG_QUAL_OUT, + SLANG_QUAL_INOUT, + SLANG_QUAL_FIXEDOUTPUT, /* internal */ + SLANG_QUAL_FIXEDINPUT /* internal */ +} slang_type_qualifier; + + +typedef enum slang_type_precision_ +{ + SLANG_PREC_DEFAULT, + SLANG_PREC_LOW, + SLANG_PREC_MEDIUM, + SLANG_PREC_HIGH +} slang_type_precision; + + /** * The basic shading language types (float, vec4, mat3, etc) */ @@ -119,6 +146,13 @@ typedef enum slang_type_specifier_type_ } slang_type_specifier_type; +extern slang_type_specifier_type +slang_type_specifier_type_from_string(const char *); + +extern const char * +slang_type_specifier_type_to_string(slang_type_specifier_type); + + /** * Describes more sophisticated types, like structs and arrays. */ @@ -155,6 +189,28 @@ slang_type_specifier_compatible(const slang_type_specifier * x, const slang_type_specifier * y); +typedef struct slang_fully_specified_type_ +{ + slang_type_qualifier qualifier; + slang_type_specifier specifier; + slang_type_precision precision; + slang_type_variant variant; + slang_type_centroid centroid; + GLint array_len; /**< -1 if not an array type */ +} slang_fully_specified_type; + +extern int +slang_fully_specified_type_construct(slang_fully_specified_type *); + +extern void +slang_fully_specified_type_destruct(slang_fully_specified_type *); + +extern int +slang_fully_specified_type_copy(slang_fully_specified_type *, + const slang_fully_specified_type *); + + + typedef struct slang_typeinfo_ { GLboolean can_be_referenced; @@ -171,16 +227,6 @@ extern GLvoid slang_typeinfo_destruct(slang_typeinfo *); -/** - * Retrieves type information about an operation. - * Returns GL_TRUE on success. - * Returns GL_FALSE otherwise. - */ -extern GLboolean -_slang_typeof_operation(const slang_assemble_ctx *, - struct slang_operation_ *, - slang_typeinfo *); - extern GLboolean _slang_typeof_operation_(struct slang_operation_ *, const slang_name_space *, |