switch (ir->op) {
case ir_tex:
opcode = (is_cube_array && ir->shadow_comparitor) ? TGSI_OPCODE_TEX2 : TGSI_OPCODE_TEX;
+ if (ir->offset) {
+ ir->offset->accept(this);
+ offset = this->result;
+ }
break;
case ir_txb:
opcode = is_cube_array ? TGSI_OPCODE_TXB2 : TGSI_OPCODE_TXB;
ir->lod_info.bias->accept(this);
lod_info = this->result;
+ if (ir->offset) {
+ ir->offset->accept(this);
+ offset = this->result;
+ }
break;
case ir_txl:
opcode = is_cube_array ? TGSI_OPCODE_TXL2 : TGSI_OPCODE_TXL;
ir->lod_info.lod->accept(this);
lod_info = this->result;
+ if (ir->offset) {
+ ir->offset->accept(this);
+ offset = this->result;
+ }
break;
case ir_txd:
opcode = TGSI_OPCODE_TXD;
dx = this->result;
ir->lod_info.grad.dPdy->accept(this);
dy = this->result;
+ if (ir->offset) {
+ ir->offset->accept(this);
+ offset = this->result;
+ }
break;
case ir_txs:
opcode = TGSI_OPCODE_TXQ;
ir->lod_info.lod->accept(this);
lod_info = this->result;
if (ir->offset) {
- ir->offset->accept(this);
- offset = this->result;
+ ir->offset->accept(this);
+ offset = this->result;
}
break;
case ir_txf_ms: