r300g: remove the hack with OPCODE_RET
authorMarek Olšák <maraeo@gmail.com>
Tue, 16 Nov 2010 21:19:47 +0000 (22:19 +0100)
committerMarek Olšák <maraeo@gmail.com>
Tue, 16 Nov 2010 21:39:27 +0000 (22:39 +0100)
RET was interpreted as END, which was wrong. Instead, if a shader contains RET
in the main function, it will fail to compile with an error message
from now on.

The hack is from early days.

src/gallium/drivers/r300/r300_tgsi_to_rc.c

index a4911b9a2a692fa7ed3814151d4cb476762d8c6f..33448bf0def238225f7c7d44a1e07df6fc70b53b 100644 (file)
@@ -363,10 +363,7 @@ void r300_tgsi_to_rc(struct tgsi_to_rc * ttr,
                 break;
             case TGSI_TOKEN_TYPE_INSTRUCTION:
                 inst = &parser.FullToken.FullInstruction;
-                /* This hack with the RET opcode woudn't work with
-                 * conditionals. */
-                if (inst->Instruction.Opcode == TGSI_OPCODE_END ||
-                    inst->Instruction.Opcode == TGSI_OPCODE_RET) {
+                if (inst->Instruction.Opcode == TGSI_OPCODE_END) {
                     break;
                 }