diff options
author | Nanley Chery <nanley.g.chery@intel.com> | 2015-05-21 14:27:55 -0700 |
---|---|---|
committer | Nanley Chery <nanley.g.chery@intel.com> | 2015-08-26 14:36:43 -0700 |
commit | a6877341358e1534e74dd9e5fc72934a20b78228 (patch) | |
tree | 97b61a8c18f4bba93622b187f675d1ab9aac2f03 /src/mesa/drivers/dri/i965/intel_mipmap_tree.h | |
parent | 1a9ceed4ba764cf73a643f8f2135b5b84cfe4581 (diff) | |
download | external_mesa3d-a6877341358e1534e74dd9e5fc72934a20b78228.zip external_mesa3d-a6877341358e1534e74dd9e5fc72934a20b78228.tar.gz external_mesa3d-a6877341358e1534e74dd9e5fc72934a20b78228.tar.bz2 |
i965: change the meaning of cpp for compressed textures
An ASTC block takes up 16 bytes for all block width and height configurations.
This size is not integrally divisible by all ASTC block widths. Therefore cpp
is changed to mean bytes per block if the texture is compressed.
Because the original definition was bytes per block divided by block width, all
references to the mipmap width must be divided the block width. This keeps the
address calculation formulas consistent. For example, the units for miptree_level
x_offset and miptree total_width has changed from pixels to blocks.
v2: reuse preexisting ALIGN_NPOT macro located in an i965 driver file.
v3: move ALIGN_NPOT into seperate commit.
simplify cpp assignment in copy_image_with_blitter().
update miptree width and offset variables in: intel_miptree_copy_slice(),
intel_miptree_map_gtt(), and brw_miptree_layout_texture_3d().
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_mipmap_tree.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h index 790d312..c28162a 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h @@ -390,7 +390,7 @@ struct intel_mipmap_tree */ GLuint physical_width0, physical_height0, physical_depth0; - GLuint cpp; /**< bytes per pixel */ + GLuint cpp; /**< bytes per pixel (or bytes per block if compressed) */ GLuint num_samples; bool compressed; |