mesa: remove unused fixup table code in glsl compiler
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 12 Dec 2008 16:58:18 +0000 (09:58 -0700)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 12 Dec 2008 16:58:18 +0000 (09:58 -0700)
src/mesa/shader/slang/slang_compile.c
src/mesa/shader/slang/slang_compile_function.c
src/mesa/shader/slang/slang_compile_function.h

index ebc98c6c08e77aad9377bff809141c78a80edcd0..d8291b2af4bbfc077bc54fc92052f983944c314f 100644 (file)
@@ -2179,10 +2179,8 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition,
          }
 
          /* destroy the existing function declaration and replace it
-          * with the new one, remember to save the fixup table
+          * with the new one
           */
-         //parsed_func.fixups = found_func->fixups;
-         //slang_fixup_table_init(&found_func->fixups);
          slang_function_destruct(found_func);
          *found_func = parsed_func;
       }
index bc926e6c0e8f38bde0bc08541b61a77cd93320c4..eca75dcb2165f8cd9b941c8b0dd6ae3ecc3c3449 100644 (file)
 #include "slang_compile.h"
 #include "slang_mem.h"
 
-/* slang_fixup_table */
-
-void
-slang_fixup_table_init(slang_fixup_table * fix)
-{
-   fix->table = NULL;
-   fix->count = 0;
-}
-
-void
-slang_fixup_table_free(slang_fixup_table * fix)
-{
-   _slang_free(fix->table);
-   slang_fixup_table_init(fix);
-}
-
-/**
- * Add a new fixup address to the table.
- */
-GLboolean
-slang_fixup_save(slang_fixup_table *fixups, GLuint address)
-{
-   fixups->table = (GLuint *)
-      _slang_realloc(fixups->table,
-                     fixups->count * sizeof(GLuint),
-                     (fixups->count + 1) * sizeof(GLuint));
-   if (fixups->table == NULL)
-      return GL_FALSE;
-   fixups->table[fixups->count] = address;
-   fixups->count++;
-   return GL_TRUE;
-}
-
-
-
-/* slang_function */
 
 int
 slang_function_construct(slang_function * func)
@@ -86,8 +50,6 @@ slang_function_construct(slang_function * func)
    _slang_variable_scope_ctr(func->parameters);
    func->param_count = 0;
    func->body = NULL;
-   //func->address = ~0;
-   //slang_fixup_table_init(&func->fixups);
    return 1;
 }
 
@@ -101,7 +63,6 @@ slang_function_destruct(slang_function * func)
       slang_operation_destruct(func->body);
       _slang_free(func->body);
    }
-   //slang_fixup_table_free(&func->fixups);
 }
 
 
index 7fd697ddc845674c736a9ca49aeea069c28fe1bc..bd44378b698bb1c15ce3cad05b980b9f5e5b4e0e 100644 (file)
@@ -39,21 +39,6 @@ typedef enum slang_function_kind_
 } slang_function_kind;
 
 
-/**
- * When we need to fill in addresses which we won't know until the future,
- * we keep track of them with a fix-up table.
- */
-typedef struct slang_fixup_table_
-{
-   GLuint *table;     /**< array[count] of addresses */
-   GLuint count;
-} slang_fixup_table;
-
-extern void slang_fixup_table_init(slang_fixup_table *);
-extern void slang_fixup_table_free(slang_fixup_table *);
-extern GLboolean slang_fixup_save(slang_fixup_table *fixups, GLuint address);
-
-
 /**
  * Description of a compiled shader function.
  */
@@ -64,10 +49,6 @@ typedef struct slang_function_
    slang_variable_scope *parameters; /**< formal parameters AND local vars */
    unsigned int param_count;   /**< number of formal params (no locals) */
    slang_operation *body;      /**< The instruction tree */
-#if 0
-   unsigned int address;       /**< Address of this func in memory */
-   slang_fixup_table fixups;   /**< Mem locations which need func's address */
-#endif
 } slang_function;
 
 extern int slang_function_construct(slang_function *);