diff options
author | Brian Paul <[email protected]> | 2013-10-07 18:16:22 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-10-23 10:15:38 -0600 |
commit | a3ed98f7aa85636579a5696bf036ec13e5c9104a (patch) | |
tree | 104078a2a8b875e5ec7c5524e7797d46d109d7e0 /src/gallium/drivers/ilo | |
parent | b11fc226e6b106de8eb777a8e62c4f7303c66fbc (diff) |
gallium: new, unified pipe_context::set_sampler_views() function
The new function replaces four old functions: set_fragment/vertex/
geometry/compute_sampler_views().
Note: at this time, it's expected that the 'start' parameter will
always be zero.
Reviewed-by: Roland Scheidegger <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Tested-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/drivers/ilo')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_state.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/src/gallium/drivers/ilo/ilo_state.c b/src/gallium/drivers/ilo/ilo_state.c index caad308ab38..91d7c7637f4 100644 --- a/src/gallium/drivers/ilo/ilo_state.c +++ b/src/gallium/drivers/ilo/ilo_state.c @@ -893,6 +893,28 @@ ilo_set_compute_sampler_views(struct pipe_context *pipe, } static void +ilo_set_sampler_views2(struct pipe_context *pipe, unsigned shader, + unsigned start_slot, unsigned num_views, + struct pipe_sampler_view **views) +{ + switch (shader) { + case PIPE_SHADER_VERTEX: + ilo_set_vertex_sampler_views(pipe, num_views, views); + break; + case PIPE_SHADER_GEOMETRY: + ilo_set_geometry_sampler_views(pipe, num_views, views); + break; + case PIPE_SHADER_FRAGMENT: + ilo_set_fragment_sampler_views(pipe, num_views, views); + break; + case PIPE_SHADER_COMPUTE: + ilo_set_compute_sampler_views(pipe, start_slot, num_views, views); + break; + } +} + + +static void ilo_set_shader_resources(struct pipe_context *pipe, unsigned start, unsigned count, struct pipe_surface **surfaces) @@ -1289,10 +1311,7 @@ ilo_init_state_functions(struct ilo_context *ilo) ilo->base.set_polygon_stipple = ilo_set_polygon_stipple; ilo->base.set_scissor_states = ilo_set_scissor_states; ilo->base.set_viewport_states = ilo_set_viewport_states; - ilo->base.set_fragment_sampler_views = ilo_set_fragment_sampler_views; - ilo->base.set_vertex_sampler_views = ilo_set_vertex_sampler_views; - ilo->base.set_geometry_sampler_views = ilo_set_geometry_sampler_views; - ilo->base.set_compute_sampler_views = ilo_set_compute_sampler_views; + ilo->base.set_sampler_views = ilo_set_sampler_views2; ilo->base.set_shader_resources = ilo_set_shader_resources; ilo->base.set_vertex_buffers = ilo_set_vertex_buffers; ilo->base.set_index_buffer = ilo_set_index_buffer; |