mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 15:00:10 +01:00
mesa: added _mesa_free_instructions()
This commit is contained in:
parent
a8a5376406
commit
f3bd7bf5c9
2 changed files with 20 additions and 0 deletions
|
|
@ -118,6 +118,23 @@ _mesa_copy_instructions(struct prog_instruction *dest,
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Free an array of instructions
|
||||
*/
|
||||
void
|
||||
_mesa_free_instructions(struct prog_instruction *inst, GLuint count)
|
||||
{
|
||||
GLuint i;
|
||||
for (i = 0; i < count; i++) {
|
||||
if (inst[i].Data)
|
||||
_mesa_free(inst[i].Data);
|
||||
if (inst[i].Comment)
|
||||
_mesa_free((char *) inst[i].Comment);
|
||||
}
|
||||
_mesa_free(inst);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Basic info about each instruction
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -439,6 +439,9 @@ extern struct prog_instruction *
|
|||
_mesa_copy_instructions(struct prog_instruction *dest,
|
||||
const struct prog_instruction *src, GLuint n);
|
||||
|
||||
extern void
|
||||
_mesa_free_instructions(struct prog_instruction *inst, GLuint count);
|
||||
|
||||
extern GLuint
|
||||
_mesa_num_inst_src_regs(gl_inst_opcode opcode);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue