i965/blorp: wrap FRC (/brw_FRC(&func, /emit_frc(/)
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 29 Nov 2013 11:27:58 +0000 (13:27 +0200)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 23 Jan 2014 06:45:49 +0000 (08:45 +0200)
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h

index 2b9224bdb5569c4b844992b0978767e92f8ae104..4d0b882f3479dc468170a2fcafd77e1116817152 100644 (file)
@@ -1413,8 +1413,8 @@ brw_blorp_blit_program::translate_dst_to_src()
       /* Store the fractional parts to be used as bilinear interpolation
        *  coefficients.
       */
-      brw_FRC(&func, x_frac, X_f);
-      brw_FRC(&func, y_frac, Y_f);
+      emit_frc(x_frac, X_f);
+      emit_frc(y_frac, Y_f);
 
       /* Round the float coordinates down to nearest integer */
       brw_RNDD(&func, Xp_f, X_f);
@@ -1664,8 +1664,8 @@ brw_blorp_blit_program::manual_blend_bilinear(unsigned num_samples)
       *                        | 6 | 7 |                            | 7 | 1 |
       *                        ---------                            ---------
       */
-      brw_FRC(&func, vec16(t1_f), x_sample_coords);
-      brw_FRC(&func, vec16(t2_f), y_sample_coords);
+      emit_frc(vec16(t1_f), x_sample_coords);
+      emit_frc(vec16(t2_f), y_sample_coords);
       emit_mul(vec16(t1_f), t1_f, brw_imm_f(key->x_scale));
       emit_mul(vec16(t2_f), t2_f, brw_imm_f(key->x_scale * key->y_scale));
       emit_add(vec16(t1_f), t1_f, t2_f);
index c083ad8c9ff44b80646546400167e0fc53a46355..f22207ddf83a5426fa634096c39e0889a23835ad 100644 (file)
@@ -137,6 +137,12 @@ protected:
       brw_OR(&func, dst, src1, src2);
    }
 
+   inline void emit_frc(const struct brw_reg& dst,
+                        const struct brw_reg& src)
+   {
+      brw_FRC(&func, dst, src);
+   }
+
    void *mem_ctx;
    struct brw_compile func;
 };