| 1241 | |
| 1242 | |
| 1243 | void Sample::BackBufferResizing() |
| 1244 | { |
| 1245 | ApplicationBase::BackBufferResizing(); |
| 1246 | |
| 1247 | GetDevice()->waitForIdle(); |
| 1248 | GetDevice()->runGarbageCollection(); |
| 1249 | m_bindingCache->Clear(); |
| 1250 | m_renderTargets = nullptr; |
| 1251 | m_linesPipeline = nullptr; // the pipeline is based on the framebuffer so needs a reset |
| 1252 | for (int i=0; i < std::size(m_nrd); i++ ) |
| 1253 | m_nrd[i] = nullptr; |
| 1254 | if (m_rtxdiPass) |
| 1255 | m_rtxdiPass->Reset(); |
| 1256 | |
| 1257 | // NOTE: we're not yet sure if this is necessary to avoid crash with going in/out of fullscreen and FG |
| 1258 | #if DONUT_WITH_STREAMLINE |
| 1259 | if (m_ui.DLSSFGOptions.mode == StreamlineInterface::DLSSGMode::eOn || m_ui.ActualDLSSFGMode() == StreamlineInterface::DLSSGMode::eOn) |
| 1260 | { |
| 1261 | GetDeviceManager()->GetStreamline().CleanupDLSS(false); |
| 1262 | GetDeviceManager()->GetStreamline().CleanupDLSSG(false); |
| 1263 | |
| 1264 | if (GetDeviceManager()->GetStreamline().IsDLSSGAvailable()) |
| 1265 | { |
| 1266 | auto dlssgOptions = StreamlineInterface::DLSSGOptions{}; |
| 1267 | StreamlineInterface::DLSSGState state; |
| 1268 | GetDeviceManager()->GetStreamline().GetDLSSGState(state, dlssgOptions); |
| 1269 | m_ui.DLSSFGMultiplier = state.numFramesActuallyPresented; |
| 1270 | m_ui.DLSSFGMaxNumFramesToGenerate = state.numFramesToGenerateMax; |
| 1271 | |
| 1272 | GetDeviceManager()->GetStreamline().SetDLSSGOptions(dlssgOptions); |
| 1273 | m_ui.DLSSFGOptions = dlssgOptions; |
| 1274 | } |
| 1275 | } |
| 1276 | #endif |
| 1277 | } |
| 1278 | |
| 1279 | void Sample::CreateRenderPasses( bool& exposureResetRequired, nvrhi::CommandListHandle initializeCommandList ) |
| 1280 | { |
nothing calls this directly
no test coverage detected