diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2011-05-08 13:05:52 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2011-05-08 13:05:52 +0400 |
commit | ed3fd722108ea4d41167c8339a97ecd818e78cdf (patch) | |
tree | 858b8ce14f808667e81bd1b1cab8d02d3415abd9 /source/blender/imbuf/intern/dds/Common.h | |
parent | aaa93c58b367e65bf4124e4b0d380925b0a6f539 (diff) |
Apply second half of [#21590] .dds textures: fix for DXT1n format + sync with upstream nvtt
submitted by Amorilia
This updates the DDS module with upstearm nvtt (r1042).
Diffstat (limited to 'source/blender/imbuf/intern/dds/Common.h')
-rw-r--r-- | source/blender/imbuf/intern/dds/Common.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/dds/Common.h b/source/blender/imbuf/intern/dds/Common.h index 9cf1de3644a..a6dcf69febf 100644 --- a/source/blender/imbuf/intern/dds/Common.h +++ b/source/blender/imbuf/intern/dds/Common.h @@ -55,4 +55,10 @@ typedef unsigned int uint; typedef unsigned int uint32; typedef unsigned long long uint64; +// copied from nvtt src/nvimage/nvimage.h +inline uint computePitch(uint w, uint bitsize, uint alignment) +{ + return ((w * bitsize + 8 * alignment - 1) / (8 * alignment)) * alignment; +} + #endif |