diff options
author | Brian Paul <[email protected]> | 2013-09-12 18:09:33 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-10-03 14:05:27 -0600 |
commit | 3f0627c2ad605b006737312c478907859411ffa8 (patch) | |
tree | 83c4a04fadb97ab0f47188592a6bd01771c027b9 /src/gallium/drivers/nouveau/nv30 | |
parent | 550f9ee64ce2eea7b76a8e4551e398aa8c780c4e (diff) |
nouveau: implement pipe_context::bind_sampler_states()
Diffstat (limited to 'src/gallium/drivers/nouveau/nv30')
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_context.h | 8 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_fragtex.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_texture.c | 17 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv40_verttex.c | 2 |
4 files changed, 27 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_context.h b/src/gallium/drivers/nouveau/nv30/nv30_context.h index 12ae0c71e4f..292dcfe61a4 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_context.h +++ b/src/gallium/drivers/nouveau/nv30/nv30_context.h @@ -187,6 +187,14 @@ void nv40_verttex_validate(struct nv30_context *nv30); void +nv30_fragtex_sampler_states_bind(struct pipe_context *pipe, + unsigned nr, void **hwcso); + +void +nv40_verttex_sampler_states_bind(struct pipe_context *pipe, + unsigned nr, void **hwcso); + +void nv30_push_vbo(struct nv30_context *nv30, const struct pipe_draw_info *info); void diff --git a/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c b/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c index 60ffb03c89f..ac819786a6c 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c @@ -149,7 +149,7 @@ nv30_fragtex_validate(struct nv30_context *nv30) nv30->fragprog.dirty_samplers = 0; } -static void +void nv30_fragtex_sampler_states_bind(struct pipe_context *pipe, unsigned nr, void **hwcso) { diff --git a/src/gallium/drivers/nouveau/nv30/nv30_texture.c b/src/gallium/drivers/nouveau/nv30/nv30_texture.c index d3cffcfb261..c3567217442 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_texture.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_texture.c @@ -186,6 +186,21 @@ nv30_sampler_state_delete(struct pipe_context *pipe, void *hwcso) FREE(hwcso); } +static void +nv30_bind_sampler_states(struct pipe_context *pipe, + unsigned shader, unsigned start_slot, + unsigned num_samplers, void **samplers) +{ + switch (shader) { + case PIPE_SHADER_VERTEX: + nv40_verttex_sampler_states_bind(pipe, num_samplers, samplers); + break; + case PIPE_SHADER_FRAGMENT: + nv30_fragtex_sampler_states_bind(pipe, num_samplers, samplers); + break; + } +} + static INLINE uint32_t swizzle(const struct nv30_texfmt *fmt, unsigned cmp, unsigned swz) { @@ -301,6 +316,8 @@ nv30_texture_init(struct pipe_context *pipe) { pipe->create_sampler_state = nv30_sampler_state_create; pipe->delete_sampler_state = nv30_sampler_state_delete; + pipe->bind_sampler_states = nv30_bind_sampler_states; + pipe->create_sampler_view = nv30_sampler_view_create; pipe->sampler_view_destroy = nv30_sampler_view_destroy; } diff --git a/src/gallium/drivers/nouveau/nv30/nv40_verttex.c b/src/gallium/drivers/nouveau/nv30/nv40_verttex.c index 9a7163c448f..c099208fb60 100644 --- a/src/gallium/drivers/nouveau/nv30/nv40_verttex.c +++ b/src/gallium/drivers/nouveau/nv30/nv40_verttex.c @@ -47,7 +47,7 @@ nv40_verttex_validate(struct nv30_context *nv30) nv30->vertprog.dirty_samplers = 0; } -static void +void nv40_verttex_sampler_states_bind(struct pipe_context *pipe, unsigned nr, void **hwcso) { |