mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-24 10:06:01 +00:00
Spoof Counters
This commit is contained in:
parent
4104af65a3
commit
66d575965c
2 changed files with 26 additions and 1 deletions
23
src/Ryujinx.Graphics.Metal/CounterEvent.cs
Normal file
23
src/Ryujinx.Graphics.Metal/CounterEvent.cs
Normal 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() { }
|
||||||
|
}
|
||||||
|
}
|
|
@ -213,7 +213,9 @@ namespace Ryujinx.Graphics.Metal
|
||||||
public ICounterEvent ReportCounter(CounterType type, EventHandler<ulong> resultHandler, float divisor, bool hostReserved)
|
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
|
// 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)
|
public void ResetCounter(CounterType type)
|
||||||
|
|
Loading…
Reference in a new issue