mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 00:30:11 +01:00
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>
This commit is contained in:
parent
84a44844f2
commit
87bf66daa9
1 changed files with 3 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue