2019-10-13 08:02:07 +02:00
|
|
|
using Ryujinx.Graphics.GAL;
|
|
|
|
using Ryujinx.Graphics.Gpu.State;
|
|
|
|
|
|
|
|
namespace Ryujinx.Graphics.Gpu.Engine
|
|
|
|
{
|
|
|
|
partial class Methods
|
|
|
|
{
|
2019-12-31 20:19:44 +01:00
|
|
|
/// <summary>
|
2020-01-02 00:14:18 +01:00
|
|
|
/// Resets the value of an internal GPU counter back to zero.
|
2019-12-31 20:19:44 +01:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="state">Current GPU state</param>
|
|
|
|
/// <param name="argument">Method call argument</param>
|
2019-11-22 03:46:14 +01:00
|
|
|
private void ResetCounter(GpuState state, int argument)
|
2019-10-13 08:02:07 +02:00
|
|
|
{
|
|
|
|
ResetCounterType type = (ResetCounterType)argument;
|
|
|
|
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case ResetCounterType.SamplesPassed:
|
|
|
|
_context.Renderer.ResetCounter(CounterType.SamplesPassed);
|
|
|
|
break;
|
|
|
|
case ResetCounterType.PrimitivesGenerated:
|
|
|
|
_context.Renderer.ResetCounter(CounterType.PrimitivesGenerated);
|
|
|
|
break;
|
|
|
|
case ResetCounterType.TransformFeedbackPrimitivesWritten:
|
|
|
|
_context.Renderer.ResetCounter(CounterType.TransformFeedbackPrimitivesWritten);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|