summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_context.h
diff options
context:
space:
mode:
authorJerome Glisse <[email protected]>2010-09-01 21:57:43 -0400
committerJerome Glisse <[email protected]>2010-09-01 21:59:28 -0400
commit31b84acbd2ae2dc7555844c5a2eead932b8759a7 (patch)
treecb54fc0922fa12f05ca688869e3cd21e77cabf66 /src/gallium/drivers/r600/r600_context.h
parent39605587951aed546c14febcc26e5a479bf8d807 (diff)
r600g: fix binding of same texture to several target slot
One can bind same texture or sampler to different slot, each slot needs it own state. The solution implemented here is not exactly beautifull or optimal need to think to somethings better. 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.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gallium/drivers/r600/r600_context.h b/src/gallium/drivers/r600/r600_context.h
index eb7a64bfbd5..d4e3baa69d2 100644
--- a/src/gallium/drivers/r600/r600_context.h
+++ b/src/gallium/drivers/r600/r600_context.h
@@ -95,13 +95,16 @@ enum pipe_state_type {
pipe_type_count
};
+#define R600_MAX_RSTATE 16
+
struct r600_context_state {
union pipe_states state;
unsigned refcount;
unsigned type;
- struct radeon_state rstate[16];
+ struct radeon_state rstate[R600_MAX_RSTATE];
struct r600_shader shader;
struct radeon_bo *bo;
+ unsigned nrstate;
};
struct r600_vertex_element
@@ -153,10 +156,10 @@ struct r600_context {
struct r600_context_state *stencil_ref;
struct r600_context_state *viewport;
struct r600_context_state *framebuffer;
- struct r600_context_state *ps_sampler[PIPE_MAX_ATTRIBS];
- struct r600_context_state *vs_sampler[PIPE_MAX_ATTRIBS];
- struct r600_context_state *ps_sampler_view[PIPE_MAX_ATTRIBS];
- struct r600_context_state *vs_sampler_view[PIPE_MAX_ATTRIBS];
+ 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 r600_vertex_element *vertex_elements;
struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
struct pipe_index_buffer index_buffer;