kolibrios/drivers/video/Gallium/auxiliary/util/u_box.h
Sergey Semyonov (Serge) edb28b33f3 Gallium 3D: initial commit
git-svn-id: svn://kolibrios.org@3770 a494cfbc-eb01-0410-851d-a64ba20cac60
2013-07-06 10:06:47 +00:00

81 lines
1.3 KiB
C

#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