gallium: Add SWITCH, CASE, DEFAULT and ENDSWITCH opcodes to TGSI.

Provide reference implementation of them in tgsi_exec.

Note that BREAK opcode is overloaded and can be used to break out
of either a loop or a switch-case statement.
This commit is contained in:
Michal Krol
2010-01-01 23:44:00 +01:00
parent 08a3efee10
commit 062aab96e0
4 changed files with 184 additions and 12 deletions

View File

@@ -314,7 +314,11 @@ struct tgsi_property_data {
#define TGSI_OPCODE_USHR 137
#define TGSI_OPCODE_USLT 138
#define TGSI_OPCODE_USNE 139
#define TGSI_OPCODE_LAST 140
#define TGSI_OPCODE_SWITCH 140
#define TGSI_OPCODE_CASE 141
#define TGSI_OPCODE_DEFAULT 142
#define TGSI_OPCODE_ENDSWITCH 143
#define TGSI_OPCODE_LAST 144
#define TGSI_SAT_NONE 0 /* do not saturate */
#define TGSI_SAT_ZERO_ONE 1 /* clamp to [0,1] */