Commit Graph
35 Commits
Author SHA1 Message Date
baldurk 03d064beb0 Tighten up handling of unsupported DXGI formats in DDS read/write 2019-11-25 23:36:45 +00:00
baldurk 07dc55c39d Handle depth formats better in DDS loading 2019-11-20 18:37:43 +00:00
baldurk 111ca43800 Fix handling of sub-8bit packed formats in DDS 2019-11-20 18:37:43 +00:00
baldurk d955c5b00c Change defaults when saving DDS to favour unorm variants 2019-11-13 10:11:39 +00:00
baldurk a8baf4fa49 Fix compile error 2019-10-28 19:25:02 +00:00
baldurk b9fbdc0ff0 Add explicit error for legacy CxV8U8 texture format 2019-10-28 12:04:05 +00:00
baldurk 0fe6be3ac6 Support YUY2/UYVY formats in DDS files
* These can only be supported if the proxy texture can be created
2019-10-28 12:03:50 +00:00
baldurk ec29e92abf Add support for old D32F_LOCKABLE format 2019-10-28 11:27:55 +00:00
baldurk 15c0244fd4 Add support for DXT2 / DXT4 aliases of DXT3 (BC2) and DXT5 (BC3)
* The only difference in these is whether or not pre-multiplied alpha is assumed
  to be used, and that doesn't change the actual data - only the interpretation.
2019-10-28 11:23:37 +00:00
baldurk e525630a17 Add special resource type for A8_UNORM. Closes #1426
* While it's redundant this format is still valid in D3D so needs to be handled
  correctly.
2019-06-25 19:08:07 +01:00
baldurk 8ffe33767c Handle UNormSRGB in some places that were missing handling 2019-04-23 16:31:18 +01:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk 44da10be06 Change SRGB to be a component type, not a ResourceFormat flag
* This allows us to have sRGB as a type hint, and better matches API format
  types.
* It's currently impossible and unlikely to ever be the case that srgb is
  applied to anything other than UNorm, so having it be independent from the
  component type was a degree of freedom that was unused.
2019-01-14 13:19:59 +00:00
baldurk 2237c241ff Fix incorrectly named methods in ResourceFormat
* We try to maintain at least an internally consistent naming scheme for the
  python/public interface, even if it doesn't match python naming schemes.
2019-01-03 12:22:29 +00:00
baldurk 68b23c5f62 Add support for YUV resource formats
* We handle 4:4:4, 4:2:2, and 4:2:0, with packed, 2-plane and 3-plane formats,
  for 8, 10, 12, and 16 bit depths.
* This covers most common formats but still leaves a few out - NV11, palettised
  formats, V208/V408 JPG formats.
2018-12-11 19:57:20 +00:00
baldurk 2411ce70ea Add flags to ResourceFormat to replace bgraOrder/srgbCorrected
* Allows for future expansion as well
2018-12-11 19:57:20 +00:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk 40a0272a3e Remove use of bool32 replay API type&optimise mem layout in some structs 2017-08-24 10:44:45 +01:00
baldurk e85c8d19bf Combine 'special' with 'specialFormat' as single resource format type
* There was no good reason to have a flag indicating if the special
  format was valid or not. Now it's a single enum, with a value
  'Regular' indicating that the compCount/compWidth/compType fully
  describe the format itself.
* This makes code patterns easier as you no longer need to check for
  special then check for specialFormat, you can just test the type
  directly.
2017-08-24 10:37:16 +01:00
baldurk fdf04cae39 Print better error messages for failures to save textures to disk 2017-06-02 17:59:57 +01:00
baldurk d40fc8471d Change API enums to enum class, remove now redundant prefixing
* This gives a little nicer syntax, a bit better type safety, and also
  reflects better for SWIG bindings. Overall it's a minor change but
  better.
* We don't update the C# UI at all, since it's soon to be removed and
  not worth the effort/code churn.
* For now so we're ABI compatible with C#, all enums are uint32_t, but
  that is an obvious optimisation in future to reduce struct packing.
* We avoid 'None' as an enum value, because it's a reserved word in
  python so will cause problems generating bindings.
2017-04-18 14:57:33 +01:00
baldurk 030cbfde9a Batch update copyright years everywhere 2017-01-06 12:13:31 +00:00
baldurk 8183c0d2ac Better handling of BGRA8 dds saving and loading 2016-08-19 17:36:36 +02:00
baldurk 504b18ab3f D32S8 type formats are 8 bytes per pixel, not 5. 2016-07-13 15:52:19 +02:00
EecheE c52e763e8c Changed default histogram range to [-1,+1] for snorm textures.
If viewing a SNORM texture, default histogram range is set to [-1,1]
instead of [0,1].
Added support for BC5U .dds fourcc code.
2016-06-25 17:14:41 -07:00
baldurk 5f28b745a2 Format code according to newly added clang-format
_  /)
                 mo / )
                 |/)\)
                  /\_
                  \__|=
                 (    )
                 __)(__
           _____/      \\_____
          |  _     ___   _   ||
          | | \     |   | \  ||
          | |  |    |   |  | ||
          | |_/     |   |_/  ||
          | | \     |   |    ||
          | |  \    |   |    ||
          | |   \. _|_. | .  ||
          |                  ||
          |repository history||
          |                  ||
  *       | *   **    * **   |**      **
   \))ejm97/.,(//,,..,,\||(,,.,\\,.((//
2016-05-22 19:41:53 +02:00
baldurk 2e0ffa7813 Batch update copyright years everywhere 2016-02-07 18:50:45 +01:00
baldurk 4b7c33d531 Fixes for vulkan for BGRA changes, add R4G4 special format 2016-02-07 18:49:21 +01:00
baldurk 8b7a025853 Refactor BGRA formats to not be special (so allow any BGRA format)
* Also add ASTC and D16S8 types while in the neighbourhood
2015-11-29 22:05:26 +01:00
baldurk c7cfdcc689 Add basic support for displaying/picking S8 textures. Refs #165 2015-10-25 14:09:43 +01:00
baldurk 5fccf87d43 Only check that DDPF_FOURCC flag is set, not that it's the only flag 2015-09-13 14:06:13 +02:00
baldurk 8ccf071865 Implement GetTextureData for GL - underlying code behind texture saving
* This should support all forms of textures off the bat, multisampled
  textures, 3D textures, arrays, compressed and uncompressed, etc.
2015-02-09 17:29:13 +00:00
baldurk 940f742e04 Implement DDS reading, add function to quickly check header exists 2014-09-25 16:19:47 +01:00
baldurk 0e6085ea20 DDS writing fixes for cubemaps & 3D textures with mips 2014-09-25 16:19:12 +01:00
baldurk 9f62428f7f Move DDS writing code out from d3d11 driver 2014-09-16 01:18:00 +01:00