Fix missing _padding in color conversion pipeline
This commit is contained in:
parent
58e2d0cdcb
commit
482d54118a
2 changed files with 9 additions and 3 deletions
|
|
@ -22,11 +22,18 @@ pub fn convert(
|
|||
struct Ratio {
|
||||
u: f32,
|
||||
v: f32,
|
||||
// Padding field for 16-byte alignment.
|
||||
// See https://docs.rs/wgpu/latest/wgpu/struct.DownlevelFlags.html#associatedconstant.BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED
|
||||
_padding: [f32; 2],
|
||||
}
|
||||
|
||||
let ratio = device.create_buffer_init(&wgpu::util::BufferInitDescriptor {
|
||||
label: Some("iced-wgpu::triangle::msaa ratio"),
|
||||
contents: bytemuck::bytes_of(&Ratio { u: 1.0, v: 1.0 }),
|
||||
contents: bytemuck::bytes_of(&Ratio {
|
||||
u: 1.0,
|
||||
v: 1.0,
|
||||
_padding: [0.0; 2],
|
||||
}),
|
||||
usage: wgpu::BufferUsages::COPY_DST | wgpu::BufferUsages::UNIFORM,
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -254,8 +254,7 @@ impl Targets {
|
|||
struct Ratio {
|
||||
u: f32,
|
||||
v: f32,
|
||||
// Padding field to make Ratio 16 byte aligned
|
||||
//
|
||||
// Padding field for 16-byte alignment.
|
||||
// See https://docs.rs/wgpu/latest/wgpu/struct.DownlevelFlags.html#associatedconstant.BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED
|
||||
_padding: [f32; 2],
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue