aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_context.h
diff options
context:
space:
mode:
authorJerome Glisse <[email protected]>2010-08-04 17:37:59 -0400
committerJerome Glisse <[email protected]>2010-08-05 15:41:35 -0400
commit9c949d4a4dd43b7889e13bdf683bcf211f049ced (patch)
tree0059712f64b8121af96f025eeab3e6a1950df5b3 /src/gallium/drivers/r600/r600_context.h
parent0633c2e68312c292607d6af22d94d67d2d141600 (diff)
r600g: don't use dynamic state allocation for states
Simplify state handly by avoiding state allocation. Next step is to allocate once for all context packet buffer and then avoid rebuilding pm4 packet each time (through use of combined crc) this would also avoid number of memcpy. Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_context.h')
-rw-r--r--src/gallium/drivers/r600/r600_context.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/gallium/drivers/r600/r600_context.h b/src/gallium/drivers/r600/r600_context.h
index 8d102b68508..78da88fef5e 100644
--- a/src/gallium/drivers/r600/r600_context.h
+++ b/src/gallium/drivers/r600/r600_context.h
@@ -76,7 +76,7 @@ struct r600_context_state {
union pipe_states state;
unsigned refcount;
unsigned type;
- struct radeon_state *rstate;
+ struct radeon_state rstate;
struct r600_shader shader;
struct radeon_bo *bo;
};
@@ -89,28 +89,28 @@ struct r600_vertex_element
};
struct r600_context_hw_states {
- struct radeon_state *rasterizer;
- struct radeon_state *scissor;
- struct radeon_state *dsa;
- struct radeon_state *blend;
- struct radeon_state *viewport;
- struct radeon_state *cb0;
- struct radeon_state *config;
- struct radeon_state *cb_cntl;
- struct radeon_state *db;
+ struct radeon_state rasterizer;
+ struct radeon_state scissor;
+ struct radeon_state dsa;
+ struct radeon_state blend;
+ struct radeon_state viewport;
+ struct radeon_state cb0;
+ struct radeon_state config;
+ struct radeon_state cb_cntl;
+ struct radeon_state db;
unsigned ps_nresource;
unsigned ps_nsampler;
- struct radeon_state *ps_resource[160];
- struct radeon_state *ps_sampler[16];
+ struct radeon_state ps_resource[160];
+ struct radeon_state ps_sampler[16];
};
struct r600_context {
struct pipe_context context;
struct r600_screen *screen;
struct radeon *rw;
- struct radeon_ctx *ctx;
+ struct radeon_ctx ctx;
struct blitter_context *blitter;
- struct radeon_draw *draw;
+ struct radeon_draw draw;
/* hw states */
struct r600_context_hw_states hw_states;
/* pipe states */
@@ -120,6 +120,7 @@ struct r600_context {
unsigned ps_nsampler_view;
unsigned vs_nsampler_view;
unsigned nvertex_buffer;
+ struct radeon_state config;
struct r600_context_state *rasterizer;
struct r600_context_state *poly_stipple;
struct r600_context_state *scissor;