summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_assemble.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/slang/slang_assemble.h')
-rw-r--r--src/mesa/shader/slang/slang_assemble.h58
1 files changed, 48 insertions, 10 deletions
diff --git a/src/mesa/shader/slang/slang_assemble.h b/src/mesa/shader/slang/slang_assemble.h
index d93755c7e7b..c3af8d8fed8 100644
--- a/src/mesa/shader/slang/slang_assemble.h
+++ b/src/mesa/shader/slang/slang_assemble.h
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5
*
- * Copyright (C) 2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -44,8 +44,16 @@ typedef enum slang_assembly_type_
slang_asm_float_divide,
slang_asm_float_negate,
slang_asm_float_less,
- slang_asm_float_equal,
+ slang_asm_float_equal_exp,
+ slang_asm_float_equal_int,
slang_asm_float_to_int,
+ slang_asm_float_sine,
+ slang_asm_float_arcsine,
+ slang_asm_float_arctan,
+ slang_asm_float_power,
+ slang_asm_float_log2,
+ slang_asm_float_floor,
+ slang_asm_float_ceil,
slang_asm_int_copy,
slang_asm_int_move,
slang_asm_int_push,
@@ -72,6 +80,10 @@ typedef enum slang_assembly_type_
slang_asm_return,
slang_asm_discard,
slang_asm_exit,
+ /* mesa-specific extensions */
+ slang_asm_float_print,
+ slang_asm_int_print,
+ slang_asm_bool_print,
slang_asm__last
} slang_assembly_type;
@@ -86,15 +98,26 @@ typedef struct slang_assembly_file_
{
slang_assembly *code;
unsigned int count;
+ unsigned int capacity;
} slang_assembly_file;
-void slang_assembly_file_construct (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);
+typedef struct slang_assembly_file_restore_point_
+{
+ unsigned int count;
+} slang_assembly_file_restore_point;
+
+int slang_assembly_file_restore_point_save (slang_assembly_file *,
+ slang_assembly_file_restore_point *);
+int 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 */
@@ -109,19 +132,31 @@ typedef struct slang_assembly_name_space_
struct slang_variable_scope_ *vars;
} slang_assembly_name_space;
-slang_function *_slang_locate_function (const char *name, slang_operation *params,
- unsigned int num_params, slang_assembly_name_space *space);
+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_atom_pool *);
int _slang_assemble_function (slang_assembly_file *, struct slang_function_ *,
- slang_assembly_name_space *);
+ slang_assembly_name_space *, struct slang_machine_ *, slang_atom_pool *);
+
+/*
+ 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 } }
+*/
+typedef struct slang_swizzle_
+{
+ unsigned int num_components;
+ unsigned int swizzle[4];
+} slang_swizzle;
typedef struct slang_assembly_stack_info_
{
- unsigned int swizzle_mask;
+ slang_swizzle swizzle;
} slang_assembly_stack_info;
int _slang_cleanup_stack (slang_assembly_file *, slang_operation *, int ref,
- slang_assembly_name_space *);
+ slang_assembly_name_space *, struct slang_machine_ *, slang_atom_pool *);
typedef struct slang_assembly_local_info_
{
@@ -130,9 +165,12 @@ typedef struct slang_assembly_local_info_
unsigned int swizzle_tmp;
} slang_assembly_local_info;
+int _slang_dereference (slang_assembly_file *, slang_operation *, slang_assembly_name_space *,
+ slang_assembly_local_info *, struct slang_machine_ *, slang_atom_pool *);
+
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 *);
+ slang_assembly_stack_info *, struct slang_machine_ *, slang_atom_pool *);
#ifdef __cplusplus
}