mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Add missing GLSL tests
This commit is contained in:
25
tests/out/glsl/interpolate.frag_main.Fragment.glsl
Normal file
25
tests/out/glsl/interpolate.frag_main.Fragment.glsl
Normal file
@@ -0,0 +1,25 @@
|
||||
#version 400 core
|
||||
struct FragmentInput {
|
||||
vec4 position;
|
||||
uint flat_;
|
||||
float linear;
|
||||
vec2 linear_centroid;
|
||||
vec3 linear_sample;
|
||||
vec4 perspective;
|
||||
float perspective_centroid;
|
||||
float perspective_sample;
|
||||
};
|
||||
|
||||
flat in uint _vs2fs_location0;
|
||||
noperspective in float _vs2fs_location1;
|
||||
noperspective centroid in vec2 _vs2fs_location2;
|
||||
noperspective sample in vec3 _vs2fs_location3;
|
||||
smooth in vec4 _vs2fs_location4;
|
||||
smooth centroid in float _vs2fs_location5;
|
||||
smooth sample in float _vs2fs_location6;
|
||||
|
||||
void main() {
|
||||
FragmentInput val = FragmentInput(gl_FragCoord, _vs2fs_location0, _vs2fs_location1, _vs2fs_location2, _vs2fs_location3, _vs2fs_location4, _vs2fs_location5, _vs2fs_location6);
|
||||
return;
|
||||
}
|
||||
|
||||
42
tests/out/glsl/interpolate.vert_main.Vertex.glsl
Normal file
42
tests/out/glsl/interpolate.vert_main.Vertex.glsl
Normal file
@@ -0,0 +1,42 @@
|
||||
#version 400 core
|
||||
struct FragmentInput {
|
||||
vec4 position;
|
||||
uint flat_;
|
||||
float linear;
|
||||
vec2 linear_centroid;
|
||||
vec3 linear_sample;
|
||||
vec4 perspective;
|
||||
float perspective_centroid;
|
||||
float perspective_sample;
|
||||
};
|
||||
|
||||
flat out uint _vs2fs_location0;
|
||||
noperspective out float _vs2fs_location1;
|
||||
noperspective centroid out vec2 _vs2fs_location2;
|
||||
noperspective sample out vec3 _vs2fs_location3;
|
||||
smooth out vec4 _vs2fs_location4;
|
||||
smooth centroid out float _vs2fs_location5;
|
||||
smooth sample out float _vs2fs_location6;
|
||||
|
||||
void main() {
|
||||
FragmentInput out_;
|
||||
out_.position = vec4(2.0, 4.0, 5.0, 6.0);
|
||||
out_.flat_ = 8u;
|
||||
out_.linear = 27.0;
|
||||
out_.linear_centroid = vec2(64.0, 125.0);
|
||||
out_.linear_sample = vec3(216.0, 343.0, 512.0);
|
||||
out_.perspective = vec4(729.0, 1000.0, 1331.0, 1728.0);
|
||||
out_.perspective_centroid = 2197.0;
|
||||
out_.perspective_sample = 2744.0;
|
||||
FragmentInput _e30 = out_;
|
||||
gl_Position = _e30.position;
|
||||
_vs2fs_location0 = _e30.flat_;
|
||||
_vs2fs_location1 = _e30.linear;
|
||||
_vs2fs_location2 = _e30.linear_centroid;
|
||||
_vs2fs_location3 = _e30.linear_sample;
|
||||
_vs2fs_location4 = _e30.perspective;
|
||||
_vs2fs_location5 = _e30.perspective_centroid;
|
||||
_vs2fs_location6 = _e30.perspective_sample;
|
||||
return;
|
||||
}
|
||||
|
||||
26
tests/out/glsl/quad.frag_main.Fragment.glsl
Normal file
26
tests/out/glsl/quad.frag_main.Fragment.glsl
Normal file
@@ -0,0 +1,26 @@
|
||||
#version 300 es
|
||||
|
||||
precision highp float;
|
||||
precision highp int;
|
||||
|
||||
struct VertexOutput {
|
||||
vec2 uv;
|
||||
vec4 position;
|
||||
};
|
||||
|
||||
uniform highp sampler2D _group_0_binding_0;
|
||||
|
||||
smooth in vec2 _vs2fs_location0;
|
||||
layout(location = 0) out vec4 _fs2p_location0;
|
||||
|
||||
void main() {
|
||||
vec2 uv_1 = _vs2fs_location0;
|
||||
vec4 color = texture(_group_0_binding_0, vec2(uv_1));
|
||||
if ((color.w == 0.0)) {
|
||||
discard;
|
||||
}
|
||||
vec4 premultiplied = (color.w * color);
|
||||
_fs2p_location0 = premultiplied;
|
||||
return;
|
||||
}
|
||||
|
||||
23
tests/out/glsl/quad.vert_main.Vertex.glsl
Normal file
23
tests/out/glsl/quad.vert_main.Vertex.glsl
Normal file
@@ -0,0 +1,23 @@
|
||||
#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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user