Repository navigation
Conversation
GNOME Shell 51 removed Shell.GLSLEffect. Port the effects that used it: - RoundedCornersEffect and ClipShadowEffect now extend Clutter.ShaderEffect and provide their shader through vfunc_get_static_snippet(). Uniforms are set by name, so the manual uniform location cache is gone (Clutter caches locations itself). - LinearFilterEffect never had real shader code, so it now extends Clutter.OffscreenEffect directly and keeps overriding paint_target to set the layer filters. - metadata.json: shell-version ["51"]. The ShaderEffect snippet API does not exist in Mutter 50, so this build cannot support 50. ShaderEffect.set_uniform_float() is not in the @Girs typings yet (they stop at GNOME 50), so its calls carry @ts-expect-error directives that will flag themselves for removal once the typings are updated.
Author
|
Closing in favor of #175, which makes the same port and was opened earlier (I missed it before opening this one). For what it's worth, an equivalent port works fine here on GNOME 51.1 with the apps listed above. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GNOME Shell 51 removed
Shell.GLSLEffect(porting guide), which all three effects of the extension were based on, so the extension doesn't work on 51. This ports them to the replacement APIs.Changes
RoundedCornersEffectandClipShadowEffectnow extendClutter.ShaderEffectand provide their shader throughvfunc_get_static_snippet(). Uniforms are set by name withset_uniform_float(), so the manual uniform location cache is no longer needed.LinearFilterEffectnow extendsClutter.OffscreenEffectdirectly. It only needed the offscreen pipeline to change the texture filters (its GLSL snippet was empty).metadata.json:shell-versionis now["51"]. TheShaderEffectsnippet API is new in Mutter 51 (Mutter 50 only hasget_static_shader_source), so supporting 50 at the same time would require runtime branching.The snippet semantics match the old
add_glsl_snippet(hook, declarations, code, false)call (same hook, code as post), checked againstshell-glsl-effect.cfrom GNOME Shell 50.6 andclutter-shader-effect.cfrom Mutter 51.1.Typings
@girsdoesn't have GNOME 51 typings yet, so theset_uniform_float()calls carry@ts-expect-errordirectives. Once the typings are updated,tscwill flag them as unused so they can be removed.biome cipasses.Testing
Tested manually on GNOME Shell 51.1 (Wayland):
AI disclosure
This port was mostly written with Claude (Anthropic's AI assistant). I reviewed the changes and tested them manually on GNOME 51.1 as described above.