diff options
author | Anuj Phogat <anuj.phogat@gmail.com> | 2016-03-11 15:05:38 -0800 |
---|---|---|
committer | Anuj Phogat <anuj.phogat@gmail.com> | 2016-05-03 03:43:18 -0700 |
commit | 87bf66daa9c73b0766e413ef697f8319dae4764d (patch) | |
tree | 9ac14201416fb0c26fabc3c7e5461b8cb6977f91 | |
parent | 84a44844f2ca90be40579a76651b8fdc2b859dda (diff) | |
download | external_mesa3d-87bf66daa9c73b0766e413ef697f8319dae4764d.zip external_mesa3d-87bf66daa9c73b0766e413ef697f8319dae4764d.tar.gz external_mesa3d-87bf66daa9c73b0766e413ef697f8319dae4764d.tar.bz2 |
mesa: Handle 3d block sizes in _mesa_compute_compressed_pixelstore
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r-- | src/mesa/main/texstore.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 48f6086..b54e033 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) { |