summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-09-12 15:07:10 -0600
committerBrian Paul <brianp@vmware.com>2013-09-12 18:07:29 -0600
commitb2a6c1a7f153903dce314083ce2565b3c21baca5 (patch)
treeda276f5a77414ea15ca00c1e4057e38616bccc44
parent0f325e0fd078daf9d55aec2de9cbf1ea551dcd58 (diff)
galahad: implement pipe_context::bind_sampler_states()
-rw-r--r--src/gallium/drivers/galahad/glhd_context.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c
index ee9de058bb..ceefd1c999 100644
--- a/src/gallium/drivers/galahad/glhd_context.c
+++ b/src/gallium/drivers/galahad/glhd_context.c
@@ -197,18 +197,23 @@ galahad_context_bind_sampler_states(struct pipe_context *_pipe,
num_samplers, PIPE_MAX_SAMPLERS);
}
- switch (shader) {
- case PIPE_SHADER_VERTEX:
- pipe->bind_vertex_sampler_states(pipe, num_samplers, samplers);
- break;
- case PIPE_SHADER_FRAGMENT:
- pipe->bind_fragment_sampler_states(pipe, num_samplers, samplers);
- break;
- case PIPE_SHADER_GEOMETRY:
- pipe->bind_geometry_sampler_states(pipe, num_samplers, samplers);
- break;
- default:
- assert(0);
+ if (pipe->bind_sampler_states) {
+ pipe->bind_sampler_states(pipe, shader, start, num_samplers, samplers);
+ }
+ else {
+ switch (shader) {
+ case PIPE_SHADER_VERTEX:
+ pipe->bind_vertex_sampler_states(pipe, num_samplers, samplers);
+ break;
+ case PIPE_SHADER_FRAGMENT:
+ pipe->bind_fragment_sampler_states(pipe, num_samplers, samplers);
+ break;
+ case PIPE_SHADER_GEOMETRY:
+ pipe->bind_geometry_sampler_states(pipe, num_samplers, samplers);
+ break;
+ default:
+ assert(0);
+ }
}
}
@@ -1052,6 +1057,7 @@ galahad_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
GLHD_PIPE_INIT(bind_blend_state);
GLHD_PIPE_INIT(delete_blend_state);
GLHD_PIPE_INIT(create_sampler_state);
+ GLHD_PIPE_INIT(bind_sampler_states);
GLHD_PIPE_INIT(bind_fragment_sampler_states);
GLHD_PIPE_INIT(bind_vertex_sampler_states);
GLHD_PIPE_INIT(bind_geometry_sampler_states);