summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe/sp_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_context.h')
-rw-r--r--src/gallium/drivers/softpipe/sp_context.h22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h
index 95f5b769a5a..2185fb85277 100644
--- a/src/gallium/drivers/softpipe/sp_context.h
+++ b/src/gallium/drivers/softpipe/sp_context.h
@@ -60,9 +60,7 @@ struct softpipe_context {
/** Constant state objects */
struct pipe_blend_state *blend;
- struct pipe_sampler_state *fragment_samplers[PIPE_MAX_SAMPLERS];
- struct pipe_sampler_state *vertex_samplers[PIPE_MAX_VERTEX_SAMPLERS];
- struct pipe_sampler_state *geometry_samplers[PIPE_MAX_GEOMETRY_SAMPLERS];
+ struct pipe_sampler_state *samplers[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
struct pipe_depth_stencil_alpha_state *depth_stencil;
struct pipe_rasterizer_state *rasterizer;
struct sp_fragment_shader *fs;
@@ -81,9 +79,8 @@ struct softpipe_context {
struct pipe_framebuffer_state framebuffer;
struct pipe_poly_stipple poly_stipple;
struct pipe_scissor_state scissor;
- struct pipe_sampler_view *fragment_sampler_views[PIPE_MAX_SAMPLERS];
- struct pipe_sampler_view *vertex_sampler_views[PIPE_MAX_VERTEX_SAMPLERS];
- struct pipe_sampler_view *geometry_sampler_views[PIPE_MAX_GEOMETRY_SAMPLERS];
+ struct pipe_sampler_view *sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_GEOMETRY_SAMPLERS];
+
struct pipe_viewport_state viewport;
struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
struct pipe_index_buffer index_buffer;
@@ -94,12 +91,9 @@ struct softpipe_context {
struct pipe_query_data_so_statistics so_stats;
unsigned num_primitives_generated;
- unsigned num_fragment_samplers;
- unsigned num_fragment_sampler_views;
- unsigned num_vertex_samplers;
- unsigned num_vertex_sampler_views;
- unsigned num_geometry_samplers;
- unsigned num_geometry_sampler_views;
+ unsigned num_samplers[PIPE_SHADER_TYPES];
+ unsigned num_sampler_views[PIPE_SHADER_TYPES];
+
unsigned num_vertex_buffers;
unsigned dirty; /**< Mask of SP_NEW_x flags */
@@ -164,9 +158,7 @@ struct softpipe_context {
/** TGSI exec things */
struct {
- struct sp_sampler_variant *geom_samplers_list[PIPE_MAX_GEOMETRY_SAMPLERS];
- struct sp_sampler_variant *vert_samplers_list[PIPE_MAX_VERTEX_SAMPLERS];
- struct sp_sampler_variant *frag_samplers_list[PIPE_MAX_SAMPLERS];
+ struct sp_sampler_variant *samplers_list[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
} tgsi;
struct tgsi_exec_machine *fs_machine;