static int tgsi_unsupported(struct r600_shader_ctx *ctx)
{
+ const unsigned tgsi_opcode =
+ ctx->parse.FullToken.FullInstruction.Instruction.Opcode;
R600_ERR("%s tgsi opcode unsupported\n",
- tgsi_get_opcode_name(ctx->inst_info->tgsi_opcode));
+ tgsi_get_opcode_name(tgsi_opcode));
return -EINVAL;
}
r600_bytecode_src(&alu.src[1], &ctx->src[0], i);
}
/* handle some special cases */
- switch (ctx->inst_info->tgsi_opcode) {
+ switch (inst->Instruction.Opcode) {
case TGSI_OPCODE_SUB:
r600_bytecode_src_toggle_neg(&alu.src[1]);
break;
r600_bytecode_src(&alu.src[j], &ctx->src[j], 0);
/* RSQ should take the absolute value of src */
- if (ctx->inst_info->tgsi_opcode == TGSI_OPCODE_RSQ) {
+ if (inst->Instruction.Opcode == TGSI_OPCODE_RSQ) {
r600_bytecode_src_set_abs(&alu.src[j]);
}
}
static int tgsi_kill(struct r600_shader_ctx *ctx)
{
+ const struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
struct r600_bytecode_alu alu;
int i, r;
alu.src[0].sel = V_SQ_ALU_SRC_0;
- if (ctx->inst_info->tgsi_opcode == TGSI_OPCODE_KILL) {
+ if (inst->Instruction.Opcode == TGSI_OPCODE_KILL) {
alu.src[1].sel = V_SQ_ALU_SRC_1;
alu.src[1].neg = 1;
} else {
alu.dst.chan = i;
alu.dst.write = (inst->Dst[0].Register.WriteMask >> i) & 1;
/* handle some special cases */
- switch (ctx->inst_info->tgsi_opcode) {
+ switch (inst->Instruction.Opcode) {
case TGSI_OPCODE_DP2:
if (i > 1) {
alu.src[0].sel = alu.src[1].sel = V_SQ_ALU_SRC_0;