aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util/u_box.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-30 15:25:48 +0000
committermarha <marha@users.sourceforge.net>2011-04-30 15:25:48 +0000
commit0402d388cb9803652c0f9a52ba7dcb6029fdd0b9 (patch)
treeafd1b68edb9a74d5c87e63ea72d04b8301705d82 /mesalib/src/gallium/auxiliary/util/u_box.h
parentc4ae0bb951bfb6061e7f0c492ba03de330137515 (diff)
downloadvcxsrv-0402d388cb9803652c0f9a52ba7dcb6029fdd0b9.tar.gz
vcxsrv-0402d388cb9803652c0f9a52ba7dcb6029fdd0b9.tar.bz2
vcxsrv-0402d388cb9803652c0f9a52ba7dcb6029fdd0b9.zip
Added extra needed files
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_box.h')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_box.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_box.h b/mesalib/src/gallium/auxiliary/util/u_box.h
new file mode 100644
index 000000000..f2f0829b5
--- /dev/null
+++ b/mesalib/src/gallium/auxiliary/util/u_box.h
@@ -0,0 +1,80 @@
+#ifndef UTIL_BOX_INLINES_H
+#define UTIL_BOX_INLINES_H
+
+#include "pipe/p_state.h"
+
+static INLINE
+void u_box_1d( unsigned x,
+ unsigned w,
+ struct pipe_box *box )
+{
+ box->x = x;
+ box->y = 0;
+ box->z = 0;
+ box->width = w;
+ box->height = 1;
+ box->depth = 1;
+}
+
+static INLINE
+void u_box_2d( unsigned x,
+ unsigned y,
+ unsigned w,
+ unsigned h,
+ struct pipe_box *box )
+{
+ box->x = x;
+ box->y = y;
+ box->z = 0;
+ box->width = w;
+ box->height = h;
+ box->depth = 1;
+}
+
+static INLINE
+void u_box_origin_2d( unsigned w,
+ unsigned h,
+ struct pipe_box *box )
+{
+ box->x = 0;
+ box->y = 0;
+ box->z = 0;
+ box->width = w;
+ box->height = h;
+ box->depth = 1;
+}
+
+static INLINE
+void u_box_2d_zslice( unsigned x,
+ unsigned y,
+ unsigned z,
+ unsigned w,
+ unsigned h,
+ struct pipe_box *box )
+{
+ box->x = x;
+ box->y = y;
+ box->z = z;
+ box->width = w;
+ box->height = h;
+ 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;
+}
+
+#endif