NVENC #
Rubylight docs › Reference · Architecture · Hardware matrix
Rubylight encodes with AMF on an AMD GPU and with NVENC on an NVIDIA GPU. With encoder = auto, the host picks the encoder from the vendor of the GPU that captures. NVENC is called through NVIDIA's driver ABI (rust/windows/graphics/src/nvenc.rs), API 11 to 13, on the compute conversion's D3D12 device or the capture's D3D11 device. Its settings are the nvenc_* keys (configuration). Intel and software encoding stay removed; those PCs use Rubylight 2.6.x.
Parity with AMF #
Each row lists a feature the AMF path has and how NVENC provides it. Fake-driver tests in rust/windows/graphics/src/nvenc/tests.rs and rust/windows/graphics/src/nvenc/overhaul_tests.rs cover every NVENC row except the GPU scheduling row, whose tests are in gpu_priority.rs.
| Feature | AMF | NVENC | Source and notes |
|---|---|---|---|
| Codecs | H.264, HEVC, AV1 | H.264, HEVC, AV1 | The codec check refuses a codec the driver does not list, before the stream starts (Foundation Sunshine). AV1 needs API 12.0 (NVIDIA driver 522.25 or newer). A driver past its session limit (NV_ENC_ERR_OUT_OF_MEMORY or NV_ENC_ERR_INCOMPATIBLE_CLIENT_KEY on open) is reported as that, naming the apps that usually hold the sessions (out of memory also names exhausted GPU memory), and no other driver API or device is tried. |
| 10-bit and HDR10 | Yes | Yes | API 13 embeds mastering display and content light metadata in the bitstream. Older drivers send it only on the control channel and log that. |
| HDR10+, HDR Vivid, Dolby Vision RPU | Yes | Yes | Both take the luminance statistics of the conversion the frame went through (the compute queue's or the D3D11 conversion's) and use the same splice (amf::dynamic). On a sliced frame the metadata goes before the first slice and the RPU after the last. |
| 4:4:4 | Packed 4:4:4 over 4:2:0 | Packed 4:4:4 over 4:2:0, and native 4:4:4 in H.264 (8-bit) and HEVC (8-bit and 10-bit) | Native 4:4:4 follows LizardByte Sunshine (Foundation Sunshine has the same path). 8-bit native 4:4:4 converts on the D3D12 compute queue into a DXGI_FORMAT_AYUV texture through an R8G8B8A8_UINT UAV (NV_ENC_BUFFER_FORMAT_AYUV), falling back to the D3D11 graphics queue if a driver or GPU refuses it; 10-bit converts on the D3D11 graphics queue via the yuv444_planes_cs / yuv444_planes_menu_cs compute shaders into a stacked R16_UINT UAV (falling back to the yuv444_planes / menu_yuv444_planes pixel shaders if UAV creation is unavailable), which the CUDA interop (nvenc/cuda.rs) copies to a YUV444_10BIT surface (NVENC's D3D12 interface refuses YUV444_10BIT). nvenc/format_444_rtx.rs pools and tracks pre-registered 4:4:4 surfaces across frames and checks SDK 13.0 pitch alignment rules. Same matrix, range and HDR transfer as 4:2:0. H.264 uses the High 4:4:4 profile and HEVC the FREXT profile, with chromaFormatIDC 3. The startup check encodes each 4:4:4 mode where the driver reports NV_ENC_CAPS_SUPPORT_YUV444_ENCODE and advertises the ones that pass (ServerCodecModeSupport 0x40000, 0x80000, 0x100000). AV1 4:4:4 is refused: NVENC SDK 13.0 encodes AV1 in 4:2:0 only. A request the host did not advertise, or a session the driver refuses, fails with the reason and never streams 4:2:0 instead. Dolby Vision drops to static HDR10, as profile 8 is 4:2:0. Rate control, the frame budget guard, split encoding and spatial AQ run as in 4:2:0. |
| Rate control | Yes | CBR (default), VBR (nvenc_rate_control) |
A one-frame VBV (vbvInitialDelay = vbvBufferSize, lowDelayKeyFrameScale = 1), with nvenc_vbv_increase and NV_ENC_TUNING_INFO_ULTRA_LOW_LATENCY (nvenc/rate_control.rs). VBR and its 1.5× default peak follow Foundation Sunshine; nvenc_peak_bitrate_ratio sets the peak from 1× to 3×. |
| Stalled encoder | Yes | Yes | The stream's stall policy (encoder_stall_limit in stream_policy.rs) is shared with AMF: an encoder that returns nothing with a full backlog is recreated after 250 ms, and each recreation that brings no frame back doubles the wait, up to 2 s, so a game that holds the GPU while loading does not restart the encoder. A frame still unfinished 3 s after submission counts as a hung driver. |
| Bitrate changes | Yes | Yes | Reconfigured in place with frames in flight, without a reset or a keyframe, in both directions, where the driver reports NV_ENC_CAPS_SUPPORT_DYN_BITRATE_CHANGE (audited before each call in nvenc/rate_control.rs). Without it, or when the driver refuses the change in place (logged as a warning), a change waits for the frames in flight, resets the encoder and forces a keyframe. |
| Reference frame invalidation | Yes | Yes | Used where the driver reports it and keeps more than one reference (nvenc/recovery_tuning.rs + DpbTracker). Tracks live retained DPB slots so nvEncInvalidateRefFrames invalidates only retained DPB frames and preserves surviving older anchors to avoid unnecessary IDR resets; otherwise a lost frame is recovered with a keyframe. |
| Intra refresh | Yes | Yes | Off while slice delivery runs, as on AMF (nvenc/recovery_tuning.rs). |
| Frame cap | Writes the per-codec maximum frame size | Targets the one-frame VBV and lowers a wider VBV to a cap below it, scaled by KeyframeCapScale |
Link jitter within a tenth is skipped so a steady link never reconfigures, while every KeyframeCapScale step reaches the driver (vbvBufferSize and vbvInitialDelay via NvEncReconfigureEncoder with resetEncoder = 0, floored at two_frames). Keyframes are targeted too (lowDelayKeyFrameScale 1); when keyframes overshoot 1.1× the cap target under a wider VBV (nvenc_vbv_increase), KeyframeCapScale tightens the VBV down toward 0.5× (floored at two_frames), relaxes by 1.125× when keyframes fit, and returns to 1× if the driver ignores the lower VBV, reporting frame_cap_target and keyframe_cap_scale. A frame over twice the cap logs a warning, at most every 10 s. |
| Scene-cut re-encode | Yes | Yes | An inter frame past the full-FEC bound that is alone in flight is submitted again as a keyframe from the kept input, with the same frame number, keeping the 4-FEC-block parity invariant without stacking double-encodes when a newer frame is already in flight. The rule is AMF's (reencodes_cut). A failed re-encode sends the inter frame and raises the same encoder_reencode event. |
Slice delivery (video_slice_delivery) |
Slice output mode | Subframe readback | enableSubFrameWrite and reportSliceOffsets require synchronous mode, so only these streams poll without completion events. A frame is complete when the lock reports hwEncodeStatus 2 (NVIDIA's developer forum); the slice count alone is not trusted. Slices leave early only while their offsets rise strictly and fit the bytes written, and the newest slice waits for the next lock, since it may be the last; otherwise the frame waits to finish and the log warns once. The first four frames' locks are logged at debug level. HEVC split encoding cannot run beside it, so where split encoding engages (a forced mode, auto's budget case, or the implicit mode's height at a preset the frame budget guard may choose) the stream keeps split encoding and sends whole frames (set nvenc_split_encode = disabled to stream slices); where it would not, slices leave as they finish. Before API 12.2 the session does not set the split mode, so on a GPU with several engines every split setting but disabled keeps slices off there, as before. A driver without NV_ENC_CAPS_SUPPORT_SUBFRAME_READBACK warns and sends whole frames. No AV1, as on AMF. |
| Split-frame encoding | Not engaged by the driver | nvenc_split_encode (auto, driver decides, forced, 2 to 4 strips) |
Fixed strip counts and the slice-mode rule follow Foundation Sunshine; API 12.2+ mutual-exclusion invariants with enableSubFrameWrite and HEVC weighted prediction are verified in nvenc/recovery_tuning.rs. auto also forces split when one engine's estimated frame time misses the frame budget; driver_decides keeps only NVIDIA's implicit mode (2112+ HEVC rows or 2048+ AV1 rows, P1 to P4). H.264, API before 12.2, one engine and HEVC weighted prediction never split. Splitting is faster and degrades picture quality; leave it on Automatic unless a seam appears, then choose Driver decides or Off. |
| Frame budget guard | Not needed | nvenc_frame_budget_guard |
Lowers a preset whose estimated encode time misses the frame interval, downgrades two-pass encoding to single-pass (NV_ENC_MULTI_PASS_DISABLED) when even P1 misses the budget (over_at_floor), and counts NVENC's multi-engine speedup only where split actually engages. The per-preset calibration comes from Foundation Sunshine. |
| Adaptive quantization | VBAQ and pre-analysis | Spatial AQ on by default, temporal AQ opt-in | Spatial AQ (enableAQ = 1 with 4-bit aqStrength checked against SDK 13.0) by default follows NVIDIA's game-streaming guidance and Foundation Sunshine. Temporal AQ (enableTemporalAQ) is strictly gated on driver support (NV_ENC_CAPS_SUPPORT_TEMPORAL_AQ), zero lookahead (enableLookahead = 0), and zero B-frames (frameIntervalP = 1). The guide's explicit CUDA-performance note is on temporal AQ; spatial AQ's cost is not quantified there. |
| GPU clocks | Not needed | Driver profile prefers maximum performance (nvenc_latency_over_power, on) |
NVIDIA's adaptive power management lowers the clocks of a lightly loaded GPU, and NVENC slows with them; Sunshine-derived hosts set the same profile. At startup the host puts butterpollo.exe in an NVIDIA driver profile named Rubylight with "Prefer maximum performance", before it opens a device on the GPU. An idle host holds no GPU context, so the clocks rise only while it streams or probes. Turned off, the setting is removed from the profile. A failure warns and the stream runs at the driver's clocks. Tests: nvidia_profile.rs. |
| GPU scheduling priority | High | Realtime, falling back to high when it is denied | Under hardware-accelerated GPU scheduling, nvenc_realtime_hags (on by default) keeps realtime. AMD stays at high: realtime would also raise AMF's and the game's queues. |
| Couch menu overlay | Yes | Yes | Drawn by the conversion, on the compute queue or the D3D11 graphics queue. |
| D3D12 compute conversion | Yes | Yes | See D3D12 conversion. A native D3D12 session (nvenc/d3d12_async.rs) pre-registers its conversion input and READBACK output ring, chains GPU-GPU fences (inputFencePoint -> encode -> outputFencePoint, driver 522.25 or newer), bounds async overlap to max_in_flight = 1..=2 (1 in Lowest latency, 2 by default), and stickily demotes to the D3D11 graphics queue on fence timeout or NV_ENC_ERR_DEVICE_NOT_EXIST. Without it NVENC converts on the D3D11 graphics queue, which realtime scheduling covers. |
| Encoder focus (ROI map) | Yes | QP delta map | The map comes from the D3D12 compute conversion; the probe needs driver 531.61 or newer. See Encoder focus. |
D3D12 conversion #
With gpu_compute_conversion on (the default), NVENC takes the compute queue's output as AMF does. The session opens on the compute queue's ID3D12Device (Session::open with an output fence):
- The GPU waits, not the CPU. For the D3D12 interface
nvEncMapInputResource"does not provide synchronization guarantee" (nvEncodeAPI.h). Each picture's input is anNV_ENC_INPUT_RESOURCE_D3D12whoseinputFencePointwaits for the conversion's fence at its value. - Output goes to READBACK buffers. Each conversion target gets a buffer of twice an uncompressed picture (at most 16 MiB), registered as
NV_ENC_OUTPUT_BITSTREAMand passed as anNV_ENC_OUTPUT_RESOURCE_D3D12. ItsoutputFencePointsignals the session's own fence. - Completion is read from the output fence. The poll locks a frame once that fence reaches the frame's value and never waits on the CPU. With
nvenc_output_event(on by default) the fence also wakes the stream thread as the oldest frame is written, instead of on the next 100 µs output poll, which stays as the bound. A frame the fence never reaches fails at the completion timeout. - What the D3D12 interface leaves out. It has no weighted prediction, so
nvenc_weighted_predictionwarns and stays off. Slice delivery returns whole frames there; setgpu_compute_conversion = falsefor either. - Driver floor. The D3D12 interface needs API 12.0, NVIDIA driver 522.25 or newer. An older driver, a missing D3D12 device or a refused session warns (
encoder_conversion) and converts on the D3D11 graphics queue, as AMF falls back. 8-bit native 4:4:4 (AYUV) uses the D3D12 compute conversion (through anR8G8B8A8_UINTUAV, sinceDXGI_FORMAT_AYUVis invalid as a UAV view format) and supports encoder focus, falling back to the D3D11 graphics queue if a driver or GPU refuses it. 10-bit native 4:4:4 (YUV444_10BIT) stays on the D3D11 graphics queue with CUDA, because NVENC's D3D12 interface refusesYUV444_10BIT, so encoder focus is off for it. A D3D12 session that falls back at creation keeps the graphics queue for the rest of the stream; a running D3D12 path that fails twice within a minute demotes stickily too, so a broken path cannot stall twice every five-minute retry.
Encoder focus #
Focus works as on AMF: the D3D12 compute conversion builds the importance map from its still-age detector (compute::Converter::latest_map), and the same rules pick the frames that carry it (amf::focus). No map goes on a keyframe, a recovery picture, the encoder's first frame or the 30 frames after them, or when the map is uniform or not newer than the last one used. Without the D3D12 conversion, focus is off with the same reason as on AMF.
- Delta map. NVENC takes the map as a per-picture
qpDeltaMap(NV_ENC_QP_MAP_DELTA): one signed offset per 16x16 macroblock for H.264, per 32x32 CTB for HEVC (the only CTB size NVENC codes) and per 64x64 superblock for AV1 (nvenc::focus_deltas). Turning focus on switchesqpMapModewith a reconfigure, without a reset or a keyframe. The emphasis map is H.264-only, so it is not used. - Same weight as AMF. Each importance step is half a QP (two q-index steps on AV1), the effect AMF's map measured on the RX 7900 XT. The offsets are centred on the picture's mean importance, so the map moves bits between blocks and leaves the frame's QP to the rate control and its one-frame VBV.
- Startup check. The probe encodes half-and-half maps, as on AMF, on a session of its own with the delta map and per-block statistics, so the codec check never depends on either. GeForce drivers cap the sessions open at once, so the probe closes the stream's session first and opens it again after, never two at a time. It reads each block's QP from
NV_ENC_OUTPUT_STATS_BLOCKand needs an effect of 2 QP (8 q-index on AV1). Block statistics need API 12.1, NVIDIA driver 531.61 or newer (NV_ENC_CAPS_OUTPUT_BLOCK_STATS); without them focus reports that ROI cannot be verified. - Verification during a stream.
encoder_focus_verifyturns block statistics on when the encoder is made, andqp_deltathen reports the QP difference between the least and most important blocks, as on AMF.
The D3D11 conversion builds no map, so focus needs the D3D12 conversion on NVENC too.
Driver settings and Reflex #
Beside the encoder, a host that streams with an NVIDIA GPU serves the NVIDIA driver's global 3D settings in the graphics settings panel (the PC page of Nightjar's Control Center, the console's game page and the native API's /radeon endpoints), read and written through NVAPI (rust/windows/graphics/src/nvidia_settings.rs): Low Latency Mode, Max frame rate, Vertical sync, Power management mode, Texture filtering quality, Anisotropic filtering and Smooth Motion (driver 571.86 or newer). As with Radeon settings, the host journals the PC's own values before it changes them and puts them back when the session ends, after a crash too; a combination the panel cannot put back exactly reads as custom and is left alone. RTSS's limit mode offers NVIDIA Reflex, and a host that streams with an NVIDIA GPU uses it on its own for virtual-display streams and frame-generation games (framegen::Policy::for_gpu).
RTX HDR and RTX Video enhancement #
Once the NVIDIA components are installed (All settings → Picture → Integrations → NVIDIA components, which downloads Rubylight's NGX adapter and NVIDIA's RTX Video SDK 1.1.0 runtime from this version's release), Rubylight runs two of NVIDIA's RTX Video SDK 1.1.0 features on the captured picture before conversion and encoding (configuration):
- RTX HDR (NGX TrueHDR) turns an SDR capture into an FP16 scRGB picture for an HDR stream. The streamed display stays in SDR while it runs. Its contrast, saturation, middle gray and peak brightness follow the game's NVIDIA driver profile where one sets them.
- RTX Video enhancement runs NGX VSR with the output at the input's size, so it removes compression artefacts and sharpens without scaling. Strength 1 to 25, 26 to 50, 51 to 75 and 76 to 100 map to VSR quality levels 1 to 4; 0 turns it off. It takes 8-bit SDR and FP16 HDR captures and leaves a 10-bit PQ capture as it is. VSR's model is SDR, so an FP16 picture goes through an SDR proxy normalized around 203-nit white (
rust/windows/abi/src/shaders/rtx_video.hlsl), and a resolve pass adds back only the change the model made.
NGX is called from butterpollo_truehdr.dll (rust/truehdr-runtime), an MSVC adapter the GNU host loads at run time by full path from the component's folder (%ProgramData%\Butterpollo\nvidia for the installed host), after checking it against the SHA-256 recorded at install and NVIDIA's DLLs against the digests in rust/core/src/nvidia_component.rs (rust/host/src/nvidia_component.rs downloads and installs them). It is the only code that links NVIDIA's NGX library, built against its static C runtime so that the adapter needs no Visual C++ Redistributable, and it gives NGX a data folder of its own and its own folder for NVIDIA's DLLs. The host (rust/host/src/nvidia_enhance.rs, rust/windows/graphics/src/{truehdr,rtx_video}.rs) checks both features on the streaming GPU after the install and at each start, in a process of its own (butterpollo.exe --nvidia-probe, given 30 s): a crash or hang inside NGX there turns both off with the reason on the console's app page and leaves a crash report in the profile, and the host starts either way. It reports them in serverinfo's NvidiaEnhancements bitmask; the console and Nightjar show their controls only where a bit is set. When D3D12 compute conversion and D3D11.4 shared fences are available, both filters output into shared NT-handle pool textures (SHARED_NTHANDLE | SHARED, with RTX Video HDR resolving directly into a pooled render-target texture) signalled by a shared D3D11→D3D12 fence so downstream conversion and NVENC can stay on D3D12; otherwise they fall back to a non-shared D3D11 pool on the graphics queue. A failure turns the enhancement off for the session with a visible warning; it never switches encoders.
The per-app settings, the one pre-encode slot that RTX HDR takes first, and the HDR proxy follow Foundation Sunshine's image enhancement (its per-application design and its DLSS NR HDR filter).
DLSS denoising is not offered. Earlier ideas used NVIDIA's DLSS ray-reconstruction denoiser (DLSS NR) as a pre-encode clean-up. NGX gives DLSS features only to applications NVIDIA has registered by application ID, and Rubylight neither presents another application's ID nor patches around that check. DLSS NR proper therefore needs NVIDIA's NGX support for third-party applications; RTX Video enhancement uses the RTX Video SDK, which NVIDIA licenses for redistribution in any application.
Assumed NVIDIA defaults #
Rubylight has not measured these defaults on NVIDIA hardware. They follow NVIDIA's Video Codec SDK 13.0 game-streaming guidance and the Sunshine forks, in this order: ULL tuning, CBR, quarter-resolution two-pass, a one-frame VBV, infinite GOP and spatial AQ on. P1 is the fastest preset. auto split keeps the driver's implicit mode and forces split only when one engine's estimate misses the frame budget; driver_decides keeps only the implicit mode; the Lowest latency stream preset asks NVENC to split at every preset.
These choices are assumptions, not NVIDIA measurements:
- Forcing split in the Lowest latency preset and in
auto's budget case can show a seam at low bitrate;nvenc_split_encode = disabledordriver_decidesavoids it. - The budget trigger uses Foundation Sunshine's per-preset calibration. NVIDIA's application note suggests P2 to P7 may be slower than that calibration, so a high preset can still miss the frame interval, especially where split cannot engage; the guard then lowers it to P1 and reports
over_at_floor. - The D3D12 session, its fences and its READBACK output have not run on NVIDIA hardware. Failures demote to the D3D11 graphics queue, now stickily for NVENC.
- Spatial AQ and quarter-res two-pass are kept in every preset because NVIDIA recommends them for CBR and low-latency streaming; their NVIDIA encode-time cost is not measured here.
Checking NVIDIA code #
No NVIDIA GPU runs our tests, so NVIDIA code is checked against the vendor's headers and samples and never reported as run on hardware. Check every foreign declaration's parameters and the order of calls, as author and again in review, and give the reviewer the headers' path: NVENC's are vendored (rust/THIRD_PARTY.md); the RTX Video SDK is rtx-video-sdk-1.1.0 in the dependencies folder after rust\build.ps1 -Nvidia. NVAPI has no headers here; a report says which calls rest on other hosts' code alone.
Not run on NVIDIA hardware #
The rows above pass the fake-driver tests. These behaviours follow NVIDIA's headers and other hosts' code and have not yet run on an NVIDIA GPU:
- Subframe completion:
hwEncodeStatus2 as the end of a picture, and the slice offsets a partial lock reports. The debug lines of the first four frames settle both. - Keyframes within the one-frame VBV (which the driver does not guarantee), and
KeyframeCapScaletightening/relaxing a wider VBV (vbvBufferSize/vbvInitialDelay>=two_framesvia in-placeNvEncReconfigureEncoder) after keyframe overshoots. - Rate control changes applied with frames in flight.
- The stall policy's waits during game loading.
- The D3D12 session: fence points, READBACK output and completion by fence.
- Encoder focus: the delta map's effect per codec,
qpMapModeswitched by a reconfigure, and the block statistics the probe reads. - The GPU clocks profile: that the driver takes it for the running host, and NVENC's encode time with it on and off on a lightly loaded GPU.
- The driver settings: reading and writing each one through NVAPI, and the restore after a session and after a crash.
- Forced Vertical sync on the virtual display (
nvidia_virtual_display_vsync): that a game started after the write takes it, and that it gives the full frame rate with DLSS frame generation. It makes no NVAPI call the driver settings do not already make. - Native 4:4:4: the D3D12 compute AYUV path (
yuv444_ayuv_cs,yuv444_ayuv_menu_cs,yuv444_ayuv_focus_cs), D3D11 AYUV and stacked-plane 10-bit inputs (yuv444_planes_cs/yuv444_planes_menu_cswriting anR16_UINTUAV withyuv444_planes/menu_yuv444_planespixel-shader fallback), the High 4:4:4 and FREXT sessions (including H.264 4:4:4 on D3D12 and older cards or drivers), and the startup check's 4:4:4 encodes. The ignored testsnative_444_keeps_a_one_pixel_chroma_checkerboardandnative_nvenc_loss_recovery_and_444_hdr_decode(casesh264-444,hevc-444,hevc-444-hdr) decode the output with FFmpeg and check the chroma at full resolution. - Async D3D11/CUDA output events: registering manual-reset Win32 events via
nvEncRegisterAsyncEvent, resetting them beforenvEncEncodePicture, and waking the stream thread viaEncoder::output_event(). - Non-blocking bitstream locks and coalesced rate control: unconditional
doNotWait = 1onnvEncLockBitstream(including synchronous non-subframe sessions), skipping the trailing immediatecollect()when only the freshly submitted frame is pending, settingvbvInitialDelay = vbvBufferSizeonnvEncInitializeEncoderand everynvEncReconfigureEncoder, and coalescing bitrate and frame-cap VBV changes into a singlenvEncReconfigureEncodercall. - CUDA 10-bit 4:4:4 async interop (paired with
yuv444_planes_cs/yuv444_planes_menu_csR16_UINTUAV and pixel-shader fallback): registering the D3D11 stacked-plane texture withCU_GRAPHICS_REGISTER_FLAGS_READ_ONLY, binding aCU_STREAM_NON_BLOCKINGstream vianvEncSetIOCudaStreams(passingCUstream*afternvEncInitializeEncoder), runningcuGraphicsMapResources/cuMemcpy2DAsync_v2/cuGraphicsUnmapResourceson that stream without nested context pushes, and skipping redundant CUDA copies on scene-cut re-encodes and static repeat-frame cache hits. - NVENC pre-drain RFI fast paths and static repeat-frame conversion caching on D3D12 and D3D11 sessions (and dynamic HDR buffer headroom via
frame_pool::copy_with_headroom). - RTX HDR and RTX Video compute-queue continuity:
GpuPool::shared()/GpuPool::shared_rtv()outputs withD3d11Signalshared fences, GPU-orderedGpuImage::order_d3d11()in place of CPUready.wait(), direct FP16 RTV resolve inrtx_video::HdrPasses, cached VSR SRV/RTV views, and the cachedID3D11Multithreadlock inrust/truehdr-runtime. - Bounded D3D12 NVENC async overlap (
nvenc/d3d12_async.rs,max_in_flight = 1in Lowest latency or2by default), pre-registered D3D12 input/READBACK ring reuse, and sticky D3D11 demotion after D3D12 fence timeout orNV_ENC_ERR_DEVICE_NOT_EXIST. - Budget-ceiling two-pass downgrade (
effective_multipassdropping two-pass toNV_ENC_MULTI_PASS_DISABLEDwhenframe_budget_guard && budget.over_at_floor), SDK 13.0aqStrengthpreservation/clearing, and strictly gatedenableTemporalAQ(enableLookahead == 0 && frameIntervalP == 1). - Explicit DPB slot-tracked reference invalidation (
DpbTrackertrimmingnvEncInvalidateRefFramesto live retained DPB slots and avoiding unnecessary IDR resets when an older anchor survives) and API 12.2+splitEncodeModemutual-exclusion invariants (nvenc/recovery_tuning.rs). - Pooled native 4:4:4 surface registration validation/tracking and zero-rebuild RTX HDR / RTX Video pre-encode pool texture swaps (
nvenc/format_444_rtx.rs, draining and rebuilding deterministically on SDR <-> FP16 format changes or shareability loss). - Hardware-cursor separation (
rubylight-vdisplayidd-push/ddx) paired with RTX HDR and RTX Video post-enhancement cursor compositing: arming separated cursor capture only when an offered RTX enhancement can actually run, stripping per-cursorsdr_white_nitson SDR / RTX HDR outputs socolor.hlslcomposites at RTX HDR'ssdrWhiteScale, and reusing the cached enhanced desktop texture across static-desktop cursor-only updates (!desktop_updated, preservingorigin).