if (intel->gen >= 5) {
switch (inst->opcode) {
- case FS_OPCODE_TEX:
+ case SHADER_OPCODE_TEX:
if (inst->shadow_compare) {
msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_COMPARE;
} else {
msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_BIAS;
}
break;
- case FS_OPCODE_TXL:
+ case SHADER_OPCODE_TXL:
if (inst->shadow_compare) {
msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_LOD_COMPARE;
} else {
msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_LOD;
}
break;
- case FS_OPCODE_TXS:
+ case SHADER_OPCODE_TXS:
msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_RESINFO;
break;
- case FS_OPCODE_TXD:
+ case SHADER_OPCODE_TXD:
/* There is no sample_d_c message; comparisons are done manually */
msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_DERIVS;
break;
- case FS_OPCODE_TXF:
+ case SHADER_OPCODE_TXF:
msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_LD;
break;
default:
}
} else {
switch (inst->opcode) {
- case FS_OPCODE_TEX:
+ case SHADER_OPCODE_TEX:
/* Note that G45 and older determines shadow compare and dispatch width
* from message length for most messages.
*/
simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD16;
}
break;
- case FS_OPCODE_TXL:
+ case SHADER_OPCODE_TXL:
if (inst->shadow_compare) {
assert(inst->mlen == 6);
msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_LOD_COMPARE;
simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD16;
}
break;
- case FS_OPCODE_TXD:
+ case SHADER_OPCODE_TXD:
/* There is no sample_d_c message; comparisons are done manually */
assert(inst->mlen == 7 || inst->mlen == 10);
msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_GRADIENTS;
break;
- case FS_OPCODE_TXF:
+ case SHADER_OPCODE_TXF:
assert(inst->mlen == 9);
msg_type = BRW_SAMPLER_MESSAGE_SIMD16_LD;
simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD16;
break;
- case FS_OPCODE_TXS:
+ case SHADER_OPCODE_TXS:
assert(inst->mlen == 3);
msg_type = BRW_SAMPLER_MESSAGE_SIMD16_RESINFO;
simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD16;
case FS_OPCODE_LINTERP:
generate_linterp(inst, dst, src);
break;
- case FS_OPCODE_TEX:
+ case SHADER_OPCODE_TEX:
case FS_OPCODE_TXB:
- case FS_OPCODE_TXD:
- case FS_OPCODE_TXF:
- case FS_OPCODE_TXL:
- case FS_OPCODE_TXS:
+ case SHADER_OPCODE_TXD:
+ case SHADER_OPCODE_TXF:
+ case SHADER_OPCODE_TXL:
+ case SHADER_OPCODE_TXS:
generate_tex(inst, dst, src[0]);
break;
case FS_OPCODE_DISCARD:
fs_inst *inst = NULL;
switch (ir->op) {
case ir_tex:
- inst = emit(FS_OPCODE_TEX, dst);
+ inst = emit(SHADER_OPCODE_TEX, dst);
break;
case ir_txb:
inst = emit(FS_OPCODE_TXB, dst);
break;
case ir_txl:
- inst = emit(FS_OPCODE_TXL, dst);
+ inst = emit(SHADER_OPCODE_TXL, dst);
break;
case ir_txd:
- inst = emit(FS_OPCODE_TXD, dst);
+ inst = emit(SHADER_OPCODE_TXD, dst);
break;
case ir_txs:
- inst = emit(FS_OPCODE_TXS, dst);
+ inst = emit(SHADER_OPCODE_TXS, dst);
break;
case ir_txf:
- inst = emit(FS_OPCODE_TXF, dst);
+ inst = emit(SHADER_OPCODE_TXF, dst);
break;
}
inst->base_mrf = base_mrf;
fs_inst *inst = NULL;
switch (ir->op) {
case ir_tex:
- inst = emit(FS_OPCODE_TEX, dst);
+ inst = emit(SHADER_OPCODE_TEX, dst);
break;
case ir_txb:
ir->lod_info.bias->accept(this);
emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), this->result);
mlen += reg_width;
- inst = emit(FS_OPCODE_TXL, dst);
+ inst = emit(SHADER_OPCODE_TXL, dst);
break;
case ir_txd: {
ir->lod_info.grad.dPdx->accept(this);
mlen += reg_width;
}
- inst = emit(FS_OPCODE_TXD, dst);
+ inst = emit(SHADER_OPCODE_TXD, dst);
break;
}
case ir_txs:
ir->lod_info.lod->accept(this);
emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen, BRW_REGISTER_TYPE_UD), this->result);
mlen += reg_width;
- inst = emit(FS_OPCODE_TXS, dst);
+ inst = emit(SHADER_OPCODE_TXS, dst);
break;
case ir_txf:
mlen = header_present + 4 * reg_width;
emit(BRW_OPCODE_MOV,
fs_reg(MRF, base_mrf + mlen - reg_width, BRW_REGISTER_TYPE_UD),
this->result);
- inst = emit(FS_OPCODE_TXF, dst);
+ inst = emit(SHADER_OPCODE_TXF, dst);
break;
}
inst->base_mrf = base_mrf;
/* Generate the SEND */
fs_inst *inst = NULL;
switch (ir->op) {
- case ir_tex: inst = emit(FS_OPCODE_TEX, dst); break;
+ case ir_tex: inst = emit(SHADER_OPCODE_TEX, dst); break;
case ir_txb: inst = emit(FS_OPCODE_TXB, dst); break;
- case ir_txl: inst = emit(FS_OPCODE_TXL, dst); break;
- case ir_txd: inst = emit(FS_OPCODE_TXD, dst); break;
- case ir_txf: inst = emit(FS_OPCODE_TXF, dst); break;
- case ir_txs: inst = emit(FS_OPCODE_TXS, dst); break;
+ case ir_txl: inst = emit(SHADER_OPCODE_TXL, dst); break;
+ case ir_txd: inst = emit(SHADER_OPCODE_TXD, dst); break;
+ case ir_txf: inst = emit(SHADER_OPCODE_TXF, dst); break;
+ case ir_txs: inst = emit(SHADER_OPCODE_TXS, dst); break;
}
inst->base_mrf = base_mrf;
inst->mlen = mlen;