radeon: don't use old bind_vertex/fragment_sampler_states() hooks
[mesa.git] / src / gallium / drivers / r300 / r300_state.c
index e69a605097d3948ceeb7e167499633c4ef57d5fb..4aebbea83d8abae5d2550ba50ecd40efe087f231 100644 (file)
@@ -1523,7 +1523,8 @@ static void*
 }
 
 static void r300_bind_sampler_states(struct pipe_context* pipe,
-                                     unsigned count,
+                                     unsigned shader,
+                                     unsigned start, unsigned count,
                                      void** states)
 {
     struct r300_context* r300 = r300_context(pipe);
@@ -1531,9 +1532,13 @@ static void r300_bind_sampler_states(struct pipe_context* pipe,
         (struct r300_textures_state*)r300->textures_state.state;
     unsigned tex_units = r300->screen->caps.num_tex_units;
 
-    if (count > tex_units) {
-        return;
-    }
+    assert(start == 0);
+
+    if (shader != PIPE_SHADER_FRAGMENT)
+       return;
+
+    if (count > tex_units)
+       return;
 
     memcpy(state->sampler_states, states, sizeof(void*) * count);
     state->sampler_state_count = count;
@@ -1541,6 +1546,7 @@ static void r300_bind_sampler_states(struct pipe_context* pipe,
     r300_mark_atom_dirty(r300, &r300->textures_state);
 }
 
+
 static void r300_lacks_vertex_textures(struct pipe_context* pipe,
                                        unsigned count,
                                        void** states)
@@ -2157,8 +2163,7 @@ void r300_init_state_functions(struct r300_context* r300)
     r300->context.delete_rasterizer_state = r300_delete_rs_state;
 
     r300->context.create_sampler_state = r300_create_sampler_state;
-    r300->context.bind_fragment_sampler_states = r300_bind_sampler_states;
-    r300->context.bind_vertex_sampler_states = r300_lacks_vertex_textures;
+    r300->context.bind_sampler_states = r300_bind_sampler_states;
     r300->context.delete_sampler_state = r300_delete_sampler_state;
 
     r300->context.set_fragment_sampler_views = r300_set_fragment_sampler_views;