-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Add compatibility methods for RenderingDevice BarrierMask #81356
Conversation
4e5bef7
to
221c4c4
Compare
We discussed #79911 quite heavily at the time and we all agreed that it was worth making the change without compatibility binds as the state of the BarrierMask is such that no one could be using it effectively from GDExtension yet anyway. Is there are new reason to add the compatibility functions that we wouldn't have considered before? For example, are you aware of a project that needs these changes? |
I have a GDExtension which calls I suspect literally nobody is using custom barriers, but I did the whole conversion thing for the sake of completeness. |
I guess this is one way forward with it but it does feel like a lot of work with very little payoff. If you're using the default (ALL BARRIERS), is there something stopping you from just sending |
The binding just breaks completely with godot-cpp. The method hash is different because the DEFVAL changed, I think.
|
AHH off course, I forgot about that :( |
I noticed that some of these compatibility methods aren't actually required, which lead me to find a serious bug: See the annotations at the bottom here, which only lists three methods: I'm gonna file a separate issue for that. It's definitely a bug, and fixing it would break compatibility for a large fraction of the GDExtension interface. If we want to fix it and accept a compatibility break in 4.2, this PR would be unnecessary. |
See #81386 |
Ready for review now that #81521 is merged. This PR is still required to maintain GDExtension compatibility. I've trimmed it down to only the three methods where the hash actually changed. |
Hm. It's still getting the "hash changed" error. I wonder if it's because adding the compatibility methods uses the new hashing algorithm, rather than the old broken one that was used when the methods were originally registered? If that's the case, you may need to add some more entries to |
@dsnopek The workflow diagnostic says "The following validation errors no longer occur", so I read that as a good thing :) |
Hm, maybe I'm misreading it, but I was looking here: https://github.com/godotengine/godot/actions/runs/6278800101/job/17053293875?pr=81356#step:17:28 The tests are passing, which I guess is a good thing. :-) But I'm not sure why I still see that in the console output of the build? |
If I run
I think the only issue is that GitHub is not displaying the title of the annotation in the workflow log, so it's confusing. So those printed errors are really just the diff compared to this file: |
Ah, ok, I think I'm finally understanding what that message is! It's saying we've got exceptions in In that case, I think this means we should remove those lines from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks good to me!
Thanks! |
PR #79911 changed the values of BarrierMask, which breaks GDExtension compatibility for any method with a default parameter value of
BARRIER_MASK_ALL_BARRIERS
. I added compatibility methods for all of those.I named everything with _79911, let me know if I should change that to something else.