Files
d4r/tools/d4r_event_wait.h
ayo f66cccaf28 Add experimental preset L and fix DLSS resource lifetimes and waits
- Build L texture variants and complete older release kernel bundles.
- Add selective Swin encoder fallback to reduce L/M motion trails.
- Add opt-in GPU motion-vector dilation for thin geometry and sky gaps.
- Replace GPU input waits with cancellable readiness polling and use
  sleeping event queries for completion.
- Retain recorded resources through command allocator completion, defer
  shutdown until cleanup, and preserve unfinished output synchronization.
- Extend lifecycle harness checks and add event, model and motion tests.
- Update configuration defaults, build scripts and release documentation.
2026-10-02 00:30:46 -04:00

17 lines
435 B
C++

#pragma once
// Query completion rather than trusting HIP event flags to put the CPU to
// sleep. Never treat NOT_READY as completion, including during retirement.
template <typename Query, typename Sleep>
int d4r_wait_event(Query query, Sleep sleep)
{
constexpr int cudaNotReady = 600;
for (;;)
{
const int result = query();
if (result != cudaNotReady)
return result;
sleep();
}
}