i965/fs: Don't constant propagate into integer math instructions.

Constant combining won't promote non-floats, so this isn't safe.

Fixes regressions since commit 0087cf23e.
This commit is contained in:
Matt Turner
2015-04-24 13:14:56 -07:00
parent e170185896
commit 51c61fff8f
2 changed files with 5 additions and 3 deletions

View File

@@ -66,8 +66,6 @@ must_promote_imm(const struct brw_device_info *devinfo, const fs_inst *inst)
{
switch (inst->opcode) {
case SHADER_OPCODE_POW:
case SHADER_OPCODE_INT_QUOTIENT:
case SHADER_OPCODE_INT_REMAINDER:
return devinfo->gen < 8;
case BRW_OPCODE_MAD:
case BRW_OPCODE_LRP:

View File

@@ -499,9 +499,13 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry)
progress = true;
break;
case SHADER_OPCODE_POW:
case SHADER_OPCODE_INT_QUOTIENT:
case SHADER_OPCODE_INT_REMAINDER:
/* FINISHME: Promote non-float constants and remove this. */
if (devinfo->gen < 8)
break;
/* fallthrough */
case SHADER_OPCODE_POW:
/* Allow constant propagation into src1 regardless of generation, and
* let constant combining promote the constant on Gen < 8.
*/