aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/compiler/radeon_compiler.h
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-09-06 00:20:27 -0400
committerTom Stellard <[email protected]>2012-09-19 19:25:53 -0400
commit886a4d4a6ad8a67e02e67d5dd79ae37a592930c6 (patch)
tree043ecf5faa15433997c83ef958343033b927802f /src/gallium/drivers/r300/compiler/radeon_compiler.h
parent9282adcae9b05399ae0e44881db1f8b0e8368d0a (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.h')
-rw-r--r--src/gallium/drivers/r300/compiler/radeon_compiler.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/compiler/radeon_compiler.h b/src/gallium/drivers/r300/compiler/radeon_compiler.h
index f78a51c19c3..e2710d848c5 100644
--- a/src/gallium/drivers/r300/compiler/radeon_compiler.h
+++ b/src/gallium/drivers/r300/compiler/radeon_compiler.h
@@ -44,6 +44,7 @@ enum rc_program_type {
struct radeon_compiler {
struct memory_pool Pool;
struct rc_program Program;
+ const struct rc_regalloc_state *regalloc_state;
enum rc_program_type type;
unsigned Debug:2;
unsigned Error:1;
@@ -77,7 +78,7 @@ struct radeon_compiler {
unsigned initial_num_insts; /* Number of instructions at start. */
};
-void rc_init(struct radeon_compiler * c);
+void rc_init(struct radeon_compiler * c, const struct rc_regalloc_state *rs);
void rc_destroy(struct radeon_compiler * c);
void rc_debug(struct radeon_compiler * c, const char * fmt, ...);