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

Update hardware Handle #8187

Merged
merged 4 commits into from
Oct 10, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions filament/backend/include/backend/Handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <utils/debug.h>

#include <type_traits> // FIXME: STL headers are not allowed in public headers
#include <utility>

#include <stdint.h>

Expand Down Expand Up @@ -106,8 +107,16 @@ struct Handle : public HandleBase {
Handle(Handle const& rhs) noexcept = default;
Handle(Handle&& rhs) noexcept = default;

Handle& operator=(Handle const& rhs) noexcept = default;
Handle& operator=(Handle&& rhs) noexcept = default;
// Explicitly redefine copy/move assignment operators rather than just using default here.
// Because it doesn't make a call to the parent's method automatically in certain compilers.
Copy link
Member

Choose a reason for hiding this comment

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

That's extremely strange. What compiler(s) are affected? What's the effect? Is HandleId object not copied correctly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This issue occurs when std::move(fences.begin() + 1, fences.end(), fences.begin()); is called (FrameSkipper.cpp:69) for specific NDK versions (<= 25.1.8937393, works fine from 26). Let me update the descriptions and comments.

Handle& operator=(Handle const& rhs) noexcept {
HandleBase::operator=(rhs);
return *this;
}
Handle& operator=(Handle&& rhs) noexcept {
HandleBase::operator=(std::move(rhs));
return *this;
}

explicit Handle(HandleId id) noexcept : HandleBase(id) { }

Expand Down
Loading