i965/fs: Don't constant-fold RCP
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 17 Mar 2016 02:31:02 +0000 (19:31 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 22 Mar 2016 23:46:15 +0000 (16:46 -0700)
No shader-db changes on Broadwell

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp

index 2616e65fc625a4e76bff6d9731c7271c8a507661..ffab0a8ebd578e39c0ff71c453ba0a0559725a97 100644 (file)
@@ -654,21 +654,6 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry)
          }
          break;
 
-      case SHADER_OPCODE_RCP:
-         /* The hardware doesn't do math on immediate values
-          * (because why are you doing that, seriously?), but
-          * the correct answer is to just constant fold it
-          * anyway.
-          */
-         assert(i == 0);
-         if (inst->src[0].f != 0.0f) {
-            inst->opcode = BRW_OPCODE_MOV;
-            inst->src[0] = val;
-            inst->src[0].f = 1.0f / inst->src[0].f;
-            progress = true;
-         }
-         break;
-
       case SHADER_OPCODE_UNTYPED_ATOMIC:
       case SHADER_OPCODE_UNTYPED_SURFACE_READ:
       case SHADER_OPCODE_UNTYPED_SURFACE_WRITE: