Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support loading another DX10 DDS variant with permissive #588

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

walbourn
Copy link
Member

@walbourn walbourn commented Feb 20, 2025

The DX10 DDS header extension has a field arraySize. For 2D Texture Arrays, this is the number of textures in the array. For cubemaps and cubemapArrays, however, it is supposed to be the number of cubes (i.e. 1 is a single cube with 6 array entries, 2 for two cubemaps with 12 array entries, etc.). This is how D3DX10/D3DX11 write these files. Some writers, however, fail to handle this special case and write the original array count. This PR allows the loading of these files when using the --permissive option.

Note that the GetMetadata functions will return the original values from the header. The Load functions will fix up the metadata value returned when this scenario is detected.

@walbourn walbourn self-assigned this Feb 20, 2025
@walbourn
Copy link
Member Author

@walbourn walbourn added the dds DirectDraw Surface (DDS) label Feb 20, 2025
@walbourn walbourn linked an issue Feb 20, 2025 that may be closed by this pull request
@walbourn walbourn merged commit 75b08fb into main Feb 20, 2025
83 checks passed
@walbourn walbourn deleted the darksoulsdds branch February 20, 2025 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dds DirectDraw Surface (DDS)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support incorrect cube map DDS files with arraySize=6
2 participants