Spoof Counters

This commit is contained in:
Isaac Marovitz 2023-07-28 13:29:26 -04:00 committed by Isaac Marovitz
parent 4104af65a3
commit 66d575965c
2 changed files with 26 additions and 1 deletions

View file

@ -0,0 +1,23 @@
using Ryujinx.Graphics.GAL;
namespace Ryujinx.Graphics.Metal
{
public class CounterEvent : ICounterEvent
{
public CounterEvent()
{
Invalid = false;
}
public bool Invalid { get; set; }
public bool ReserveForHostAccess()
{
return true;
}
public void Flush() { }
public void Dispose() { }
}
}

View file

@ -213,7 +213,9 @@ namespace Ryujinx.Graphics.Metal
public ICounterEvent ReportCounter(CounterType type, EventHandler<ulong> resultHandler, float divisor, bool hostReserved)
{
// https://developer.apple.com/documentation/metal/gpu_counters_and_counter_sample_buffers/creating_a_counter_sample_buffer_to_store_a_gpu_s_counter_data_during_a_pass?language=objc
throw new NotImplementedException();
var counterEvent = new CounterEvent();
resultHandler?.Invoke(counterEvent, type == CounterType.SamplesPassed ? (ulong)1 : 0);
return counterEvent;
}
public void ResetCounter(CounterType type)