summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnuj Phogat <[email protected]>2015-08-11 16:30:34 -0700
committerAnuj Phogat <[email protected]>2015-09-28 12:43:43 -0700
commite83b07aa7b124184decd68a64d970e8f408f8725 (patch)
treeae467b072f33b0588c221215046e6c32ceae2fe6 /src
parent485285498f39aa9590d430dee6d52c796531b8c0 (diff)
i965: Move conversion of {src, dst}_pitch to dwords outside if/else
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/intel_blit.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
index 8ddb313a491..8bb41207930 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -587,15 +587,6 @@ intelEmitCopyBlit(struct brw_context *brw,
dst_tiling, dst_tr_mode,
cpp, use_fast_copy_blit);
- /* For tiled source and destination, pitch value should be specified
- * as a number of Dwords.
- */
- if (dst_tiling != I915_TILING_NONE)
- dst_pitch /= 4;
-
- if (src_tiling != I915_TILING_NONE)
- src_pitch /= 4;
-
} else {
assert(!dst_y_tiled || (dst_pitch % 128) == 0);
assert(!src_y_tiled || (src_pitch % 128) == 0);
@@ -636,17 +627,19 @@ intelEmitCopyBlit(struct brw_context *brw,
CMD = xy_blit_cmd(src_tiling, src_tr_mode,
dst_tiling, dst_tr_mode,
cpp, use_fast_copy_blit);
+ }
- if (dst_tiling != I915_TILING_NONE)
- dst_pitch /= 4;
+ /* For tiled source and destination, pitch value should be specified
+ * as a number of Dwords.
+ */
+ if (dst_tiling != I915_TILING_NONE)
+ dst_pitch /= 4;
- if (src_tiling != I915_TILING_NONE)
- src_pitch /= 4;
- }
+ if (src_tiling != I915_TILING_NONE)
+ src_pitch /= 4;
- if (dst_y2 <= dst_y || dst_x2 <= dst_x) {
+ if (dst_y2 <= dst_y || dst_x2 <= dst_x)
return true;
- }
assert(dst_x < dst_x2);
assert(dst_y < dst_y2);