mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-20 03:30:36 +02:00
mesa: remove unused varpool code in glsl compiler
(cherry picked from commit 81253be334)
This commit is contained in:
parent
71ef9e3775
commit
ceaf57524b
4 changed files with 0 additions and 26 deletions
|
|
@ -74,18 +74,6 @@ legal_identifier(slang_atom name)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Allocate storage for a variable of 'size' bytes from given pool.
|
||||
* Return the allocated address for the variable.
|
||||
*/
|
||||
static GLuint
|
||||
slang_var_pool_alloc(slang_var_pool * pool, unsigned int size)
|
||||
{
|
||||
const GLuint addr = pool->next_addr;
|
||||
pool->next_addr += size;
|
||||
return addr;
|
||||
}
|
||||
|
||||
/*
|
||||
* slang_code_unit
|
||||
*/
|
||||
|
|
@ -120,7 +108,6 @@ _slang_code_object_ctr(slang_code_object * self)
|
|||
for (i = 0; i < SLANG_BUILTIN_TOTAL; i++)
|
||||
_slang_code_unit_ctr(&self->builtin[i], self);
|
||||
_slang_code_unit_ctr(&self->unit, self);
|
||||
self->varpool.next_addr = 0;
|
||||
slang_atom_pool_construct(&self->atompool);
|
||||
}
|
||||
|
||||
|
|
@ -156,7 +143,6 @@ typedef struct slang_output_ctx_
|
|||
slang_variable_scope *vars;
|
||||
slang_function_scope *funs;
|
||||
slang_struct_scope *structs;
|
||||
slang_var_pool *global_pool;
|
||||
struct gl_program *program;
|
||||
slang_var_table *vartable;
|
||||
GLuint default_precision[TYPE_SPECIFIER_COUNT];
|
||||
|
|
@ -2058,7 +2044,6 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O,
|
|||
&& var->array_len == 0)) {
|
||||
if (!calculate_var_size(C, O, var))
|
||||
return GL_FALSE;
|
||||
var->address = slang_var_pool_alloc(O->global_pool, var->size);
|
||||
}
|
||||
|
||||
/* emit code for global var decl */
|
||||
|
|
@ -2358,7 +2343,6 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit,
|
|||
o.funs = &unit->funs;
|
||||
o.structs = &unit->structs;
|
||||
o.vars = &unit->vars;
|
||||
o.global_pool = &unit->object->varpool;
|
||||
o.program = shader ? shader->Program : NULL;
|
||||
o.vartable = _slang_new_var_table(maxRegs);
|
||||
_slang_push_var_table(o.vartable);
|
||||
|
|
|
|||
|
|
@ -53,12 +53,6 @@ typedef enum slang_unit_type_
|
|||
} slang_unit_type;
|
||||
|
||||
|
||||
typedef struct slang_var_pool_
|
||||
{
|
||||
GLuint next_addr;
|
||||
} slang_var_pool;
|
||||
|
||||
|
||||
typedef struct slang_code_unit_
|
||||
{
|
||||
slang_variable_scope vars;
|
||||
|
|
@ -86,7 +80,6 @@ typedef struct slang_code_object_
|
|||
{
|
||||
slang_code_unit builtin[SLANG_BUILTIN_TOTAL];
|
||||
slang_code_unit unit;
|
||||
slang_var_pool varpool;
|
||||
slang_atom_pool atompool;
|
||||
} slang_code_object;
|
||||
|
||||
|
|
|
|||
|
|
@ -164,7 +164,6 @@ slang_variable_construct(slang_variable * var)
|
|||
var->a_name = SLANG_ATOM_NULL;
|
||||
var->array_len = 0;
|
||||
var->initializer = NULL;
|
||||
var->address = ~0;
|
||||
var->size = 0;
|
||||
var->isTemp = GL_FALSE;
|
||||
var->store = NULL;
|
||||
|
|
@ -219,7 +218,6 @@ slang_variable_copy(slang_variable * x, const slang_variable * y)
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
z.address = y->address;
|
||||
z.size = y->size;
|
||||
slang_variable_destruct(x);
|
||||
*x = z;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ typedef struct slang_variable_
|
|||
slang_atom a_name; /**< The variable's name (char *) */
|
||||
GLuint array_len; /**< only if type == SLANG_SPEC_ARRAy */
|
||||
struct slang_operation_ *initializer; /**< Optional initializer code */
|
||||
GLuint address; /**< Storage location */
|
||||
GLuint size; /**< Variable's size in bytes */
|
||||
GLboolean isTemp; /**< a named temporary (__resultTmp) */
|
||||
GLboolean declared; /**< for debug */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue