summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/python/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/python/tests')
-rwxr-xr-xsrc/gallium/state_trackers/python/tests/surface_copy.py7
-rwxr-xr-xsrc/gallium/state_trackers/python/tests/texture_transfer.py5
2 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/python/tests/surface_copy.py b/src/gallium/state_trackers/python/tests/surface_copy.py
index 3ceecbbd3a..df5babb78a 100755
--- a/src/gallium/state_trackers/python/tests/surface_copy.py
+++ b/src/gallium/state_trackers/python/tests/surface_copy.py
@@ -98,9 +98,10 @@ class TextureTest(TestCase):
y = 0
w = dst_surface.width
h = dst_surface.height
-
- stride = dst_surface.nblocksx * dst_texture.block.size
- size = dst_surface.nblocksy * stride
+
+ # ???
+ stride = pf_get_stride(texture->format, w)
+ size = pf_get_nblocksy(texture->format) * stride
src_raw = os.urandom(size)
src_surface.put_tile_raw(0, 0, w, h, src_raw, stride)
diff --git a/src/gallium/state_trackers/python/tests/texture_transfer.py b/src/gallium/state_trackers/python/tests/texture_transfer.py
index e65b425adf..35daca9e49 100755
--- a/src/gallium/state_trackers/python/tests/texture_transfer.py
+++ b/src/gallium/state_trackers/python/tests/texture_transfer.py
@@ -86,8 +86,9 @@ class TextureTest(TestCase):
surface = texture.get_surface(face, level, zslice)
- stride = surface.nblocksx * texture.block.size
- size = surface.nblocksy * stride
+ # ???
+ stride = pf_get_stride(texture->format, w)
+ size = pf_get_nblocksy(texture->format) * stride
in_raw = os.urandom(size)