mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-12-03 04:03:32 +00:00
Fix data packing functions on MSL (#1637)
* Fix data packing functions on MSL `snorm` and `unorm` got mixed up. * Fix bits.msl
This commit is contained in:
parent
1d0f484b37
commit
6aca3e0b36
@ -1207,10 +1207,10 @@ impl<W: Write> Writer<W> {
|
||||
Mf::FindLsb => "",
|
||||
Mf::FindMsb => "",
|
||||
// data packing
|
||||
Mf::Pack4x8snorm => "pack_float_to_unorm4x8",
|
||||
Mf::Pack4x8unorm => "pack_float_to_snorm4x8",
|
||||
Mf::Pack2x16snorm => "pack_float_to_unorm2x16",
|
||||
Mf::Pack2x16unorm => "pack_float_to_snorm2x16",
|
||||
Mf::Pack4x8snorm => "pack_float_to_snorm4x8",
|
||||
Mf::Pack4x8unorm => "pack_float_to_unorm4x8",
|
||||
Mf::Pack2x16snorm => "pack_float_to_snorm2x16",
|
||||
Mf::Pack2x16unorm => "pack_float_to_unorm2x16",
|
||||
Mf::Pack2x16float => "",
|
||||
// data unpacking
|
||||
Mf::Unpack4x8snorm => "unpack_snorm4x8_to_float",
|
||||
|
@ -24,13 +24,13 @@ kernel void main_(
|
||||
f2_ = metal::float2(0.0);
|
||||
f4_ = metal::float4(0.0);
|
||||
metal::float4 _e28 = f4_;
|
||||
u = metal::pack_float_to_unorm4x8(_e28);
|
||||
u = metal::pack_float_to_snorm4x8(_e28);
|
||||
metal::float4 _e30 = f4_;
|
||||
u = metal::pack_float_to_snorm4x8(_e30);
|
||||
u = metal::pack_float_to_unorm4x8(_e30);
|
||||
metal::float2 _e32 = f2_;
|
||||
u = metal::pack_float_to_unorm2x16(_e32);
|
||||
u = metal::pack_float_to_snorm2x16(_e32);
|
||||
metal::float2 _e34 = f2_;
|
||||
u = metal::pack_float_to_snorm2x16(_e34);
|
||||
u = metal::pack_float_to_unorm2x16(_e34);
|
||||
metal::float2 _e36 = f2_;
|
||||
u = as_type<uint>(half2(_e36));
|
||||
metal::uint _e38 = u;
|
||||
|
Loading…
Reference in New Issue
Block a user