summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_context.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-09-03 13:53:39 +1000
committerDave Airlie <[email protected]>2010-09-03 13:53:39 +1000
commit9ef228ee2d74a32e01ac0fcf0776d92d904369f4 (patch)
tree18d0a3023c1b88751586f244a8da1324f2a32e7b /src/gallium/drivers/r600/r600_context.h
parentb5fcf8274916afdf29aca5e8db7611687b03abe4 (diff)
r600g: reduce size of r600 context structure to !insane
Its now about 7.8k, and might actually fit in a cache.
Diffstat (limited to 'src/gallium/drivers/r600/r600_context.h')
-rw-r--r--src/gallium/drivers/r600/r600_context.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/r600_context.h b/src/gallium/drivers/r600/r600_context.h
index 6294f7ad47b..1c32ced7dc3 100644
--- a/src/gallium/drivers/r600/r600_context.h
+++ b/src/gallium/drivers/r600/r600_context.h
@@ -121,6 +121,9 @@ struct r600_context_hw_states {
struct radeon_state cb_cntl;
};
+#define R600_MAX_CONSTANT 256 /* magic */
+#define R600_MAX_RESOURCE 160 /* magic */
+
struct r600_context {
struct pipe_context context;
struct r600_screen *screen;
@@ -130,10 +133,10 @@ struct r600_context {
struct radeon_draw draw;
struct radeon_state config;
/* FIXME get rid of those vs_resource,vs/ps_constant */
- struct radeon_state vs_resource[160];
+ struct radeon_state *vs_resource;
unsigned vs_nresource;
- struct radeon_state vs_constant[256];
- struct radeon_state ps_constant[256];
+ struct radeon_state *vs_constant;
+ struct radeon_state *ps_constant;
/* hw states */
struct r600_context_hw_states hw_states;
/* pipe states */