Initial conditional rendering support (#1012)
* Initial conditional rendering support * Properly reset state * Support conditional modes and skeleton a counter cache for future host conditional rendering * Address PR feedback
This commit is contained in:
parent
c46edfab85
commit
6bfe4715f0
9 changed files with 269 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
using Ryujinx.Common;
|
||||
using Ryujinx.Graphics.GAL;
|
||||
using Ryujinx.Graphics.Gpu.Memory;
|
||||
using Ryujinx.Graphics.Gpu.State;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
@ -11,6 +12,10 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
|||
private const int NsToTicksFractionNumerator = 384;
|
||||
private const int NsToTicksFractionDenominator = 625;
|
||||
|
||||
private ulong _runningCounter;
|
||||
|
||||
private readonly CounterCache _counterCache = new CounterCache();
|
||||
|
||||
/// <summary>
|
||||
/// Writes a GPU counter to guest memory.
|
||||
/// </summary>
|
||||
|
@ -98,6 +103,8 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
|||
var rs = state.Get<ReportState>(MethodOffset.ReportState);
|
||||
|
||||
_context.MemoryAccessor.Write(rs.Address.Pack(), data);
|
||||
|
||||
_counterCache.AddOrUpdate(rs.Address.Pack());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue