From 545f506a6331e4a35ec16561c10509bf43bb9328 Mon Sep 17 00:00:00 2001 From: UjinT34 <41110182+UjinT34@users.noreply.github.com> Date: Tue, 12 Nov 2024 00:29:19 +0300 Subject: [PATCH] drm: fix fences according to spec (#105) --- include/aquamarine/output/Output.hpp | 6 +++--- src/output/Output.cpp | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/aquamarine/output/Output.hpp b/include/aquamarine/output/Output.hpp index 9b0519f..1288a1f 100644 --- a/include/aquamarine/output/Output.hpp +++ b/include/aquamarine/output/Output.hpp @@ -68,7 +68,7 @@ namespace Aquamarine { Hyprutils::Memory::CSharedPointer customMode; uint32_t drmFormat = DRM_FORMAT_INVALID; Hyprutils::Memory::CSharedPointer buffer; - int64_t explicitInFence = -1, explicitOutFence = -1; + int32_t explicitInFence = -1, explicitOutFence = -1; Hyprutils::Math::Mat3x3 ctm; }; @@ -84,8 +84,8 @@ namespace Aquamarine { void setCustomMode(Hyprutils::Memory::CSharedPointer mode); void setFormat(uint32_t drmFormat); void setBuffer(Hyprutils::Memory::CSharedPointer 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); diff --git a/src/output/Output.cpp b/src/output/Output.cpp index b5d3f3e..6186eb1 100644 --- a/src/output/Output.cpp +++ b/src/output/Output.cpp @@ -99,13 +99,12 @@ void Aquamarine::COutputState::setBuffer(Hyprutils::Memory::CSharedPointer