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 conversion in the GL backend #2956

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

goodartistscopy
Copy link
Contributor

The line as currently written disallows conversions (except swizzle) because convert can't be true if compressed isn't.

The line as currently written disallows conversions (except swizzle) because `convert` can't be true if `compressed` isn't.
Copy link
Owner

@bkaradzic bkaradzic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify which format -> format conversion fails?

Flipping logic would disallow decompressing textures.

@goodartistscopy
Copy link
Contributor Author

Conversion is fine but it's never called, because compressed == false prevents convert == true.
The same logic at texture creation is even written without compressed (line 5735):

    const bool compressed = bimg::isCompressed(bimg::TextureFormat::Enum(m_requestedFormat) );
    const bool convert    = false
        || m_textureFormat != m_requestedFormat
        || swizzle
        ;

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.

2 participants