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

DDS output dwPitchOrLinearSize borked #305

Open
tamlin-mike opened this issue Mar 4, 2024 · 0 comments
Open

DDS output dwPitchOrLinearSize borked #305

tamlin-mike opened this issue Mar 4, 2024 · 0 comments

Comments

@tamlin-mike
Copy link

DDS file output produces invalid DDS_HEADER.dwPitchOrLinearSize (a.k.a. DDSURFACEDESC2.dwLinearSize).

For a mipmapped compressed DDS (BC7, but should apply to all compressed DDS formats) of size 1024x1024, compressonatorcli generates dwLinearSize 4096.

That's... not entirely correct. (hint: sqrt(4096) != 1024) :-)

It should be 1MB (in this case, with a 4:1 compression).

While I have not looked at the src emitting this incorrect value, the binary representations of these two values could suggest an erroneous big-/little-endian conversion.
4K = 00 10 00 00
1M = 00 00 10 00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant