Commit Graph

5 Commits

Author SHA1 Message Date
K. S. Ernest (iFire) Lee 65ca207d2c dds: Use put_u32 for unsigned integer puts.
UBSan reports:
  image_saver_dds.cpp:417: implicit conversion from type 'uint32_t'
  of value 4278190080 to type 'int32_t' changed the value to -16777216
  stream_peer.cpp:184: implicit conversion from type 'int32_t'
  of value -16777216 to type 'uint32_t' changed the value to 4278190080

The DDS pixel format masks (r/g/b/a_mask) are uint32_t but put_32
takes int32_t. Use put_u32 to avoid the round-trip conversion that
UBSan flags when the high bit is set (e.g. a_mask = 0xFF000000).

This fix found a large class of uses where we put unsigned integer values into
integer puts.
2026-04-12 12:04:56 -07:00
Thaddeus Crews cd3a6c88fd Merge pull request #106200 from BlueCube3310/image-16-u16
Image: Implement 16-bit unorm and uint formats
2025-09-23 12:08:46 -05:00
BlueCube3310 638c6a5659 Fix Image format RGB565 conversion 2025-08-03 16:28:13 +02:00
BlueCube3310 16b9ee6f50 Image: Implement 16-bit unorm and uint formats 2025-06-28 00:30:52 +02:00
K. S. Ernest (iFire) Lee 69b281295c Add DDS image load and save functionality
Save and load DDS from Image class.

Co-authored-by: BlueCube3310 <53150244+BlueCube3310@users.noreply.github.com>
2025-03-14 19:31:43 -07:00