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/r300_context.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/r300_context.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_context.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index 8cbe246f787..76c2e232009 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -35,6 +35,7 @@ #include "r300_emit.h" #include "r300_screen.h" #include "r300_screen_buffer.h" +#include "compiler/radeon_regalloc.h" static void r300_release_referenced_objects(struct r300_context *r300) { @@ -89,6 +90,8 @@ static void r300_destroy_context(struct pipe_context* context) if (r300->cs) r300->rws->cs_destroy(r300->cs); + rc_destroy_regalloc_state(&r300->fs_regalloc_state); + /* XXX: No way to tell if this was initialized or not? */ util_slab_destroy(&r300->pool_transfers); @@ -466,6 +469,9 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, r300->hyperz_time_of_last_flush = os_time_get(); + /* Register allocator state */ + rc_init_regalloc_state(&r300->fs_regalloc_state); + /* Print driver info. */ #ifdef DEBUG { |