summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-11-22 21:34:47 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-11-22 21:34:47 +0000
commitf9f4625367a7b8d462f4af67aabf61c29f11f500 (patch)
tree57651c9e392e83c720458f205c72c2a24ffd7300 /src
parent958a8af3b01be3d600b90acef2dd7761fb2d7141 (diff)
clean-up, comments
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/slang/slang_compile_variable.h38
1 files changed, 23 insertions, 15 deletions
diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h
index 3b6e1987c8..626e424e79 100644
--- a/src/mesa/shader/slang/slang_compile_variable.h
+++ b/src/mesa/shader/slang/slang_compile_variable.h
@@ -22,7 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#if !defined SLANG_COMPILE_VARIABLE_H
+#ifndef SLANG_COMPILE_VARIABLE_H
#define SLANG_COMPILE_VARIABLE_H
#if defined __cplusplus
@@ -68,9 +68,28 @@ slang_fully_specified_type_copy(slang_fully_specified_type *,
const slang_fully_specified_type *);
+/**
+ * A shading language program variable.
+ */
+typedef struct slang_variable_
+{
+ slang_fully_specified_type type; /**< Variable's data type */
+ slang_atom a_name; /**< The variable's name (char *) */
+ GLuint array_len; /**< only if type == slang_spec_array */
+ struct slang_operation_ *initializer; /**< Optional initializer code */
+ GLuint address; /**< Storage location */
+ GLuint address2; /**< Storage location */
+ GLuint size; /**< Variable's size in bytes */
+ GLboolean global; /**< A global var? */
+} slang_variable;
+
+
+/**
+ * Basically a list of variables, with a pointer to the parent scope.
+ */
typedef struct slang_variable_scope_
{
- struct slang_variable_ *variables;
+ slang_variable *variables; /**< Array [num_variables] */
GLuint num_variables;
struct slang_variable_scope_ *outer_scope;
} slang_variable_scope;
@@ -86,18 +105,6 @@ slang_variable_scope_copy(slang_variable_scope *,
const slang_variable_scope *);
-typedef struct slang_variable_
-{
- slang_fully_specified_type type;
- slang_atom a_name;
- GLuint array_len; /* type: spec_array */
- struct slang_operation_ *initializer;
- unsigned int address;
- unsigned int size;
- GLboolean global;
-} slang_variable;
-
-
extern int
slang_variable_construct(slang_variable *);
@@ -116,8 +123,9 @@ _slang_build_export_data_table(slang_export_data_table *,
slang_variable_scope *);
+
#ifdef __cplusplus
}
#endif
-#endif
+#endif /* SLANG_COMPILE_VARIABLE_H */