mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 02:35:59 +01:00
drm: pass explicitOutFence pointer and do not touch the value (#10)
* pass explicitOutFence pointer and do not touch the value * add resetExplicitFences
This commit is contained in:
parent
d92d55d454
commit
1ae9ead82c
3 changed files with 10 additions and 7 deletions
|
@ -82,6 +82,7 @@ namespace Aquamarine {
|
|||
void setBuffer(Hyprutils::Memory::CSharedPointer<IBuffer> buffer);
|
||||
void setExplicitInFence(int64_t fenceFD); // -1 removes
|
||||
void setExplicitOutFence(int64_t fenceFD); // -1 removes
|
||||
void resetExplicitFences();
|
||||
|
||||
private:
|
||||
SInternalState internalState;
|
||||
|
|
|
@ -101,8 +101,8 @@ void Aquamarine::CDRMAtomicRequest::addConnector(Hyprutils::Memory::CSharedPoint
|
|||
add(connector->crtc->id, connector->crtc->props.active, enable);
|
||||
|
||||
if (enable) {
|
||||
if (connector->output->supportsExplicit && STATE.explicitOutFence >= 0)
|
||||
add(connector->crtc->id, connector->crtc->props.out_fence_ptr, STATE.explicitOutFence);
|
||||
if (connector->output->supportsExplicit && STATE.committed & COutputState::AQ_OUTPUT_STATE_EXPLICIT_OUT_FENCE)
|
||||
add(connector->crtc->id, connector->crtc->props.out_fence_ptr, (uintptr_t)&STATE.explicitOutFence);
|
||||
|
||||
if (connector->crtc->props.gamma_lut && data.atomic.gammad)
|
||||
add(connector->crtc->id, connector->crtc->props.gamma_lut, data.atomic.gammaLut);
|
||||
|
|
|
@ -101,15 +101,17 @@ void Aquamarine::COutputState::setExplicitInFence(int64_t fenceFD) {
|
|||
}
|
||||
|
||||
void Aquamarine::COutputState::setExplicitOutFence(int64_t fenceFD) {
|
||||
internalState.explicitOutFence = fenceFD;
|
||||
// internalState.explicitOutFence = fenceFD;
|
||||
internalState.committed |= AQ_OUTPUT_STATE_EXPLICIT_OUT_FENCE;
|
||||
}
|
||||
|
||||
void Aquamarine::COutputState::resetExplicitFences() {
|
||||
// fences are now used, let's reset them to not confuse ourselves later.
|
||||
internalState.explicitInFence = -1;
|
||||
internalState.explicitOutFence = -1;
|
||||
}
|
||||
|
||||
void Aquamarine::COutputState::onCommit() {
|
||||
internalState.committed = 0;
|
||||
internalState.damage.clear();
|
||||
|
||||
// fences are now used, let's reset them to not confuse ourselves later.
|
||||
internalState.explicitInFence = -1;
|
||||
internalState.explicitOutFence = -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue