diff options
Diffstat (limited to 'progs/gallium/python/tests/surface_copy.py')
-rwxr-xr-x | progs/gallium/python/tests/surface_copy.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/progs/gallium/python/tests/surface_copy.py b/progs/gallium/python/tests/surface_copy.py index a3f1b3e130c..37d210d904e 100755 --- a/progs/gallium/python/tests/surface_copy.py +++ b/progs/gallium/python/tests/surface_copy.py @@ -99,21 +99,18 @@ class TextureTest(TestCase): w = dst_surface.width h = dst_surface.height - # ??? - stride = pf_get_stride(texture->format, w) - size = pf_get_nblocksy(texture->format) * stride + stride = util_format_get_stride(format, w) + size = util_format_get_nblocksy(format, h) * stride src_raw = os.urandom(size) - src_surface.put_tile_raw(0, 0, w, h, src_raw, stride) - ctx = self.dev.context_create() + ctx.surface_write_raw(src_surface, 0, 0, w, h, src_raw, stride) + ctx.surface_copy(dst_surface, 0, 0, src_surface, 0, 0, w, h) - ctx.flush() - - dst_raw = dst_surface.get_tile_raw(0, 0, w, h) + dst_raw = ctx.surface_read_raw(dst_surface, 0, 0, w, h) if dst_raw != src_raw: raise TestFailure |