gallium: change set_constant_buffer to be UBO-friendly
[mesa.git] / src / gallium / drivers / r300 / r300_state.c
index 337008be47ee6102f2ff9cbcd6b1369ad5b9c853..058e6f881f0fafbb0e832d756e76b07e568b549f 100644 (file)
@@ -1819,9 +1819,10 @@ static void r300_delete_vs_state(struct pipe_context* pipe, void* shader)
 
 static void r300_set_constant_buffer(struct pipe_context *pipe,
                                      uint shader, uint index,
-                                     struct pipe_resource *buf)
+                                     struct pipe_constant_buffer *cb)
 {
     struct r300_context* r300 = r300_context(pipe);
+    struct pipe_resource *buf = cb ? cb->buffer : NULL;
     struct r300_constant_buffer *cbuf;
     struct r300_resource *rbuf = r300_resource(buf);
     uint32_t *mapped;