-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Generic Headless support, drop server platform, enable linuxbsd build without vulkan/X11. #49074
Conversation
9337925
to
704a905
Compare
Part of godotengine/godot-proposals#991? |
Rebased and ready to go. |
Looks good to me, up to @akien-mga to merge. |
else: | ||
SConscript("dummy/SCsub") |
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.
As discussed on chat, since this SCsub
is removed it doesn't really make sense anymore to keep a drivers/dummy
folder. Instead, we should move the respective dummy/null implementations close to their virtual class definitions (as was done already with servers/audio/audio_driver_dummy.h
).
This can be done in a follow-up PR though.
drivers/dummy/display_server_dummy.h
Outdated
class DisplayServerDummy : public DisplayServer { | ||
public: | ||
bool has_feature(Feature p_feature) const override { return false; } | ||
String get_name() const override { return "headless"; } |
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.
I guess we'd want this capitalized to be consistent with other platforms.
And maybe the name should be "Dummy" (respectively "Null" if we do this change).
Tested on Windows, seems to work fine:
We could possibly silence those by replacing the default implementation with a no-op:
|
drivers/dummy/display_server_dummy.h
Outdated
void process_events() override {} | ||
|
||
static void register_headless_driver() { | ||
register_create_function("headless", create_func, get_rendering_drivers_func); |
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.
Since we name it headless
internally, maybe the implementation should be DisplayServerHeadless
?
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.
Yeah, I think that's a good idea.
Renamed |
@@ -0,0 +1,128 @@ | |||
/*************************************************************************/ | |||
/* display_server_dummy.h */ |
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.
Needs renaming too.
Uses RasterizerDummy internally. This is always compiled in, maybe we should add a switch to enable/disable it via scons?
I think you can do the
|
Thanks! |
Hi guys, quick question. Is this commit also in 3.5.1 and if yes, how do I make a headless build with windows? |
@SebastianAtWork This is not a part of 3.x and won't be a part of 3.x, as it's a breaking change. In 3.x you can still use the |
Implement a new
"headless"
DisplayServerDummy
DisplayServerHeadless
. Uses the dummy rasterizer internally, and is always compiled in (we could exclude it, but frankly, it's a bunch of empty functions).You can run ideally any platform via
--display-driver headless
, e.g.:An extra commit removes the old "server" platform, and the last one enable building the linuxbsd platform without vulkan/X11 dependencies.
This effectively adds the
RasterizerDummy
back to CI, and for all platforms. so, as mentioned above, I can also add anheadless
flag toscons
and default it toFalse
if that's preferred.EDIT: Closes godotengine/godot-proposals#991 . Only tested on linuxbsd. EDIT: Also briefly tested on windows.