diff options
author | Brian Paul <[email protected]> | 2012-08-09 20:59:44 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-08-16 09:01:31 -0600 |
commit | a2c1df4c9a7375bc5306e8cfd07a9f7087759a96 (patch) | |
tree | 92691c4d7786bd2decc45a393f4b5b2e496e685f /src/gallium/auxiliary/draw/draw_private.h | |
parent | bef196c7929606bb8c7e9c06fe83a90fc0d95f09 (diff) |
draw: index samplers and sampler_view state by shader type
So that we can handle GS state and other types of shaders in the future.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_private.h')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_private.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h index 6a085be27fc..c2af0f36bca 100644 --- a/src/gallium/auxiliary/draw/draw_private.h +++ b/src/gallium/auxiliary/draw/draw_private.h @@ -308,10 +308,15 @@ struct draw_context struct draw_llvm *llvm; #endif - struct pipe_sampler_view *sampler_views[PIPE_MAX_VERTEX_SAMPLERS]; - unsigned num_sampler_views; - const struct pipe_sampler_state *samplers[PIPE_MAX_VERTEX_SAMPLERS]; - unsigned num_samplers; + /** Texture sampler and sampler view state. + * Note that we have arrays indexed by shader type. At this time + * we only handle vertex and geometry shaders in the draw module, but + * there may be more in the future (ex: hull and tessellation). + */ + struct pipe_sampler_view *sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS]; + unsigned num_sampler_views[PIPE_SHADER_TYPES]; + const struct pipe_sampler_state *samplers[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS]; + unsigned num_samplers[PIPE_SHADER_TYPES]; void *driver_private; }; |