Files
wgpu/tests/out/quad.Vertex.glsl
Jim Blandy 4f442ff8cc Require binding interpolation to be resolved by the front end.
When validating IR, verify that all `Binding`s for vertex shader outputs and
fragment shader inputs, whether directly in the argument or result, or applied
to a struct member, has specified an interpolation and sampling, not `None`.
This ensures that front ends explicitly state their policies, rather than
coasting through on back ends' default behavior.

In practice, all our front ends have very similar defaults, so provide a utility
function on `Module` to apply these rules. Use this utility function in the
SPIR-V and WGSL front ends; GLSL seems to already fill in interpolation as
required.
2021-04-19 09:42:00 -04:00

22 lines
489 B
GLSL

#version 310 es
precision highp float;
struct VertexOutput {
vec2 uv;
vec4 position;
};
layout(location = 0) in vec2 _p2vs_location0;
layout(location = 1) in vec2 _p2vs_location1;
smooth layout(location = 0) out vec2 _vs2fs_location0;
void main() {
vec2 pos = _p2vs_location0;
vec2 uv1 = _p2vs_location1;
_vs2fs_location0 = VertexOutput(uv1, vec4((1.2 * pos), 0.0, 1.0)).uv;
gl_Position = VertexOutput(uv1, vec4((1.2 * pos), 0.0, 1.0)).position;
return;
}