add resetExplicitFences

This commit is contained in:
UjinT34 2024-07-11 00:17:15 +03:00
parent eca8220920
commit 6536bc8699
2 changed files with 7 additions and 4 deletions

View File

@ -82,6 +82,7 @@ namespace Aquamarine {
void setBuffer(Hyprutils::Memory::CSharedPointer<IBuffer> buffer); void setBuffer(Hyprutils::Memory::CSharedPointer<IBuffer> buffer);
void setExplicitInFence(int64_t fenceFD); // -1 removes void setExplicitInFence(int64_t fenceFD); // -1 removes
void setExplicitOutFence(int64_t fenceFD); // -1 removes void setExplicitOutFence(int64_t fenceFD); // -1 removes
void resetExplicitFences();
private: private:
SInternalState internalState; SInternalState internalState;

View File

@ -105,11 +105,13 @@ void Aquamarine::COutputState::setExplicitOutFence(int64_t fenceFD) {
internalState.committed |= AQ_OUTPUT_STATE_EXPLICIT_OUT_FENCE; internalState.committed |= AQ_OUTPUT_STATE_EXPLICIT_OUT_FENCE;
} }
void Aquamarine::COutputState::onCommit() { void Aquamarine::COutputState::resetExplicitFences() {
internalState.committed = 0;
internalState.damage.clear();
// fences are now used, let's reset them to not confuse ourselves later. // fences are now used, let's reset them to not confuse ourselves later.
internalState.explicitInFence = -1; internalState.explicitInFence = -1;
internalState.explicitOutFence = -1; internalState.explicitOutFence = -1;
} }
void Aquamarine::COutputState::onCommit() {
internalState.committed = 0;
internalState.damage.clear();
}