diff options
Diffstat (limited to 'non_square_mipmaps.patch')
-rw-r--r-- | non_square_mipmaps.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/non_square_mipmaps.patch b/non_square_mipmaps.patch new file mode 100644 index 000000000000..c239a3403764 --- /dev/null +++ b/non_square_mipmaps.patch @@ -0,0 +1,23 @@ +Description: Fix size chain for non-square mipmaps +Author: Tony Houghton <h@realh.co.uk> +Forwarded: No +Last-Update: 2016-11-20 +Index: gimp-dds-3.0.1/mipmap.c +=================================================================== +--- gimp-dds-3.0.1.orig/mipmap.c ++++ gimp-dds-3.0.1/mipmap.c +@@ -143,11 +143,11 @@ unsigned int get_volume_mipmapped_size(i + int get_next_mipmap_dimensions(int *next_w, int *next_h, + int curr_w, int curr_h) + { +- if(curr_w == 1 || curr_h == 1) ++ if(curr_w == 1 && curr_h == 1) + return(0); + +- if(next_w) *next_w = curr_w >> 1; +- if(next_h) *next_h = curr_h >> 1; ++ if(next_w) *next_w = curr_w == 1 ? 1 : curr_w >> 1; ++ if(next_h) *next_h = curr_h == 1 ? 1 : curr_h >> 1; + + return(1); + } |