shadow_comparitor = this->result;
}
+ const glsl_type *lod_type;
src_reg lod, dPdx, dPdy;
switch (ir->op) {
case ir_txf:
case ir_txs:
ir->lod_info.lod->accept(this);
lod = this->result;
+ lod_type = ir->lod_info.lod->type;
break;
case ir_txd:
ir->lod_info.grad.dPdx->accept(this);
ir->lod_info.grad.dPdy->accept(this);
dPdy = this->result;
+
+ lod_type = ir->lod_info.grad.dPdx->type;
break;
case ir_tex:
case ir_txb:
if (ir->op == ir_txs) {
int writemask = intel->gen == 4 ? WRITEMASK_W : WRITEMASK_X;
- emit(MOV(dst_reg(MRF, param_base, ir->lod_info.lod->type, writemask),
- lod));
+ emit(MOV(dst_reg(MRF, param_base, lod_type, writemask), lod));
} else {
int i, coord_mask = 0, zero_mask = 0;
/* Load the coordinate */
mrf = param_base;
writemask = WRITEMASK_Z;
}
- emit(MOV(dst_reg(MRF, mrf, ir->lod_info.lod->type, writemask), lod));
+ emit(MOV(dst_reg(MRF, mrf, lod_type, writemask), lod));
} else if (ir->op == ir_txf) {
- emit(MOV(dst_reg(MRF, param_base, ir->lod_info.lod->type, WRITEMASK_W),
+ emit(MOV(dst_reg(MRF, param_base, lod_type, WRITEMASK_W),
lod));
} else if (ir->op == ir_txd) {
- const glsl_type *type = ir->lod_info.grad.dPdx->type;
+ const glsl_type *type = lod_type;
if (intel->gen >= 5) {
dPdx.swizzle = BRW_SWIZZLE4(SWIZZLE_X,SWIZZLE_X,SWIZZLE_Y,SWIZZLE_Y);