Translate label for GLSL IF, ELSE.
*instruction_ext_label = tgsi_build_instruction_ext_label(
full_inst->InstructionExtLabel.Label,
- full_inst->InstructionExtLabel.Target,
prev_token,
instruction,
header );
instruction_ext_label.Type = TGSI_INSTRUCTION_EXT_TYPE_LABEL;
instruction_ext_label.Label = 0;
- instruction_ext_label.Target = 0;
instruction_ext_label.Padding = 0;
instruction_ext_label.Extended = 0;
struct tgsi_instruction_ext_label
tgsi_build_instruction_ext_label(
GLuint label,
- GLuint target,
struct tgsi_token *prev_token,
struct tgsi_instruction *instruction,
struct tgsi_header *header )
instruction_ext_label = tgsi_default_instruction_ext_label();
instruction_ext_label.Label = label;
- instruction_ext_label.Target = target;
prev_token->Extended = 1;
instruction_grow( instruction, header );
struct tgsi_instruction_ext_label
tgsi_build_instruction_ext_label(
GLuint label,
- GLuint target,
struct tgsi_token *prev_token,
struct tgsi_instruction *instruction,
struct tgsi_header *header );
TXT( "\nLabel : " );
UID( inst->InstructionExtLabel.Label );
}
- if( deflt || fi.InstructionExtLabel.Target != inst->InstructionExtLabel.Target ) {
- TXT( "\nTarget : " );
- UID( inst->InstructionExtLabel.Target );
- }
if( ignored ) {
TXT( "\nPadding : " );
UIX( inst->InstructionExtLabel.Padding );
mach->ImmLimit += (parse.FullToken.FullImmediate.Immediate.Size - 1) / 4;
break;
case TGSI_TOKEN_TYPE_INSTRUCTION:
- if( parse.FullToken.FullInstruction.InstructionExtLabel.Label &&
- parse.FullToken.FullInstruction.InstructionExtLabel.Target ) {
+ if( parse.FullToken.FullInstruction.InstructionExtLabel.Label ) {
assert( labels->count < 128 );
labels->labels[labels->count][0] = parse.FullToken.FullInstruction.InstructionExtLabel.Label;
labels->labels[labels->count][1] = pointer;
{
GLuint Type : 4; /* TGSI_INSTRUCTION_EXT_TYPE_LABEL */
GLuint Label : 24; /* UINT */
- GLuint Target : 1; /* BOOL */
- GLuint Padding : 2;
+ GLuint Padding : 3;
GLuint Extended : 1; /* BOOL */
};
break;\r
case OPCODE_ELSE:\r
fullinst->Instruction.Opcode = TGSI_OPCODE_ELSE;\r
+ fullinst->InstructionExtLabel.Label = inst->BranchTarget;\r
break;\r
case OPCODE_ENDIF:\r
fullinst->Instruction.Opcode = TGSI_OPCODE_ENDIF;\r
break;\r
case OPCODE_IF:\r
fullinst->Instruction.Opcode = TGSI_OPCODE_IF;\r
+ fullinst->InstructionExtLabel.Label = inst->BranchTarget;\r
break;\r
case OPCODE_INT:\r
fullinst->Instruction.Opcode = TGSI_OPCODE_INT;\r