brw_util.h File Reference

Include dependency graph for brw_util.h:

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

Go to the source code of this file.

Functions

unsigned brw_count_bits (unsigned val)
unsigned brw_translate_blend_factor (int factor)
unsigned brw_translate_blend_equation (int mode)


Function Documentation

unsigned brw_count_bits ( unsigned  val  ) 

Definition at line 38 of file brw_util.c.

00039 {
00040    unsigned i;
00041    for (i = 0; val ; val >>= 1)
00042       if (val & 1)
00043          i++;
00044    return i;
00045 }

unsigned brw_translate_blend_equation ( int  mode  ) 

Definition at line 48 of file brw_util.c.

References assert, BRW_BLENDFUNCTION_ADD, BRW_BLENDFUNCTION_MAX, BRW_BLENDFUNCTION_MIN, BRW_BLENDFUNCTION_REVERSE_SUBTRACT, BRW_BLENDFUNCTION_SUBTRACT, PIPE_BLEND_ADD, PIPE_BLEND_MAX, PIPE_BLEND_MIN, PIPE_BLEND_REVERSE_SUBTRACT, and PIPE_BLEND_SUBTRACT.

00049 {
00050    switch (mode) {
00051    case PIPE_BLEND_ADD:
00052       return BRW_BLENDFUNCTION_ADD;
00053    case PIPE_BLEND_MIN:
00054       return BRW_BLENDFUNCTION_MIN;
00055    case PIPE_BLEND_MAX:
00056       return BRW_BLENDFUNCTION_MAX;
00057    case PIPE_BLEND_SUBTRACT:
00058       return BRW_BLENDFUNCTION_SUBTRACT;
00059    case PIPE_BLEND_REVERSE_SUBTRACT:
00060       return BRW_BLENDFUNCTION_REVERSE_SUBTRACT;
00061    default:
00062       assert(0);
00063       return BRW_BLENDFUNCTION_ADD;
00064    }
00065 }

unsigned brw_translate_blend_factor ( int  factor  ) 

Definition at line 67 of file brw_util.c.

References assert, BRW_BLENDFACTOR_CONST_ALPHA, BRW_BLENDFACTOR_CONST_COLOR, BRW_BLENDFACTOR_DST_ALPHA, BRW_BLENDFACTOR_DST_COLOR, BRW_BLENDFACTOR_INV_CONST_ALPHA, BRW_BLENDFACTOR_INV_CONST_COLOR, BRW_BLENDFACTOR_INV_DST_ALPHA, BRW_BLENDFACTOR_INV_DST_COLOR, BRW_BLENDFACTOR_INV_SRC_ALPHA, BRW_BLENDFACTOR_INV_SRC_COLOR, BRW_BLENDFACTOR_ONE, BRW_BLENDFACTOR_SRC_ALPHA, BRW_BLENDFACTOR_SRC_ALPHA_SATURATE, BRW_BLENDFACTOR_SRC_COLOR, BRW_BLENDFACTOR_ZERO, PIPE_BLENDFACTOR_CONST_ALPHA, PIPE_BLENDFACTOR_CONST_COLOR, PIPE_BLENDFACTOR_DST_ALPHA, PIPE_BLENDFACTOR_DST_COLOR, PIPE_BLENDFACTOR_INV_CONST_ALPHA, PIPE_BLENDFACTOR_INV_CONST_COLOR, PIPE_BLENDFACTOR_INV_DST_ALPHA, PIPE_BLENDFACTOR_INV_DST_COLOR, PIPE_BLENDFACTOR_INV_SRC_ALPHA, PIPE_BLENDFACTOR_INV_SRC_COLOR, PIPE_BLENDFACTOR_ONE, PIPE_BLENDFACTOR_SRC_ALPHA, PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE, PIPE_BLENDFACTOR_SRC_COLOR, and PIPE_BLENDFACTOR_ZERO.


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