galahad: implement pipe_context::bind_sampler_states()
authorBrian Paul <brianp@vmware.com>
Thu, 12 Sep 2013 21:07:10 +0000 (15:07 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 3 Oct 2013 20:05:26 +0000 (14:05 -0600)
src/gallium/drivers/galahad/glhd_context.c

index 3df22ce332eee6c5a1981076fa88ff3e1769caa3..f96543e1e9077ae2fd5d76c1c8535dedc31a1c08 100644 (file)
@@ -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);
+      }
    }
 }
 
@@ -1064,6 +1069,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);