-
-
Notifications
You must be signed in to change notification settings - Fork 21
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 dumb allocator #31
Conversation
I tested this PR and hyprwm/Hyprland#7040, they broke my hw cursor
my cursor buffer is expected to be allocated by the aquamarine/src/allocator/GBM.cpp Lines 147 to 154 in 0ab8ffa
|
You need either |
I have working hw cursor on main. To avoid regression I guess the dumb buffer allocation should be moved after gbm_bo_create to avoid short-circuiting it? |
No regression here. GBM allocator logic restored. |
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.
sorry for the delay, on a "break"
@@ -77,7 +77,10 @@ namespace Aquamarine { | |||
virtual std::vector<SDRMFormat> getCursorFormats() = 0; | |||
virtual bool createOutput(const std::string& name = "") = 0; // "" means auto | |||
virtual Hyprutils::Memory::CSharedPointer<IAllocator> preferredAllocator() = 0; | |||
virtual std::vector<SDRMFormat> getRenderableFormats(); // empty = use getRenderFormats | |||
virtual Hyprutils::Memory::CSharedPointer<IAllocator> fallbackAllocator() { |
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.
no, no, no. The dumb allocator doesn't really hold any big allocs, so it should be per-drm-backend (can be always present, no big deal)
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.
Don't really understand what needs to be done here. How HL should get access to dumb allocator?
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.
in CDRMBackend SP<CDumbAllocator>
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.
then it can ->output->backend
, cast that to drm and ->dumballocator
fallbackAllocator
APIfallbackAllocator
defaults tonullptr
, returns dumb allocator for drm backend.hyprwm/Hyprland#7040