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()");
+ }
}
}
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;