diff options
author | Brian Paul <[email protected]> | 2013-09-12 15:07:33 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-10-03 14:05:26 -0600 |
commit | 9564ec831733b4403433b93db9aeda481a293ae2 (patch) | |
tree | 55a3d21ed40ce018233b3bc01024359a2e852a7e | |
parent | aec11d48cf60a67924a892e7f42c93065efef0f1 (diff) |
identity: implement pipe_context::bind_sampler_states()
-rw-r--r-- | src/gallium/drivers/identity/id_context.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/src/gallium/drivers/identity/id_context.c b/src/gallium/drivers/identity/id_context.c index 6cb7bdfa117..61c9e51f71e 100644 --- a/src/gallium/drivers/identity/id_context.c +++ b/src/gallium/drivers/identity/id_context.c @@ -168,21 +168,26 @@ identity_bind_sampler_states(struct pipe_context *_pipe, struct identity_context *id_pipe = identity_context(_pipe); struct pipe_context *pipe = id_pipe->pipe; - /* remove this when we have pipe->bind_sampler_states(..., start, ...) */ - assert(start == 0); - - switch (shader) { - case PIPE_SHADER_VERTEX: - pipe->bind_vertex_sampler_states(pipe, num_samplers, samplers); - break; - case PIPE_SHADER_GEOMETRY: - pipe->bind_geometry_sampler_states(pipe, num_samplers, samplers); - break; - case PIPE_SHADER_FRAGMENT: - pipe->bind_fragment_sampler_states(pipe, num_samplers, samplers); - break; - default: - debug_error("Unexpected shader in identity_bind_sampler_states()"); + if (pipe->bind_sampler_states) { + pipe->bind_sampler_states(pipe, shader, start, num_samplers, samplers); + } + else { + /* remove this when we have pipe->bind_sampler_states(..., start, ...) */ + assert(start == 0); + + switch (shader) { + case PIPE_SHADER_VERTEX: + pipe->bind_vertex_sampler_states(pipe, num_samplers, samplers); + break; + case PIPE_SHADER_GEOMETRY: + pipe->bind_geometry_sampler_states(pipe, num_samplers, samplers); + break; + case PIPE_SHADER_FRAGMENT: + pipe->bind_fragment_sampler_states(pipe, num_samplers, samplers); + break; + default: + debug_error("Unexpected shader in identity_bind_sampler_states()"); + } } } @@ -901,6 +906,7 @@ identity_context_create(struct pipe_screen *_screen, struct pipe_context *pipe) id_pipe->base.bind_blend_state = identity_bind_blend_state; id_pipe->base.delete_blend_state = identity_delete_blend_state; id_pipe->base.create_sampler_state = identity_create_sampler_state; + id_pipe->base.bind_sampler_states = identity_bind_sampler_states; id_pipe->base.bind_fragment_sampler_states = identity_bind_fragment_sampler_states; id_pipe->base.bind_vertex_sampler_states = identity_bind_vertex_sampler_states; id_pipe->base.delete_sampler_state = identity_delete_sampler_state; |