summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormichal <michal@michal-laptop.(none)>2007-08-07 10:14:50 +0100
committermichal <michal@michal-laptop.(none)>2007-08-07 10:15:21 +0100
commit285c7d593170506409ef78adb40f3bb849c93e5d (patch)
treeb4f6a11f769970aa2d6d8694af49b3806bd84457 /src
parent958a1ad4200521f4fefa87196ee56be0f0c61613 (diff)
Labels are always label targets.
Translate label for GLSL IF, ELSE.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/pipe/tgsi/core/tgsi_build.c4
-rw-r--r--src/mesa/pipe/tgsi/core/tgsi_build.h1
-rw-r--r--src/mesa/pipe/tgsi/core/tgsi_dump.c4
-rw-r--r--src/mesa/pipe/tgsi/core/tgsi_exec.c3
-rw-r--r--src/mesa/pipe/tgsi/core/tgsi_token.h3
-rw-r--r--src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c2
6 files changed, 4 insertions, 13 deletions
diff --git a/src/mesa/pipe/tgsi/core/tgsi_build.c b/src/mesa/pipe/tgsi/core/tgsi_build.c
index 2a482a78dc3..bbf4a89a5e3 100644
--- a/src/mesa/pipe/tgsi/core/tgsi_build.c
+++ b/src/mesa/pipe/tgsi/core/tgsi_build.c
@@ -528,7 +528,6 @@ tgsi_build_full_instruction(
*instruction_ext_label = tgsi_build_instruction_ext_label(
full_inst->InstructionExtLabel.Label,
- full_inst->InstructionExtLabel.Target,
prev_token,
instruction,
header );
@@ -835,7 +834,6 @@ tgsi_default_instruction_ext_label( void )
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;
@@ -855,7 +853,6 @@ tgsi_compare_instruction_ext_label(
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 )
@@ -864,7 +861,6 @@ tgsi_build_instruction_ext_label(
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 );
diff --git a/src/mesa/pipe/tgsi/core/tgsi_build.h b/src/mesa/pipe/tgsi/core/tgsi_build.h
index db259565193..35c1a2506d2 100644
--- a/src/mesa/pipe/tgsi/core/tgsi_build.h
+++ b/src/mesa/pipe/tgsi/core/tgsi_build.h
@@ -160,7 +160,6 @@ tgsi_compare_instruction_ext_label(
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 );
diff --git a/src/mesa/pipe/tgsi/core/tgsi_dump.c b/src/mesa/pipe/tgsi/core/tgsi_dump.c
index bdffc59d393..882771da2e4 100644
--- a/src/mesa/pipe/tgsi/core/tgsi_dump.c
+++ b/src/mesa/pipe/tgsi/core/tgsi_dump.c
@@ -618,10 +618,6 @@ tgsi_dump(
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 );
diff --git a/src/mesa/pipe/tgsi/core/tgsi_exec.c b/src/mesa/pipe/tgsi/core/tgsi_exec.c
index 7cf48021de2..37ca7c1b2ab 100644
--- a/src/mesa/pipe/tgsi/core/tgsi_exec.c
+++ b/src/mesa/pipe/tgsi/core/tgsi_exec.c
@@ -134,8 +134,7 @@ tgsi_exec_prepare(
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;
diff --git a/src/mesa/pipe/tgsi/core/tgsi_token.h b/src/mesa/pipe/tgsi/core/tgsi_token.h
index 632d6788181..fd59ea1e2ed 100644
--- a/src/mesa/pipe/tgsi/core/tgsi_token.h
+++ b/src/mesa/pipe/tgsi/core/tgsi_token.h
@@ -855,8 +855,7 @@ struct tgsi_instruction_ext_label
{
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 */
};
diff --git a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c
index 8ce3931f5e4..47fd5791e11 100644
--- a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c
+++ b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c
@@ -293,6 +293,7 @@ compile_instruction(
break;
case OPCODE_ELSE:
fullinst->Instruction.Opcode = TGSI_OPCODE_ELSE;
+ fullinst->InstructionExtLabel.Label = inst->BranchTarget;
break;
case OPCODE_ENDIF:
fullinst->Instruction.Opcode = TGSI_OPCODE_ENDIF;
@@ -317,6 +318,7 @@ compile_instruction(
break;
case OPCODE_IF:
fullinst->Instruction.Opcode = TGSI_OPCODE_IF;
+ fullinst->InstructionExtLabel.Label = inst->BranchTarget;
break;
case OPCODE_INT:
fullinst->Instruction.Opcode = TGSI_OPCODE_INT;