util: add u_box_3d
authorKeith Whitwell <keithw@vmware.com>
Sat, 22 May 2010 19:31:11 +0000 (20:31 +0100)
committerKeith Whitwell <keithw@vmware.com>
Mon, 7 Jun 2010 15:34:55 +0000 (16:34 +0100)
src/gallium/auxiliary/util/u_box.h

index 919967b55a709ccea5be48381d1e317097ee76c0..e9c71743fc89e62a723b8e5b112e4f88885cf66f 100644 (file)
@@ -60,6 +60,25 @@ void u_box_2d_zslice( unsigned x,
    box->depth = 1;
 }
 
+
+static INLINE
+void u_box_3d( unsigned x,
+              unsigned y,
+              unsigned z,
+              unsigned w,
+              unsigned h,
+              unsigned d,
+              struct pipe_box *box )
+{
+   box->x = x;
+   box->y = y;
+   box->z = z;
+   box->width = w;
+   box->height = h;
+   box->depth = d;
+}
+
+
 static INLINE
 struct pipe_subresource u_subresource( unsigned face,
                                       unsigned level )