[Mesa-dev] [PATCH 36/42] i965/blorp: wrap RNDD (/brw_RNDD(&func, /emit_rndd(/)

Topi Pohjolainen topi.pohjolainen at intel.com
Fri Dec 20 06:39:05 PST 2013


Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
 src/mesa/drivers/dri/i965/brw_blorp_blit.cpp  | 4 ++--
 src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
index 83d2e56..37fc7ac 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
@@ -1412,8 +1412,8 @@ brw_blorp_blit_program::translate_dst_to_src()
       emit_frc(y_frac, Y_f);
 
       /* Round the float coordinates down to nearest integer */
-      brw_RNDD(&func, Xp_f, X_f);
-      brw_RNDD(&func, Yp_f, Y_f);
+      emit_rndd(Xp_f, X_f);
+      emit_rndd(Yp_f, Y_f);
       emit_mul(X_f, Xp_f, brw_imm_f(1 / key->x_scale));
       emit_mul(Y_f, Yp_f, brw_imm_f(1 / key->y_scale));
       SWAP_XY_AND_XPYP();
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h b/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h
index c9606b1..1ecf076 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h
@@ -156,6 +156,12 @@ protected:
       brw_FRC(&func, dst, src);
    }
 
+   inline void emit_rndd(const struct brw_reg& dst,
+                         const struct brw_reg& src)
+   {
+      brw_RNDD(&func, dst, src);
+   }
+
    void *mem_ctx;
    struct brw_compile func;
 };
-- 
1.8.3.1



More information about the mesa-dev mailing list