diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-13 12:35:58 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-13 15:07:44 +0200 |
commit | 83440953e50d1c46217ce9bdcd74aa9a4671913d (patch) | |
tree | 4e94f8444c479e4e59be2b760dba01d3aa561ed2 /tests/prime_nv_pcopy.c | |
parent | 2371c79bbd69f46c2849298fb7f216a5b9a21aa8 (diff) |
tests: s/assert/igt_assert
Just a wholesale rollout for now, we can refine later on.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/prime_nv_pcopy.c')
-rw-r--r-- | tests/prime_nv_pcopy.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/prime_nv_pcopy.c b/tests/prime_nv_pcopy.c index a0fb9d26..b7aad707 100644 --- a/tests/prime_nv_pcopy.c +++ b/tests/prime_nv_pcopy.c @@ -356,8 +356,8 @@ static int swtile_y(uint8_t *out, const uint8_t *in, int w, int h) { uint32_t x, y, dx, dy; uint8_t *endptr = out + w * h; - assert(!(w % 128)); - assert(!(h % 32)); + igt_assert(!(w % 128)); + igt_assert(!(h % 32)); for (y = 0; y < h; y += 32) { for (x = 0; x < w; x += 128, out += TILE_SIZE) { @@ -365,8 +365,8 @@ static int swtile_y(uint8_t *out, const uint8_t *in, int w, int h) for (dy = 0; dy < 32; ++dy) { uint32_t out_ofs = (dx * 32 + dy) * 16; uint32_t in_ofs = (y + dy) * w + (x + 16 * dx); - assert(out_ofs < TILE_SIZE); - assert(in_ofs < w*h); + igt_assert(out_ofs < TILE_SIZE); + igt_assert(in_ofs < w*h); // To do the Y tiling quirk: // out_ofs = out_ofs ^ (((out_ofs >> 9) & 1) << 6); @@ -375,7 +375,7 @@ static int swtile_y(uint8_t *out, const uint8_t *in, int w, int h) } } } - assert(out == endptr); + igt_assert(out == endptr); return 0; } @@ -383,21 +383,21 @@ static int swtile_x(uint8_t *out, const uint8_t *in, int w, int h) { uint32_t x, y, dy; uint8_t *endptr = out + w * h; - assert(!(w % 512)); - assert(!(h % 8)); + igt_assert(!(w % 512)); + igt_assert(!(h % 8)); for (y = 0; y < h; y += 8) { for (x = 0; x < w; x += 512, out += TILE_SIZE) { for (dy = 0; dy < 8; ++dy) { uint32_t out_ofs = 512 * dy; uint32_t in_ofs = (y + dy) * w + x; - assert(out_ofs < TILE_SIZE); - assert(in_ofs < w*h); + igt_assert(out_ofs < TILE_SIZE); + igt_assert(in_ofs < w*h); memcpy(&out[out_ofs], &in[in_ofs], 512); } } } - assert(out == endptr); + igt_assert(out == endptr); return 0; } |