Shaders: normalized buffer codes give the nearest float, cube gradients take DXIL's base-2 logarithm, d16 data of integer views keeps its bits, unordered views of vertex programs are declared

- VIctory da82e444: the host's division was a step off for some codes, and a
  material index cut from one was the code below.
- DexNom/VIctory 921d8d3b (its cube part, with its test): the level was taken
  from a natural logarithm DXIL does not have, 1.44 times too high; the
  instruction's least level was lost.
- VIctory 4243a96a, for buffers a program picks from the heap.
- VIctory a1a2077a.
Every shader is translated anew.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-25 10:50:14 -06:00
1 parent 1cfc476831
commit 31f662bc9b
9 files changed
+501 -36

No files matched your search

@@ -162,13 +162,19 @@ fn build(
wide: bool,
descriptor: Descriptor,
) -> Result<(HostShader, resource::Resources), ShaderError> {
let native = native(&program(wide, descriptor));
build_compute_shader(&native(&program(wide, descriptor)))
}
/// `native`, a compute program, translated (the tests' own way: no container).
pub(super) fn build_compute_shader(
native: &NativeProgram,
) -> Result<(HostShader, resource::Resources), ShaderError> {
let p = ir::build(&native.code, native.wave64, native.vgprs).expect("ir::build");
let st = structure::structure(&p).expect("structure");
let res = resource::track(&p, &native.layout, native.stage, Some(&st))?;
let io = io::raise(&p, &native).expect("io::raise");
let io = io::raise(&p, native).expect("io::raise");
let lowered = lower::lower(&lower::Parts {
native: &native,
native,
p: &p,
st: &st,
io: &io,