OSDN Git Service

i965/fs: Fix off-by-one in saturate propagation.
authorMatt Turner <mattst88@gmail.com>
Thu, 3 Apr 2014 17:35:09 +0000 (10:35 -0700)
committerMatt Turner <mattst88@gmail.com>
Sat, 5 Apr 2014 16:47:36 +0000 (09:47 -0700)
commit86ae6f477d24169cbc27d53c57d5d024d73e4e4a
treeccb6c95473d66141760331e1777557df361df67f
parent20dee82a75ac7415fba0b3540a1f99d60b2325db
i965/fs: Fix off-by-one in saturate propagation.

ip needs to be initialized to start_ip - 1, since the first thing in the
main loop is ip++. Otherwise we would incorrectly propagate the saturate
from the mov to the mad:

   mad     a, b, c, d
   mov.sat x, a
   add     y, z, a

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp