mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-07-08 12:09:06 +00:00
- Improves MMNV request handling by tracking active clock requests per session and returning the effective requested rate for each module. - Treats sentinel clock requests (`0` / negative values) as request clears. - Preserves VP9 segment maps across inter frames, resetting them for key/intra/size-change cases. - Avoids stale VP9 motion-vector state by disabling previous MV lookup on key frames and clearing output MVs for intra-only frames. This fixes VP9 playback corruption seen in several Just Dance videos where stale segmentation/MV state could leak across frames and produce blocky/discolored output until a later refresh frame. The MMNV changes also make the service behavior closer to what games expect when requesting and clearing NvDec clocks, removing the stub spam for this service. Co-authored-by: MrKev312 <34964788+MrKev312@users.noreply.github.com> Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/132 Reviewed-by: sh0inx <sh0inx@noreply.git.ryujinx.app>
37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
namespace Ryujinx.Horizon.Sdk.MmNv
|
|
{
|
|
class Session
|
|
{
|
|
public Module Module { get; }
|
|
public uint Id { get; }
|
|
public bool IsAutoClearEvent { get; }
|
|
public uint RequestedClockRate { get; private set; }
|
|
public uint LastTimeout { get; private set; }
|
|
public bool HasActiveRequest { get; private set; }
|
|
|
|
public Session(uint id, Module module, bool isAutoClearEvent)
|
|
{
|
|
Module = module;
|
|
Id = id;
|
|
IsAutoClearEvent = isAutoClearEvent;
|
|
RequestedClockRate = 0;
|
|
LastTimeout = uint.MaxValue;
|
|
HasActiveRequest = false;
|
|
}
|
|
|
|
public void SetAndWait(uint clockRate, uint timeout)
|
|
{
|
|
RequestedClockRate = clockRate;
|
|
LastTimeout = timeout;
|
|
HasActiveRequest = true;
|
|
}
|
|
|
|
public void ClearRequest(uint timeout)
|
|
{
|
|
RequestedClockRate = 0;
|
|
LastTimeout = timeout;
|
|
HasActiveRequest = false;
|
|
}
|
|
}
|
|
}
|