83 Commits

Author SHA1 Message Date
Luke Street 880f04c1df Add extended DXGI formats for ASTC 2023-02-14 16:31:06 -05:00
Mike Dilger dba6f3cb4f Switch from abandoned 'enum_primitive' crate to 'enum-primitive-derive'
Fixes #13
2022-07-07 09:47:54 +12:00
Mike Dilger f279731d5f Handle cubemaps as 6 array layers in d3d 2022-05-09 03:35:29 +12:00
Mike Dilger ca8465079b bump version to unstable 2022-03-09 20:35:20 +13:00
Mike Dilger 99bab9e3eb 0.5.1 2022-03-09 20:33:25 +13:00
Michael Dilger 452a50d1f1 Merge pull request #11 from Danielmelody/master
fix compressed texture linearsize
2022-03-09 07:31:42 +00:00
Danielhu 63192571a5 fix compressed texture linearsize 2022-03-09 10:33:15 +08:00
Mike Dilger 9d1a7f4e63 rustfmt (except for one spot that reads easier as a table) 2022-03-09 09:00:58 +13:00
Mike Dilger a2d107d359 bump version to unstable 2022-01-20 07:55:58 +13:00
Mike Dilger 9a9957cd38 0.5.0 2022-01-20 07:53:14 +13:00
Mike Dilger 73654c792d [BREAKING] Use structs to name parameters in new_d3d() and new_dxgi() 2022-01-20 07:51:02 +13:00
Mike Dilger ed0458b5e2 Fix clippy lints (save for one) 2022-01-20 07:50:23 +13:00
Mike Dilger fd93a46883 Fix a typo in a constant 2022-01-20 07:27:32 +13:00
Mike Dilger ae8456445f Make header10.misc_flag public 2022-01-19 18:44:51 +13:00
Mike Dilger 225cfd4ff7 dxgi cubemaps array_size should be 1 per cube (not 1 per layer) 2022-01-19 13:47:40 +13:00
Mike Dilger dc695117b8 Set MIPMAPCOUNT header flag (in dxgi) if mipmap_levels 2022-01-17 16:50:06 +13:00
Mike Dilger d68145e088 Revert "Fix array stride calculation for small mip levels" (by request of author)
This reverts commit 4f894d5880.
2021-11-01 07:07:25 +13:00
Michael Dilger 986c7055da Merge pull request #6 from w-flo/fix_array_stride_calculation
Fix array stride calculation for small mip levels
2021-10-30 10:58:22 +13:00
Florian Will 4f894d5880 Fix array stride calculation for small mip levels
The next mipmap level of a 16x4 texture does not take up 1/4 the number
of bytes when using block compression. It takes up half the number of
bytes, because 8x2 textures are stored as two blocks (total dimensions
of 8x4 where half of those stored pixels are ignored). This is more than
the "min mipmap size" so the calculation would give an incorrect result
previously.

Fixes #5.
2021-10-28 11:52:08 +02:00
Michael Dilger 1767a407e1 Merge pull request #4 from w-flo/fix_mipmapcount_flag
Set MIPMAPCOUNT flag when writing a mipmapped D3D file
2021-10-28 14:13:39 +13:00
Florian Will 45ed173f6b Set MIPMAPCOUNT flag when writing a mipmapped D3D file
GIMP assumes the file has 0 mipmaps, so doesn't import any mipmaps, if
this flag is not set.
2021-10-27 14:01:45 +02:00
Michael Dilger 17dfb3aeda Merge pull request #3 from expenses/include-depth-in-linear-size
Include depth in linear_size calculation
2021-02-23 07:10:09 +13:00
Ashley Ruglys 5ce64c2a4e Include depth in linear_size calculation 2021-02-22 17:19:36 +01:00
Michael Dilger f1b75cfc4d Merge pull request #2 from expenses/add-depth-flag
Add a DEPTH header flag in `new_d3d`/`new_dxgi` if `depth` is set.
2021-02-22 17:26:48 +13:00
Ashley Ruglys be707fb0bb Add a DEPTH header flag if a new file has a depth. 2021-02-21 16:16:43 +01:00