diff --git a/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp b/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp index 7a5f983..1407564 100644 --- a/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp +++ b/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp @@ -161,7 +161,8 @@ lower_texture_grad_visitor::visit_leave(ir_texture *ir) * alternatively, remove one unit from the result of the log2 computation. */ ir->op = ir_txl; - if (ir->sampler->type->sampler_dimensionality == GLSL_SAMPLER_DIM_CUBE) { + if (ir->sampler->type->sampler_dimensionality == GLSL_SAMPLER_DIM_CUBE && + !ir->shadow_comparitor) { ir->lod_info.lod = expr(ir_binop_add, expr(ir_unop_log2, rho), new(mem_ctx) ir_constant(-1.0f));