MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / initializeDLSS

Method initializeDLSS

Source/RenderPasses/DLSSPass/DLSSPass.cpp:168–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168void DLSSPass::initializeDLSS(RenderContext* pRenderContext)
169{
170 if (!mpNGXWrapper)
171 mpNGXWrapper.reset(new NGXWrapper(mpDevice, getRuntimeDirectory(), getRuntimeDirectory()));
172
173 Texture* target = nullptr; // Not needed for D3D12 implementation
174 bool depthInverted = false;
175 NVSDK_NGX_PerfQuality_Value perfQuality = NVSDK_NGX_PerfQuality_Value_Balanced;
176 switch (mProfile)
177 {
178 case Profile::MaxPerf:
179 perfQuality = NVSDK_NGX_PerfQuality_Value_MaxPerf;
180 break;
181 case Profile::Balanced:
182 perfQuality = NVSDK_NGX_PerfQuality_Value_Balanced;
183 break;
184 case Profile::MaxQuality:
185 perfQuality = NVSDK_NGX_PerfQuality_Value_MaxQuality;
186 break;
187 }
188
189 auto optimalSettings = mpNGXWrapper->queryOptimalSettings(mInputSize, perfQuality);
190
191 mDLSSOutputSize = uint2(float2(mInputSize) * float2(mInputSize) / float2(optimalSettings.optimalRenderSize));
192 mpOutput = mpDevice->createTexture2D(
193 mDLSSOutputSize.x,
194 mDLSSOutputSize.y,
195 ResourceFormat::RGBA32Float,
196 1,
197 1,
198 nullptr,
199 ResourceBindFlags::UnorderedAccess | ResourceBindFlags::ShaderResource
200 );
201
202 mpNGXWrapper->releaseDLSS();
203 mpNGXWrapper->initializeDLSS(pRenderContext, mInputSize, mDLSSOutputSize, target, mIsHDR, depthInverted, perfQuality);
204}
205
206void DLSSPass::executeInternal(RenderContext* pRenderContext, const RenderData& renderData)
207{

Callers

nothing calls this directly

Calls 4

queryOptimalSettingsMethod · 0.80
createTexture2DMethod · 0.80
releaseDLSSMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected