summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_compile_struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/slang/slang_compile_struct.c')
-rw-r--r--src/mesa/shader/slang/slang_compile_struct.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/shader/slang/slang_compile_struct.c b/src/mesa/shader/slang/slang_compile_struct.c
index 89c79d431b..97a34d24fe 100644
--- a/src/mesa/shader/slang/slang_compile_struct.c
+++ b/src/mesa/shader/slang/slang_compile_struct.c
@@ -29,6 +29,7 @@
*/
#include "imports.h"
+#include "slang_mem.h"
#include "slang_compile.h"
@@ -47,7 +48,7 @@ slang_struct_scope_destruct(slang_struct_scope * scope)
for (i = 0; i < scope->num_structs; i++)
slang_struct_destruct(scope->structs + i);
- slang_alloc_free(scope->structs);
+ _slang_free(scope->structs);
/* do not free scope->outer_scope */
}
@@ -58,9 +59,8 @@ slang_struct_scope_copy(slang_struct_scope * x, const slang_struct_scope * y)
GLuint i;
_slang_struct_scope_ctr(&z);
- z.structs =
- (slang_struct *) slang_alloc_malloc(y->num_structs *
- sizeof(slang_struct));
+ z.structs = (slang_struct *)
+ _slang_alloc(y->num_structs * sizeof(slang_struct));
if (z.structs == NULL) {
slang_struct_scope_destruct(&z);
return 0;
@@ -102,16 +102,16 @@ slang_struct_construct(slang_struct * stru)
{
stru->a_name = SLANG_ATOM_NULL;
stru->fields = (slang_variable_scope *)
- slang_alloc_malloc(sizeof(slang_variable_scope));
+ _slang_alloc(sizeof(slang_variable_scope));
if (stru->fields == NULL)
return 0;
_slang_variable_scope_ctr(stru->fields);
stru->structs =
- (slang_struct_scope *) slang_alloc_malloc(sizeof(slang_struct_scope));
+ (slang_struct_scope *) _slang_alloc(sizeof(slang_struct_scope));
if (stru->structs == NULL) {
slang_variable_scope_destruct(stru->fields);
- slang_alloc_free(stru->fields);
+ _slang_free(stru->fields);
return 0;
}
_slang_struct_scope_ctr(stru->structs);
@@ -122,9 +122,9 @@ void
slang_struct_destruct(slang_struct * stru)
{
slang_variable_scope_destruct(stru->fields);
- slang_alloc_free(stru->fields);
+ _slang_free(stru->fields);
slang_struct_scope_destruct(stru->structs);
- slang_alloc_free(stru->structs);
+ _slang_free(stru->structs);
}
int