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/nouveau/nv30/nv30_fragtex.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/nouveau/nv30/nv30_fragtex.c')
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_fragtex.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c b/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c index 87e66cc6d91..4ab31d14169 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c @@ -171,7 +171,7 @@ nv30_fragtex_sampler_states_bind(struct pipe_context *pipe, } -static void +void nv30_fragtex_set_sampler_views(struct pipe_context *pipe, unsigned nr, struct pipe_sampler_view **views) { @@ -194,8 +194,28 @@ nv30_fragtex_set_sampler_views(struct pipe_context *pipe, unsigned nr, nv30->dirty |= NV30_NEW_FRAGTEX; } + +static void +nv30_set_sampler_views(struct pipe_context *pipe, unsigned shader, + unsigned start, unsigned nr, + struct pipe_sampler_view **views) +{ + assert(start == 0); + switch (shader) { + case PIPE_SHADER_FRAGMENT: + nv30_fragtex_set_sampler_views(pipe, nr, views); + break; + case PIPE_SHADER_VERTEX: + nv40_verttex_set_sampler_views(pipe, nr, views); + break; + default: + ; + } +} + + void nv30_fragtex_init(struct pipe_context *pipe) { - pipe->set_fragment_sampler_views = nv30_fragtex_set_sampler_views; + pipe->set_sampler_views = nv30_set_sampler_views; } |