static struct tgsi_instruction tgsi_build_instruction(unsigned opcode, unsigned saturate, unsigned predicate, unsigned num_dst_regs, unsigned num_src_regs, struct tgsi_header *header) { struct tgsi_instruction instruction; assert (opcode <= TGSI_OPCODE_LAST); assert (saturate <= TGSI_SAT_MINUS_PLUS_ONE); assert (num_dst_regs <= 3); assert (num_src_regs <= 15); instruction = tgsi_default_instruction(); instruction.Opcode = opcode; instruction.Saturate = saturate; instruction.Predicate = predicate; instruction.NumDstRegs = num_dst_regs; instruction.NumSrcRegs = num_src_regs; header_bodysize_grow( header ); return instruction; }
static struct tgsi_declaration tgsi_build_declaration( unsigned file, unsigned usage_mask, unsigned interpolate, unsigned dimension, unsigned semantic, unsigned invariant, unsigned local, unsigned array, struct tgsi_header *header ) { struct tgsi_declaration declaration; assert( file < TGSI_FILE_COUNT ); assert( interpolate < TGSI_INTERPOLATE_COUNT ); declaration = tgsi_default_declaration(); declaration.File = file; declaration.UsageMask = usage_mask; declaration.Interpolate = interpolate; declaration.Dimension = dimension; declaration.Semantic = semantic; declaration.Invariant = invariant; declaration.Local = local; declaration.Array = array; header_bodysize_grow( header ); return declaration; }
struct tgsi_declaration tgsi_build_declaration( unsigned file, unsigned usage_mask, unsigned interpolate, unsigned semantic, unsigned centroid, unsigned invariant, struct tgsi_header *header ) { struct tgsi_declaration declaration; assert( file < TGSI_FILE_COUNT ); assert( interpolate < TGSI_INTERPOLATE_COUNT ); declaration = tgsi_default_declaration(); declaration.File = file; declaration.UsageMask = usage_mask; declaration.Interpolate = interpolate; declaration.Semantic = semantic; declaration.Centroid = centroid; declaration.Invariant = invariant; header_bodysize_grow( header ); return declaration; }
static void declaration_grow( struct tgsi_declaration *declaration, struct tgsi_header *header ) { assert( declaration->NrTokens < 0xFF ); declaration->NrTokens++; header_bodysize_grow( header ); }
static void instruction_grow( struct tgsi_instruction *instruction, struct tgsi_header *header ) { assert (instruction->NrTokens < 0xFF); instruction->NrTokens++; header_bodysize_grow( header ); }
static void immediate_grow( struct tgsi_immediate *immediate, struct tgsi_header *header ) { assert( immediate->NrTokens < 0xFF ); immediate->NrTokens++; header_bodysize_grow( header ); }
static void property_grow( struct tgsi_property *property, struct tgsi_header *header ) { assert( property->NrTokens < 0xFF ); property->NrTokens++; header_bodysize_grow( header ); }
struct tgsi_immediate tgsi_build_immediate( struct tgsi_header *header ) { struct tgsi_immediate immediate; immediate = tgsi_default_immediate(); header_bodysize_grow( header ); return immediate; }
static struct tgsi_property tgsi_build_property(unsigned property_name, struct tgsi_header *header) { struct tgsi_property property; property = tgsi_default_property(); property.PropertyName = property_name; header_bodysize_grow( header ); return property; }
static struct tgsi_immediate tgsi_build_immediate( struct tgsi_header *header, unsigned type ) { struct tgsi_immediate immediate; immediate = tgsi_default_immediate(); immediate.DataType = type; header_bodysize_grow( header ); return immediate; }