aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program/register_allocate.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-20 09:35:29 +0100
committermarha <marha@users.sourceforge.net>2012-01-20 09:35:29 +0100
commita8ef69cc0c9e5281e6b745dd4a2be75f629eb8b8 (patch)
tree8bc980551565964e13d046f54ee3876ba2bb7f14 /mesalib/src/mesa/program/register_allocate.c
parent34c1e86406451a3604de4982339058088434ab40 (diff)
downloadvcxsrv-a8ef69cc0c9e5281e6b745dd4a2be75f629eb8b8.tar.gz
vcxsrv-a8ef69cc0c9e5281e6b745dd4a2be75f629eb8b8.tar.bz2
vcxsrv-a8ef69cc0c9e5281e6b745dd4a2be75f629eb8b8.zip
xserver xkeyboard-config git update 20 jan 2012
Diffstat (limited to 'mesalib/src/mesa/program/register_allocate.c')
-rw-r--r--mesalib/src/mesa/program/register_allocate.c10
1 files changed, 8 insertions, 2 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);