diff options
author | Brian Paul <brianp@vmware.com> | 2013-10-07 18:16:22 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2013-10-23 10:15:38 -0600 |
commit | a3ed98f7aa85636579a5696bf036ec13e5c9104a (patch) | |
tree | 104078a2a8b875e5ec7c5524e7797d46d109d7e0 /src/gallium/drivers/r300/r300_state.c | |
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 <sroland@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 6ce009e466..6840e8b2cf 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1576,9 +1576,9 @@ static uint32_t r300_assign_texture_cache_region(unsigned index, unsigned num) return R300_TX_CACHE(num + index); } -static void r300_set_fragment_sampler_views(struct pipe_context* pipe, - unsigned count, - struct pipe_sampler_view** views) +static void r300_set_sampler_views(struct pipe_context* pipe, unsigned shader, + unsigned start, unsigned count, + struct pipe_sampler_view** views) { struct r300_context* r300 = r300_context(pipe); struct r300_textures_state* state = @@ -1588,6 +1588,11 @@ static void r300_set_fragment_sampler_views(struct pipe_context* pipe, unsigned tex_units = r300->screen->caps.num_tex_units; boolean dirty_tex = FALSE; + if (shader != PIPE_SHADER_FRAGMENT) + return; + + assert(start == 0); /* non-zero not handled yet */ + if (count > tex_units) { return; } @@ -2159,7 +2164,7 @@ void r300_init_state_functions(struct r300_context* r300) r300->context.bind_sampler_states = r300_bind_sampler_states; r300->context.delete_sampler_state = r300_delete_sampler_state; - r300->context.set_fragment_sampler_views = r300_set_fragment_sampler_views; + r300->context.set_sampler_views = r300_set_sampler_views; r300->context.create_sampler_view = r300_create_sampler_view; r300->context.sampler_view_destroy = r300_sampler_view_destroy; |