Spoof Counters

This commit is contained in:
Isaac Marovitz 2023-07-28 13:29:26 -04:00
parent 93054ce3dc
commit 50cc73a9b2
No known key found for this signature in database
GPG Key ID: 97250B2B09A132E1
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)