fix(windows-client): clear clippy -D warnings on MSVC
apple / swift (push) Successful in 53s
windows-msix / package (push) Successful in 1m4s
windows / build (push) Successful in 57s
ci / bench (push) Failing after 2s
android / android (push) Failing after 2m46s
ci / web (push) Successful in 32s
ci / docs-site (push) Failing after 16s
deb / build-publish (push) Failing after 1s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Failing after 0s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Failing after 0s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Failing after 1s
docker / deploy-docs (push) Has been skipped
decky / build-publish (push) Failing after 0s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Failing after 0s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Failing after 1s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Failing after 0s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Failing after 0s
ci / rust (push) Failing after 2m16s

The cfg(windows) code can't be lint-checked on the Linux dev box, so three
-D warnings slipped through (caught by windows.yml; the FFI + shaders compiled
fine):
- gpu.rs: SetMultithreadProtected returns a must-use BOOL -> `let _ =`.
- video.rs: drop the unused GpuFrame::ten_bit field (present keys off `hdr`;
  the value is still computed locally for the first-frame log).
- present.rs: GpuView::frame is an RAII keep-alive (its Drop returns the decoder
  surface to the pool), never read -> #[allow(dead_code)].

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-18 23:21:18 +00:00
parent 0cc36fa130
commit a58b6b8e76
3 changed files with 7 additions and 6 deletions
+3 -1
View File
@@ -97,7 +97,9 @@ fn create_device() -> Result<SharedDevice> {
// FFmpeg also sets this during hwdevice init, but doing it up front keeps the // FFmpeg also sets this during hwdevice init, but doing it up front keeps the
// cross-thread `Send`/`Sync` sound from the moment the device exists. // cross-thread `Send`/`Sync` sound from the moment the device exists.
if let Ok(mt) = context.cast::<ID3D11Multithread>() { if let Ok(mt) = context.cast::<ID3D11Multithread>() {
unsafe { mt.SetMultithreadProtected(true) }; unsafe {
let _ = mt.SetMultithreadProtected(true); // returns the prior state; ignore
}
} }
tracing::info!( tracing::info!(
driver = if hardware { driver = if hardware {
+2
View File
@@ -82,6 +82,8 @@ float4 ps_p010(VSOut i) : SV_Target {
struct GpuView { struct GpuView {
y: ID3D11ShaderResourceView, y: ID3D11ShaderResourceView,
c: ID3D11ShaderResourceView, c: ID3D11ShaderResourceView,
/// Held only for its `Drop` (returns the decoder surface to the reuse pool) — never read.
#[allow(dead_code)]
frame: GpuFrame, frame: GpuFrame,
} }
+2 -5
View File
@@ -91,11 +91,9 @@ pub struct GpuFrame {
pub height: u32, pub height: u32,
/// Texture-array slice this frame occupies (`AVFrame::data[1]`). /// Texture-array slice this frame occupies (`AVFrame::data[1]`).
pub index: u32, pub index: u32,
/// BT.2020 PQ HDR10 (P010, ST.2084) vs ordinary 8-bit BT.709 SDR (NV12). /// BT.2020 PQ HDR10 (P010, ST.2084) vs ordinary 8-bit BT.709 SDR (NV12). The present path keys
/// SRV format + shader off this (the host couples 10-bit ⟺ HDR).
pub hdr: bool, pub hdr: bool,
/// 10-bit (P010, R16 planes) vs 8-bit (NV12, R8 planes) — kept for the first-frame log; the
/// present path keys colour/format off `hdr` (the host couples 10-bit ⟺ HDR).
pub ten_bit: bool,
guard: D3d11FrameGuard, guard: D3d11FrameGuard,
} }
@@ -472,7 +470,6 @@ impl D3d11vaDecoder {
height: (*self.frame).height as u32, height: (*self.frame).height as u32,
index: (*self.frame).data[1] as usize as u32, index: (*self.frame).data[1] as usize as u32,
hdr, hdr,
ten_bit,
guard: D3d11FrameGuard(cloned), guard: D3d11FrameGuard(cloned),
}; };
log_layout_once(frame.width, frame.height, frame.index, hdr, ten_bit); log_layout_once(frame.width, frame.height, frame.index, hdr, ten_bit);