summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_context.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/r300_context.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/r300_context.h')
-rw-r--r--src/gallium/drivers/r300/r300_context.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 2c7b477685a..fe253089094 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -33,6 +33,7 @@
#include "r300_defines.h"
#include "r300_screen.h"
+#include "compiler/radeon_regalloc.h"
#include "../../winsys/radeon/drm/radeon_winsys.h"
struct u_upload_mgr;
@@ -622,6 +623,10 @@ struct r300_context {
boolean hiz_in_use; /* Whether HIZ is enabled. */
enum r300_hiz_func hiz_func; /* HiZ function. Can be either MIN or MAX. */
uint32_t hiz_clear_value; /* HiZ clear value. */
+
+ /* Compiler state. */
+ struct rc_regalloc_state fs_regalloc_state; /* Register allocator info for
+ * fragment shaders. */
};
#define foreach_atom(r300, atom) \