1287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell#ifndef UTIL_BOX_INLINES_H 2287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell#define UTIL_BOX_INLINES_H 3287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell 4287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell#include "pipe/p_state.h" 5287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell 6287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwellstatic INLINE 7287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwellvoid u_box_1d( unsigned x, 8287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell unsigned w, 9287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell struct pipe_box *box ) 10287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell{ 11287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->x = x; 12287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->y = 0; 13287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->z = 0; 14287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->width = w; 15287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->height = 1; 16287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->depth = 1; 17287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell} 18287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell 19287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwellstatic INLINE 20287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwellvoid u_box_2d( unsigned x, 21287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell unsigned y, 22287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell unsigned w, 23287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell unsigned h, 24287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell struct pipe_box *box ) 25287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell{ 26287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->x = x; 27287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->y = y; 28287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->z = 0; 29287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->width = w; 30287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->height = h; 31287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->depth = 1; 32287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell} 33287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell 34287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwellstatic INLINE 35287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwellvoid u_box_origin_2d( unsigned w, 36287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell unsigned h, 37287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell struct pipe_box *box ) 38287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell{ 39287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->x = 0; 40287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->y = 0; 41287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->z = 0; 42287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->width = w; 43287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->height = h; 44287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->depth = 1; 45287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell} 46287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell 47287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwellstatic INLINE 48287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwellvoid u_box_2d_zslice( unsigned x, 49287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell unsigned y, 50287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell unsigned z, 51287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell unsigned w, 52287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell unsigned h, 53287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell struct pipe_box *box ) 54287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell{ 55287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->x = x; 56287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->y = y; 57287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->z = z; 58287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->width = w; 59287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->height = h; 60287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell box->depth = 1; 61287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell} 62287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell 63d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwellstatic INLINE 64d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwellvoid u_box_3d( unsigned x, 65d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwell unsigned y, 66d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwell unsigned z, 67d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwell unsigned w, 68d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwell unsigned h, 69d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwell unsigned d, 70d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwell struct pipe_box *box ) 71d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwell{ 72d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwell box->x = x; 73d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwell box->y = y; 74d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwell box->z = z; 75d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwell box->width = w; 76d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwell box->height = h; 77d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwell box->depth = d; 78d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwell} 79d6861be9cc42c19f7f0bb719e7e2dab5e592614eKeith Whitwell 80287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell#endif 81