From 2164cf77306856f7d20965354b4eeff3736ddf64 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 18 Nov 2006 17:45:01 +0000 Subject: move fix-up code into new slang_fixup_save() function --- src/mesa/shader/slang/slang_compile_function.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/mesa/shader/slang/slang_compile_function.c') diff --git a/src/mesa/shader/slang/slang_compile_function.c b/src/mesa/shader/slang/slang_compile_function.c index b0e2b62d42..e6e0d89ddb 100644 --- a/src/mesa/shader/slang/slang_compile_function.c +++ b/src/mesa/shader/slang/slang_compile_function.c @@ -47,6 +47,25 @@ slang_fixup_table_free(slang_fixup_table * fix) 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_alloc_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 -- cgit v1.2.3