From 87bf66daa9c73b0766e413ef697f8319dae4764d Mon Sep 17 00:00:00 2001 From: Anuj Phogat Date: Fri, 11 Mar 2016 15:05:38 -0800 Subject: mesa: Handle 3d block sizes in _mesa_compute_compressed_pixelstore Signed-off-by: Anuj Phogat Reviewed-by: Brian Paul --- src/mesa/main/texstore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 48f60867088..b54e0333749 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -1267,16 +1267,16 @@ _mesa_compute_compressed_pixelstore(GLuint dims, mesa_format texFormat, const struct gl_pixelstore_attrib *packing, struct compressed_pixelstore *store) { - GLuint bw, bh; + GLuint bw, bh, bd; - _mesa_get_format_block_size(texFormat, &bw, &bh); + _mesa_get_format_block_size_3d(texFormat, &bw, &bh, &bd); store->SkipBytes = 0; store->TotalBytesPerRow = store->CopyBytesPerRow = _mesa_format_row_stride(texFormat, width); store->TotalRowsPerSlice = store->CopyRowsPerSlice = (height + bh - 1) / bh; - store->CopySlices = depth; + store->CopySlices = (depth + bd - 1) / bd; if (packing->CompressedBlockWidth && packing->CompressedBlockSize) { -- cgit v1.2.3