gallivm_p.h File Reference

Include dependency graph for gallivm_p.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  llvm

Data Structures

struct  gallivm_interpolate
struct  gallivm_ir
struct  gallivm_prog

Functions

static void gallivm_swizzle_components (int swizzle, int *xc, int *yc, int *zc, int *wc)
static boolean gallivm_is_swizzle (int swizzle)
static int gallivm_x_swizzle (int swizzle)
static int gallivm_y_swizzle (int swizzle)
static int gallivm_z_swizzle (int swizzle)
static int gallivm_w_swizzle (int swizzle)


Function Documentation

static boolean gallivm_is_swizzle ( int  swizzle  )  [static]

Definition at line 69 of file gallivm_p.h.

References TGSI_SWIZZLE_W, TGSI_SWIZZLE_X, TGSI_SWIZZLE_Y, and TGSI_SWIZZLE_Z.

00070 {
00071    const int NO_SWIZZLE = TGSI_SWIZZLE_X * 1000 + TGSI_SWIZZLE_Y * 100 +
00072                           TGSI_SWIZZLE_Z * 10 + TGSI_SWIZZLE_W;
00073    return swizzle != NO_SWIZZLE;
00074 }

static void gallivm_swizzle_components ( int  swizzle,
int *  xc,
int *  yc,
int *  zc,
int *  wc 
) [static]

Definition at line 54 of file gallivm_p.h.

00057 {
00058    int x = swizzle / 1000; swizzle -= x * 1000;
00059    int y = swizzle / 100;  swizzle -= y * 100;
00060    int z = swizzle / 10;   swizzle -= z * 10;
00061    int w = swizzle;
00062 
00063    if (xc) *xc = x;
00064    if (yc) *yc = y;
00065    if (zc) *zc = z;
00066    if (wc) *wc = w;
00067 }

static int gallivm_w_swizzle ( int  swizzle  )  [static]

Definition at line 97 of file gallivm_p.h.

References gallivm_swizzle_components().

00098 {
00099    int w;
00100    gallivm_swizzle_components(swizzle, 0, 0, 0, &w);
00101    return w;
00102 }

static int gallivm_x_swizzle ( int  swizzle  )  [static]

Definition at line 76 of file gallivm_p.h.

References gallivm_swizzle_components().

00077 {
00078    int x;
00079    gallivm_swizzle_components(swizzle, &x, 0, 0, 0);
00080    return x;
00081 }

static int gallivm_y_swizzle ( int  swizzle  )  [static]

Definition at line 83 of file gallivm_p.h.

References gallivm_swizzle_components().

00084 {
00085    int y;
00086    gallivm_swizzle_components(swizzle, 0, &y, 0, 0);
00087    return y;
00088 }

static int gallivm_z_swizzle ( int  swizzle  )  [static]

Definition at line 90 of file gallivm_p.h.

References gallivm_swizzle_components().

00091 {
00092    int z;
00093    gallivm_swizzle_components(swizzle, 0, 0, &z, 0);
00094    return z;
00095 }


Generated on Tue Sep 29 06:25:23 2009 for Gallium3D by  doxygen 1.5.4