mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-29 09:34:09 +01:00
* Implement lexing for all WGSL number literal types * Move number literal test cases * Adjust tests to match WGSL spec on number literals Suffixes are not type names and currently only a plain `u` is supported for uints. More specifically, `i` and `f` suffixes or suffixes with widths in bits like `u32` are not supported at the moment. * Add more tests for invalid number literal suffixes * Replace code too new for Rust 1.43 * Implement parsing for hexadecimal integers * Switch to enum number types, and Bytes for width * Check for negative and leading zeros in int literals * Implement parsing of hex floats with hexf-parse * Update error message tests * Update snapshot test output files * Clean up lexer state machine code * Clean up unexpected token error code * Move number literal parsing to own submodule
24 lines
511 B
GLSL
24 lines
511 B
GLSL
#version 300 es
|
|
|
|
precision highp float;
|
|
precision highp int;
|
|
|
|
struct VertexOutput {
|
|
vec2 uv;
|
|
vec4 position;
|
|
};
|
|
|
|
layout(location = 0) in vec2 _p2vs_location0;
|
|
layout(location = 1) in vec2 _p2vs_location1;
|
|
smooth out vec2 _vs2fs_location0;
|
|
|
|
void main() {
|
|
vec2 pos = _p2vs_location0;
|
|
vec2 uv = _p2vs_location1;
|
|
VertexOutput _tmp_return = VertexOutput(uv, vec4((1.2000000476837158 * pos), 0.0, 1.0));
|
|
_vs2fs_location0 = _tmp_return.uv;
|
|
gl_Position = _tmp_return.position;
|
|
return;
|
|
}
|
|
|