diff options
author | Tom Stellard <[email protected]> | 2012-09-06 00:20:27 -0400 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-09-19 19:25:53 -0400 |
commit | 886a4d4a6ad8a67e02e67d5dd79ae37a592930c6 (patch) | |
tree | 043ecf5faa15433997c83ef958343033b927802f /src/gallium/drivers/r300/compiler/radeon_compiler.c | |
parent | 9282adcae9b05399ae0e44881db1f8b0e8368d0a (diff) |
r300g: Init regalloc state during context creation
Initializing the regalloc state is expensive, and since it is always
the same for every compile we only need to initialize it once per
context. This should help improve shader compile times for the driver.
Diffstat (limited to 'src/gallium/drivers/r300/compiler/radeon_compiler.c')
-rw-r--r-- | src/gallium/drivers/r300/compiler/radeon_compiler.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/compiler/radeon_compiler.c b/src/gallium/drivers/r300/compiler/radeon_compiler.c index 4d4eb645841..081cd2d0d55 100644 --- a/src/gallium/drivers/r300/compiler/radeon_compiler.c +++ b/src/gallium/drivers/r300/compiler/radeon_compiler.c @@ -29,10 +29,11 @@ #include "radeon_dataflow.h" #include "radeon_program.h" #include "radeon_program_pair.h" +#include "radeon_regalloc.h" #include "radeon_compiler_util.h" -void rc_init(struct radeon_compiler * c) +void rc_init(struct radeon_compiler * c, const struct rc_regalloc_state *rs) { memset(c, 0, sizeof(*c)); @@ -40,6 +41,7 @@ void rc_init(struct radeon_compiler * c) c->Program.Instructions.Prev = &c->Program.Instructions; c->Program.Instructions.Next = &c->Program.Instructions; c->Program.Instructions.U.I.Opcode = RC_OPCODE_ILLEGAL_OPCODE; + c->regalloc_state = rs; } void rc_destroy(struct radeon_compiler * c) |