mesa: remove unused fixup table code in glsl compiler
(cherry picked from commit 19ca2908be)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -32,42 +32,6 @@
|
||||
#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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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 *);
|
||||
|
||||
Reference in New Issue
Block a user