summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_context.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-09-03 14:12:38 +1000
committerDave Airlie <airlied@redhat.com>2010-09-03 14:12:38 +1000
commit191bfc5c3be219e2389fec004a51ea3239f434c8 (patch)
treefbd8163e7b5b62ac4d6defdf2a26154c64262b29 /src/gallium/drivers/r600/r600_context.h
parent9ef228ee2d74a32e01ac0fcf0776d92d904369f4 (diff)
r600g: refactor sample states into a reusable struct.
I will not cut-n-paste. I will not cut-n-paste. I will not cut-n-paste.
Diffstat (limited to 'src/gallium/drivers/r600/r600_context.h')
-rw-r--r--src/gallium/drivers/r600/r600_context.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/gallium/drivers/r600/r600_context.h b/src/gallium/drivers/r600/r600_context.h
index 1c32ced7dc..dc4e948e8d 100644
--- a/src/gallium/drivers/r600/r600_context.h
+++ b/src/gallium/drivers/r600/r600_context.h
@@ -124,6 +124,15 @@ struct r600_context_hw_states {
#define R600_MAX_CONSTANT 256 /* magic */
#define R600_MAX_RESOURCE 160 /* magic */
+struct r600_shader_sampler_states {
+ unsigned nsampler;
+ unsigned nview;
+ unsigned nborder;
+ struct radeon_state *sampler[PIPE_MAX_ATTRIBS];
+ struct radeon_state *view[PIPE_MAX_ATTRIBS];
+ struct radeon_state *border[PIPE_MAX_ATTRIBS];
+};
+
struct r600_context {
struct pipe_context context;
struct r600_screen *screen;
@@ -141,11 +150,7 @@ struct r600_context {
struct r600_context_hw_states hw_states;
/* pipe states */
unsigned flat_shade;
- unsigned ps_nsampler;
- unsigned vs_nsampler;
- unsigned ps_nsampler_view;
- unsigned vs_nsampler_view;
- unsigned ps_nsampler_border;
+
unsigned nvertex_buffer;
struct r600_context_state *rasterizer;
struct r600_context_state *poly_stipple;
@@ -161,11 +166,9 @@ struct r600_context {
struct r600_context_state *stencil_ref;
struct r600_context_state *viewport;
struct r600_context_state *framebuffer;
- struct radeon_state *ps_sampler[PIPE_MAX_ATTRIBS];
- struct radeon_state *vs_sampler[PIPE_MAX_ATTRIBS];
- struct radeon_state *ps_sampler_view[PIPE_MAX_ATTRIBS];
- struct radeon_state *vs_sampler_view[PIPE_MAX_ATTRIBS];
- struct radeon_state *ps_sampler_border[PIPE_MAX_ATTRIBS];
+ struct r600_shader_sampler_states vs_sampler;
+ struct r600_shader_sampler_states ps_sampler;
+ /* can add gs later */
struct r600_vertex_element *vertex_elements;
struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
struct pipe_index_buffer index_buffer;