| 102 | } |
| 103 | |
| 104 | void SuperResolution::Execute(const RenderAttributes& RenderAttribs) |
| 105 | { |
| 106 | DEV_CHECK_ERR(RenderAttribs.pDevice != nullptr, "RenderAttribs.pDevice must not be null"); |
| 107 | DEV_CHECK_ERR(RenderAttribs.pDeviceContext != nullptr, "RenderAttribs.pDeviceContext must not be null"); |
| 108 | DEV_CHECK_ERR(RenderAttribs.pPostFXContext != nullptr, "RenderAttribs.pPostFXContext must not be null"); |
| 109 | |
| 110 | DEV_CHECK_ERR(RenderAttribs.pColorBufferSRV != nullptr, "RenderAttribs.pColorBufferSRV must not be null"); |
| 111 | DEV_CHECK_ERR(RenderAttribs.pFSRAttribs != nullptr, "RenderAttribs.pFSRAttribs must not be null"); |
| 112 | |
| 113 | m_Resources.Insert(RESOURCE_IDENTIFIER_INPUT_COLOR, RenderAttribs.pColorBufferSRV->GetTexture()); |
| 114 | |
| 115 | ScopedDebugGroup DebugGroupGlobal{RenderAttribs.pDeviceContext, "SuperResolution"}; |
| 116 | |
| 117 | bool AllPSOsReady = PrepareShadersAndPSO(RenderAttribs, m_FeatureFlags); |
| 118 | UpdateConstantBuffer(RenderAttribs); |
| 119 | if (AllPSOsReady) |
| 120 | { |
| 121 | ComputeEdgeAdaptiveUpsampling(RenderAttribs); |
| 122 | ComputeContrastAdaptiveSharpening(RenderAttribs); |
| 123 | } |
| 124 | else |
| 125 | { |
| 126 | ComputePlaceholderTexture(RenderAttribs); |
| 127 | } |
| 128 | |
| 129 | // Release references to input resources |
| 130 | for (Uint32 ResourceIdx = 0; ResourceIdx <= RESOURCE_IDENTIFIER_INPUT_LAST; ++ResourceIdx) |
| 131 | m_Resources[ResourceIdx].Release(); |
| 132 | } |
| 133 | |
| 134 | bool SuperResolution::UpdateUI(HLSL::SuperResolutionAttribs& Attribs, FEATURE_FLAGS& FeatureFlags) |
| 135 | { |
nothing calls this directly
no outgoing calls
no test coverage detected