| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#pragma once |
| 23 |
|
| 24 |
|
| 25 |
typedef struct Fsr2Constants { |
| 26 |
|
| 27 |
int32_t renderSize[2]; |
| 28 |
int32_t maxRenderSize[2]; |
| 29 |
int32_t displaySize[2]; |
| 30 |
int32_t inputColorResourceDimensions[2]; |
| 31 |
int32_t lumaMipDimensions[2]; |
| 32 |
int32_t lumaMipLevelToUse; |
| 33 |
int32_t frameIndex; |
| 34 |
|
| 35 |
float deviceToViewDepth[4]; |
| 36 |
float jitterOffset[2]; |
| 37 |
float motionVectorScale[2]; |
| 38 |
float downscaleFactor[2]; |
| 39 |
float motionVectorJitterCancellation[2]; |
| 40 |
float preExposure; |
| 41 |
float previousFramePreExposure; |
| 42 |
float tanHalfFOV; |
| 43 |
float jitterPhaseCount; |
| 44 |
float deltaTime; |
| 45 |
float dynamicResChangeFactor; |
| 46 |
float viewSpaceToMetersFactor; |
| 47 |
|
| 48 |
float pad; |
| 49 |
float reprojectionMatrix[16]; |
| 50 |
} Fsr2Constants; |
| 51 |
|
| 52 |
struct FfxFsr2ContextDescription; |
| 53 |
struct FfxDeviceCapabilities; |
| 54 |
struct FfxPipelineState; |
| 55 |
struct FfxResource; |
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
typedef struct FfxFsr2Context_Private { |
| 60 |
|
| 61 |
FfxFsr2ContextDescription contextDescription; |
| 62 |
Fsr2Constants constants; |
| 63 |
FfxDevice device; |
| 64 |
FfxDeviceCapabilities deviceCapabilities; |
| 65 |
FfxPipelineState pipelineDepthClip; |
| 66 |
FfxPipelineState pipelineReconstructPreviousDepth; |
| 67 |
FfxPipelineState pipelineLock; |
| 68 |
FfxPipelineState pipelineAccumulate; |
| 69 |
FfxPipelineState pipelineAccumulateSharpen; |
| 70 |
FfxPipelineState pipelineRCAS; |
| 71 |
FfxPipelineState pipelineComputeLuminancePyramid; |
| 72 |
FfxPipelineState pipelineGenerateReactive; |
| 73 |
FfxPipelineState pipelineTcrAutogenerate; |
| 74 |
|
| 75 |
|
| 76 |
FfxResourceInternal srvResources[FFX_FSR2_RESOURCE_IDENTIFIER_COUNT]; |
| 77 |
FfxResourceInternal uavResources[FFX_FSR2_RESOURCE_IDENTIFIER_COUNT]; |
| 78 |
|
| 79 |
bool firstExecution; |
| 80 |
bool refreshPipelineStates; |
| 81 |
uint32_t resourceFrameIndex; |
| 82 |
float previousJitterOffset[2]; |
| 83 |
int32_t jitterPhaseCountRemaining; |
| 84 |
} FfxFsr2Context_Private; |