diff options
author | Keith Whitwell <keithw@vmware.com> | 2010-03-15 22:21:48 +0000 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2010-03-15 22:24:33 +0000 |
commit | 77bc770c991ea025c82eaa4e0e2390efd825d96d (patch) | |
tree | db651842426db606da4f453d98f3e454e250b4e2 | |
parent | f83c91db8ae63a3c3a34ff21492427a5663fb760 (diff) |
util: missing file
-rw-r--r-- | src/gallium/auxiliary/util/u_box.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_box.h b/src/gallium/auxiliary/util/u_box.h new file mode 100644 index 0000000000..fe694a9899 --- /dev/null +++ b/src/gallium/auxiliary/util/u_box.h @@ -0,0 +1,73 @@ +#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_orgin_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 +struct pipe_subresource u_subresource( unsigned face, + unsigned level ) +{ + struct pipe_subresource subresource; + subresource.face = face; + subresource.level = level; + return subresource; +} + +#endif |