From 774340981dc7fb685fa5b1007ff6d8bc025ee39c Mon Sep 17 00:00:00 2001 From: KainanP Date: Wed, 25 Nov 2026 09:52:28 -0300 Subject: [PATCH 1/7] Shader: a dot product over a constant multiplicand is taken by hand On an Intel UHD (Xe-LP, 8086:a78b, driver 31.0.101.5445), `fspx_programs_run_with_the_hardwares_dot_products` gives acc - 128 where RDNA 2 gives acc - 320 (#1829). The case is `v_dot4_i32_i8 v0, v1, 2.0` with `sel_hi_lo`, a multiplicand of 0x4000. The DXIL is right: the op_sel selection is integer arithmetic on 0x40000000, and the driver folds it to `dot4AddPacked(acc, a, 0x4000)`. The device then multiplies by 0x40004000: -5 * 64 + 3 * 64 = -128. A probe over constant multiplicands on that device shows the rule. Every constant that fits in 16 bits (signed or not) is read as its low half in both halves: 1, 2, 64, -2, -16, 0x4000, 0x7F00, 0xFF80 and 0xFFFF8000 all give the replicated value. 0 and -1 are right only because their replication is themselves. Constants wider than 16 bits (the inline floats as 32-bit patterns, 0x00800000, 0x12345678) are right, and so is every run-time multiplicand. A constant moved into a VGPR or an SGPR first fails the same way, and so does `v_dot4c_i32_i8`. #1896 reports the same symptom on an RTX 5070. Both dot lowerings now go through `dot4_i8`. When a multiplicand is something the host compiler can work out before the program runs, the lowering sums the other operand's sign-extended bytes times the constant's non-zero bytes by hand, which is V_DOT4_I32_I8 and V_DOT4C_I32_I8 in the RDNA 2 ISA (November 2020, pp. 140 and 173), so no `dot4AddPacked` sees a constant. `bitcode::Module::known_i32` decides this. It folds constants through integer arithmetic, casts and selects, which covers the op_sel half selection the lowering itself emits. Run-time multiplicands keep the intrinsic. The constant's value is unchanged: an inline float is its 32-bit pattern and op_sel picks its halves, as on `main`. `dot4_takes_every_constant_class_whole` checks against `dot4_ref`, one program per class with its dot products chained through v0: inline integers 0, 1, 2, 15, 16, 63, 64, -1, -2 and -16; the nine inline floats; 16-bit and wider literals (each constant in src1 with four op_sel choices and in src0); constants in a VGPR or an SGPR; `v_dot4c` with literal and inline sources; constant accumulators; and run-time operands with four op_sel choices. With `main`'s lowering the Intel UHD fails the first six classes and passes the last two. With this change it passes all of them, and the FSPX test passes too. Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 9ea9e00de2d2a843b0f854e608cadfe250547347) --- crates/victory-shader/src/emit/bitcode.rs | 104 ++++++++++++ crates/victory-shader/src/emit/lower.rs | 69 ++++++-- crates/victory-shader/src/emit/valu_tests.rs | 165 +++++++++++++++++++ 3 files changed, 320 insertions(+), 18 deletions(-) diff --git a/crates/victory-shader/src/emit/bitcode.rs b/crates/victory-shader/src/emit/bitcode.rs index ad1772b1cb..ff165edb63 100644 --- a/crates/victory-shader/src/emit/bitcode.rs +++ b/crates/victory-shader/src/emit/bitcode.rs @@ -319,6 +319,72 @@ impl Module { self.consts.iter().any(|(_, c)| *c == want) } + /// The value of a 32-bit integer that any optimiser can work out before + /// the program runs: a constant, or integer arithmetic, casts and selects + /// over such values (the builder itself folds nothing, a driver does). + /// `None` when it depends on anything else. + pub fn known_i32(&self, v: V) -> Option { + self.known_int(v, 32) + } + + fn known_int(&self, v: V, depth: u32) -> Option { + let depth = depth.checked_sub(1)?; + let (bits, int) = match self.types[self.type_of(v).0 as usize] { + TypeDef::Int(bits) if bits <= 32 => (bits, true), + TypeDef::Float => (32, false), + _ => return None, + }; + let mask = u32::MAX >> (32 - bits); + let x = match v { + V::Const(i) => match self.consts[i as usize].1 { + Const::Int(x) => x as u32, + Const::Float(x) => x, + _ => return None, + }, + V::Inst(i) => match self.insts[i as usize].op { + Op::Bin(op, a, b) if int => { + let (a, b) = (self.known_int(a, depth)?, self.known_int(b, depth)?); + let signed = |x: u32| ((x << (32 - bits)) as i32) >> (32 - bits); + match op { + Bin::Add => a.wrapping_add(b), + Bin::Sub => a.wrapping_sub(b), + Bin::Mul => a.wrapping_mul(b), + Bin::Shl if b < bits => a << b, + Bin::LShr if b < bits => (a & mask) >> b, + Bin::AShr if b < bits => (signed(a) >> b) as u32, + Bin::And => a & b, + Bin::Or => a | b, + Bin::Xor => a ^ b, + _ => return None, + } + } + Op::Cast(op, x) => { + let from = match self.types[self.type_of(x).0 as usize] { + TypeDef::Int(bits) if bits <= 32 => bits, + TypeDef::Float if op == Cast::Bitcast => 32, + _ => return None, + }; + let y = self.known_int(x, depth)?; + match op { + Cast::Trunc | Cast::ZExt | Cast::Bitcast => y & u32::MAX >> (32 - from), + Cast::SExt => (((y << (32 - from)) as i32) >> (32 - from)) as u32, + _ => return None, + } + } + Op::Select(cond, t, f) => match self.known_int(cond, depth) { + Some(c) => self.known_int(if c & 1 != 0 { t } else { f }, depth)?, + None => { + let t = self.known_int(t, depth)?; + (Some(t) == self.known_int(f, depth)).then_some(t)? + } + }, + _ => return None, + }, + _ => return None, + }; + Some(x & mask) + } + /// Gives constant `old` the content of `new` (both stay valid). pub fn replace_const(&mut self, old: V, new: V) { if let (V::Const(o), V::Const(n)) = (old, new) { @@ -1233,6 +1299,44 @@ mod tests { assert_eq!(signed(2), 4); } + /// `known_i32` sees through the integer arithmetic over constants that + /// an `op_sel` half selection is made of, and stops at run-time values + /// and float arithmetic. + #[test] + fn known_i32_folds_constant_integer_arithmetic() { + let mut m = Module::default(); + let i32t = m.int(32); + let fty = m.func_ty(i32t, vec![i32t]); + let f = m.function("dx.op.input", fty, Some(Attr::ReadNone), false); + let b = m.new_block(); + let two = m.i32(0x4000_0000); + let (k16, low) = (m.i32(16), m.i32(0xFFFF)); + let top = m.bin(b, Bin::LShr, two, k16); + let bottom = m.bin(b, Bin::And, two, low); + let hi = m.bin(b, Bin::Shl, bottom, k16); + let swapped = m.bin(b, Bin::Or, top, hi); + assert_eq!(m.known_i32(swapped), Some(0x4000)); + let minus16 = m.i32(0xFFFF_FFF0); + assert_eq!(m.known_i32(minus16), Some(0xFFFF_FFF0)); + let float = m.f32(2.0f32.to_bits()); + let bits = m.cast(b, Cast::Bitcast, float, i32t); + assert_eq!(m.known_i32(bits), Some(0x4000_0000)); + let shifted = m.bin(b, Bin::AShr, minus16, k16); + assert_eq!(m.known_i32(shifted), Some(u32::MAX)); + + let input = m.call(b, f, vec![two]); + assert_eq!(m.known_i32(input), None); + let mixed = m.bin(b, Bin::And, input, low); + assert_eq!(m.known_i32(mixed), None); + let yes = m.cmp(b, pred::EQ, input, two); + let same = m.select(b, yes, swapped, top); + assert_eq!(m.known_i32(same), Some(0x4000)); + let either = m.select(b, yes, swapped, two); + assert_eq!(m.known_i32(either), None); + let sum = m.bin(b, Bin::Add, float, float); + assert_eq!(m.known_i32(sum), None); + } + /// A structured shader's shape: `stages` if/else diamonds in a row, each /// merge with one phi per register (as the lowering makes them), then a /// loop, and a tail that reads only the first `read` registers. diff --git a/crates/victory-shader/src/emit/lower.rs b/crates/victory-shader/src/emit/lower.rs index c96f522ec8..46dfebbf8c 100644 --- a/crates/victory-shader/src/emit/lower.rs +++ b/crates/victory-shader/src/emit/lower.rs @@ -2045,6 +2045,55 @@ impl<'a> Lower<'a> { (sel < 6).then_some((sel, sext)) } + /// `acc` plus the dot product of the four signed bytes of `a` and `b`, + /// wrapping (`v_dot4_i32_i8`, `v_dot4c_i32_i8`). + /// + /// A multiplicand the host compiler can work out goes by hand, over its + /// non-zero bytes. Drivers read a constant `dot4AddPacked` operand that + /// fits in 16 bits as its low half in both halves, as a half-word + /// immediate would be: Intel's Xe-LP does so for every such constant + /// (0x4000 as 0x40004000, 64 as 0x00400040, -16 as 0xFFF0FFF0; #1829), + /// and the RTX 5070 for 0x4000 (#1896). + fn dot4_i8(&mut self, acc: V, a: V, b: V) -> V { + let c = self.cur; + let (ka, kb) = (self.s.m.known_i32(a), self.s.m.known_i32(b)); + let (x, k) = match (ka, kb) { + (None, None) => { + let i32_ty = self.s.t.i32; + return self.s.op( + c, + "dot4AddPacked.i32", + Attr::ReadNone, + i32_ty, + 163, + &[acc, a, b], + ); + } + (Some(k), None) => (b, k), + (_, Some(k)) => (a, k), + }; + let mut dot = acc; + for t in 0..4u8 { + let byte = i32::from((k >> (8 * t)) as i8); + if byte == 0 { + continue; + } + let p = match self.s.m.known_i32(x) { + Some(x) => { + let p = i32::from((x >> (8 * t)) as i8) * byte; + self.s.m.i32(p as u32) + } + None => { + let xb = self.select_bits(x, t, true); + let kb = self.s.m.i32(byte as u32); + self.s.m.bin(c, Bin::Mul, xb, kb) + } + }; + dot = self.s.m.bin(c, Bin::Add, dot, p); + } + dot + } + /// Bits `sel` (0-3 a byte, 4-5 a word) of `x`, extended. fn select_bits(&mut self, x: V, sel: u8, sext: bool) -> V { let c = self.cur; @@ -6180,15 +6229,7 @@ impl<'a> Lower<'a> { return Err("an accumulator"); }; let acc = self.i32_of(inst.read(Reg::V(reg)).ok_or("an accumulator")?)?; - let i32_ty = self.s.t.i32; - let r = self.s.op( - c, - "dot4AddPacked.i32", - Attr::ReadNone, - i32_ty, - 163, - &[acc, a, bb], - ); + let r = self.dot4_i8(acc, a, bb); int(self, r) } "v_dot4_i32_i8" => { @@ -6216,15 +6257,7 @@ impl<'a> Lower<'a> { xs.push(self.s.m.bin(c, Bin::Or, if lo { top } else { bottom }, hi)); } let acc = s(self, 2)?; - let i32_ty = self.s.t.i32; - let r = self.s.op( - c, - "dot4AddPacked.i32", - Attr::ReadNone, - i32_ty, - 163, - &[acc, xs[0], xs[1]], - ); + let r = self.dot4_i8(acc, xs[0], xs[1]); int(self, r) } "v_mov_b32" => { diff --git a/crates/victory-shader/src/emit/valu_tests.rs b/crates/victory-shader/src/emit/valu_tests.rs index 182aea707a..e338cdc13e 100644 --- a/crates/victory-shader/src/emit/valu_tests.rs +++ b/crates/victory-shader/src/emit/valu_tests.rs @@ -2281,3 +2281,168 @@ fn v_mul_legacy_f32_treats_denormals_as_zero() { ); }); } + +/// The halves `op_sel` (`lo`) and `op_sel_hi` (`hi`) pick from `x`. +fn op_sel_halves(x: u32, lo: bool, hi: bool) -> u32 { + let half = |top: bool| if top { x >> 16 } else { x & 0xFFFF }; + half(lo) | half(hi) << 16 +} + +/// One step of a chain of dot products: its words, and the running sum it +/// leaves in v0 from the inputs and the sum before it. +type DotStep = (Vec, Box u32>); + +/// Runs `steps` one after another in one program, v0 starting as the +/// accumulator in v3, and compares v0 with the steps' sum for each input +/// (`a` in v1, `b` in v2, the accumulator in v3). +fn run_dot_chain(what: &str, steps: Vec) { + let mut body = vec![vop1(0x001, 0, vgpr(3))]; // v_mov_b32 v0, v3 + for (words, _) in &steps { + body.extend(words); + } + let inputs = [ + [0x0705_FB82, 0x0000_4000, 0x7FFF_FFF0, 0], + [0x80FF_7F01, 0x0000_0040, 0x0000_0123, 0], + [0x0302_FB02, 0xFFFF_FFF0, 0x8000_0000, 0], + [0x0302_FB02, 0x80FF_7F01, 0x7FFF_FFF0, 0], + ]; + run_cases(&build_valu_cs(&body), &inputs, |backend, _, inp, got| { + let want = steps.iter().fold(inp[2], |sum, (_, step)| step(inp, sum)); + assert_eq!( + got, want, + "{backend}: {what}, inputs {inp:08x?}: got {got:#010x}, want {want:#010x}", + ); + }); +} + +/// `v_dot4_i32_i8 v0, v1, , v0` (or the constant first) with +/// each `op_sel` choice for it, a literal's dword after the instruction. +fn constant_dot_steps(code: u16, value: u32) -> Vec { + let literal = (code == 255).then_some(value); + let mut steps: Vec = Vec::new(); + // (constant's place, op_sel, op_sel_hi, its low and high half selections) + for (place, opsel, opsel_hi, lo, hi) in [ + (1, 0b000, 0b111, false, true), + (1, 0b010, 0b101, true, false), + (1, 0b000, 0b101, false, false), + (1, 0b010, 0b111, true, true), + (0, 0b000, 0b111, false, true), + ] { + let mut words = if place == 1 { + dot4(0, vgpr(1), code, vgpr(0), opsel, opsel_hi).to_vec() + } else { + dot4(0, code, vgpr(1), vgpr(0), opsel, opsel_hi).to_vec() + }; + words.extend(literal); + let b = op_sel_halves(value, lo, hi); + steps.push((words, Box::new(move |inp, sum| dot4_ref(inp[0], b, sum)))); + } + steps +} + +/// `v_dot4_i32_i8` and `v_dot4c_i32_i8` with constant and register +/// multiplicands, in either place and with each `op_sel` choice, against +/// `dot4_ref`: inline integers (0, small positive, -1, -2, -16), the inline +/// floats as their 32-bit patterns, literals that fit in 16 bits (which a +/// driver may read as their low half in both halves, #1829) and wider ones, +/// constants moved into a VGPR or an SGPR first, constant accumulators, and +/// run-time values. The other operand and the accumulator come from root +/// constants, so only the constant is known to the host compiler. Each +/// class is one program, its dot products chained through v0. +#[test] +fn dot4_takes_every_constant_class_whole() { + let inline = |code: u16| resource::inline(code as u8).expect("inline"); + let integers = [128u16, 129, 130, 143, 144, 191, 192, 193, 194, 208]; + run_dot_chain( + "inline integers", + integers + .iter() + .flat_map(|&code| constant_dot_steps(code, inline(code))) + .collect(), + ); + run_dot_chain( + "inline floats", + (240..=248) + .flat_map(|code| constant_dot_steps(code, inline(code))) + .collect(), + ); + let literals = [ + 0x4000u32, + 0x7F00, + 0xFF80, + 0xFFFF_8000, + 0x0080_0000, + 0x1234_5678, + ]; + run_dot_chain( + "literals", + literals + .iter() + .flat_map(|&value| constant_dot_steps(255, value)) + .collect(), + ); + + let mut held: Vec = Vec::new(); + let mut dot4c: Vec = Vec::new(); + for value in [0x4000u32, 0x40, 0xFFFF_FFF0, 0x1234_5678] { + // v_mov_b32 v2, literal; v_dot4_i32_i8 v0, v1, v2, v0 + let mut words = vec![vop1(0x001, 2, 0xFF), value]; + words.extend(dot4(0, vgpr(1), vgpr(2), vgpr(0), 0, 7)); + held.push(( + words, + Box::new(move |inp, sum| dot4_ref(inp[0], value, sum)), + )); + // s_mov_b32 s12, literal; v_dot4_i32_i8 v0, v1, s12, v0 + let mut words = vec![s_mov_b32(12, 0xFF), value]; + words.extend(dot4(0, vgpr(1), sgpr(12), vgpr(0), 0, 7)); + held.push(( + words, + Box::new(move |inp, sum| dot4_ref(inp[0], value, sum)), + )); + // v_dot4c_i32_i8 v0, literal, v1 + let words = vec![0x0d << 25 | 1 << 9 | 0xFF, value]; + dot4c.push(( + words, + Box::new(move |inp, sum| dot4_ref(value, inp[0], sum)), + )); + } + run_dot_chain("constants in registers", held); + let mut accumulators: Vec = Vec::new(); + for code in [129u16, 192, 208, 244] { + let value = inline(code); + // v_dot4c_i32_i8 v0, inline, v1 + let words = vec![0x0d << 25 | 1 << 9 | u32::from(code)]; + dot4c.push(( + words, + Box::new(move |inp, sum| dot4_ref(value, inp[0], sum)), + )); + // v_dot4_i32_i8 v5, v1, v2, inline; v_add_nc_u32 v0, v5, v0 + let mut words = dot4(5, vgpr(1), vgpr(2), code, 0, 7).to_vec(); + words.push(0x25 << 25 | vgpr(5) as u32); + accumulators.push(( + words, + Box::new(move |inp, sum| sum.wrapping_add(dot4_ref(inp[0], inp[1], value))), + )); + } + run_dot_chain("v_dot4c_i32_i8 constants", dot4c); + run_dot_chain("constant accumulators", accumulators); + + // Run-time multiplicands with each op_sel choice: v_dot4_i32_i8 v0, v1, v2, v0 + let runtime: Vec = [ + (0b000, 0b111), + (0b011, 0b100), + (0b000, 0b100), + (0b011, 0b111), + ] + .into_iter() + .map(|(opsel, opsel_hi)| -> DotStep { + let sel = + move |x: u32, k: u32| op_sel_halves(x, opsel >> k & 1 != 0, opsel_hi >> k & 1 != 0); + ( + dot4(0, vgpr(1), vgpr(2), vgpr(0), opsel, opsel_hi).to_vec(), + Box::new(move |inp, sum| dot4_ref(sel(inp[0], 0), sel(inp[1], 1), sum)), + ) + }) + .collect(); + run_dot_chain("run-time operands", runtime); +} From 876e8f5ca046cc035a53cf91dcdf1e56a4a8bc4b Mon Sep 17 00:00:00 2001 From: AxizDesign <169168492+AxizDesign@users.noreply.github.com> Date: Thu, 26 Nov 2026 14:56:27 +0700 Subject: [PATCH 2/7] Honor the NVIDIA adapter preference in shader validation --- crates/victory-shader/src/emit/host.rs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/crates/victory-shader/src/emit/host.rs b/crates/victory-shader/src/emit/host.rs index da16ad7d2c..b079d21922 100644 --- a/crates/victory-shader/src/emit/host.rs +++ b/crates/victory-shader/src/emit/host.rs @@ -85,6 +85,12 @@ fn create_device(warp: bool) -> Result { } else { hardware_adapter(&factory).map_err(err)? }; + #[cfg(test)] + if !warp { + let desc = adapter.GetDesc1().map_err(err)?; + let name = String::from_utf16_lossy(&desc.Description); + eprintln!("shader D3D12 adapter: {}", name.trim_end_matches('\0')); + } D3D12CreateDevice(&adapter, D3D_FEATURE_LEVEL_12_0, &mut device).map_err(err)?; let device = device.ok_or("no device")?; let mut sm = D3D12_FEATURE_DATA_SHADER_MODEL { @@ -135,6 +141,8 @@ fn on_software_adapter(device: &ID3D12Device) -> bool { /// basic render driver report no dedicated video memory, which is what this /// asks for as well. fn hardware_adapter(factory: &IDXGIFactory4) -> windows::core::Result { + let prefer_nvidia = std::env::var_os("VICTORY_D3D12_NVIDIA").is_some_and(|value| value != "0"); + let mut first_hardware = None; // SAFETY: plain DXGI adapter enumeration. unsafe { for index in 0.. { @@ -143,12 +151,16 @@ fn hardware_adapter(factory: &IDXGIFactory4) -> windows::core::Result 0 { + if software || desc.DedicatedVideoMemory == 0 { + continue; + } + if !prefer_nvidia || desc.VendorId == 0x10de { return Ok(adapter); } + first_hardware.get_or_insert(adapter); } } - Err(windows::core::Error::new( + first_hardware.ok_or_else(|| windows::core::Error::new( windows::Win32::Foundation::E_FAIL, "no hardware adapter", )) @@ -164,7 +176,8 @@ impl Host { .then(|| WARP_LOCK.lock().unwrap_or_else(|e| e.into_inner())) } - /// The default adapter, or WARP with `warp` (or `VICTORY_WARP=1`). + /// The first hardware adapter, preferring NVIDIA with + /// `VICTORY_D3D12_NVIDIA=1`, or WARP with `warp` or `VICTORY_WARP=1`. /// A software default adapter (a machine without a GPU, as CI) is /// refused, so hardware-only checks never run on WARP. pub fn new(warp: bool) -> Result { From 8f53bfde60dc434b338ee641fbb2ef058e713f2d Mon Sep 17 00:00:00 2001 From: AxizDesign <169168492+AxizDesign@users.noreply.github.com> Date: Thu, 26 Nov 2026 14:59:19 +0700 Subject: [PATCH 3/7] Initialize the mandatory root constant for empty shader inputs --- crates/victory-shader/src/emit/host.rs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/crates/victory-shader/src/emit/host.rs b/crates/victory-shader/src/emit/host.rs index b079d21922..24a75a4f83 100644 --- a/crates/victory-shader/src/emit/host.rs +++ b/crates/victory-shader/src/emit/host.rs @@ -1932,12 +1932,17 @@ impl Host { list.SetComputeRootSignature(root); for (param, arg) in &d.roots { match arg { - Root::Constants(data) => list.SetComputeRoot32BitConstants( - *param, - data.len() as u32, - data.as_ptr().cast(), - 0, - ), + Root::Constants(data) => { + // Even stages without user data get one dword in the + // root signature. A zero-count call crashes on NVIDIA. + let data = if data.is_empty() { &[0][..] } else { data.as_slice() }; + list.SetComputeRoot32BitConstants( + *param, + data.len() as u32, + data.as_ptr().cast(), + 0, + ); + } Root::Table { sampler, index } => { let (h, size) = if *sampler { (&samplers, sampler_size) From a2cfeb1f4a7259c84f92021b91d8129bb3ad728b Mon Sep 17 00:00:00 2001 From: Bullet18x <344699838+Bullet18x@users.noreply.github.com> Date: Wed, 25 Nov 2026 13:39:47 +0300 Subject: [PATCH 4/7] Shader tests: the gather-at-a-level test reads its records through a raw view gathers_at_a_level_match_the_hardware reads each lane's record (offset, u, v, level) by byte offset through a structured view (stride 16). On NVIDIA a raw load through a structured descriptor multiplies the offset by the stride (#2178), so every lane read zeros and every lane failed with the gather of (0, 0) at level 0, [0, 1, 0, 0], including the native gather the test compares against: it looked like a gather bug, and is none. The records go through a raw view, as #2178 does for stride_tests. On an RTX 5090 the test then passes on the hardware and on WARP; the gathers were right all along. Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 9c6e094241315666e1e11cb3c6ece627f649f8cd) --- crates/victory-shader/src/emit/synthetic_tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/victory-shader/src/emit/synthetic_tests.rs b/crates/victory-shader/src/emit/synthetic_tests.rs index e6cee0dada..59c754a3b0 100644 --- a/crates/victory-shader/src/emit/synthetic_tests.rs +++ b/crates/victory-shader/src/emit/synthetic_tests.rs @@ -214,7 +214,7 @@ fn gathers_at_a_level_match_the_hardware() { View::Mipped(24, 16, 4, &texels), View::Buffer { data: &input, - stride: Stride::Structured(16), + stride: Stride::Raw, }, View::RawUav(32 * 12), ]; From 01806bde5bf056557637b7e629f5aedb1ff0dc60 Mon Sep 17 00:00:00 2001 From: AxizDesign <169168492+AxizDesign@users.noreply.github.com> Date: Thu, 26 Nov 2026 15:02:11 +0700 Subject: [PATCH 5/7] Reuse constant analysis results for shared DXIL expressions --- crates/victory-shader/src/emit/bitcode.rs | 54 +++++++++++++++++++---- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/crates/victory-shader/src/emit/bitcode.rs b/crates/victory-shader/src/emit/bitcode.rs index ff165edb63..13d975d10a 100644 --- a/crates/victory-shader/src/emit/bitcode.rs +++ b/crates/victory-shader/src/emit/bitcode.rs @@ -324,11 +324,16 @@ impl Module { /// over such values (the builder itself folds nothing, a driver does). /// `None` when it depends on anything else. pub fn known_i32(&self, v: V) -> Option { - self.known_int(v, 32) + self.known_int(v, 32, &mut HashMap::new()) } - fn known_int(&self, v: V, depth: u32) -> Option { + fn known_int(&self, v: V, depth: u32, resolved: &mut HashMap<(V, u32), u32>) -> Option { let depth = depth.checked_sub(1)?; + // A shared expression can appear at different depths. Keep the + // original depth bound even when its value is already known. + if let Some(&value) = resolved.get(&(v, depth)) { + return Some(value); + } let (bits, int) = match self.types[self.type_of(v).0 as usize] { TypeDef::Int(bits) if bits <= 32 => (bits, true), TypeDef::Float => (32, false), @@ -343,7 +348,10 @@ impl Module { }, V::Inst(i) => match self.insts[i as usize].op { Op::Bin(op, a, b) if int => { - let (a, b) = (self.known_int(a, depth)?, self.known_int(b, depth)?); + let (a, b) = ( + self.known_int(a, depth, resolved)?, + self.known_int(b, depth, resolved)?, + ); let signed = |x: u32| ((x << (32 - bits)) as i32) >> (32 - bits); match op { Bin::Add => a.wrapping_add(b), @@ -364,25 +372,29 @@ impl Module { TypeDef::Float if op == Cast::Bitcast => 32, _ => return None, }; - let y = self.known_int(x, depth)?; + let y = self.known_int(x, depth, resolved)?; match op { Cast::Trunc | Cast::ZExt | Cast::Bitcast => y & u32::MAX >> (32 - from), Cast::SExt => (((y << (32 - from)) as i32) >> (32 - from)) as u32, _ => return None, } } - Op::Select(cond, t, f) => match self.known_int(cond, depth) { - Some(c) => self.known_int(if c & 1 != 0 { t } else { f }, depth)?, + Op::Select(cond, t, f) => match self.known_int(cond, depth, resolved) { + Some(c) => self.known_int(if c & 1 != 0 { t } else { f }, depth, resolved)?, None => { - let t = self.known_int(t, depth)?; - (Some(t) == self.known_int(f, depth)).then_some(t)? + let t = self.known_int(t, depth, resolved)?; + (Some(t) == self.known_int(f, depth, resolved)).then_some(t)? } }, _ => return None, }, _ => return None, }; - Some(x & mask) + let value = x & mask; + if matches!(v, V::Inst(_)) { + resolved.insert((v, depth), value); + } + Some(value) } /// Gives constant `old` the content of `new` (both stay valid). @@ -1281,6 +1293,30 @@ impl Writer { mod tests { use super::*; + #[test] + #[ignore = "synthetic constant analysis benchmark"] + fn constant_analysis_of_shared_subexpressions() { + let mut module = Module::default(); + let block = module.new_block(); + let one = module.i32(1); + let mut value = one; + for _ in 0..15 { + let left = module.bin(block, Bin::Add, value, one); + let right = module.bin(block, Bin::Sub, value, one); + value = module.bin(block, Bin::Add, left, right); + } + let mut samples = [std::time::Duration::ZERO; 21]; + for sample in &mut samples { + let start = std::time::Instant::now(); + let result = std::hint::black_box(&module).known_i32(std::hint::black_box(value)); + *sample = start.elapsed(); + // The expression should be known and double on every iteration. + assert_eq!(result, Some(1 << 15)); + } + samples.sort_unstable(); + eprintln!("shared subexpressions: median {} ns", samples[10].as_nanos()); + } + #[test] fn vbr_and_blocks() { let mut w = Writer::default(); From 8b25498deefb32e0e3ca9746ecb7f7ca3c0ea3fb Mon Sep 17 00:00:00 2001 From: AxizDesign <169168492+AxizDesign@users.noreply.github.com> Date: Thu, 26 Nov 2026 15:06:14 +0700 Subject: [PATCH 6/7] Record Blackwell validation and performance measurements --- BENCHMARKS.md | 33 +++++++++++++++++++++++++++++++++ BUILD_INSTRUCTIONS.md | 12 ++++++++---- DEVELOPMENT_LOG.md | 8 +++++++- KNOWN_ISSUES.md | 5 +++-- NVIDIA_COMPATIBILITY.md | 6 ++++-- OPTIMIZATION_MATRIX.md | 9 ++++++++- ROADMAP.md | 4 +++- 7 files changed, 66 insertions(+), 11 deletions(-) diff --git a/BENCHMARKS.md b/BENCHMARKS.md index 8df1e2000e..2e91bf5f44 100644 --- a/BENCHMARKS.md +++ b/BENCHMARKS.md @@ -42,3 +42,36 @@ On a hybrid system, confirm from the process or GPU capture that both builds use Gameplay and user-reported captures are pending. The synthetic copy example does not measure rendering or GPU utilization. For an analyzer smoke test, a generated 1,000-interval CSV with 999 intervals of 20 ms and one of 100 ms yielded 49.801 average FPS, 50.000 median FPS, 35.714 and 10.000 for the two lows, and one budget miss and stutter. This fixture only checks arithmetic. + +## D3D12 heap creation on RTX 5070 Ti Laptop GPU + +```powershell +$env:VICTORY_D3D12_NVIDIA='1' +cargo test --release --locked -p victory-gpu host_heap_creation_throughput -- --ignored --nocapture +``` + +The Release harness discards one warm-up and times 21 sequential heap creations per case, with destruction outside each timed interval. The earlier candidate was measured with only the benchmark attached. Times are median / P90 in microseconds. + +| Title descriptors | Previous candidate | Bounded heap | With reusable null template | +| --- | ---: | ---: | ---: | +| 128 samplers | 893 / 954 | 951 / 1,059 | 355 / 395 | +| 4,096 views | 3,260 / 3,489 | 8,735 / 8,860 | 7,854 / 8,100 | +| 262,144 views | 5,924 / 6,179 | 9,889 / 10,017 | 8,939 / 9,175 | + +The bounded heap backs all one million addressable slots and costs more to initialize than the older undersized heap. Reusing the immutable CPU template reduces median initialization 10–63% relative to the bounded heap alone. The new stride and write-mark buffers request 12,000,000 bytes total per view heap, down from 25,165,824 bytes for these title sizes. These are buffer sizes, with process RAM and dedicated VRAM residency still unmeasured. + +## Shared constant expressions in the DXIL emitter + +The Release benchmark `constant_analysis_of_shared_subexpressions` builds a 15-level expression graph outside the timed interval, checks the result against the CPU formula and reports the median of 21 evaluations. With KainanP's constant-dot lowering as the baseline, caching proven values by instruction and remaining depth reduced the median from **1,001,400 ns** to **2,600 ns** on the Intel Core Ultra 9 275HX. This tests repeated visits to a shared expression graph. It does not estimate a title's total shader or PSO compilation time. + +## Experimental native FP16 on Blackwell + +Separate checkout at [upstream PR #2825](https://github.com/Marvisak/VIctory/pull/2825), head `47078d7f3cb90335ec6efc921ef8f3f3ce4d178c`, with the NVIDIA test-adapter selector applied. Rust 1.98.1 Release, Windows 11 build 26300, RTX 5070 Ti Laptop GPU, driver 621.14. The PR's `translated_f16_math_costs` harness reports GPU timestamps for synthetic dependent arithmetic chains and compares results per thread. + +| Instruction chain | f32 path | Native f16 | Speedup | +| --- | ---: | ---: | ---: | +| Packed f16 FMA | 8.376 ms | 0.630 ms | 13.3× | +| Scalar f16 FMA | 4.636 ms | 0.630 ms | 7.4× | +| f16 multiply + add | 3.682 ms | 0.133 ms | 27.6× | + +Each comparison matched all 262,144 threads. Four focused native-path correctness tests passed. This experiment uses the PR's timing protocol and has no rendering or frame-pacing measurements. The shipped candidate keeps its existing f16 path. diff --git a/BUILD_INSTRUCTIONS.md b/BUILD_INSTRUCTIONS.md index f3cca0cb08..9dac832a4d 100644 --- a/BUILD_INSTRUCTIONS.md +++ b/BUILD_INSTRUCTIONS.md @@ -15,8 +15,9 @@ See the [architecture](docs/architecture.md) and [asset policy](docs/asset-polic | Profile | Local artifact | Source | | --- | --- | --- | | Pinned upstream release | `target/baseline/63bcca4/victory.exe` | `63bcca43c6a00a758510398fa43096ce7e4f7df0` | -| Candidate release | `target/release/victory.exe` | `7dd9a868959d6389596a1824e04a199c474ab630` | -| Candidate diagnostics | `target/diag/victory.exe` | `7dd9a868959d6389596a1824e04a199c474ab630` | +| Previous candidate release | `target/baseline/0b366c6b/victory.exe` | `7dd9a868959d6389596a1824e04a199c474ab630` | +| Previous candidate diagnostics | `target/diag/victory.exe` | `7dd9a868959d6389596a1824e04a199c474ab630` | +| Blackwell candidate release | `target/validated/01806bde/victory.exe` | `01806bde5bf056557637b7e629f5aedb1ff0dc60` | The local builds dated 2026-11-26 retain matching PDB files. They depend on Windows D3D12 for GPU operation. The diagnostics profile adds instrumentation and should be used separately from release frame-pacing captures. @@ -25,5 +26,8 @@ SHA-256 values for the local executables: | Artifact | SHA-256 | | --- | --- | | Baseline release | `303520a2e0ef216abb5192e0c9426fec2fbf113e6bcead52235f1ed6f032884e` | -| Candidate release | `9e4abb9b66d9902c939350a061d8b39728bf7fb798ac6c2b3614327fadffc1e8` | -| Candidate diagnostics | `46e45b40ddba98ea0e2ca7677af37e2ef9c91ed44219805a331680c6b74a5cf6` | +| Previous candidate release | `9e4abb9b66d9902c939350a061d8b39728bf7fb798ac6c2b3614327fadffc1e8` | +| Previous candidate diagnostics | `46e45b40ddba98ea0e2ca7677af37e2ef9c91ed44219805a331680c6b74a5cf6` | +| Blackwell candidate release | `8a89b1164c54f987ac805060fdd0fa967834bd59d1287cfeed729a6502805d1e` | + +For the hybrid laptop, set `$env:VICTORY_D3D12_NVIDIA='1'` before launching the candidate or running the workspace tests against the RTX. diff --git a/DEVELOPMENT_LOG.md b/DEVELOPMENT_LOG.md index b23e1d1b03..65abffc479 100644 --- a/DEVELOPMENT_LOG.md +++ b/DEVELOPMENT_LOG.md @@ -8,4 +8,10 @@ - Identified the default Intel adapter on the hybrid laptop and added opt-in NVIDIA selection in `7dd9a868`. The opt-in test checked the actual device LUID. See [NVIDIA compatibility](NVIDIA_COMPATIBILITY.md). - Both release variants compiled and passed CLI smoke tests. Clippy passed with default and all features. The baseline and NVIDIA-opt-in candidate workspace runs reported the same five failed tests, with 867 and 872 passes respectively in the Cargo logs, including the nested fixture runner. See [known issues](KNOWN_ISSUES.md). -Work branch is `codex/texture-copy`. The compiled source commit is `7dd9a868`. The following documentation commit records the baseline and validation. The next engineering milestone is to isolate descriptor heap sizing and shader test failures on the target GPU. +### Blackwell follow-up + +- Saved the starting Release executable and PDB under `target/baseline/0b366c6b`. +- Aligned descriptor heap sizes with the translator bound, retained the original assertions, and measured reusable null templates on the RTX. The descriptor work extends `codex/texture-copy`. +- Stacked `codex/blackwell-shaders` on the descriptor branch. It adds constant-dot fixes and bounded memoization, identifies the validation adapter, initializes the mandatory root dword and corrects the gather input view. The compiled source is `01806bde`. +- Verified that all five original problem tests run successfully on the RTX. The remaining structured read failure also reproduced on the preserved baseline with only the test-adapter selector applied. The zero-count root-constant crash reproduced there as well and the current dispatch passes. +- Measured native FP16 in a separate source checkout. See [benchmarks](BENCHMARKS.md) for GPU timestamps, memory calculations and the shader compilation microbenchmark. diff --git a/KNOWN_ISSUES.md b/KNOWN_ISSUES.md index 5b235f5b25..cc1ff66147 100644 --- a/KNOWN_ISSUES.md +++ b/KNOWN_ISSUES.md @@ -1,7 +1,8 @@ # Known issues - Upstream CPU texture and descriptor behavior can be tested with generated fixtures. Representative gameplay timing, image fidelity, the dominant frame bottleneck and sustained stability remain unmeasured on the target system. -- Upstream `dynamic_slots_are_held_until_released` asserts that the actual host heap reaches `HEAP_VIEWS`. `lists_share_a_table_and_copies_keep_their_views` asserts that allocated pairs are past a hard-coded dynamic slot boundary. Both failed on the pinned machine before the texture change. Investigate the host-dependent heap sizing and where the shader gets its index bound together. [Upstream NVIDIA descriptor-limit report](https://github.com/Marvisak/VIctory/issues/1835) -- Three other upstream hardware tests failed before the texture change. The null-buffer dispatch and 64-bit image atomic tests returned an invalid parameter error. The hardware fused dot-product test returned a different result bit pattern. These paths need independent adapter and capability checks. +- Both inherited descriptor assertions and the null-buffer dispatch pass with a shared one-million-slot bound and reserved null views. The runtime still truncates guest heaps larger than its supported title range. Detect and remap oversized title ranges before relying on those descriptors. [Upstream NVIDIA descriptor-limit report](https://github.com/Marvisak/VIctory/issues/1835) +- The typed 64-bit atomic test runs unchanged and passes on RTX and WARP. Running the hardware leg on the Intel adapter produces a capability error because the device reports no support for typed 64-bit atomics. Runtime feature gating already handles that capability. +- `a_heap_buffer_read_by_element_takes_the_views_stride` remains a reproducible NVIDIA failure, including on the preserved baseline with only the adapter selector applied. The read uses the wrong elements through a structured view and returns zeros for later lanes. A fix must preserve logical stride, bounds, write tracking and placement alignment when changing the host view kind. [Upstream raw-structured proposal](https://github.com/Marvisak/VIctory/pull/2178) - The repository's [asset policy](docs/asset-policy.md) identifies the inherited BCPack table as outside the upstream GPL license. The candidate adds source and synthetic measurement tooling. The local executable retains the upstream dependency and is kept local. - External reports include GPU device removal entering the world on other NVIDIA setups. A synthetic texture throughput result cannot resolve that issue. [Upstream RTX 5070 Ti report](https://github.com/Marvisak/VIctory/issues/1216) diff --git a/NVIDIA_COMPATIBILITY.md b/NVIDIA_COMPATIBILITY.md index cac15d3bef..c687ebd4c4 100644 --- a/NVIDIA_COMPATIBILITY.md +++ b/NVIDIA_COMPATIBILITY.md @@ -4,12 +4,14 @@ Local discovery on 2026-11-26 found an NVIDIA GeForce RTX 5070 Ti Laptop GPU wit A local D3D12 API probe opened the RTX explicitly. It returned Shader Model 6.8 (probe ceiling), resource binding tier 3, 32-lane waves, native 16-bit shader operations, raytracing tier 1.2, mesh shader tier 1, and a point-in-time DXGI local-memory budget of 11,176 MiB. NVIDIA SMI reported compute capability 12.0. -The default D3D12 adapter resolved to Intel Graphics in the probe. Set `VICTORY_D3D12_NVIDIA=1` for Axiz-VIctory to try compatible NVIDIA adapters in DXGI order. Mode selection is once per process. The log names the NVIDIA adapter when selected and reports fallback to the system default when none can be used. The diagnostics WARP switch takes precedence. Shader crate hardware tests use their own adapter selection. +The default D3D12 adapter resolved to Intel Graphics in the probe. Set `VICTORY_D3D12_NVIDIA=1` for Axiz-VIctory to try compatible NVIDIA adapters in DXGI order. The runtime log names the adapter when selected and reports fallback to the system default when none can be used. The diagnostics WARP switch takes precedence. Shader validation now honors the same NVIDIA preference and prints the actual hardware adapter in tests. The RTX returned true for both typed-resource and descriptor-heap 64-bit atomics. Intel returned false for the typed-resource capability. The CPU is an x86-64 Intel Core Ultra 9 275HX with 24 cores and 24 logical processors. Windows 11 Pro is build 26300. The OS reports 33,752,997,888 bytes of physical memory. Drive C had about 300 GiB free. The automatically managed pagefile showed a 2 GiB allocation and zero reported use at inspection. Git 2.56.1 and GitHub CLI 2.105.0 were available, and authenticated GitHub API and HTTPS fetch succeeded. Cargo, rustc, MSVC, the Windows SDK, DXDiag, Vulkaninfo, NVIDIA SMI and Windows Performance Recorder were available. Nsight Graphics and Nsight Systems were not found on PATH or in the standard NVIDIA installation directory checked. -The texture-copy path changes host CPU work. Shader execution, occupancy, register pressure, queues, VRAM residency and pipeline behavior require adapter-specific captures before choosing an NVIDIA profile. The upstream runtime queries D3D12 capabilities in `crates/victory-gpu/src/host.rs`. +Wave32 is the only wave size reported by the RTX. Shader Model 6.6 validates required wave sizes when creating a pipeline, so changing the guest wave width requires checking cross-lane and mask semantics. Native FP16 also needs a runtime fused-rounding probe, correct fallbacks for output modifiers and distinct translation cache keys. The external experiment uses those checks. See [benchmarks](BENCHMARKS.md) for measured compute-chain results. [Wave size specification](https://microsoft.github.io/DirectX-Specs/d3d/HLSL_SM_6_6_WaveSize.html) · [Typed and heap atomics specification](https://microsoft.github.io/DirectX-Specs/d3d/HLSL_SM_6_6_Int64_and_Float_Atomics.html) + +Occupancy, register pressure, queue stalls, VRAM residency and pipeline behavior still require representative captures. The runtime queries D3D12 capabilities in `crates/victory-gpu/src/host.rs`. [NVIDIA RTX 50 Series Laptop specifications](https://www.nvidia.com/en-gb/geforce/laptops/50-series/) diff --git a/OPTIMIZATION_MATRIX.md b/OPTIMIZATION_MATRIX.md index df024189cb..a910c3d4c8 100644 --- a/OPTIMIZATION_MATRIX.md +++ b/OPTIMIZATION_MATRIX.md @@ -31,7 +31,14 @@ The eight fetched heads declare GPL-3.0-or-later in their workspace manifests. V | VRAM, rendering, streaming | Steenax6, [83e2ba51](https://github.com/Steenax6/VIctory-NVID/commit/83e2ba51) | Start sampling at the first available level while textures stream in. | Verify fallback, binding clamps and image correctness with authorized workloads. Avoid forced mip dropping in default profiles. | Experimental | | VRAM, RAM, graphics API overhead | uiliannn, [e40fba44](https://github.com/uiliannn/VItoriaBr/commit/e40fba44) | Dynamic descriptors within a capped heap. | D3D12. Compare with upstream's capacity calculation and shader index clamps. Verify no overlaps, rollover or early release. | Under investigation | | Stability, error handling | Axiz-VIctory, `7dd9a868` | Opt-in NVIDIA D3D12 adapter selection avoids unintended use of integrated graphics on hybrid systems. | DXGI enumeration and feature-level 12_0. Verified the actual runtime device LUID on the RTX 5070 Ti Laptop GPU. | Validated for adapter selection | -| GPU, shader execution | 0xkn0wh3r3, [47078d7](https://github.com/Marvisak/VIctory/pull/2825) | Emit native half arithmetic when the device supports it. PR reports a focused RTX 5070 Ti result. | Inspect D3D12 capability gating, floating-point edge cases, DXIL validation and fallback. No gameplay benefit assumed. | Discovered | +| GPU, shader execution | 0xkn0wh3r3, [47078d7](https://github.com/Marvisak/VIctory/pull/2825) | Emit native half arithmetic on devices that pass the capability and fused-rounding checks. GPL-3.0-or-later source tested in a separate checkout. | Three synthetic RTX chains ran 7.4–27.6× faster and matched per-thread outputs. Preserve output-modifier fallback and cache-key separation. See [benchmarks](BENCHMARKS.md). | Experimental | | Shader compilation and cache | [Upstream #1844](https://github.com/Marvisak/VIctory/issues/1844) | Investigate whether host wave settings affect cache identity across adapters. | Check current key fields, invalidate only when generation inputs change, and test cold versus warm bytes. | Under investigation | | Pipeline cache, filesystem I/O | [Upstream architecture](https://github.com/Marvisak/VIctory/blob/63bcca43c6a00a758510398fa43096ce7e4f7df0/docs/architecture.md) | Existing content-addressed shader cache and D3D12 pipeline library. Measure startup cache hits, conversion work and disk reads separately. | Pipeline library is adapter/driver dependent. Compare cold/warm captures with the same inputs. | Discovered | | Frame pacing, stability, error handling | Axiz-VIctory, `e04aea17` | Offline interval summary exposes budget misses and tail latency. Runtime diagnostics already capture device removal and submission timing. | One exported interval per frame. Separate release capture from diagnostic instrumentation. | Implemented | +| VRAM, RAM, descriptors | pes7, [541a3203](https://github.com/Marvisak/VIctory/pull/2683), and Axiz-VIctory `f5a13995` | Portable one-million-slot bound shared by shaders and host heaps, reserved null slots and pairs. GPL-3.0-or-later. | Original failing assertions pass. Full initialization costs more for small view heaps, while stride and mark buffers shrink. Oversized guest heaps still need remapping. | Validated | +| CPU, D3D12 allocation | Axiz-VIctory `6f19b2f4` | Reuse immutable CPU-only null templates per heap type, with a sampler-sized template. | Distinct destination heaps, initialization serialized once per template. Benchmarked both heap types. | Validated | +| Shader correctness | KainanP, [9ea9e00d](https://github.com/Marvisak/VIctory/pull/2408), GPL-3.0-or-later | Lower constant packed dot operands into wrapping signed byte operations. Dynamic operands still use packed hardware dot. | Original FSPX fixture passes on the Intel and NVIDIA adapters. Added constant equivalence tests with input classes from the PR. | Validated | +| Shader compilation, CPU | Axiz-VIctory `01806bde` | Memoize proven constant values for repeated DXIL subexpressions at the same remaining analysis depth. | Retains the depth bound and evaluation semantics. Compare the same graph before and after. | Validated | +| Shader validation | Bullet18x, [9c6e0942](https://github.com/Marvisak/VIctory/pull/2323), GPL-3.0-or-later | Provide a raw view to a test using byte-addressed gather inputs. | Fixture matches the translated shader contract and retains the per-lane output assertions. | Validated | +| RAM and allocation | 0xKaji, [98c38907](https://github.com/Marvisak/VIctory/pull/2971), GPL-3.0-or-later | Sparse host-slot tables and deferred upload buffers. | Evaluate hot-path lookup cost and lifetime handling after resolving structured views. | Under investigation | +| Shader execution, buffer bindings | Nikita Romanovich, [319749e4](https://github.com/Marvisak/VIctory/pull/2178), GPL-3.0-or-later | Back structured guest buffers with raw host views and explicitly compute byte offsets. | Prototype needs tests for bounds, descriptor format, copy alignment and cache separation. The original failing stride assertion stays enabled. | Under investigation | diff --git a/ROADMAP.md b/ROADMAP.md index abb0da6476..7f971bd5fe 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,8 +1,10 @@ # Roadmap 1. Retain the pinned upstream release and verify changes with synthetic fixtures and the Windows test suite. -2. Reproduce and isolate the descriptor heap and shader failures on the RTX 5070 Ti Laptop GPU. Track the host heap capacity and shader index range together. +2. Resolve the remaining structured buffer read on RTX 5070 Ti Laptop GPU. Test raw-backed views against the existing stride oracle, including typed and writable views, overlaps, alignment and cache invalidation. 3. Capture comparable baseline and candidate runs on an authorized workload. Use release for FPS, then collect CPU, GPU, residency and copy diagnostics on separate runs to identify the dominant cost. 4. Work toward sustained 5, 10, 15, 20, 25 and 30 FPS on the same representative route. Skip demonstrated thresholds. At 30 FPS, inspect the distribution around 33.333 ms, outliers and sustained stability as well as the mean. Candidate areas after profiling include texture upload and copy-back, pipeline creation and cache reuse, descriptor lifetime, and CPU/GPU synchronization. Keep each change independently reviewable. + +Gate native FP16 behind an experimental option before measuring it in a representative workload. Retain the fused-rounding and output-modifier checks and compare independent shader and pipeline cache results. From 4263a2c84e00521aae4c4d8961bb3bdd05d469d7 Mon Sep 17 00:00:00 2001 From: AxizDesign <169168492+AxizDesign@users.noreply.github.com> Date: Thu, 26 Nov 2026 15:10:24 +0700 Subject: [PATCH 7/7] Record the completed NVIDIA Release regression run --- DEVELOPMENT_LOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/DEVELOPMENT_LOG.md b/DEVELOPMENT_LOG.md index 65abffc479..1b741f1904 100644 --- a/DEVELOPMENT_LOG.md +++ b/DEVELOPMENT_LOG.md @@ -14,4 +14,5 @@ - Aligned descriptor heap sizes with the translator bound, retained the original assertions, and measured reusable null templates on the RTX. The descriptor work extends `codex/texture-copy`. - Stacked `codex/blackwell-shaders` on the descriptor branch. It adds constant-dot fixes and bounded memoization, identifies the validation adapter, initializes the mandatory root dword and corrects the gather input view. The compiled source is `01806bde`. - Verified that all five original problem tests run successfully on the RTX. The remaining structured read failure also reproduced on the preserved baseline with only the test-adapter selector applied. The zero-count root-constant crash reproduced there as well and the current dispatch passes. +- The full Release workspace run with NVIDIA selected recorded 878 passes, one failure and 13 ignored tests, excluding the nested fixture runner. All-features Clippy passed. The single failing shader assertion remained enabled. - Measured native FP16 in a separate source checkout. See [benchmarks](BENCHMARKS.md) for GPU timestamps, memory calculations and the shader compilation microbenchmark.