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/freedreno/freedreno_texture.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 <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Tested-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_texture.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_texture.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_texture.c b/src/gallium/drivers/freedreno/freedreno_texture.c index fc0c8aa3346..bcc846f6819 100644 --- a/src/gallium/drivers/freedreno/freedreno_texture.c +++ b/src/gallium/drivers/freedreno/freedreno_texture.c @@ -144,6 +144,24 @@ fd_verttex_set_sampler_views(struct pipe_context *pctx, unsigned nr, ctx->dirty |= FD_DIRTY_VERTTEX; } +static void +fd_set_sampler_views(struct pipe_context *pctx, unsigned shader, + unsigne start, unsigned nr, + struct pipe_sampler_view **views) +{ + assert(start == 0); + switch (shader) { + case PIPE_SHADER_FRAGMENT: + fd_fragtex_set_sampler_views(pctx, nr, views); + break; + case PIPE_SHADER_VERTEX: + fd_verttex_set_sampler_views(pctx, nr, views); + break; + default: + ; + } +} + void fd_texture_init(struct pipe_context *pctx) { @@ -152,7 +170,5 @@ fd_texture_init(struct pipe_context *pctx) pctx->sampler_view_destroy = fd_sampler_view_destroy; pctx->bind_sampler_states = fd_sampler_states_bind; - pctx->set_fragment_sampler_views = fd_fragtex_set_sampler_views; - - pctx->set_vertex_sampler_views = fd_verttex_set_sampler_views; + pctx->set_sampler_views = fd_set_sampler_views; } |