mesa: more glsl type/function movement

(cherry picked from commit 9a174ef409)
This commit is contained in:
Brian Paul
2008-12-12 10:17:58 -07:00
committed by Brian Paul
parent a5cd8fef91
commit 9fc529bcff
5 changed files with 14 additions and 30 deletions
+7
View File
@@ -37,6 +37,13 @@
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,
@@ -84,7 +84,7 @@ extern struct slang_function_ *
_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);
@@ -25,10 +25,6 @@
#ifndef SLANG_COMPILE_VARIABLE_H
#define SLANG_COMPILE_VARIABLE_H
#if defined __cplusplus
extern "C" {
#endif
struct slang_ir_storage_;
@@ -91,8 +87,4 @@ _slang_locate_variable(const slang_variable_scope *, const slang_atom a_name,
GLboolean all);
#ifdef __cplusplus
}
#endif
#endif /* SLANG_COMPILE_VARIABLE_H */
+2 -2
View File
@@ -130,7 +130,7 @@ _slang_is_swizzle(const char *field, GLuint rows, slang_swizzle * swz)
* 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;
@@ -154,7 +154,7 @@ _slang_is_swizzle_mask(const slang_swizzle * swz, GLuint rows)
* 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)
{
+4 -19
View File
@@ -34,6 +34,9 @@
struct slang_operation_;
struct slang_name_space_;
/**
* Holds complete information about vector swizzle - the <swizzle>
@@ -47,27 +50,9 @@ typedef struct slang_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_
{
@@ -229,7 +214,7 @@ slang_typeinfo_destruct(slang_typeinfo *);
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);