fix packSnorm2x16/packUnorm2x16 swap in naga GLSL frontend (#9675)

This commit is contained in:
Trey authored and GitHub committed 2026-06-15 15:01:41 +02:00
1 parent 78b4dfd0cb
commit 1c77f87b0f
3 files changed
+5 -4

No files matched your search

+1
View File
@@ -229,6 +229,7 @@ By @beholdnec in [#8505](https://github.com/gfx-rs/wgpu/pull/8505).
- Added support for `enable wgpu_binding_array;`. By @39ali in [#9298](https://github.com/gfx-rs/wgpu/pull/9298).
- Ability to disable integer division safety checks on Vulkan and Metal. By @kvark in [#9443](https://github.com/gfx-rs/wgpu/pull/9443).
- \[hlsl\] more `matCx2` fixes. By @teoxoy in [#9507](https://github.com/gfx-rs/wgpu/pull/9507).
- Fix `packSnorm2x16` and `packUnorm2x16` swap in the GLSL frontend. By @treylutton in [#9675](https://github.com/gfx-rs/wgpu/pull/9675).
#### Vulkan
+2 -2
View File
@@ -753,8 +753,8 @@ fn inject_standard_builtins(
let fun = match name {
"packSnorm4x8" => MathFunction::Pack4x8snorm,
"packUnorm4x8" => MathFunction::Pack4x8unorm,
"packSnorm2x16" => MathFunction::Pack2x16unorm,
"packUnorm2x16" => MathFunction::Pack2x16snorm,
"packSnorm2x16" => MathFunction::Pack2x16snorm,
"packUnorm2x16" => MathFunction::Pack2x16unorm,
"packHalf2x16" => MathFunction::Pack2x16float,
_ => unreachable!(),
};
+2 -2
View File
@@ -15,9 +15,9 @@ fn main_1() {
let _e30 = f4_;
u = pack4x8unorm(_e30);
let _e32 = f2_;
u = pack2x16unorm(_e32);
u = pack2x16snorm(_e32);
let _e34 = f2_;
u = pack2x16snorm(_e34);
u = pack2x16unorm(_e34);
let _e36 = f2_;
u = pack2x16float(_e36);
let _e38 = u;