diff options
author | marha <marha@users.sourceforge.net> | 2012-01-20 09:41:09 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-01-20 09:41:09 +0100 |
commit | c5f912c7b9248440bf9dff4b3c64513ec0f3ec98 (patch) | |
tree | 7986b288489dac6a8a70787dbdedfc0c064a0c02 /mesalib/src/mesa/program | |
parent | 27bec2ba601ec12334e6b7564034f87ab7c9522b (diff) | |
parent | a8ef69cc0c9e5281e6b745dd4a2be75f629eb8b8 (diff) | |
download | vcxsrv-c5f912c7b9248440bf9dff4b3c64513ec0f3ec98.tar.gz vcxsrv-c5f912c7b9248440bf9dff4b3c64513ec0f3ec98.tar.bz2 vcxsrv-c5f912c7b9248440bf9dff4b3c64513ec0f3ec98.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/program')
-rw-r--r-- | mesalib/src/mesa/program/register_allocate.c | 10 | ||||
-rw-r--r-- | mesalib/src/mesa/program/register_allocate.h | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/mesalib/src/mesa/program/register_allocate.c b/mesalib/src/mesa/program/register_allocate.c index f5b5174fc..f08c9d28d 100644 --- a/mesalib/src/mesa/program/register_allocate.c +++ b/mesalib/src/mesa/program/register_allocate.c @@ -154,13 +154,19 @@ struct ra_graph { unsigned int stack_count; }; +/** + * Creates a set of registers for the allocator. + * + * mem_ctx is a ralloc context for the allocator. The reg set may be freed + * using ralloc_free(). + */ struct ra_regs * -ra_alloc_reg_set(unsigned int count) +ra_alloc_reg_set(void *mem_ctx, unsigned int count) { unsigned int i; struct ra_regs *regs; - regs = rzalloc(NULL, struct ra_regs); + regs = rzalloc(mem_ctx, struct ra_regs); regs->count = count; regs->regs = rzalloc_array(regs, struct ra_reg, count); diff --git a/mesalib/src/mesa/program/register_allocate.h b/mesalib/src/mesa/program/register_allocate.h index ee2e58a47..00b851ec2 100644 --- a/mesalib/src/mesa/program/register_allocate.h +++ b/mesalib/src/mesa/program/register_allocate.h @@ -36,7 +36,7 @@ struct ra_regs; * registers, such as aligned register pairs that conflict with the * two real registers from which they are composed. */ -struct ra_regs *ra_alloc_reg_set(unsigned int count); +struct ra_regs *ra_alloc_reg_set(void *mem_ctx, unsigned int count); unsigned int ra_alloc_reg_class(struct ra_regs *regs); void ra_add_reg_conflict(struct ra_regs *regs, unsigned int r1, unsigned int r2); |