|
|
|
@ -39,7 +39,6 @@ namespace FidelityFX.FrameGen |
|
|
|
private bool _firstExecution; |
|
|
|
private bool _asyncSupported; |
|
|
|
private ulong _previousFrameID; |
|
|
|
private ulong _dispatchCount; |
|
|
|
|
|
|
|
public void Create(in FrameInterpolation.ContextDescription contextDescription) |
|
|
|
{ |
|
|
|
@ -49,7 +48,6 @@ namespace FidelityFX.FrameGen |
|
|
|
_spdConstantsBuffer = CreateConstantBuffer<FrameInterpolation.InpaintingPyramidConstants>(); |
|
|
|
|
|
|
|
_firstExecution = true; |
|
|
|
_dispatchCount = 0; |
|
|
|
_previousFrameID = 0; |
|
|
|
_asyncSupported = (_contextDescription.flags & FrameInterpolation.InitializationFlags.EnableAsyncSupport) == FrameInterpolation.InitializationFlags.EnableAsyncSupport; |
|
|
|
|
|
|
|
@ -134,7 +132,8 @@ namespace FidelityFX.FrameGen |
|
|
|
{ |
|
|
|
commandBuffer.BeginSample(_sampler); |
|
|
|
|
|
|
|
bool reset = _dispatchCount == 0 || dispatchDescription.reset; |
|
|
|
bool reset = _firstExecution || dispatchDescription.reset; |
|
|
|
_firstExecution = false; |
|
|
|
Assert.IsTrue(!_asyncSupported || reset || dispatchDescription.frameID > _previousFrameID, |
|
|
|
"When async support is enabled, and the reset flag is not set, frame ID must increment in each dispatch."); |
|
|
|
|
|
|
|
@ -142,7 +141,6 @@ namespace FidelityFX.FrameGen |
|
|
|
bool frameIdSkipped = (dispatchDescription.frameID - _previousFrameID) > 1; |
|
|
|
bool disjointFrameId = frameIdDecreased || frameIdSkipped; |
|
|
|
_previousFrameID = dispatchDescription.frameID; |
|
|
|
_dispatchCount++; // TODO: this is pointless, it does the same as _firstExecution, no need to do any counting
|
|
|
|
|
|
|
|
Constants.renderSize = dispatchDescription.renderSize; |
|
|
|
Constants.displaySize = dispatchDescription.displaySize; |
|
|
|
|