DLSS colour conversion samples a filterable texture (#124)

The display<->linear conversion shaders sample the source with
textureSampleLevel and the filtering HD sampler, but the bind group layout
declared the source UNFILTERED (Float filterable:false). wgpu rejects a
non-filterable texture paired with a filtering sampler when the pipeline is
created, which only happens on a real DLSS device (the colour pipelines are
built when DLSS initialises, never on the native-TAAU fallback). HDR is
Rgba16Float, filterable, so bind the source as FLOAT (filterable:true).

Co-Authored-By: Kimi Code <noreply@moonshot.ai>
This commit is contained in:
2026-11-21 16:08:39 +03:00
parent b2cc11c459
commit a791e84391
+5 -2
View File
@@ -1,6 +1,6 @@
//! DLSS Super Resolution behind the native TAA interface. NGX never sees the display-space
//! colour used by Horizon: two small conversion passes bracket its command buffer.
use super::{entries, module, target, SAMPLER, UNFILTERED};
use super::{entries, module, target, FLOAT, SAMPLER};
use dlss_wgpu::{
DlssFeatureFlags, DlssPerfQualityMode, DlssSdk,
super_resolution::{DlssSuperResolution, DlssSuperResolutionExposure, DlssSuperResolutionRenderParameters},
@@ -8,7 +8,10 @@ use dlss_wgpu::{
use std::sync::{Arc, Mutex};
const COLOR: &str = include_str!("dlss_color.wgsl");
const BINDINGS: [wgpu::BindingType; 2] = [UNFILTERED, SAMPLER];
// The conversion shaders sample with `textureSampleLevel` and the filtering `linear` sampler, so
// the source must be a filterable float texture (HDR is Rgba16Float). A non-filterable binding
// here fails wgpu validation when the pipeline is created on a real DLSS device.
const BINDINGS: [wgpu::BindingType; 2] = [FLOAT, SAMPLER];
struct ColorConvert {
input: wgpu::TextureView,