From d59498b78041b8a7a046ac2c892e7a1896f59ca2 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 13 Oct 2010 15:22:04 +1000 Subject: r600g: reduce size of context structure. this thing will be in the cache a lot, so having massive big struct arrays inside it won't be helping anyone. --- src/gallium/drivers/r600/r600_pipe.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/gallium/drivers/r600/r600_pipe.h') diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 34a59646d5..6ce1f96952 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -100,6 +100,9 @@ struct r600_textures_info { unsigned n_samplers; }; +#define R600_CONSTANT_ARRAY_SIZE 256 +#define R600_RESOURCE_ARRAY_SIZE 160 + struct r600_pipe_context { struct pipe_context context; struct blitter_context *blitter; @@ -122,10 +125,10 @@ struct r600_pipe_context { struct pipe_clip_state clip; unsigned vs_nconst; unsigned ps_nconst; - struct r600_pipe_state vs_const[256]; - struct r600_pipe_state ps_const[256]; - struct r600_pipe_state vs_resource[160]; - struct r600_pipe_state ps_resource[160]; + struct r600_pipe_state *vs_const; + struct r600_pipe_state *ps_const; + struct r600_pipe_state *vs_resource; + struct r600_pipe_state *ps_resource; struct r600_pipe_state config; struct r600_pipe_shader *ps_shader; struct r600_pipe_shader *vs_shader; -- cgit v1.2.3