gallium: change set_constant_buffer to be UBO-friendly
[mesa.git] / src / gallium / drivers / nv50 / nv50_state.c
index 5b783da7ad7fbab85f0de1afa8fe415c80eec3c5..34d2b6daeadfb51d9269ecc0a016cd35d566649c 100644 (file)
@@ -744,9 +744,10 @@ nv50_gp_state_bind(struct pipe_context *pipe, void *hwcso)
 
 static void
 nv50_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
-                         struct pipe_resource *res)
+                         struct pipe_constant_buffer *cb)
 {
    struct nv50_context *nv50 = nv50_context(pipe);
+   struct pipe_resource *res = cb ? cb->buffer : NULL;
 
    pipe_resource_reference(&nv50->constbuf[shader][index], res);