diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2015-03-03 14:10:58 +0000 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2015-03-12 14:19:57 +0000 |
commit | 130221b3b5be3ad03bd0ac2b12d8b009eaf540d4 (patch) | |
tree | cc09023db545b7d22bac36b9979eece5d39ba733 /lib/intel_batchbuffer.c | |
parent | cbd927cd35473c88bf5e2f5f42e61af612eaa75e (diff) |
lib: Don't give a struct igt_buf * to fast_copy_pitch()
So we can use this function in a "raw" (ie without igt_buf) version.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'lib/intel_batchbuffer.c')
-rw-r--r-- | lib/intel_batchbuffer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c index f26bee15..2d1a23fa 100644 --- a/lib/intel_batchbuffer.c +++ b/lib/intel_batchbuffer.c @@ -461,12 +461,12 @@ unsigned igt_buf_height(struct igt_buf *buf) * pitches are in bytes if the surfaces are linear, number of dwords * otherwise */ -static uint32_t fast_copy_pitch(struct igt_buf *buf) +static uint32_t fast_copy_pitch(unsigned int stride, enum i915_tiling tiling) { - if (buf->tiling != I915_TILING_NONE) - return buf->stride / 4; + if (tiling != I915_TILING_NONE) + return stride / 4; else - return buf->stride; + return stride; } /** @@ -494,8 +494,8 @@ void igt_blitter_fast_copy(struct intel_batchbuffer *batch, uint32_t src_pitch, dst_pitch; uint32_t dword0 = 0, dword1 = 0; - src_pitch = fast_copy_pitch(src); - dst_pitch = fast_copy_pitch(dst); + src_pitch = fast_copy_pitch(src->stride, src->tiling); + dst_pitch = fast_copy_pitch(dst->stride, src->tiling); #define CHECK_RANGE(x) ((x) >= 0 && (x) < (1 << 15)) assert(CHECK_RANGE(src_x) && CHECK_RANGE(src_y) && |