I use wgpu 0.6.2 from crates.io and https://github.com/gfx-rs/wgpu-rs/blob/v0.6/examples/hello-triangle/main.rs as a basis
changes in main.rs:
vertex_state: wgpu::VertexStateDescriptor {
index_format: wgpu::IndexFormat::Uint16,
vertex_buffers: &[wgpu::VertexBufferDescriptor {
stride: 2 * 2,
step_mode: wgpu::InputStepMode::Vertex,
attributes: &wgpu::vertex_attr_array![0 => Ushort2Norm], // Float2 works without error
}],
},
shader.vert:
#version 450
layout(location = 0) in vec2 a_TexCoord;
layout(location = 0) out vec2 v_TexCoord;
void main() { v_TexCoord = a_TexCoord; }
// void main() { } // works without error
shader.frag:
#version 450
layout(location = 0) out vec4 outColor;
layout(location = 0) in vec2 v_TexCoord;
void main() { outColor = vec4(1.0, 0.0, 0.0, 1.0); }
thread 'main' panicked at 'error in stage VERTEX: error matching the stage input at 0 against the previous stage outputs: input type is not compatible with the provided', /home/lain/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.6.2/src/backend/direct.rs:1355:35
Looks like issue in naga.
$ glslc --version
2020.3
2020.4
11.0.0
Target: SPIR-V 1.0
$ rustc --version
rustc 1.50.0-nightly (fe982319a 2020-11-19)
Seems to validate fine in master. Naga integration has gone a long way since 0.6 was out.
How do you feel about either moving to master or disabling DeviceDescriptor::shader_validation for now, until we roll out 0.7?
In fact, I moved from the master to 0.6.2 only for the test.
@lain-dono could you confirm if this works as expected for you on master? Just in case, I pushed a commit I was testing in https://github.com/kvark/wgpu-rs/tree/test-ushort2-attrib
Seems to validate fine in
master. Naga integration has gone a long way since 0.6 was out.
How do you feel about either moving tomasteror disablingDeviceDescriptor::shader_validationfor now, until we roll out 0.7?
Maybe a wrong place to ask, but is there some estimation of 0.7 release?
I think we'll start some preparations now, just needed to finish the bind group layout changes that were hanging in the air. Should expect 0.7 to come before the end of the year.
Most helpful comment
I think we'll start some preparations now, just needed to finish the bind group layout changes that were hanging in the air. Should expect 0.7 to come before the end of the year.