mesa: Branch 'glsl-compiler-1' - 9 commits

Brian Paul brianp at kemper.freedesktop.org
Fri Feb 2 23:16:04 UTC 2007


 src/mesa/shader/slang/slang_codegen.c           |   68 ----
 src/mesa/shader/slang/slang_compile.c           |    2 
 src/mesa/shader/slang/slang_compile.h           |    3 
 src/mesa/shader/slang/slang_compile_operation.h |    2 
 src/mesa/shader/slang/slang_export.c            |  386 ------------------------
 src/mesa/shader/slang/slang_export.h            |  183 -----------
 src/mesa/shader/slang/slang_library_noise.c     |    4 
 src/mesa/shader/slang/slang_print.c             |  154 ---------
 src/mesa/shader/slang/slang_print.h             |    6 
 src/mesa/shader/slang/slang_simplify.c          |   18 -
 src/mesa/shader/slang/slang_simplify.h          |    4 
 src/mesa/shader/slang/slang_storage.h           |   94 +++--
 src/mesa/shader/slang/slang_typeinfo.c          |   94 ++++-
 src/mesa/shader/slang/slang_typeinfo.h          |   33 --
 14 files changed, 161 insertions(+), 890 deletions(-)

New commits:
diff-tree d9dbb3e15442635df10333fbf31dbede0ce2797a (from e1b47b68ecd4a91ec46f594d8dfbcbcabae87988)
Author: Brian <brian at yutani.localnet.net>
Date:   Fri Feb 2 16:14:55 2007 -0700

    remove slang_export.[ch]

diff --git a/src/mesa/shader/slang/slang_export.c b/src/mesa/shader/slang/slang_export.c
deleted file mode 100644
index 9620ef0..0000000
--- a/src/mesa/shader/slang/slang_export.c
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  6.5
- *
- * Copyright (C) 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"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_export.c
- * interface between assembly code and the application
- * \author Michal Krol
- */
-
-#include "imports.h"
-#include "slang_export.h"
-
-/*
- * slang_export_data_quant
- */
-
-GLvoid slang_export_data_quant_ctr (slang_export_data_quant *self)
-{
-	self->name = SLANG_ATOM_NULL;
-	self->size = 0;
-	self->array_len = 0;
-	self->structure = NULL;
-	self->u.basic_type = GL_FLOAT;
-}
-
-GLvoid slang_export_data_quant_dtr (slang_export_data_quant *self)
-{
-	if (self->structure != NULL)
-	{
-		GLuint i;
-
-		for (i = 0; i < self->u.field_count; i++)
-			slang_export_data_quant_dtr (&self->structure[i]);
-		slang_alloc_free (self->structure);
-	}
-}
-
-slang_export_data_quant *slang_export_data_quant_add_field (slang_export_data_quant *self)
-{
-	const GLuint n = self->u.field_count;
-
-	self->structure = (slang_export_data_quant *) slang_alloc_realloc (self->structure,
-		n * sizeof (slang_export_data_quant), (n + 1) * sizeof (slang_export_data_quant));
-	if (self->structure == NULL)
-		return NULL;
-	slang_export_data_quant_ctr (&self->structure[n]);
-	self->u.field_count++;
-	return &self->structure[n];
-}
-
-GLboolean slang_export_data_quant_array (slang_export_data_quant *self)
-{
-	return self->array_len != 0;
-}
-
-GLboolean slang_export_data_quant_struct (slang_export_data_quant *self)
-{
-	return self->structure != NULL;
-}
-
-GLboolean slang_export_data_quant_simple (slang_export_data_quant *self)
-{
-	return self->array_len == 0 && self->structure == NULL;
-}
-
-GLenum slang_export_data_quant_type (slang_export_data_quant *self)
-{
-	assert (self->structure == NULL);
-	return self->u.basic_type;
-}
-
-GLuint slang_export_data_quant_fields (slang_export_data_quant *self)
-{
-	assert (self->structure != NULL);
-	return self->u.field_count;
-}
-
-GLuint slang_export_data_quant_elements (slang_export_data_quant *self)
-{
-	if (self->array_len == 0)
-		return 1;
-	return self->array_len;
-}
-
-GLuint slang_export_data_quant_components (slang_export_data_quant *self)
-{
-	return self->size / 4;
-}
-
-GLuint slang_export_data_quant_size (slang_export_data_quant *self)
-{
-	return self->size;
-}
-
-/*
- * slang_export_data_entry
- */
-
-GLvoid slang_export_data_entry_ctr (slang_export_data_entry *self)
-{
-	slang_export_data_quant_ctr (&self->quant);
-	self->access = slang_exp_uniform;
-	self->address = ~0;
-}
-
-GLvoid slang_export_data_entry_dtr (slang_export_data_entry *self)
-{
-	slang_export_data_quant_dtr (&self->quant);
-}
-
-/*
- * slang_export_data_table
- */
-
-GLvoid slang_export_data_table_ctr (slang_export_data_table *self)
-{
-	self->entries = NULL;
-	self->count = 0;
-	self->atoms = NULL;
-}
-
-GLvoid slang_export_data_table_dtr (slang_export_data_table *self)
-{
-	if (self->entries != NULL)
-	{
-		GLuint i;
-
-		for (i = 0; i < self->count; i++)
-			slang_export_data_entry_dtr (&self->entries[i]);
-		slang_alloc_free (self->entries);
-	}
-}
-
-slang_export_data_entry *slang_export_data_table_add (slang_export_data_table *self)
-{
-	const GLuint n = self->count;
-
-	self->entries = (slang_export_data_entry *) slang_alloc_realloc (self->entries,
-		n * sizeof (slang_export_data_entry), (n + 1) * sizeof (slang_export_data_entry));
-	if (self->entries == NULL)
-		return NULL;
-	slang_export_data_entry_ctr (&self->entries[n]);
-	self->count++;
-	return &self->entries[n];
-}
-
-/*
- * slang_export_code_entry
- */
-
-static GLvoid slang_export_code_entry_ctr (slang_export_code_entry *self)
-{
-	self->name = SLANG_ATOM_NULL;
-	self->address = ~0;
-}
-
-static GLvoid slang_export_code_entry_dtr (slang_export_code_entry *self)
-{
-}
-
-/*
- * slang_export_code_table
- */
-
-GLvoid slang_export_code_table_ctr (slang_export_code_table *self)
-{
-	self->entries = NULL;
-	self->count = 0;
-	self->atoms = NULL;
-}
-
-GLvoid slang_export_code_table_dtr (slang_export_code_table *self)
-{
-	if (self->entries != NULL)
-	{
-		GLuint i;
-
-		for (i = 0; i < self->count; i++)
-			slang_export_code_entry_dtr (&self->entries[i]);
-		slang_alloc_free (self->entries);
-	}
-}
-
-slang_export_code_entry *slang_export_code_table_add (slang_export_code_table *self)
-{
-	const GLuint n = self->count;
-
-	self->entries = (slang_export_code_entry *) slang_alloc_realloc (self->entries,
-		n * sizeof (slang_export_code_entry), (n + 1) * sizeof (slang_export_code_entry));
-	if (self->entries == NULL)
-		return NULL;
-	slang_export_code_entry_ctr (&self->entries[n]);
-	self->count++;
-	return &self->entries[n];
-}
-
-/*
- * _slang_find_exported_data()
- */
-
-#define EXTRACT_ERROR 0
-#define EXTRACT_BASIC 1
-#define EXTRACT_ARRAY 2
-#define EXTRACT_STRUCT 3
-#define EXTRACT_STRUCT_ARRAY 4
-
-#define EXTRACT_MAXLEN 255
-
-static GLuint extract_name (const char *name, char *parsed, GLuint *element, const char **end)
-{
-	GLuint i;
-
-	if ((name[0] >= 'a' && name[0] <= 'z') || (name[0] >= 'A' && name[0] <= 'Z') || name[0] == '_')
-	{
-		parsed[0] = name[0];
-
-		for (i = 1; i < EXTRACT_MAXLEN; i++)
-		{
-			if ((name[i] >= 'a' && name[i] <= 'z') || (name[i] >= 'A' && name[i] <= 'Z') ||
-				(name[i] >= '0' && name[i] <= '9') || name[0] == '_')
-			{
-				parsed[i] = name[i];
-			}
-			else
-			{
-				if (name[i] == '\0')
-				{
-					parsed[i] = '\0';
-					return EXTRACT_BASIC;
-				}
-				if (name[i] == '.')
-				{
-					parsed[i] = '\0';
-					*end = &name[i + 1];
-					return EXTRACT_STRUCT;
-				}
-				if (name[i] == '[')
-				{
-					parsed[i] = '\0';
-					i++;
-					if (name[i] >= '0' && name[i] <= '9')
-					{
-						*element = name[i] - '0';
-						for (i++; ; i++)
-						{
-							if (name[i] >= '0' && name[i] <= '9')
-								*element = *element * 10 + (name[i] - '0');
-							else
-							{
-								if (name[i] == ']')
-								{
-									i++;
-									if (name[i] == '.')
-									{
-										*end = &name[i + 1];
-										return EXTRACT_STRUCT_ARRAY;
-									}
-									*end = &name[i];
-									return EXTRACT_ARRAY;
-								}
-								break;
-							}
-						}
-					}
-				}
-				break;
-			}
-		}
-	}
-	return EXTRACT_ERROR;
-}
-
-static GLboolean validate_extracted (slang_export_data_quant *q, GLuint element, GLuint extr)
-{
-	switch (extr)
-	{
-	case EXTRACT_BASIC:
-		return GL_TRUE;
-	case EXTRACT_ARRAY:
-		return element < slang_export_data_quant_elements (q);
-	case EXTRACT_STRUCT:
-		return slang_export_data_quant_struct (q);
-	case EXTRACT_STRUCT_ARRAY:
-		return slang_export_data_quant_struct (q) && element < slang_export_data_quant_elements (q);
-	}
-	return GL_FALSE;
-}
-
-static GLuint calculate_offset (slang_export_data_quant *q, GLuint element)
-{
-	if (slang_export_data_quant_array (q))
-		return element * slang_export_data_quant_size (q);
-	return 0;
-}
-
-static GLboolean find_exported_data (slang_export_data_quant *q, const char *name,
-	slang_export_data_quant **quant, GLuint *offset, slang_atom_pool *atoms)
-{
-	char parsed[EXTRACT_MAXLEN];
-	GLuint result, element, i;
-	const char *end;
-	slang_atom atom;
-	const GLuint fields = slang_export_data_quant_fields (q);
-
-	result = extract_name (name, parsed, &element, &end);
-	if (result == EXTRACT_ERROR)
-		return GL_FALSE;
-
-	atom = slang_atom_pool_atom (atoms, parsed);
-	if (atom == SLANG_ATOM_NULL)
-		return GL_FALSE;
-
-	for (i = 0; i < fields; i++)
-		if (q->structure[i].name == atom)
-		{
-			if (!validate_extracted (&q->structure[i], element, result))
-				return GL_FALSE;
-			*offset += calculate_offset (&q->structure[i], element);
-			if (result == EXTRACT_BASIC || result == EXTRACT_ARRAY)
-			{
-				if (*end != '\0')
-					return GL_FALSE;
-				*quant = &q->structure[i];
-				return GL_TRUE;
-			}
-			return find_exported_data (&q->structure[i], end, quant, offset, atoms);
-		}
-	return GL_FALSE;
-}
-
-GLboolean _slang_find_exported_data (slang_export_data_table *table, const char *name,
-	slang_export_data_entry **entry, slang_export_data_quant **quant, GLuint *offset)
-{
-	char parsed[EXTRACT_MAXLEN];
-	GLuint result, element, i;
-	const char *end;
-	slang_atom atom;
-
-	result = extract_name (name, parsed, &element, &end);
-	if (result == EXTRACT_ERROR)
-		return GL_FALSE;
-
-	atom = slang_atom_pool_atom (table->atoms, parsed);
-	if (atom == SLANG_ATOM_NULL)
-		return GL_FALSE;
-
-	for (i = 0; i < table->count; i++)
-		if (table->entries[i].quant.name == atom)
-		{
-			if (!validate_extracted (&table->entries[i].quant, element, result))
-				return GL_FALSE;
-			*entry = &table->entries[i];
-			*offset = calculate_offset (&table->entries[i].quant, element);
-			if (result == EXTRACT_BASIC || result == EXTRACT_ARRAY)
-			{
-				if (*end != '\0')
-					return GL_FALSE;
-				*quant = &table->entries[i].quant;
-				return GL_TRUE;
-			}
-			return find_exported_data (&table->entries[i].quant, end, quant, offset, table->atoms);
-		}
-	return GL_FALSE;
-}
-
diff --git a/src/mesa/shader/slang/slang_export.h b/src/mesa/shader/slang/slang_export.h
deleted file mode 100644
index 40ceac1..0000000
--- a/src/mesa/shader/slang/slang_export.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  6.5
- *
- * Copyright (C) 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"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_EXPORT_H
-#define SLANG_EXPORT_H
-
-#include "slang_utility.h"
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-/*
- * Basic data quantity to transfer between application and assembly.
- * The <size> is the actual size of the data quantity including padding, if any. It is
- * used to calculate offsets from the beginning of the data.
- * If the <array_len> is not 0, the data quantity is an array of <array_len> size.
- * If the <structure> is not NULL, the data quantity is a struct. The <basic_type> is
- * invalid and the <field_count> holds the size of the <structure> array.
- * The <basic_type> values match those of <type> parameter for glGetActiveUniformARB.
- */
-
-typedef struct slang_export_data_quant_
-{
-	slang_atom name;
-	GLuint size;
-	GLuint array_len;
-	struct slang_export_data_quant_ *structure;
-	union
-	{
-		GLenum basic_type;
-		GLuint field_count;
-	} u;
-} slang_export_data_quant;
-
-GLvoid slang_export_data_quant_ctr (slang_export_data_quant *);
-GLvoid slang_export_data_quant_dtr (slang_export_data_quant *);
-slang_export_data_quant *slang_export_data_quant_add_field (slang_export_data_quant *);
-
-/*
- * Returns GL_FALSE if the quant is not an array.
- */
-GLboolean slang_export_data_quant_array (slang_export_data_quant *);
-
-/*
- * Returns GL_FALSE if the quant is not a structure.
- */
-GLboolean slang_export_data_quant_struct (slang_export_data_quant *);
-
-/*
- * Returns GL_TRUE if the quant is neither an array nor a structure.
- */
-GLboolean slang_export_data_quant_simple (slang_export_data_quant *);
-
-/*
- * Returns basic type of the quant. It must not be a structure.
- */
-GLenum slang_export_data_quant_type (slang_export_data_quant *);
-
-/*
- * Returns number of fields in the quant that is a structure.
- */
-GLuint slang_export_data_quant_fields (slang_export_data_quant *);
-
-/*
- * Return number of elements in the quant.
- * For arrays, return the size of the array.
- * Otherwise, return 1.
- */
-GLuint slang_export_data_quant_elements (slang_export_data_quant *);
-
-/*
- * Returns total number of components withing the quant element.
- */
-GLuint slang_export_data_quant_components (slang_export_data_quant *);
-
-/*
- * Returns size of the quant element.
- */
-GLuint slang_export_data_quant_size (slang_export_data_quant *);
-
-/*
- * Data access pattern. Specifies how data is accessed at what frequency.
- */
-
-typedef enum
-{
-	slang_exp_uniform,
-	slang_exp_varying,
-	slang_exp_attribute
-} slang_export_data_access;
-
-/*
- * Data export entry. Holds the data type information, access pattern and base address.
- */
-
-typedef struct
-{
-	slang_export_data_quant quant;
-	slang_export_data_access access;
-	GLuint address;
-} slang_export_data_entry;
-
-GLvoid slang_export_data_entry_ctr (slang_export_data_entry *);
-GLvoid slang_export_data_entry_dtr (slang_export_data_entry *);
-
-/*
- * Data export table.
- */
-
-typedef struct
-{
-	slang_export_data_entry *entries;
-	GLuint count;
-	slang_atom_pool *atoms;
-} slang_export_data_table;
-
-GLvoid slang_export_data_table_ctr (slang_export_data_table *);
-GLvoid slang_export_data_table_dtr (slang_export_data_table *);
-slang_export_data_entry *slang_export_data_table_add (slang_export_data_table *);
-
-/*
- * Code export entry. Contains label name and its entry point (label, address).
- */
-
-typedef struct
-{
-	slang_atom name;
-	GLuint address;
-} slang_export_code_entry;
-
-/*
- * Code export table.
- */
-
-typedef struct
-{
-	slang_export_code_entry *entries;
-	GLuint count;
-	slang_atom_pool *atoms;
-} slang_export_code_table;
-
-GLvoid slang_export_code_table_ctr (slang_export_code_table *);
-GLvoid slang_export_code_table_dtr (slang_export_code_table *);
-slang_export_code_entry *slang_export_code_table_add (slang_export_code_table *);
-
-/*
- * _slang_find_exported_data()
- *
- * Parses the name string and returns corresponding data entry, data quantity and offset.
- * Returns GL_TRUE if the data is found, returns GL_FALSE otherwise.
- */
-
-GLboolean _slang_find_exported_data (slang_export_data_table *, const char *,
-	slang_export_data_entry **, slang_export_data_quant **, GLuint *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff-tree e1b47b68ecd4a91ec46f594d8dfbcbcabae87988 (from 1f9def3163e26310b688336ef6dd513b99506151)
Author: Brian <brian at yutani.localnet.net>
Date:   Fri Feb 2 16:12:20 2007 -0700

    reformat, clean-up comments

diff --git a/src/mesa/shader/slang/slang_storage.h b/src/mesa/shader/slang/slang_storage.h
index c7380eb..5d756b5 100644
--- a/src/mesa/shader/slang/slang_storage.h
+++ b/src/mesa/shader/slang/slang_storage.h
@@ -28,21 +28,21 @@
 #include "slang_compile.h"
 #include "slang_typeinfo.h"
 
-#if defined __cplusplus
-extern "C" {
-#endif
 
 /*
- * Program variable data storage is kept completely transparent to the front-end compiler. It is
- * up to the back-end how the data is actually allocated. The slang_storage_type enum
- * provides the basic information about how the memory is interpreted. This abstract piece
- * of memory is called a data slot. A data slot of a particular type has a fixed size.
+ * Program variable data storage is kept completely transparent to the
+ * front-end compiler. It is up to the back-end how the data is
+ * actually allocated. The slang_storage_type enum provides the basic
+ * information about how the memory is interpreted. This abstract
+ * piece of memory is called a data slot. A data slot of a particular
+ * type has a fixed size.
  *
- * For now, only the three basic types are supported, that is bool, int and float. Other built-in
- * types like vector or matrix can easily be decomposed into a series of basic types.
+ * For now, only the three basic types are supported, that is bool,
+ * int and float. Other built-in types like vector or matrix can
+ * easily be decomposed into a series of basic types.
  *
- * If the vec4 module is enabled, 4-component vectors of floats are used when possible. 4x4 matrices
- * are constructed of 4 vec4 slots.
+ * If the vec4 module is enabled, 4-component vectors of floats are
+ * used when possible. 4x4 matrices are constructed of 4 vec4 slots.
  */
 typedef enum slang_storage_type_
 {
@@ -55,42 +55,50 @@ typedef enum slang_storage_type_
    slang_stor_vec4
 } slang_storage_type;
 
-/*
- * The slang_storage_array structure groups data slots of the same type into an array. This
- * array has a fixed length. Arrays are required to have a size equal to the sum of sizes of its
- * elements. They are also required to support indirect addressing. That is, if B references
- * first data slot in the array, S is the size of the data slot and I is the integral index that
- * is not known at compile time, B+I*S references I-th data slot.
+
+/**
+ * The slang_storage_array structure groups data slots of the same
+ * type into an array. This array has a fixed length. Arrays are
+ * required to have a size equal to the sum of sizes of its
+ * elements. They are also required to support indirect
+ * addressing. That is, if B references first data slot in the array,
+ * S is the size of the data slot and I is the integral index that is
+ * not known at compile time, B+I*S references I-th data slot.
  *
- * This structure is also used to break down built-in data types that are not supported directly.
- * Vectors, like vec3, are constructed from arrays of their basic types. Matrices are formed of
- * an array of column vectors, which are in turn processed as other vectors.
+ * This structure is also used to break down built-in data types that
+ * are not supported directly.  Vectors, like vec3, are constructed
+ * from arrays of their basic types. Matrices are formed of an array
+ * of column vectors, which are in turn processed as other vectors.
  */
 typedef struct slang_storage_array_
 {
-	slang_storage_type type;
-	struct slang_storage_aggregate_ *aggregate;	/* slang_stor_aggregate */
-	GLuint length;
+   slang_storage_type type;
+   struct slang_storage_aggregate_ *aggregate;
+   GLuint length;
 } slang_storage_array;
 
 GLboolean slang_storage_array_construct (slang_storage_array *);
 GLvoid slang_storage_array_destruct (slang_storage_array *);
 
-/*
- * The slang_storage_aggregate structure relaxes the indirect addressing requirement for
- * slang_storage_array structure. Aggregates are always accessed statically - its member
- * addresses are well-known at compile time. For example, user-defined types are implemented as
- * aggregates. Aggregates can collect data of a different type.
+
+/**
+ * The slang_storage_aggregate structure relaxes the indirect
+ * addressing requirement for slang_storage_array
+ * structure. Aggregates are always accessed statically - its member
+ * addresses are well-known at compile time. For example, user-defined
+ * types are implemented as aggregates. Aggregates can collect data of
+ * a different type.
  */
 typedef struct slang_storage_aggregate_
 {
-	slang_storage_array *arrays;
-	GLuint count;
+   slang_storage_array *arrays;
+   GLuint count;
 } slang_storage_aggregate;
 
 GLboolean slang_storage_aggregate_construct (slang_storage_aggregate *);
 GLvoid slang_storage_aggregate_destruct (slang_storage_aggregate *);
 
+
 extern GLboolean
 _slang_aggregate_variable(slang_storage_aggregate *agg,
                           slang_type_specifier *spec,
@@ -98,9 +106,6 @@ _slang_aggregate_variable(slang_storage_
                           slang_function_scope *funcs,
                           slang_struct_scope *structs,
                           slang_variable_scope *vars,
-#if 0
-                          slang_assembly_file *file,
-#endif
                           slang_atom_pool *atoms);
 
 /*
@@ -111,23 +116,24 @@ _slang_aggregate_variable(slang_storage_
 extern GLuint
 _slang_sizeof_type (slang_storage_type);
 
-/*
+
+/**
  * Returns total size (in machine units) of the given aggregate.
  * Returns 0 on error.
  */
-GLuint _slang_sizeof_aggregate (const slang_storage_aggregate *);
+extern GLuint
+_slang_sizeof_aggregate (const slang_storage_aggregate *);
 
-/*
- * Converts structured aggregate to a flat one, with arrays of generic type being
- * one-element long.
- * Returns GL_TRUE on success.
- * Returns GL_FALSE otherwise.
+
+/**
+ * Converts structured aggregate to a flat one, with arrays of generic
+ * type being one-element long.  Returns GL_TRUE on success.  Returns
+ * GL_FALSE otherwise.
  */
-GLboolean _slang_flatten_aggregate (slang_storage_aggregate *, const slang_storage_aggregate *);
+extern GLboolean
+_slang_flatten_aggregate (slang_storage_aggregate *,
+                          const slang_storage_aggregate *);
 
-#ifdef __cplusplus
-}
-#endif
 
 #endif
 
diff-tree 1f9def3163e26310b688336ef6dd513b99506151 (from 9cfee527f6ff5ff3e4de43b46ef098cb86211d2d)
Author: Brian <brian at yutani.localnet.net>
Date:   Fri Feb 2 16:10:02 2007 -0700

    move _slang_locate_function()

diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 295292e..17d1a6b 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -1264,58 +1264,6 @@ _slang_first_function(struct slang_funct
 
 
 
-slang_function *
-_slang_locate_function(const slang_function_scope * funcs, slang_atom a_name,
-                       const slang_operation * args, GLuint num_args,
-                       const slang_name_space * space,
-                       slang_atom_pool * atoms)
-{
-   GLuint i;
-
-   for (i = 0; i < funcs->num_functions; i++) {
-      slang_function *f = &funcs->functions[i];
-      const GLuint haveRetValue = _slang_function_has_return_value(f);
-      GLuint j;
-
-      if (a_name != f->header.a_name)
-         continue;
-      if (f->param_count - haveRetValue != num_args)
-         continue;
-
-      /* compare parameter / argument types */
-      for (j = 0; j < num_args; j++) {
-         slang_typeinfo ti;
-
-         if (!slang_typeinfo_construct(&ti))
-            return NULL;
-         if (!_slang_typeof_operation_(&args[j], space, &ti, atoms)) {
-            slang_typeinfo_destruct(&ti);
-            return NULL;
-         }
-         if (!slang_type_specifier_equal(&ti.spec,
-             &f->parameters->variables[j/* + haveRetValue*/]->type.specifier)) {
-            slang_typeinfo_destruct(&ti);
-            break;
-         }
-         slang_typeinfo_destruct(&ti);
-
-         /* "out" and "inout" formal parameter requires the actual parameter to be l-value */
-         if (!ti.can_be_referenced &&
-             (f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_out ||
-              f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_inout))
-            break;
-      }
-      if (j == num_args)
-         return f;
-   }
-   if (funcs->outer_scope != NULL)
-      return _slang_locate_function(funcs->outer_scope, a_name, args,
-                                    num_args, space, atoms);
-   return NULL;
-}
-
-
-
 /**
  * Assemble a function call, given a particular function name.
  * \param name  the function's name (operators like '*' are possible).
diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c
index cfed542..8bedb40 100644
--- a/src/mesa/shader/slang/slang_typeinfo.c
+++ b/src/mesa/shader/slang/slang_typeinfo.c
@@ -604,6 +604,58 @@ _slang_typeof_operation_(const slang_ope
 
 
 
+slang_function *
+_slang_locate_function(const slang_function_scope * funcs, slang_atom a_name,
+                       const slang_operation * args, GLuint num_args,
+                       const slang_name_space * space,
+                       slang_atom_pool * atoms)
+{
+   GLuint i;
+
+   for (i = 0; i < funcs->num_functions; i++) {
+      slang_function *f = &funcs->functions[i];
+      const GLuint haveRetValue = _slang_function_has_return_value(f);
+      GLuint j;
+
+      if (a_name != f->header.a_name)
+         continue;
+      if (f->param_count - haveRetValue != num_args)
+         continue;
+
+      /* compare parameter / argument types */
+      for (j = 0; j < num_args; j++) {
+         slang_typeinfo ti;
+
+         if (!slang_typeinfo_construct(&ti))
+            return NULL;
+         if (!_slang_typeof_operation_(&args[j], space, &ti, atoms)) {
+            slang_typeinfo_destruct(&ti);
+            return NULL;
+         }
+         if (!slang_type_specifier_equal(&ti.spec,
+             &f->parameters->variables[j/* + haveRetValue*/]->type.specifier)) {
+            slang_typeinfo_destruct(&ti);
+            break;
+         }
+         slang_typeinfo_destruct(&ti);
+
+         /* "out" and "inout" formal parameter requires the actual parameter to be l-value */
+         if (!ti.can_be_referenced &&
+             (f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_out ||
+              f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_inout))
+            break;
+      }
+      if (j == num_args)
+         return f;
+   }
+   if (funcs->outer_scope != NULL)
+      return _slang_locate_function(funcs->outer_scope, a_name, args,
+                                    num_args, space, atoms);
+   return NULL;
+}
+
+
+
 /**
  * Determine the return type of a function.
  * \param a_name  the function name
diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h
index 2b565df..6e27079 100644
--- a/src/mesa/shader/slang/slang_typeinfo.h
+++ b/src/mesa/shader/slang/slang_typeinfo.h
@@ -58,15 +58,14 @@ typedef struct slang_assemble_ctx_
 {
    slang_atom_pool *atoms;
    slang_name_space space;
-   slang_swizzle swz;
    struct gl_program *program;
    slang_var_table *vartable;
-
    struct slang_function_ *CurFunction;
    slang_atom CurLoopBreak;
    slang_atom CurLoopCont;
 } slang_assemble_ctx;
 
+
 extern struct slang_function_ *
 _slang_locate_function(const struct slang_function_scope_ *funcs,
                        slang_atom name, const struct slang_operation_ *params,
diff-tree 9cfee527f6ff5ff3e4de43b46ef098cb86211d2d (from 3f71282850d97e8493c505f178365ba305754ce9)
Author: Brian <brian at yutani.localnet.net>
Date:   Fri Feb 2 16:08:45 2007 -0700

    remove multibyte chars

diff --git a/src/mesa/shader/slang/slang_library_noise.c b/src/mesa/shader/slang/slang_library_noise.c
index b30bb30..46075c4 100644
--- a/src/mesa/shader/slang/slang_library_noise.c
+++ b/src/mesa/shader/slang/slang_library_noise.c
@@ -24,7 +24,7 @@
 
 /*
  * SimplexNoise1234
- * Copyright © 2003-2005, Stefan Gustavson
+ * Copyright (c) 2003-2005, Stefan Gustavson
  *
  * Contact: stegu at itn.liu.se
  */
@@ -395,7 +395,7 @@ GLfloat _slang_library_noise4 (GLfloat x
     /* To find out which of the 24 possible simplices we're in, we need to */
     /* determine the magnitude ordering of x0, y0, z0 and w0. */
     /* The method below is a good way of finding the ordering of x,y,z,w and */
-    /* then find the correct traversal order for the simplex we’re in. */
+    /* then find the correct traversal order for the simplex we're in. */
     /* First, six pair-wise comparisons are performed between each possible pair */
     /* of the four coordinates, and the results are used to add up binary bits */
     /* for an integer index. */
diff-tree 3f71282850d97e8493c505f178365ba305754ce9 (from 72c3672857b3ee4bed34d82ed70a1cf9cf277131)
Author: Brian <brian at yutani.localnet.net>
Date:   Fri Feb 2 15:33:16 2007 -0700

    remove unused field

diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h
index 6e247d0..e7be7ef 100644
--- a/src/mesa/shader/slang/slang_compile.h
+++ b/src/mesa/shader/slang/slang_compile.h
@@ -75,9 +75,6 @@ typedef struct slang_code_object_
 {
    slang_code_unit builtin[SLANG_BUILTIN_TOTAL];
    slang_code_unit unit;
-#if 0
-   slang_assembly_file assembly;
-#endif
    slang_var_pool varpool;
    slang_atom_pool atompool;
 } slang_code_object;
diff-tree 72c3672857b3ee4bed34d82ed70a1cf9cf277131 (from 0d1cd6d41c22836cf196e06656ae5f34e5148deb)
Author: Brian <brian at yutani.localnet.net>
Date:   Fri Feb 2 15:32:32 2007 -0700

    remove slang_asm_string()

diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c
index 0ebef81..7cfd87f 100644
--- a/src/mesa/shader/slang/slang_print.c
+++ b/src/mesa/shader/slang/slang_print.c
@@ -631,160 +631,6 @@ slang_print_function(const slang_functio
 
 
 
-#if 0
-
-const char *
-slang_asm_string(slang_assembly_type t)
-{
-   switch (t) {
-      /* core */
-   case slang_asm_none:
-      return "none";
-   case slang_asm_float_copy:
-      return "float_copy";
-   case slang_asm_float_move:
-      return "float_move";
-   case slang_asm_float_push:
-      return "float_push";
-   case slang_asm_float_deref:
-      return "float_deref";
-   case slang_asm_float_add:
-      return "float_add";
-   case slang_asm_float_multiply:
-      return "float_multiply";
-   case slang_asm_float_divide:
-      return "float_divide";
-   case slang_asm_float_negate:
-      return "float_negate";
-   case slang_asm_float_less:
-      return "float_less";
-   case slang_asm_float_equal_exp:
-      return "float_equal";
-   case slang_asm_float_equal_int:
-      return "float_equal";
-   case slang_asm_float_to_int:
-      return "float_to_int";
-   case slang_asm_float_sine:
-      return "float_sine";
-   case slang_asm_float_arcsine:
-      return "float_arcsine";
-   case slang_asm_float_arctan:
-      return "float_arctan";
-   case slang_asm_float_power:
-      return "float_power";
-   case slang_asm_float_log2:
-      return "float_log2";
-   case slang_asm_vec4_floor:
-      return "vec4_floor";
-   case slang_asm_float_ceil:
-      return "float_ceil";
-   case slang_asm_float_noise1:
-      return "float_noise1";
-   case slang_asm_float_noise2:
-      return "float_noise2";
-   case slang_asm_float_noise3:
-      return "float_noise3";
-   case slang_asm_float_noise4:
-      return "float_noise4";
-   case slang_asm_int_copy:
-      return "int_copy";
-   case slang_asm_int_move:
-      return "int_move";
-   case slang_asm_int_push:
-      return "int_push";
-   case slang_asm_int_deref:
-      return "int_deref";
-   case slang_asm_int_to_float:
-      return "int_to_float";
-   case slang_asm_int_to_addr:
-      return "int_to_addr";
-   case slang_asm_bool_copy:
-      return "bool_copy";
-   case slang_asm_bool_move:
-      return "bool_move";
-   case slang_asm_bool_push:
-      return "bool_push";
-   case slang_asm_bool_deref:
-      return "bool_deref";
-   case slang_asm_addr_copy:
-      return "addr_copy";
-   case slang_asm_addr_push:
-      return "addr_push";
-   case slang_asm_addr_deref:
-      return "addr_deref";
-   case slang_asm_addr_add:
-      return "addr_add";
-   case slang_asm_addr_multiply:
-      return "addr_multiply";
-   case slang_asm_vec4_tex1d:
-      return "vec4_tex1d";
-   case slang_asm_vec4_tex2d:
-      return "vec4_tex2d";
-   case slang_asm_vec4_tex3d:
-      return "vec4_tex3d";
-   case slang_asm_vec4_texcube:
-      return "vec4_texcube";
-   case slang_asm_vec4_shad1d:
-      return "vec4_shad1d";
-   case slang_asm_vec4_shad2d:
-      return "vec4_shad2d";
-   case slang_asm_jump:
-      return "jump";
-   case slang_asm_jump_if_zero:
-      return "jump_if_zero";
-   case slang_asm_enter:
-      return "enter";
-   case slang_asm_leave:
-      return "leave";
-   case slang_asm_local_alloc:
-      return "local_alloc";
-   case slang_asm_local_free:
-      return "local_free";
-   case slang_asm_local_addr:
-      return "local_addr";
-   case slang_asm_global_addr:
-      return "global_addr";
-   case slang_asm_call:
-      return "call";
-   case slang_asm_return:
-      return "return";
-   case slang_asm_discard:
-      return "discard";
-   case slang_asm_exit:
-      return "exit";
-      /* GL_MESA_shader_debug */
-   case slang_asm_float_print:
-      return "float_print";
-   case slang_asm_int_print:
-      return "int_print";
-   case slang_asm_bool_print:
-      return "bool_print";
-      /* vec4 */
-   case slang_asm_float_to_vec4:
-      return "float_to_vec4";
-   case slang_asm_vec4_add:
-      return "vec4_add";
-   case slang_asm_vec4_subtract:
-      return "vec4_subtract";
-   case slang_asm_vec4_multiply:
-      return "vec4_multiply";
-   case slang_asm_vec4_divide:
-      return "vec4_divide";
-   case slang_asm_vec4_negate:
-      return "vec4_negate";
-   case slang_asm_vec4_dot:
-      return "vec4_dot";
-   case slang_asm_vec4_copy:
-      return "vec4_copy";
-   case slang_asm_vec4_deref:
-      return "vec4_deref";
-   case slang_asm_vec4_equal_int:
-      return "vec4_equal";
-   default:
-      return "??asm??";
-   }
-}
-#endif
 
 
 const char *
diff --git a/src/mesa/shader/slang/slang_print.h b/src/mesa/shader/slang/slang_print.h
index 81cf0a8..46605c8 100644
--- a/src/mesa/shader/slang/slang_print.h
+++ b/src/mesa/shader/slang/slang_print.h
@@ -9,12 +9,6 @@ slang_print_function(const slang_functio
 extern void
 slang_print_tree(const slang_operation *op, int indent);
 
-
-#if 0
-extern const char *
-slang_asm_string(slang_assembly_type t);
-#endif
-
 extern const char *
 slang_type_qual_string(slang_type_qualifier q);
 
diff-tree 0d1cd6d41c22836cf196e06656ae5f34e5148deb (from 1bc71e32ea281077fed6f77bf4c1d63c65eb14f6)
Author: Brian <brian at yutani.localnet.net>
Date:   Fri Feb 2 15:31:21 2007 -0700

    s/SLANG_ASSEMBLE_TYPEINFO_H/SLANG_TYPEINFO_H/

diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h
index 71ed9b7..2b565df 100644
--- a/src/mesa/shader/slang/slang_typeinfo.h
+++ b/src/mesa/shader/slang/slang_typeinfo.h
@@ -22,8 +22,8 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#ifndef SLANG_ASSEMBLE_TYPEINFO_H
-#define SLANG_ASSEMBLE_TYPEINFO_H 1
+#ifndef SLANG_TYPEINFO_H
+#define SLANG_TYPEINFO_H 1
 
 #include "imports.h"
 #include "mtypes.h"
@@ -199,6 +199,4 @@ extern GLuint
 _slang_type_dim(slang_type_specifier_type);
 
 
-
 #endif
-
diff-tree 1bc71e32ea281077fed6f77bf4c1d63c65eb14f6 (from fe45343df98ecdc06039b68d5a249a41f9e9e11e)
Author: Brian <brian at yutani.localnet.net>
Date:   Fri Feb 2 15:30:50 2007 -0700

    s/slang_assembly_typeinfo/slang_typeinfo/

diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index d972118..295292e 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -1284,20 +1284,20 @@ _slang_locate_function(const slang_funct
 
       /* compare parameter / argument types */
       for (j = 0; j < num_args; j++) {
-         slang_assembly_typeinfo ti;
+         slang_typeinfo ti;
 
-         if (!slang_assembly_typeinfo_construct(&ti))
+         if (!slang_typeinfo_construct(&ti))
             return NULL;
          if (!_slang_typeof_operation_(&args[j], space, &ti, atoms)) {
-            slang_assembly_typeinfo_destruct(&ti);
+            slang_typeinfo_destruct(&ti);
             return NULL;
          }
          if (!slang_type_specifier_equal(&ti.spec,
              &f->parameters->variables[j/* + haveRetValue*/]->type.specifier)) {
-            slang_assembly_typeinfo_destruct(&ti);
+            slang_typeinfo_destruct(&ti);
             break;
          }
-         slang_assembly_typeinfo_destruct(&ti);
+         slang_typeinfo_destruct(&ti);
 
          /* "out" and "inout" formal parameter requires the actual parameter to be l-value */
          if (!ti.can_be_referenced &&
@@ -1667,14 +1667,14 @@ _slang_gen_select(slang_assemble_ctx *A,
    slang_ir_node *altLab, *endLab;
    slang_ir_node *tree, *tmpDecl, *tmpVar, *cond, *cjump, *jump;
    slang_ir_node *bodx, *body, *assignx, *assigny;
-   slang_assembly_typeinfo type;
+   slang_typeinfo type;
    int size;
 
    assert(oper->type == slang_oper_select);
    assert(oper->num_children == 3);
 
    /* size of x or y's type */
-   slang_assembly_typeinfo_construct(&type);
+   slang_typeinfo_construct(&type);
    _slang_typeof_operation(A, &oper->children[1], &type);
    size = _slang_sizeof_type_specifier(&type.spec);
    assert(size > 0);
@@ -2110,9 +2110,9 @@ _slang_gen_assignment(slang_assemble_ctx
 static slang_ir_node *
 _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper)
 {
-   slang_assembly_typeinfo ti;
+   slang_typeinfo ti;
 
-   slang_assembly_typeinfo_construct(&ti);
+   slang_typeinfo_construct(&ti);
    _slang_typeof_operation(A, &oper->children[0], &ti);
 
    if (_slang_type_is_vector(ti.spec.type)) {
@@ -2167,10 +2167,10 @@ _slang_gen_field(slang_assemble_ctx * A,
 static slang_ir_node *
 _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper)
 {
-   slang_assembly_typeinfo array_ti;
+   slang_typeinfo array_ti;
 
    /* get array's type info */
-   slang_assembly_typeinfo_construct(&array_ti);
+   slang_typeinfo_construct(&array_ti);
    _slang_typeof_operation(A, &oper->children[0], &array_ti);
 
    if (_slang_type_is_vector(array_ti.spec.type)) {
@@ -2201,12 +2201,12 @@ _slang_gen_subscript(slang_assemble_ctx 
    }
    else {
       /* conventional array */
-      slang_assembly_typeinfo elem_ti;
+      slang_typeinfo elem_ti;
       slang_ir_node *elem, *array, *index;
       GLint elemSize;
 
       /* size of array element */
-      slang_assembly_typeinfo_construct(&elem_ti);
+      slang_typeinfo_construct(&elem_ti);
       _slang_typeof_operation(A, oper, &elem_ti);
       elemSize = _slang_sizeof_type_specifier(&elem_ti.spec);
       assert(elemSize >= 1);
diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h
index ad52b66..0ce9bba 100644
--- a/src/mesa/shader/slang/slang_compile_operation.h
+++ b/src/mesa/shader/slang/slang_compile_operation.h
@@ -122,7 +122,7 @@ typedef struct slang_operation_
    struct slang_function_ *fun;  /**< If type == slang_oper_call */
    struct slang_variable_ *var;  /**< If type == slang_oper_identier */
    slang_fully_specified_type *datatype; /**< Type of this operation */
-   slang_assembly_typeinfo ti;
+   slang_typeinfo ti;
 } slang_operation;
 
 
diff --git a/src/mesa/shader/slang/slang_simplify.c b/src/mesa/shader/slang/slang_simplify.c
index bf6afe4..ef8b2fe 100644
--- a/src/mesa/shader/slang/slang_simplify.c
+++ b/src/mesa/shader/slang/slang_simplify.c
@@ -294,15 +294,15 @@ _slang_adapt_call(slang_operation *callO
           * into individual floats/ints and try to match the function params.
           */
          for (i = 0; i < numParams; i++) {
-            slang_assembly_typeinfo argType;
+            slang_typeinfo argType;
             GLint argSz, j;
 
             /* Get type of arg[i] */
-            if (!slang_assembly_typeinfo_construct(&argType))
+            if (!slang_typeinfo_construct(&argType))
                return GL_FALSE;
             if (!_slang_typeof_operation_(&callOper->children[i], space,
                                           &argType, atoms)) {
-               slang_assembly_typeinfo_destruct(&argType);
+               slang_typeinfo_destruct(&argType);
                return GL_FALSE;
             }
 
@@ -369,15 +369,15 @@ _slang_adapt_call(slang_operation *callO
     *   x = foo(int(3.15), bool(9))
     */
    for (i = 0; i < numParams; i++) {
-      slang_assembly_typeinfo argType;
+      slang_typeinfo argType;
       slang_variable *paramVar = fun->parameters->variables[i];
 
       /* Get type of arg[i] */
-      if (!slang_assembly_typeinfo_construct(&argType))
+      if (!slang_typeinfo_construct(&argType))
          return GL_FALSE;
       if (!_slang_typeof_operation_(&callOper->children[i], space,
                                     &argType, atoms)) {
-         slang_assembly_typeinfo_destruct(&argType);
+         slang_typeinfo_destruct(&argType);
          return GL_FALSE;
       }
 
@@ -398,7 +398,7 @@ _slang_adapt_call(slang_operation *callO
          callOper->children[i].children = child;
       }
 
-      slang_assembly_typeinfo_destruct(&argType);
+      slang_typeinfo_destruct(&argType);
    }
 
    if (dbg) {
diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c
index d48113a..cfed542 100644
--- a/src/mesa/shader/slang/slang_typeinfo.c
+++ b/src/mesa/shader/slang/slang_typeinfo.c
@@ -230,7 +230,7 @@ slang_type_specifier_equal(const slang_t
 
 
 GLboolean
-slang_assembly_typeinfo_construct(slang_assembly_typeinfo * ti)
+slang_typeinfo_construct(slang_typeinfo * ti)
 {
    slang_type_specifier_ctr(&ti->spec);
    ti->array_len = 0;
@@ -238,7 +238,7 @@ slang_assembly_typeinfo_construct(slang_
 }
 
 GLvoid
-slang_assembly_typeinfo_destruct(slang_assembly_typeinfo * ti)
+slang_typeinfo_destruct(slang_typeinfo * ti)
 {
    slang_type_specifier_dtr(&ti->spec);
 }
@@ -274,7 +274,7 @@ typeof_existing_function(const char *nam
 GLboolean
 _slang_typeof_operation(const slang_assemble_ctx * A,
                         const slang_operation * op,
-                        slang_assembly_typeinfo * ti)
+                        slang_typeinfo * ti)
 {
    return _slang_typeof_operation_(op, &A->space, ti, A->atoms);
 }
@@ -291,7 +291,7 @@ _slang_typeof_operation(const slang_asse
 GLboolean
 _slang_typeof_operation_(const slang_operation * op,
                          const slang_name_space * space,
-                         slang_assembly_typeinfo * ti,
+                         slang_typeinfo * ti,
                          slang_atom_pool * atoms)
 {
    ti->can_be_referenced = GL_FALSE;
@@ -415,30 +415,30 @@ _slang_typeof_operation_(const slang_ope
       /*case slang_oper_complement: */
    case slang_oper_subscript:
       {
-         slang_assembly_typeinfo _ti;
+         slang_typeinfo _ti;
 
-         if (!slang_assembly_typeinfo_construct(&_ti))
+         if (!slang_typeinfo_construct(&_ti))
             RETURN_NIL();
          if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) {
-            slang_assembly_typeinfo_destruct(&_ti);
+            slang_typeinfo_destruct(&_ti);
             RETURN_NIL();
          }
          ti->can_be_referenced = _ti.can_be_referenced;
          if (_ti.spec.type == slang_spec_array) {
             if (!slang_type_specifier_copy(&ti->spec, _ti.spec._array)) {
-               slang_assembly_typeinfo_destruct(&_ti);
+               slang_typeinfo_destruct(&_ti);
                RETURN_NIL();
             }
          }
          else {
             if (!_slang_type_is_vector(_ti.spec.type)
                 && !_slang_type_is_matrix(_ti.spec.type)) {
-               slang_assembly_typeinfo_destruct(&_ti);
+               slang_typeinfo_destruct(&_ti);
                RETURN_ERROR("cannot index a non-array type", 0);
             }
             ti->spec.type = _slang_type_base(_ti.spec.type);
          }
-         slang_assembly_typeinfo_destruct(&_ti);
+         slang_typeinfo_destruct(&_ti);
       }
       break;
    case slang_oper_call:
@@ -480,12 +480,12 @@ _slang_typeof_operation_(const slang_ope
       break;
    case slang_oper_field:
       {
-         slang_assembly_typeinfo _ti;
+         slang_typeinfo _ti;
 
-         if (!slang_assembly_typeinfo_construct(&_ti))
+         if (!slang_typeinfo_construct(&_ti))
             RETURN_NIL();
          if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) {
-            slang_assembly_typeinfo_destruct(&_ti);
+            slang_typeinfo_destruct(&_ti);
             RETURN_NIL();
          }
          if (_ti.spec.type == slang_spec_struct) {
@@ -494,11 +494,11 @@ _slang_typeof_operation_(const slang_ope
             field = _slang_locate_variable(_ti.spec._struct->fields, op->a_id,
                                            GL_FALSE);
             if (field == NULL) {
-               slang_assembly_typeinfo_destruct(&_ti);
+               slang_typeinfo_destruct(&_ti);
                RETURN_NIL();
             }
             if (!slang_type_specifier_copy(&ti->spec, &field->type.specifier)) {
-               slang_assembly_typeinfo_destruct(&_ti);
+               slang_typeinfo_destruct(&_ti);
                RETURN_NIL();
             }
             ti->can_be_referenced = _ti.can_be_referenced;
@@ -511,14 +511,14 @@ _slang_typeof_operation_(const slang_ope
             /* determine the swizzle of the field expression */
 #if 000
             if (!_slang_type_is_vector(_ti.spec.type)) {
-               slang_assembly_typeinfo_destruct(&_ti);
+               slang_typeinfo_destruct(&_ti);
                RETURN_ERROR("Can't swizzle scalar expression", 0);
             }
 #endif
             rows = _slang_type_dim(_ti.spec.type);
             swizzle = slang_atom_pool_id(atoms, op->a_id);
             if (!_slang_is_swizzle(swizzle, rows, &ti->swz)) {
-               slang_assembly_typeinfo_destruct(&_ti);
+               slang_typeinfo_destruct(&_ti);
                RETURN_ERROR("Bad swizzle", 0);
             }
             ti->is_swizzled = GL_TRUE;
@@ -585,7 +585,7 @@ _slang_typeof_operation_(const slang_ope
                break;
             }
          }
-         slang_assembly_typeinfo_destruct(&_ti);
+         slang_typeinfo_destruct(&_ti);
       }
       break;
    case slang_oper_postincrement:
diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h
index 267f9ab..71ed9b7 100644
--- a/src/mesa/shader/slang/slang_typeinfo.h
+++ b/src/mesa/shader/slang/slang_typeinfo.h
@@ -143,20 +143,20 @@ slang_type_specifier_equal(const slang_t
                            const slang_type_specifier *);
 
 
-typedef struct slang_assembly_typeinfo_
+typedef struct slang_typeinfo_
 {
    GLboolean can_be_referenced;
    GLboolean is_swizzled;
    slang_swizzle swz;
    slang_type_specifier spec;
    GLuint array_len;
-} slang_assembly_typeinfo;
+} slang_typeinfo;
 
 extern GLboolean
-slang_assembly_typeinfo_construct(slang_assembly_typeinfo *);
+slang_typeinfo_construct(slang_typeinfo *);
 
 extern GLvoid
-slang_assembly_typeinfo_destruct(slang_assembly_typeinfo *);
+slang_typeinfo_destruct(slang_typeinfo *);
 
 
 /**
@@ -167,12 +167,12 @@ slang_assembly_typeinfo_destruct(slang_a
 extern GLboolean
 _slang_typeof_operation(const slang_assemble_ctx *,
                         const struct slang_operation_ *,
-                        slang_assembly_typeinfo *);
+                        slang_typeinfo *);
 
 extern GLboolean
 _slang_typeof_operation_(const struct slang_operation_ *,
                          const slang_name_space *,
-                         slang_assembly_typeinfo *, slang_atom_pool *);
+                         slang_typeinfo *, slang_atom_pool *);
 
 /**
  * Retrieves type of a function prototype, if one exists.
diff-tree fe45343df98ecdc06039b68d5a249a41f9e9e11e (from 884fdfeb2272802e3103321edfed9cb198950e90)
Author: Brian <brian at yutani.localnet.net>
Date:   Fri Feb 2 15:29:48 2007 -0700

    s/slang_assembly_name_space/slang_name_space/

diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 222bf11..d972118 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -1267,7 +1267,7 @@ _slang_first_function(struct slang_funct
 slang_function *
 _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name,
                        const slang_operation * args, GLuint num_args,
-                       const slang_assembly_name_space * space,
+                       const slang_name_space * space,
                        slang_atom_pool * atoms)
 {
    GLuint i;
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index 615dfc1..2f4d458 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -339,7 +339,7 @@ static GLboolean
 parse_array_len(slang_parse_ctx * C, slang_output_ctx * O, GLuint * len)
 {
    slang_operation array_size;
-   slang_assembly_name_space space;
+   slang_name_space space;
    GLboolean result;
 
    if (!slang_operation_construct(&array_size))
diff --git a/src/mesa/shader/slang/slang_simplify.c b/src/mesa/shader/slang/slang_simplify.c
index 19e6274..bf6afe4 100644
--- a/src/mesa/shader/slang/slang_simplify.c
+++ b/src/mesa/shader/slang/slang_simplify.c
@@ -90,7 +90,7 @@ _slang_lookup_constant(const char *name)
  */
 void
 _slang_simplify(slang_operation *oper,
-                const slang_assembly_name_space * space,
+                const slang_name_space * space,
                 slang_atom_pool * atoms)
 {
    GLboolean isFloat[4];
@@ -275,7 +275,7 @@ _slang_simplify(slang_operation *oper,
  */
 GLboolean
 _slang_adapt_call(slang_operation *callOper, const slang_function *fun,
-                  const slang_assembly_name_space * space,
+                  const slang_name_space * space,
                   slang_atom_pool * atoms)
 {
    const GLboolean haveRetValue = _slang_function_has_return_value(fun);
diff --git a/src/mesa/shader/slang/slang_simplify.h b/src/mesa/shader/slang/slang_simplify.h
index b29740e..d6979a8 100644
--- a/src/mesa/shader/slang/slang_simplify.h
+++ b/src/mesa/shader/slang/slang_simplify.h
@@ -9,13 +9,13 @@ _slang_lookup_constant(const char *name)
 
 extern void
 _slang_simplify(slang_operation *oper,
-                const slang_assembly_name_space * space,
+                const slang_name_space * space,
                 slang_atom_pool * atoms);
 
 
 extern GLboolean
 _slang_adapt_call(slang_operation *callOper, const slang_function *fun,
-                  const slang_assembly_name_space * space,
+                  const slang_name_space * space,
                   slang_atom_pool * atoms);
 
 
diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c
index fd5cd70..d48113a 100644
--- a/src/mesa/shader/slang/slang_typeinfo.c
+++ b/src/mesa/shader/slang/slang_typeinfo.c
@@ -257,7 +257,7 @@ slang_assembly_typeinfo_destruct(slang_a
 static GLboolean
 typeof_existing_function(const char *name, const slang_operation * params,
                          GLuint num_params,
-                         const slang_assembly_name_space * space,
+                         const slang_name_space * space,
                          slang_type_specifier * spec,
                          slang_atom_pool * atoms)
 {
@@ -290,7 +290,7 @@ _slang_typeof_operation(const slang_asse
  */
 GLboolean
 _slang_typeof_operation_(const slang_operation * op,
-                         const slang_assembly_name_space * space,
+                         const slang_name_space * space,
                          slang_assembly_typeinfo * ti,
                          slang_atom_pool * atoms)
 {
@@ -616,7 +616,7 @@ _slang_typeof_operation_(const slang_ope
 GLboolean
 _slang_typeof_function(slang_atom a_name, const slang_operation * params,
                        GLuint num_params,
-                       const slang_assembly_name_space * space,
+                       const slang_name_space * space,
                        slang_type_specifier * spec, GLboolean * exists,
                        slang_atom_pool * atoms)
 {
diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h
index b2ca8b8..267f9ab 100644
--- a/src/mesa/shader/slang/slang_typeinfo.h
+++ b/src/mesa/shader/slang/slang_typeinfo.h
@@ -46,18 +46,18 @@ typedef struct slang_swizzle_
    GLuint swizzle[4];
 } slang_swizzle;
 
-typedef struct slang_assembly_name_space_
+typedef struct slang_name_space_
 {
    struct slang_function_scope_ *funcs;
    struct slang_struct_scope_ *structs;
    struct slang_variable_scope_ *vars;
-} slang_assembly_name_space;
+} slang_name_space;
 
 
 typedef struct slang_assemble_ctx_
 {
    slang_atom_pool *atoms;
-   slang_assembly_name_space space;
+   slang_name_space space;
    slang_swizzle swz;
    struct gl_program *program;
    slang_var_table *vartable;
@@ -71,7 +71,7 @@ extern struct slang_function_ *
 _slang_locate_function(const struct slang_function_scope_ *funcs,
                        slang_atom name, const struct slang_operation_ *params,
                        GLuint num_params,
-                       const slang_assembly_name_space *space,
+                       const slang_name_space *space,
                        slang_atom_pool *);
 
 
@@ -171,7 +171,7 @@ _slang_typeof_operation(const slang_asse
 
 extern GLboolean
 _slang_typeof_operation_(const struct slang_operation_ *,
-                         const slang_assembly_name_space *,
+                         const slang_name_space *,
                          slang_assembly_typeinfo *, slang_atom_pool *);
 
 /**
@@ -182,7 +182,7 @@ _slang_typeof_operation_(const struct sl
 extern GLboolean
 _slang_typeof_function(slang_atom a_name,
                        const struct slang_operation_ *params,
-                       GLuint num_params, const slang_assembly_name_space *,
+                       GLuint num_params, const slang_name_space *,
                        slang_type_specifier *spec, GLboolean *exists,
                        slang_atom_pool *);
 



More information about the mesa-commit mailing list