#ifndef __VERTEX_SHADER_H__ #define __VERTEX_SHADER_H__ #define VSF_FLAG_X 1 #define VSF_FLAG_Y 2 #define VSF_FLAG_Z 4 #define VSF_FLAG_W 8 #define VSF_FLAG_XYZ (VSF_FLAG_X | VSF_FLAG_Y | VSF_FLAG_Z) #define VSF_FLAG_ALL 0xf #define VSF_FLAG_NONE 0 #define VSF_OUT_CLASS_TMP 0 #define VSF_OUT_CLASS_ADDR 1 #define VSF_OUT_CLASS_RESULT 2 /* first CARD32 of an instruction */ /* possible operations: DOT, MUL, ADD, MAD, FRC, MAX, MIN, SGE, SLT, EXP, LOG, LIT, POW, RCP, RSQ, EX2, LG2, MAD_2 */ #define MAKE_VSF_OP(op, out_reg_index, out_reg_fields, class) \ ((op) \ | ((out_reg_index) << R300_VPI_OUT_REG_INDEX_SHIFT) \ | ((out_reg_fields) << 20) \ | ( (class) << 8 ) ) #define EASY_VSF_OP(op, out_reg_index, out_reg_fields, class) \ MAKE_VSF_OP(R300_VPI_OUT_OP_##op, out_reg_index, VSF_FLAG_##out_reg_fields, VSF_OUT_CLASS_##class) \ /* according to Nikolai, the subsequent 3 CARD32 are sources, use same define for each */ #define VSF_IN_CLASS_TMP 0 #define VSF_IN_CLASS_ATTR 1 #define VSF_IN_CLASS_PARAM 2 #define VSF_IN_CLASS_NONE 9 #define VSF_IN_COMPONENT_X 0 #define VSF_IN_COMPONENT_Y 1 #define VSF_IN_COMPONENT_Z 2 #define VSF_IN_COMPONENT_W 3 #define VSF_IN_COMPONENT_ZERO 4 #define VSF_IN_COMPONENT_ONE 5 #define MAKE_VSF_SOURCE(in_reg_index, comp_x, comp_y, comp_z, comp_w, class, negate) \ ( ((in_reg_index)<