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

Fix fences according to spec #105

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions include/aquamarine/output/Output.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace Aquamarine {
Hyprutils::Memory::CSharedPointer<SOutputMode> customMode;
uint32_t drmFormat = DRM_FORMAT_INVALID;
Hyprutils::Memory::CSharedPointer<IBuffer> buffer;
int64_t explicitInFence = -1, explicitOutFence = -1;
int32_t explicitInFence = -1, explicitOutFence = -1;
Hyprutils::Math::Mat3x3 ctm;
};

Expand All @@ -84,8 +84,8 @@ namespace Aquamarine {
void setCustomMode(Hyprutils::Memory::CSharedPointer<SOutputMode> mode);
void setFormat(uint32_t drmFormat);
void setBuffer(Hyprutils::Memory::CSharedPointer<IBuffer> buffer);
void setExplicitInFence(int64_t fenceFD); // -1 removes
void setExplicitOutFence(int64_t fenceFD); // -1 removes
void setExplicitInFence(int32_t fenceFD); // -1 removes
void enableExplicitOutFenceForNextCommit();
void resetExplicitFences();
void setCTM(const Hyprutils::Math::Mat3x3& ctm);

Expand Down
5 changes: 2 additions & 3 deletions src/output/Output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,12 @@ void Aquamarine::COutputState::setBuffer(Hyprutils::Memory::CSharedPointer<IBuff
internalState.committed |= AQ_OUTPUT_STATE_BUFFER;
}

void Aquamarine::COutputState::setExplicitInFence(int64_t fenceFD) {
void Aquamarine::COutputState::setExplicitInFence(int32_t fenceFD) {
internalState.explicitInFence = fenceFD;
internalState.committed |= AQ_OUTPUT_STATE_EXPLICIT_IN_FENCE;
}

void Aquamarine::COutputState::setExplicitOutFence(int64_t fenceFD) {
// internalState.explicitOutFence = fenceFD;
void Aquamarine::COutputState::enableExplicitOutFenceForNextCommit() {
internalState.committed |= AQ_OUTPUT_STATE_EXPLICIT_OUT_FENCE;
}

Expand Down
Loading