summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnuj Phogat <[email protected]>2013-11-07 16:27:25 -0800
committerAnuj Phogat <[email protected]>2013-11-11 13:35:37 -0800
commit348b91b7dcb2c160b7e0e4f5aedf7042590a0b5e (patch)
treee879ce8beb546584116e29e8a816bc7f79104f7d /src
parent227872571ac57e47777fe1350fe9f5a355b5fbb8 (diff)
i965: Move #define's inside function as local variables
X_f, Y_f, Xp_f, Yp_f variables are used just inside translate_dst_to_src().So, they can be defined just as local variables. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp_blit.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
index 7e436f71fd7..d54b9263392 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
@@ -1403,10 +1403,6 @@ brw_blorp_blit_program::kill_if_outside_dst_rect()
brw_pop_insn_state(&func);
}
-#define X_f retype(X, BRW_REGISTER_TYPE_F)
-#define Y_f retype(Y, BRW_REGISTER_TYPE_F)
-#define Xp_f retype(Xp, BRW_REGISTER_TYPE_F)
-#define Yp_f retype(Yp, BRW_REGISTER_TYPE_F)
/**
* Emit code to translate from destination (X, Y) coordinates to source (X, Y)
* coordinates.
@@ -1414,6 +1410,11 @@ brw_blorp_blit_program::kill_if_outside_dst_rect()
void
brw_blorp_blit_program::translate_dst_to_src()
{
+ struct brw_reg X_f = retype(X, BRW_REGISTER_TYPE_F);
+ struct brw_reg Y_f = retype(Y, BRW_REGISTER_TYPE_F);
+ struct brw_reg Xp_f = retype(Xp, BRW_REGISTER_TYPE_F);
+ struct brw_reg Yp_f = retype(Yp, BRW_REGISTER_TYPE_F);
+
brw_set_compression_control(&func, BRW_COMPRESSION_COMPRESSED);
/* Move the UD coordinates to float registers. */
brw_MOV(&func, Xp_f, X);
@@ -1489,10 +1490,6 @@ brw_blorp_blit_program::clamp_tex_coords(struct brw_reg regX,
brw_MOV(&func, regY, clampY1);
brw_set_predicate_control(&func, BRW_PREDICATE_NONE);
}
-#undef X_f
-#undef Y_f
-#undef Xp_f
-#undef Yp_f
/**
* Emit code to transform the X and Y coordinates as needed for blending