diff options
Diffstat (limited to 'src/mesa/shader/slang/slang_assemble.h')
-rw-r--r-- | src/mesa/shader/slang/slang_assemble.h | 85 |
1 files changed, 39 insertions, 46 deletions
diff --git a/src/mesa/shader/slang/slang_assemble.h b/src/mesa/shader/slang/slang_assemble.h index 3d5eec21047..ec273aa308c 100644 --- a/src/mesa/shader/slang/slang_assemble.h +++ b/src/mesa/shader/slang/slang_assemble.h @@ -54,6 +54,10 @@ typedef enum slang_assembly_type_ slang_asm_float_log2,
slang_asm_float_floor,
slang_asm_float_ceil,
+ slang_asm_float_noise1,
+ slang_asm_float_noise2,
+ slang_asm_float_noise3,
+ slang_asm_float_noise4,
slang_asm_int_copy,
slang_asm_int_move,
slang_asm_int_push,
@@ -97,64 +101,59 @@ typedef struct slang_assembly_ typedef struct slang_assembly_file_
{
slang_assembly *code;
- unsigned int count;
- unsigned int capacity;
+ GLuint count;
+ GLuint capacity;
} slang_assembly_file;
-int slang_assembly_file_construct (slang_assembly_file *);
-void slang_assembly_file_destruct (slang_assembly_file *);
-int slang_assembly_file_push (slang_assembly_file *, slang_assembly_type);
-int slang_assembly_file_push_label (slang_assembly_file *, slang_assembly_type, GLuint);
-int slang_assembly_file_push_label2 (slang_assembly_file *, slang_assembly_type, GLuint, GLuint);
-int slang_assembly_file_push_literal (slang_assembly_file *, slang_assembly_type, GLfloat);
+GLboolean slang_assembly_file_construct (slang_assembly_file *);
+GLvoid slang_assembly_file_destruct (slang_assembly_file *);
+GLboolean slang_assembly_file_push (slang_assembly_file *, slang_assembly_type);
+GLboolean slang_assembly_file_push_label (slang_assembly_file *, slang_assembly_type, GLuint);
+GLboolean slang_assembly_file_push_label2 (slang_assembly_file *, slang_assembly_type, GLuint, GLuint);
+GLboolean slang_assembly_file_push_literal (slang_assembly_file *, slang_assembly_type, GLfloat);
typedef struct slang_assembly_file_restore_point_
{
- unsigned int count;
+ GLuint count;
} slang_assembly_file_restore_point;
-int slang_assembly_file_restore_point_save (slang_assembly_file *,
+GLboolean slang_assembly_file_restore_point_save (slang_assembly_file *,
slang_assembly_file_restore_point *);
-int slang_assembly_file_restore_point_load (slang_assembly_file *,
+GLboolean slang_assembly_file_restore_point_load (slang_assembly_file *,
slang_assembly_file_restore_point *);
typedef struct slang_assembly_flow_control_
{
- unsigned int loop_start; /* for "continue" statement */
- unsigned int loop_end; /* for "break" statement */
- unsigned int function_end; /* for "return" statement */
+ GLuint loop_start; /* for "continue" statement */
+ GLuint loop_end; /* for "break" statement */
+ GLuint function_end; /* for "return" statement */
} slang_assembly_flow_control;
typedef struct slang_assembly_local_info_
{
- unsigned int ret_size;
- unsigned int addr_tmp;
- unsigned int swizzle_tmp;
+ GLuint ret_size;
+ GLuint addr_tmp;
+ GLuint swizzle_tmp;
} slang_assembly_local_info;
typedef enum
{
slang_ref_force,
- slang_ref_forbid,
- slang_ref_freelance
+ slang_ref_forbid/*,
+ slang_ref_freelance*/
} slang_ref_type;
/*
- holds a complete information about vector swizzle - the <swizzle> array contains
- vector component sources indices, where 0 is "x", 1 is "y", ...
- example: "xwz" --> { 3, { 0, 3, 2, n/u } }
-*/
+ * Holds a complete information about vector swizzle - the <swizzle> array contains
+ * vector component source indices, where 0 is "x", 1 is "y", 2 is "z" and 3 is "w".
+ * Example: "xwz" --> { 3, { 0, 3, 2, not used } }.
+ */
typedef struct slang_swizzle_
{
- unsigned int num_components;
- unsigned int swizzle[4];
+ GLuint num_components;
+ GLuint swizzle[4];
} slang_swizzle;
-typedef struct slang_assembly_stack_info_
-{
- slang_swizzle swizzle;
-} slang_assembly_stack_info;
-
typedef struct slang_assembly_name_space_
{
struct slang_function_scope_ *funcs;
@@ -171,32 +170,26 @@ typedef struct slang_assemble_ctx_ slang_assembly_flow_control flow;
slang_assembly_local_info local;
slang_ref_type ref;
- slang_assembly_stack_info swz;
+ slang_swizzle swz;
} slang_assemble_ctx;
slang_function *_slang_locate_function (slang_function_scope *funcs, slang_atom a_name,
- slang_operation *params, unsigned int num_params, slang_assembly_name_space *space,
+ slang_operation *params, GLuint num_params, slang_assembly_name_space *space,
slang_atom_pool *);
-int _slang_assemble_function (slang_assemble_ctx *, struct slang_function_ *);
+GLboolean _slang_assemble_function (slang_assemble_ctx *, struct slang_function_ *);
-int _slang_cleanup_stack (slang_assembly_file *, slang_operation *, int ref,
- slang_assembly_name_space *, struct slang_machine_ *, slang_atom_pool *);
-int _slang_cleanup_stack_ (slang_assemble_ctx *, slang_operation *);
+GLboolean _slang_cleanup_stack_ (slang_assemble_ctx *, slang_operation *);
-int _slang_dereference (slang_assembly_file *, slang_operation *, slang_assembly_name_space *,
- slang_assembly_local_info *, struct slang_machine_ *, slang_atom_pool *);
+GLboolean _slang_dereference (slang_assemble_ctx *, slang_operation *);
-int _slang_assemble_function_call (slang_assemble_ctx *, slang_function *,
- slang_operation *, GLuint, GLboolean);
+GLboolean _slang_assemble_function_call (slang_assemble_ctx *, slang_function *, slang_operation *,
+ GLuint, GLboolean);
-int _slang_assemble_function_call_name (slang_assemble_ctx *, const char *,
- slang_operation *, GLuint, GLboolean);
+GLboolean _slang_assemble_function_call_name (slang_assemble_ctx *, const char *, slang_operation *,
+ GLuint, GLboolean);
-int _slang_assemble_operation (slang_assembly_file *, struct slang_operation_ *, int reference,
- slang_assembly_flow_control *, slang_assembly_name_space *, slang_assembly_local_info *,
- slang_assembly_stack_info *, struct slang_machine_ *, slang_atom_pool *);
-int _slang_assemble_operation_ (slang_assemble_ctx *, struct slang_operation_ *, slang_ref_type);
+GLboolean _slang_assemble_operation_ (slang_assemble_ctx *, struct slang_operation_ *, slang_ref_type);
#ifdef __cplusplus
}
|