View Issue Details

IDProjectCategoryView StatusLast Update
0005781The Dark ModCodingpublic15.10.2021 15:29
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 2.09 
Target VersionTDM 2.10Fixed in VersionTDM 2.10 
Summary0005781: Image programs don't work with DDS source files.
DescriptionImage programs don't work with DDS because they usually contains compressed data.
And engine code has no means for decompression (aside from sending to GPU, which is a shitty way).
Additional InformationNote that doing any kind of processing on compressed images is discouraged!
Because you operate with image which has already lost quality due to initial compression.
So, this is considered a "last resort" feature.
TagsNo tags attached.

Relationships

related to 0005325 new New error reported about texture stain01b_s 

Activities

stgatilov

stgatilov

15.10.2021 03:23

administrator   ~0014434

Implemented:
  r9629. Implemented code for DXT1, DXT3, DXT5, RGTC decompression.
  r9630. DDS loading code extracted from CheckPrecompressedImage and UploadPrecompressedImage to R_LoadCompressedImage. Also implemented imageCompressedData_s::ComputeUncompressedData method for DDS decompression.
  r9631. Supported loading DDS images in image programs.
  r9632. A bit more information in trace zones: image dimensions, compressed format.

In case we decide that this feature should not exist, comment out the code in rev 9631.

I only implemented generic C++ code for decompression, but it works very fast.
Performance test shows about 2.5 ms per megapixel for each format --- that's the same as vectorized RGTC compressor takes.

There are tests for texture decompression, one for correctness, and one for performance (not run by default).
I compare our decompression results to decompression results of OpenGL driver.
Unfortunately, there is no bitwise exact description of DXT formats in OpenGL specs.
I tried to reproduce NVIDIA's behavior as closely as I could, but not perfectly: I allow error up to 1 in each component in the tests.
stgatilov

stgatilov

15.10.2021 15:29

administrator   ~0014436

Some bugfixes:
  r9633. Hopefully fixed GCC compile error.
  r9635. Fixed bug with sizes.

Issue History

Date Modified Username Field Change
15.10.2021 03:01 stgatilov New Issue
15.10.2021 03:01 stgatilov Status new => assigned
15.10.2021 03:01 stgatilov Assigned To => stgatilov
15.10.2021 03:01 stgatilov Relationship added related to 0005325
15.10.2021 03:18 stgatilov Additional Information Updated
15.10.2021 03:23 stgatilov Note Added: 0014434
15.10.2021 03:23 stgatilov Status assigned => resolved
15.10.2021 03:23 stgatilov Resolution open => fixed
15.10.2021 03:23 stgatilov Fixed in Version => TDM 2.10
15.10.2021 15:29 stgatilov Note Added: 0014436