Opened 7 years ago

Closed 4 years ago

Last modified 4 years ago

#4549 closed task (fixed)

Update to NVTT 2.1.1

Reported by: leper Owned by: Itms
Priority: Should Have Milestone: Alpha 24
Component: Build & Packages Keywords:
Cc: historic_bruno Patch: Phab:D2475

Description (last modified by Itms)

NVTT 2.1.1 was released in 2017.

It would also be nice to possibly unbundle NVTT, since there aren't any patches that are actually needed (memory leak fixes, compression fixes, etc) anymore.

https://github.com/na-Itms/0ad/tree/nvtt imports the new release, updates the needed patches, fixes the build of NVTT and 0 A.D.

Tested on Windows and Linux (build and mass-convert textures). Windows developers might get memory issues if they try to mass rebuild the textures, the --large-address-aware flags helps with that.

Attachments (2)

nvtt-engine.diff (3.8 KB ) - added by Itms 4 years ago.
Patch for the engine code
nvtt.tar.xz (553.1 KB ) - added by Itms 4 years ago.
Updated source bundle, replace libraries/source/nvtt with contents

Download all attachments as: .zip

Change History (9)

comment:1 by leper, 7 years ago

Description: modified (diff)
Summary: Update to NVTT 2.1.0Update to NVTT 2.1.1

2.1.1 was released last week.

comment:2 by fabio, 7 years ago

For reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794562

comment:3 by historic_bruno, 5 years ago

Cc: historic_bruno added

comment:4 by Itms, 4 years ago

Cc: Itms removed
Description: modified (diff)
Keywords: wip removed
Milestone: BacklogAlpha 24
Owner: set to Itms
Patch: Phab:D2475

Working version.

by Itms, 4 years ago

Attachment: nvtt-engine.diff added

Patch for the engine code

by Itms, 4 years ago

Attachment: nvtt.tar.xz added

Updated source bundle, replace libraries/source/nvtt with contents

comment:5 by Itms, 4 years ago

Resolution: fixed
Status: newclosed

In 23305:

Upgrade NVTT to version 2.1.1, fixes #4549.

Windows binaries built with toolset v140_xp.
Tested under Windows, Linux and macOS.
Includes a patch for building on musl Linux, contributed by voroskoi, containing code by leper.
Use the opportunity to set native line endings in the NVTT bundle.

The NVTT DLL was the last one built with VS 2010, refs #5379, #5527.

Differential Revision: https://code.wildfiregames.com/D2475

comment:6 by Itms, 4 years ago

In 23381:

Commit concrt140.dll, dependency of the new NVTT dll. Fixes #5527, refs #4549 and #5379.

comment:7 by Itms, 4 years ago

In 23973:

Fix logic issue with the DXT1a texture format, refs #4549.

Before the NVTT upgrade, no DXT1a file would have been properly decoded: they would all have been mistaken for a 8bpp greyscale due to a logic issue in our code, which would have triggered a crash. I did not notice the logic issue when performing the upgrade. As a result, decoding those files now fails silently: their alpha bit will be ignored and they will be handled as DXT1.

This patch fixes the logic and allows us to decode DXT1a properly, in accordance with the format specifications. Currently, we do not use this format.

Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2522

Note: See TracTickets for help on using tickets.