feat(d3d11): upload software-decoded NV12/P010 frames as CPU textures - #133
Closed
1824239290 wants to merge 1 commit into
Closed
1824239290 wants to merge 1 commit into
1824239290 wants to merge 1 commit into
Conversation
The D3D11 backend rejected every software-decoded video frame with 'd3d11: software frames require WgpuFallback or a CPU upload path', forcing hosts through the wgpu fallback for CPU decode output. Upload the planar luma/chroma planes as Nv12/P010 shader resources instead: validate plane sizes against the format geometry, keep both plane textures alive on ImportedVideoFrame via _chroma_texture, retire the previous frame through the AimesSoft#129 GPU-wait barrier, and count the frames in the software_video_frames runtime stat that previously sat at zero.
1824239290
force-pushed
the
split/d3d11-software-upload
branch
from
September 7, 2026 07:17
f15b043 to
af019d3
Compare
This was referenced Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
D3D11 后端增加软件解码帧的 CPU 上传路径:NV12/P010 平面数据作为 shader 资源上传,替代原先的直接报错拒绝。
背景
此前 D3D11 渲染后端对非 D3D11VA 帧(
upload_player_frame的软件分支)一律返回 "d3d11: software frames require WgpuFallback or a CPU upload path",宿主只能依赖 wgpu 回退链路。软解输出的 NV12/P010(包括 Dolby Vision Profile 5 按后端能力回退软解的场景)在 Windows 上需要这条路径可用。改动
upload_player_frame软件分支:校验平面尺寸后,将 luma/chroma 平面通过create_overlay_texture上传为 Nv12/P010 shader 资源。ImportedVideoFrame增加_chroma_texture: Option<ID3D11Texture2D>,保持色度平面纹理存活(硬件路径置 None)。retire_current_video()的 GPU 等待屏障,与 修复 Windows 扫描线视频 DWM 崩溃、铺满尺寸及 D3D11VA 帧复用 #129 引入的硬件路径语义一致。RendererRuntimeStats.software_video_frames(该字段此前恒为 0)。验证
cargo test -p erika --lib483 项通过。该路径需要真实 D3D11 设备,运行时行为待 Windows 真机验证。