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

basis_universal: Clarify encoder-only dependencies, only used in editor builds #99860

Merged

Conversation

akien-mga
Copy link
Member

Proper solution to the issue #99825 tried to address. CC @gio3k

@akien-mga akien-mga added this to the 4.x milestone Nov 30, 2024
@akien-mga akien-mga requested a review from a team as a code owner November 30, 2024 00:41
if env.dev_build:
env_basisu.Append(CPPDEFINES=[("BASISU_DEVEL_MESSAGES", 1), ("BASISD_ENABLE_DEBUG_FLAGS", 1)])
env_basisu.Append(CPPDEFINES=[("BASISU_FORCE_DEVEL_MESSAGES", 1), ("BASISD_ENABLE_DEBUG_FLAGS", 1)])
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: This will change behavior in dev builds. BASISU_DEVEL_MESSAGES doesn't exist in the current version, so what this was meant to be is BASISU_FORCE_DEVEL_MESSAGES.

I'm not sure we actually want to see those in dev builds though, so alternatively we might remove this define to keep the current behavior.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm erring on the side of removing both those flags actually. I don't think most engine developers benefit from a verbose basisu debugging output. Anyone working on the basisu integration can enable those temporarily.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm leaning towards removing them outright

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah let's give it a try, and reconsider if someone finds they're missing important dev-only info.

@@ -74,9 +81,9 @@ env_thirdparty.Append(
]
)

if env.editor_build:
env_thirdparty.Append(CPPDEFINES=["BASISU_NO_IMG_LOADERS"])
Copy link
Member Author

Choose a reason for hiding this comment

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

This define no longer seems to exist. I'm not sure what would be the replacement, so I just removed it, which is equivalent to how it behaves now.

transcoder_sources = [thirdparty_dir + "transcoder/basisu_transcoder.cpp"]

# Treat Basis headers as system headers to avoid raising warnings. Not supported on MSVC.
if not env.msvc:
env_basisu.Append(
CPPFLAGS=["-isystem", Dir(thirdparty_dir).path, "-isystem", Dir("#thirdparty/jpeg-compressor").path]
Copy link
Member Author

Choose a reason for hiding this comment

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

Let's see if jpeg-compressor really needed the -isystem trick or if we can get away with how I refactored this.

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

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

The changes make sense to me, and if it builds I think we can be confident that it works!

@clayjohn clayjohn modified the milestones: 4.x, 4.4 Dec 3, 2024
Copy link
Contributor

@Repiteo Repiteo left a comment

Choose a reason for hiding this comment

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

Refactor shenanigans seemed to do the trick. Gonna wait for confirmation whether you wanna get rid of those flags before merging

@akien-mga akien-mga force-pushed the basisu-clarify-encoder-only-deps branch from e067665 to fbde06e Compare December 5, 2024 20:02
@Repiteo Repiteo merged commit 6931930 into godotengine:master Dec 9, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Dec 9, 2024

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants