nvc0: support user clip planes
[mesa.git] / src / gallium / drivers / nvc0 / nvc0_state.c
index c7a8c4b747ffaaaed448b66551030b8b3d8274ae..8d293233b12adc9211c002ab7dec78fc98589daa 100644 (file)
@@ -699,8 +699,13 @@ nvc0_set_clip_state(struct pipe_context *pipe,
                     const struct pipe_clip_state *clip)
 {
     struct nvc0_context *nvc0 = nvc0_context(pipe);
+    const unsigned size = clip->nr * sizeof(clip->ucp[0]);
+
+    memcpy(&nvc0->clip.ucp[0][0], &clip->ucp[0][0], size);
+    nvc0->clip.nr = clip->nr;
 
     nvc0->clip.depth_clamp = clip->depth_clamp;
+
     nvc0->dirty |= NVC0_NEW_CLIP;
 }