i965/fs: Use the scale helper in surface_builder
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 5 Apr 2016 17:37:54 +0000 (10:37 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 7 Apr 2016 23:49:09 +0000 (16:49 -0700)
As requested by Curro

src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp

index 4adffdd75fba532ab06163d803e76ac175c8050e..96731ffac7f52b790be2534bac628e59e45a63c4 100644 (file)
@@ -725,7 +725,7 @@ namespace {
                 */
                if (is_signed && widths[c] < 32)
                   bld.AND(offset(dst, bld, c), offset(dst, bld, c),
-                          brw_imm_d((1 << widths[c]) - 1));
+                          brw_imm_d(scale(widths[c])));
             }
          }
 
@@ -804,7 +804,7 @@ namespace {
                 */
                if (is_signed && widths[c] < 32)
                   bld.AND(offset(dst, bld, c), offset(dst, bld, c),
-                          brw_imm_d((1 << widths[c]) - 1));
+                          brw_imm_d(scale(widths[c])));
             }
          }