{
struct ureg fog = register_output(p, VERT_RESULT_FOGC);
struct ureg input;
- GLuint useabs = p->state->fog_source_is_depth && p->state->fog_mode &&
- (p->state->fog_mode != FOG_EXP2);
if (p->state->fog_source_is_depth) {
input = swizzle1(get_eye_position(p), Z);
STATE_FOG_PARAMS_OPTIMIZED);
struct ureg tmp = get_temp(p);
+ GLboolean useabs = (p->state->fog_mode != FOG_EXP2);
+
if (useabs) {
emit_op1(p, OPCODE_ABS, tmp, 0, input);
}
/* results = incoming fog coords (compute fog per-fragment later)
*
* KW: Is it really necessary to do anything in this case?
+ * BP: Yes, we always need to compute the absolute value, unless
+ * we want to push that down into the fragment program...
*/
+ GLboolean useabs = GL_TRUE;
emit_op1(p, useabs ? OPCODE_ABS : OPCODE_MOV, fog, WRITEMASK_X, input);
}
}