Passing SPIR-V shaders to naga and back alters their effects.
For example see this fragment shader used to paint a 2d normal distribution.
https://github.com/HeroicKatora/stealth-paint/blob/wgpu-0.10/src/shaders/distribution_normal2d.frag
We paint over a screen-filling quad (uv = [0; 1]×[0; 1]). With parameters
let u_fragmentParams_std140: &[f32; 13] = &[
0.0, 0.0, 0.0, 0.0,
100.080055, 99.83977, 0.0, 0.0,
99.83977, 99.6012, 0.0, 0.0,
0.031466257
]
Expected:

Actual:

With parameters
let u_fragmentParams_std140: &[f32; 13] = &[
0.0, 0.0, 0.0, 0.0,
5.0, 0.0, 0.0, 0.0,
0.0, 5.0, 0.0, 0.0,
1.5791368]
Expected:

Actual:

Additional information
Reproduce: Run the test suite here.
# Enables SPIR-V passthrough, works okay.
STEALTH_PAINT_PASSTHROUGH=1 STEALTH_PAINT_BLESS=1 cargo test
# Goes through Naga, fails
STEALTH_PAINT_BLESS=1 cargo test
There is a cryptic, reappearing validation error that seems to be unrelated.
[2021-09-20T07:51:41Z ERROR wgpu_core::validation] Unexpected varying type: Array { base: [1], size: Constant([11]), stride: 4 }
Passing SPIR-V shaders to naga and back alters their effects.
For example see this fragment shader used to paint a 2d normal distribution.
https://github.com/HeroicKatora/stealth-paint/blob/wgpu-0.10/src/shaders/distribution_normal2d.frag
We paint over a screen-filling quad (uv = [0; 1]×[0; 1]). With parameters
Expected:

Actual:

With parameters
Expected:

Actual:

Additional information
Reproduce: Run the test suite here.
There is a cryptic, reappearing validation error that seems to be unrelated.