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

Fix texture ValidateParams exception with DXT1/3/5 decompression on Linux #5512

Merged
merged 1 commit into from
Feb 26, 2017

Conversation

hach-que
Copy link
Contributor

When running on Linux without DXT decompression support (such as the Mesa OpenGL software renderer), the code path for decompressing DXT textures on load is hit. This code currently has a bug where levelDataSizeInBytes is passed through to the SetData method, but levelDataSizeInBytes is not updated after DXT decompression, so the validation which occurs inside Texture2D to check that the element count is correct fails.

@KonajuGames has informed me this code path is likely going away soon, so I'll also be future proofing Protogame to turn off DXT compression for textures in the content pipeline when targeting Linux (since it's not supported everywhere).

@KonajuGames
Copy link
Contributor

Don't make it a permanent change in Protogame. It is only your use case of Mesa in a headless GPU-less environment that does not support DXT (due to S3TC patent fears). Anyone playing a game on Linux will not be using Mesa and will have DXT support.

@KonajuGames
Copy link
Contributor

Merging. Thanks @hach-que

@KonajuGames KonajuGames merged commit 28fd5de into MonoGame:develop Feb 26, 2017
@hach-que hach-que deleted the dxt3-linux-fix branch February 26, 2017 07:34
@tomspilman
Copy link
Member

I ran into this same bug on a console platform where we were using the original PC XNBs decompressed. Thanks @hach-que !

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

Successfully merging this pull request may close these issues.

3 participants