Normalize all line endings to LF

And force shader code to always use LF endings.

Post merge, there were a number of files that crept in with CRLF endings.

Some Tint end-to-end tests take objection to CRLF endings.

CRLF endings can be detected with:

```
git grep -I --files-with-matches --perl-regexp '\r' HEAD
```

And fixed with:

```
find . -type f -exec dos2unix {} \;
```

Bug: dawn:1339
Change-Id: Iee054bafd15875de744b86e28393cd8229bd3cfa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86140
Kokoro-Run: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton
2022-04-08 14:18:28 +00:00
committed by Dawn LUCI CQ
parent 6249b24581
commit 4d36557bce
54 changed files with 1248 additions and 1243 deletions

View File

@@ -1,63 +1,63 @@
struct Uniforms {
u_scale : vec2<f32>,
u_offset : vec2<f32>,
};
@binding(0) @group(0) var<uniform> uniforms : Uniforms;
struct VertexOutputs {
@location(0) texcoords : vec2<f32>,
@builtin(position) position : vec4<f32>,
};
@stage(vertex) fn vs_main(
@builtin(vertex_index) VertexIndex : u32
) -> VertexOutputs {
var texcoord = array<vec2<f32>, 3>(
vec2<f32>(-0.5, 0.0),
vec2<f32>( 1.5, 0.0),
vec2<f32>( 0.5, 2.0));
var output : VertexOutputs;
output.position = vec4<f32>((texcoord[VertexIndex] * 2.0 - vec2<f32>(1.0, 1.0)), 0.0, 1.0);
// Y component of scale is calculated by the copySizeHeight / textureHeight. Only
// flipY case can get negative number.
var flipY = uniforms.u_scale.y < 0.0;
// Texture coordinate takes top-left as origin point. We need to map the
// texture to triangle carefully.
if (flipY) {
// We need to get the mirror positions(mirrored based on y = 0.5) on flip cases.
// Adopt transform to src texture and then mapping it to triangle coord which
// do a +1 shift on Y dimension will help us got that mirror position perfectly.
output.texcoords = (texcoord[VertexIndex] * uniforms.u_scale + uniforms.u_offset) *
vec2<f32>(1.0, -1.0) + vec2<f32>(0.0, 1.0);
} else {
// For the normal case, we need to get the exact position.
// So mapping texture to triangle firstly then adopt the transform.
output.texcoords = (texcoord[VertexIndex] *
vec2<f32>(1.0, -1.0) + vec2<f32>(0.0, 1.0)) *
uniforms.u_scale + uniforms.u_offset;
}
return output;
}
@binding(1) @group(0) var mySampler: sampler;
@binding(2) @group(0) var myTexture: texture_2d<f32>;
@stage(fragment) fn fs_main(
@location(0) texcoord : vec2<f32>
) -> @location(0) vec4<f32> {
// Clamp the texcoord and discard the out-of-bound pixels.
var clampedTexcoord =
clamp(texcoord, vec2<f32>(0.0, 0.0), vec2<f32>(1.0, 1.0));
if (!all(clampedTexcoord == texcoord)) {
discard;
}
var srcColor = textureSample(myTexture, mySampler, texcoord);
// Swizzling of texture formats when sampling / rendering is handled by the
// hardware so we don't need special logic in this shader. This is covered by tests.
return srcColor;
}
struct Uniforms {
u_scale : vec2<f32>,
u_offset : vec2<f32>,
};
@binding(0) @group(0) var<uniform> uniforms : Uniforms;
struct VertexOutputs {
@location(0) texcoords : vec2<f32>,
@builtin(position) position : vec4<f32>,
};
@stage(vertex) fn vs_main(
@builtin(vertex_index) VertexIndex : u32
) -> VertexOutputs {
var texcoord = array<vec2<f32>, 3>(
vec2<f32>(-0.5, 0.0),
vec2<f32>( 1.5, 0.0),
vec2<f32>( 0.5, 2.0));
var output : VertexOutputs;
output.position = vec4<f32>((texcoord[VertexIndex] * 2.0 - vec2<f32>(1.0, 1.0)), 0.0, 1.0);
// Y component of scale is calculated by the copySizeHeight / textureHeight. Only
// flipY case can get negative number.
var flipY = uniforms.u_scale.y < 0.0;
// Texture coordinate takes top-left as origin point. We need to map the
// texture to triangle carefully.
if (flipY) {
// We need to get the mirror positions(mirrored based on y = 0.5) on flip cases.
// Adopt transform to src texture and then mapping it to triangle coord which
// do a +1 shift on Y dimension will help us got that mirror position perfectly.
output.texcoords = (texcoord[VertexIndex] * uniforms.u_scale + uniforms.u_offset) *
vec2<f32>(1.0, -1.0) + vec2<f32>(0.0, 1.0);
} else {
// For the normal case, we need to get the exact position.
// So mapping texture to triangle firstly then adopt the transform.
output.texcoords = (texcoord[VertexIndex] *
vec2<f32>(1.0, -1.0) + vec2<f32>(0.0, 1.0)) *
uniforms.u_scale + uniforms.u_offset;
}
return output;
}
@binding(1) @group(0) var mySampler: sampler;
@binding(2) @group(0) var myTexture: texture_2d<f32>;
@stage(fragment) fn fs_main(
@location(0) texcoord : vec2<f32>
) -> @location(0) vec4<f32> {
// Clamp the texcoord and discard the out-of-bound pixels.
var clampedTexcoord =
clamp(texcoord, vec2<f32>(0.0, 0.0), vec2<f32>(1.0, 1.0));
if (!all(clampedTexcoord == texcoord)) {
discard;
}
var srcColor = textureSample(myTexture, mySampler, texcoord);
// Swizzling of texture formats when sampling / rendering is handled by the
// hardware so we don't need special logic in this shader. This is covered by tests.
return srcColor;
}

View File

@@ -1,28 +1,28 @@
// 1112.wgsl
@group(0) @binding(0) var Sampler: sampler;
@group(0) @binding(1) var randomTexture: texture_2d<f32>;
@group(0) @binding(2) var depthTexture: texture_2d<f32>;
@stage(fragment)
fn main(@location(0) vUV : vec2<f32>) -> @location(0) vec4<f32> {
let random: vec3<f32> = textureSample(randomTexture, Sampler, vUV).rgb;
var i = 0;
loop {
if (i < 1) {
} else {
break;
}
let offset : vec3<f32> = vec3<f32>(random.x);
if (offset.x < 0.0 || offset.y < 0.0 || offset.x > 1.0 || offset.y > 1.0) {
i = i + 1;
continue;
}
let sampleDepth : f32 = textureSample(depthTexture, Sampler, offset.xy).r;
i = i + 1;
}
return vec4<f32>(1.0);
}
// 1112.wgsl
@group(0) @binding(0) var Sampler: sampler;
@group(0) @binding(1) var randomTexture: texture_2d<f32>;
@group(0) @binding(2) var depthTexture: texture_2d<f32>;
@stage(fragment)
fn main(@location(0) vUV : vec2<f32>) -> @location(0) vec4<f32> {
let random: vec3<f32> = textureSample(randomTexture, Sampler, vUV).rgb;
var i = 0;
loop {
if (i < 1) {
} else {
break;
}
let offset : vec3<f32> = vec3<f32>(random.x);
if (offset.x < 0.0 || offset.y < 0.0 || offset.x > 1.0 || offset.y > 1.0) {
i = i + 1;
continue;
}
let sampleDepth : f32 = textureSample(depthTexture, Sampler, offset.xy).r;
i = i + 1;
}
return vec4<f32>(1.0);
}

View File

@@ -1,23 +1,23 @@
struct Simulation {
i : u32,
};
struct Particle {
position : array<vec3<f32>, 8>,
lifetime : f32,
color : vec4<f32>,
velocity : vec3<f32>,
};
struct Particles {
p : array<Particle>,
};
@group(1) @binding(3) var<storage, read> particles : Particles;
@group(1) @binding(4) var<uniform> sim : Simulation;
@stage(compute) @workgroup_size(1)
fn main() {
var particle = particles.p[0];
particle.position[sim.i] = particle.position[sim.i];
}
struct Simulation {
i : u32,
};
struct Particle {
position : array<vec3<f32>, 8>,
lifetime : f32,
color : vec4<f32>,
velocity : vec3<f32>,
};
struct Particles {
p : array<Particle>,
};
@group(1) @binding(3) var<storage, read> particles : Particles;
@group(1) @binding(4) var<uniform> sim : Simulation;
@stage(compute) @workgroup_size(1)
fn main() {
var particle = particles.p[0];
particle.position[sim.i] = particle.position[sim.i];
}

View File

@@ -1,12 +1,12 @@
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var m1 : mat2x4<f32>;
m1[uniforms.i][0] = 1.0;
}
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var m1 : mat2x4<f32>;
m1[uniforms.i][0] = 1.0;
}

View File

@@ -1,12 +1,12 @@
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var m1 : mat2x4<f32>;
m1[uniforms.i][uniforms.j] = 1.0;
}
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var m1 : mat2x4<f32>;
m1[uniforms.i][uniforms.j] = 1.0;
}

View File

@@ -1,13 +1,13 @@
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
var<private> m1 : mat2x4<f32>;
@stage(compute) @workgroup_size(1)
fn main() {
m1[0][uniforms.j] = 1.0;
}
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
var<private> m1 : mat2x4<f32>;
@stage(compute) @workgroup_size(1)
fn main() {
m1[0][uniforms.j] = 1.0;
}

View File

@@ -1,12 +1,12 @@
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var m1 : mat2x4<f32>;
m1[uniforms.i] = vec4<f32>(1.0);
}
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var m1 : mat2x4<f32>;
m1[uniforms.i] = vec4<f32>(1.0);
}

View File

@@ -1,13 +1,13 @@
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
var<private> m1 : mat2x4<f32>;
@stage(compute) @workgroup_size(1)
fn main() {
m1[uniforms.i][0] = 1.0;
}
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
var<private> m1 : mat2x4<f32>;
@stage(compute) @workgroup_size(1)
fn main() {
m1[uniforms.i][0] = 1.0;
}

View File

@@ -1,13 +1,13 @@
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
var<private> m1 : mat2x4<f32>;
@stage(compute) @workgroup_size(1)
fn main() {
m1[uniforms.i][uniforms.j] = 1.0;
}
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
var<private> m1 : mat2x4<f32>;
@stage(compute) @workgroup_size(1)
fn main() {
m1[uniforms.i][uniforms.j] = 1.0;
}

View File

@@ -1,13 +1,13 @@
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
var<private> m1 : mat2x4<f32>;
@stage(compute) @workgroup_size(1)
fn main() {
m1[0][uniforms.j] = 1.0;
}
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
var<private> m1 : mat2x4<f32>;
@stage(compute) @workgroup_size(1)
fn main() {
m1[0][uniforms.j] = 1.0;
}

View File

@@ -1,13 +1,13 @@
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
var<private> m1 : mat2x4<f32>;
@stage(compute) @workgroup_size(1)
fn main() {
m1[uniforms.i] = vec4<f32>(1.0);
}
struct Uniforms {
i : u32,
j : u32,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
var<private> m1 : mat2x4<f32>;
@stage(compute) @workgroup_size(1)
fn main() {
m1[uniforms.i] = vec4<f32>(1.0);
}

View File

@@ -1,117 +1,117 @@
struct Scene {
vEyePosition : vec4<f32>,
};
struct Material {
vDiffuseColor : vec4<f32>,
vAmbientColor : vec3<f32>,
dummy: f32,
vEmissiveColor : vec3<f32>,
dummy2: f32,
};
struct Mesh {
visibility : f32,
};
var<private> fClipDistance3 : f32;
var<private> fClipDistance4 : f32;
@group(0) @binding(0) var<uniform> x_29 : Scene;
@group(0) @binding(1) var<uniform> x_49 : Material;
@group(0) @binding(2) var<uniform> x_137 : Mesh;
var<private> glFragColor : vec4<f32>;
fn main_1() {
var viewDirectionW : vec3<f32>;
var baseColor : vec4<f32>;
var diffuseColor : vec3<f32>;
var alpha : f32;
var normalW : vec3<f32>;
var uvOffset : vec2<f32>;
var baseAmbientColor : vec3<f32>;
var glossiness : f32;
var diffuseBase : vec3<f32>;
var shadow : f32;
var refractionColor : vec4<f32>;
var reflectionColor : vec4<f32>;
var emissiveColor : vec3<f32>;
var finalDiffuse : vec3<f32>;
var finalSpecular : vec3<f32>;
var color : vec4<f32>;
let x_9 : f32 = fClipDistance3;
if ((x_9 > 0.0)) {
discard;
}
let x_17 : f32 = fClipDistance4;
if ((x_17 > 0.0)) {
discard;
}
let x_34 : vec4<f32> = x_29.vEyePosition;
let x_38 : vec3<f32> = vec3<f32>(0., 0., 0.);
viewDirectionW = normalize((vec3<f32>(x_34.x, x_34.y, x_34.z) - x_38));
baseColor = vec4<f32>(1.0, 1.0, 1.0, 1.0);
let x_52 : vec4<f32> = x_49.vDiffuseColor;
diffuseColor = vec3<f32>(x_52.x, x_52.y, x_52.z);
let x_60 : f32 = x_49.vDiffuseColor.w;
alpha = x_60;
let x_62 : vec3<f32> = vec3<f32>(0., 0., 0.);
let x_64 : vec3<f32> = vec3<f32>(0., 0., 0.);
normalW = normalize(-(cross(dpdx(x_62), dpdy(x_64))));
uvOffset = vec2<f32>(0.0, 0.0);
let x_74 : vec4<f32> = vec4<f32>(0., 0., 0., 0.);
let x_76 : vec4<f32> = baseColor;
let x_78 : vec3<f32> = (vec3<f32>(x_76.x, x_76.y, x_76.z) * vec3<f32>(x_74.x, x_74.y, x_74.z));
let x_79 : vec4<f32> = baseColor;
baseColor = vec4<f32>(x_78.x, x_78.y, x_78.z, x_79.w);
baseAmbientColor = vec3<f32>(1.0, 1.0, 1.0);
glossiness = 0.0;
diffuseBase = vec3<f32>(0.0, 0.0, 0.0);
shadow = 1.0;
refractionColor = vec4<f32>(0.0, 0.0, 0.0, 1.0);
reflectionColor = vec4<f32>(0.0, 0.0, 0.0, 1.0);
let x_94 : vec3<f32> = x_49.vEmissiveColor;
emissiveColor = x_94;
let x_96 : vec3<f32> = diffuseBase;
let x_97 : vec3<f32> = diffuseColor;
let x_99 : vec3<f32> = emissiveColor;
let x_103 : vec3<f32> = x_49.vAmbientColor;
let x_108 : vec4<f32> = baseColor;
finalDiffuse = (clamp((((x_96 * x_97) + x_99) + x_103), vec3<f32>(0.0, 0.0, 0.0), vec3<f32>(1.0, 1.0, 1.0)) * vec3<f32>(x_108.x, x_108.y, x_108.z));
finalSpecular = vec3<f32>(0.0, 0.0, 0.0);
let x_113 : vec3<f32> = finalDiffuse;
let x_114 : vec3<f32> = baseAmbientColor;
let x_116 : vec3<f32> = finalSpecular;
let x_118 : vec4<f32> = reflectionColor;
let x_121 : vec4<f32> = refractionColor;
let x_123 : vec3<f32> = ((((x_113 * x_114) + x_116) + vec3<f32>(x_118.x, x_118.y, x_118.z)) + vec3<f32>(x_121.x, x_121.y, x_121.z));
let x_124 : f32 = alpha;
color = vec4<f32>(x_123.x, x_123.y, x_123.z, x_124);
let x_129 : vec4<f32> = color;
let x_132 : vec3<f32> = max(vec3<f32>(x_129.x, x_129.y, x_129.z), vec3<f32>(0.0, 0.0, 0.0));
let x_133 : vec4<f32> = color;
color = vec4<f32>(x_132.x, x_132.y, x_132.z, x_133.w);
let x_140 : f32 = x_137.visibility;
let x_142 : f32 = color.w;
color.w = (x_142 * x_140);
let x_147 : vec4<f32> = color;
glFragColor = x_147;
return;
}
struct main_out {
@location(0)
glFragColor_1 : vec4<f32>,
};
@stage(fragment)
fn main(@location(2) fClipDistance3_param : f32, @location(3) fClipDistance4_param : f32) -> main_out {
fClipDistance3 = fClipDistance3_param;
fClipDistance4 = fClipDistance4_param;
main_1();
return main_out(glFragColor);
}
struct Scene {
vEyePosition : vec4<f32>,
};
struct Material {
vDiffuseColor : vec4<f32>,
vAmbientColor : vec3<f32>,
dummy: f32,
vEmissiveColor : vec3<f32>,
dummy2: f32,
};
struct Mesh {
visibility : f32,
};
var<private> fClipDistance3 : f32;
var<private> fClipDistance4 : f32;
@group(0) @binding(0) var<uniform> x_29 : Scene;
@group(0) @binding(1) var<uniform> x_49 : Material;
@group(0) @binding(2) var<uniform> x_137 : Mesh;
var<private> glFragColor : vec4<f32>;
fn main_1() {
var viewDirectionW : vec3<f32>;
var baseColor : vec4<f32>;
var diffuseColor : vec3<f32>;
var alpha : f32;
var normalW : vec3<f32>;
var uvOffset : vec2<f32>;
var baseAmbientColor : vec3<f32>;
var glossiness : f32;
var diffuseBase : vec3<f32>;
var shadow : f32;
var refractionColor : vec4<f32>;
var reflectionColor : vec4<f32>;
var emissiveColor : vec3<f32>;
var finalDiffuse : vec3<f32>;
var finalSpecular : vec3<f32>;
var color : vec4<f32>;
let x_9 : f32 = fClipDistance3;
if ((x_9 > 0.0)) {
discard;
}
let x_17 : f32 = fClipDistance4;
if ((x_17 > 0.0)) {
discard;
}
let x_34 : vec4<f32> = x_29.vEyePosition;
let x_38 : vec3<f32> = vec3<f32>(0., 0., 0.);
viewDirectionW = normalize((vec3<f32>(x_34.x, x_34.y, x_34.z) - x_38));
baseColor = vec4<f32>(1.0, 1.0, 1.0, 1.0);
let x_52 : vec4<f32> = x_49.vDiffuseColor;
diffuseColor = vec3<f32>(x_52.x, x_52.y, x_52.z);
let x_60 : f32 = x_49.vDiffuseColor.w;
alpha = x_60;
let x_62 : vec3<f32> = vec3<f32>(0., 0., 0.);
let x_64 : vec3<f32> = vec3<f32>(0., 0., 0.);
normalW = normalize(-(cross(dpdx(x_62), dpdy(x_64))));
uvOffset = vec2<f32>(0.0, 0.0);
let x_74 : vec4<f32> = vec4<f32>(0., 0., 0., 0.);
let x_76 : vec4<f32> = baseColor;
let x_78 : vec3<f32> = (vec3<f32>(x_76.x, x_76.y, x_76.z) * vec3<f32>(x_74.x, x_74.y, x_74.z));
let x_79 : vec4<f32> = baseColor;
baseColor = vec4<f32>(x_78.x, x_78.y, x_78.z, x_79.w);
baseAmbientColor = vec3<f32>(1.0, 1.0, 1.0);
glossiness = 0.0;
diffuseBase = vec3<f32>(0.0, 0.0, 0.0);
shadow = 1.0;
refractionColor = vec4<f32>(0.0, 0.0, 0.0, 1.0);
reflectionColor = vec4<f32>(0.0, 0.0, 0.0, 1.0);
let x_94 : vec3<f32> = x_49.vEmissiveColor;
emissiveColor = x_94;
let x_96 : vec3<f32> = diffuseBase;
let x_97 : vec3<f32> = diffuseColor;
let x_99 : vec3<f32> = emissiveColor;
let x_103 : vec3<f32> = x_49.vAmbientColor;
let x_108 : vec4<f32> = baseColor;
finalDiffuse = (clamp((((x_96 * x_97) + x_99) + x_103), vec3<f32>(0.0, 0.0, 0.0), vec3<f32>(1.0, 1.0, 1.0)) * vec3<f32>(x_108.x, x_108.y, x_108.z));
finalSpecular = vec3<f32>(0.0, 0.0, 0.0);
let x_113 : vec3<f32> = finalDiffuse;
let x_114 : vec3<f32> = baseAmbientColor;
let x_116 : vec3<f32> = finalSpecular;
let x_118 : vec4<f32> = reflectionColor;
let x_121 : vec4<f32> = refractionColor;
let x_123 : vec3<f32> = ((((x_113 * x_114) + x_116) + vec3<f32>(x_118.x, x_118.y, x_118.z)) + vec3<f32>(x_121.x, x_121.y, x_121.z));
let x_124 : f32 = alpha;
color = vec4<f32>(x_123.x, x_123.y, x_123.z, x_124);
let x_129 : vec4<f32> = color;
let x_132 : vec3<f32> = max(vec3<f32>(x_129.x, x_129.y, x_129.z), vec3<f32>(0.0, 0.0, 0.0));
let x_133 : vec4<f32> = color;
color = vec4<f32>(x_132.x, x_132.y, x_132.z, x_133.w);
let x_140 : f32 = x_137.visibility;
let x_142 : f32 = color.w;
color.w = (x_142 * x_140);
let x_147 : vec4<f32> = color;
glFragColor = x_147;
return;
}
struct main_out {
@location(0)
glFragColor_1 : vec4<f32>,
};
@stage(fragment)
fn main(@location(2) fClipDistance3_param : f32, @location(3) fClipDistance4_param : f32) -> main_out {
fClipDistance3 = fClipDistance3_param;
fClipDistance4 = fClipDistance4_param;
main_1();
return main_out(glFragColor);
}

View File

@@ -1,48 +1,48 @@
struct Uniforms {
dstTextureFlipY : u32,
isFloat16 : u32,
isRGB10A2Unorm : u32,
channelCount : u32,
};
struct OutputBuf {
result : array<u32>,
};
@group(0) @binding(0) var src : texture_2d<f32>;
@group(0) @binding(1) var dst : texture_2d<f32>;
@group(0) @binding(2) var<storage_buffer, read_write> output : OutputBuf;
@group(0) @binding(3) var<uniform> uniforms : Uniforms;
//@builtin(global_invocation_id) var<in> GlobalInvocationID : vec3<u32>;
// Fp16 logic
// Infinity and NaN won't happen in this test case.
fn ConvertToFp16FloatValue(fp32 : f32) -> u32 {
return 1u;
}
@stage(compute) @workgroup_size(1, 1, 1)
fn main(@builtin(global_invocation_id) GlobalInvocationID : vec3<u32>) {
var size : vec2<i32> = textureDimensions(src);
var dstTexCoord : vec2<i32> = vec2<i32>(GlobalInvocationID.xy);
var srcTexCoord : vec2<i32> = dstTexCoord;
if (uniforms.dstTextureFlipY == 1u) {
srcTexCoord.y = size.y - dstTexCoord.y - 1;
}
var srcColor : vec4<f32> = textureLoad(src, srcTexCoord, 0);
var dstColor : vec4<f32> = textureLoad(dst, dstTexCoord, 0);
var success : bool = true;
var srcColorBits : vec4<u32>;
var dstColorBits : vec4<u32> = vec4<u32>(dstColor);
for (var i : u32 = 0u; i < uniforms.channelCount; i = i + 1u) {
srcColorBits[i] = ConvertToFp16FloatValue(srcColor[i]);
success = success && (srcColorBits[i] == dstColorBits[i]);
}
var outputIndex : u32 = GlobalInvocationID.y * u32(size.x) + GlobalInvocationID.x;
if (success) {
output.result[outputIndex] = u32(1);
} else {
output.result[outputIndex] = u32(0);
}
}
struct Uniforms {
dstTextureFlipY : u32,
isFloat16 : u32,
isRGB10A2Unorm : u32,
channelCount : u32,
};
struct OutputBuf {
result : array<u32>,
};
@group(0) @binding(0) var src : texture_2d<f32>;
@group(0) @binding(1) var dst : texture_2d<f32>;
@group(0) @binding(2) var<storage_buffer, read_write> output : OutputBuf;
@group(0) @binding(3) var<uniform> uniforms : Uniforms;
//@builtin(global_invocation_id) var<in> GlobalInvocationID : vec3<u32>;
// Fp16 logic
// Infinity and NaN won't happen in this test case.
fn ConvertToFp16FloatValue(fp32 : f32) -> u32 {
return 1u;
}
@stage(compute) @workgroup_size(1, 1, 1)
fn main(@builtin(global_invocation_id) GlobalInvocationID : vec3<u32>) {
var size : vec2<i32> = textureDimensions(src);
var dstTexCoord : vec2<i32> = vec2<i32>(GlobalInvocationID.xy);
var srcTexCoord : vec2<i32> = dstTexCoord;
if (uniforms.dstTextureFlipY == 1u) {
srcTexCoord.y = size.y - dstTexCoord.y - 1;
}
var srcColor : vec4<f32> = textureLoad(src, srcTexCoord, 0);
var dstColor : vec4<f32> = textureLoad(dst, dstTexCoord, 0);
var success : bool = true;
var srcColorBits : vec4<u32>;
var dstColorBits : vec4<u32> = vec4<u32>(dstColor);
for (var i : u32 = 0u; i < uniforms.channelCount; i = i + 1u) {
srcColorBits[i] = ConvertToFp16FloatValue(srcColor[i]);
success = success && (srcColorBits[i] == dstColorBits[i]);
}
var outputIndex : u32 = GlobalInvocationID.y * u32(size.x) + GlobalInvocationID.x;
if (success) {
output.result[outputIndex] = u32(1);
} else {
output.result[outputIndex] = u32(0);
}
}

View File

@@ -1,24 +1,24 @@
struct MyStruct {
f1 : f32,
};
type MyArray = array<f32, 10>;
// Global lets
let v1 = 1;
let v2 = 1u;
let v3 = 1.0;
let v4 = vec3<i32>(1, 1, 1);
let v5 = vec3<u32>(1u, 1u, 1u);
let v6 = vec3<f32>(1.0, 1.0, 1.0);
let v7 = mat3x3<f32>(vec3<f32>(1.0, 1.0, 1.0), vec3<f32>(1.0, 1.0, 1.0), vec3<f32>(1.0, 1.0, 1.0));
let v8 = MyStruct();
let v9 = MyArray();
@stage(fragment)
fn main() -> @location(0) vec4<f32> {
return vec4<f32>(0.0,0.0,0.0,0.0);
}
struct MyStruct {
f1 : f32,
};
type MyArray = array<f32, 10>;
// Global lets
let v1 = 1;
let v2 = 1u;
let v3 = 1.0;
let v4 = vec3<i32>(1, 1, 1);
let v5 = vec3<u32>(1u, 1u, 1u);
let v6 = vec3<f32>(1.0, 1.0, 1.0);
let v7 = mat3x3<f32>(vec3<f32>(1.0, 1.0, 1.0), vec3<f32>(1.0, 1.0, 1.0), vec3<f32>(1.0, 1.0, 1.0));
let v8 = MyStruct();
let v9 = MyArray();
@stage(fragment)
fn main() -> @location(0) vec4<f32> {
return vec4<f32>(0.0,0.0,0.0,0.0);
}

View File

@@ -1,39 +1,39 @@
struct MyStruct {
f1 : f32,
};
type MyArray = array<f32, 10>;
fn ret_i32() -> i32 { return 1; }
fn ret_u32() -> u32 { return 1u; }
fn ret_f32() -> f32 { return 1.0; }
fn ret_MyStruct() -> MyStruct { return MyStruct(); }
fn ret_MyArray() -> MyArray { return MyArray(); }
// Local lets
fn let_decls() {
let v1 = 1;
let v2 = 1u;
let v3 = 1.0;
let v4 = vec3<i32>(1, 1, 1);
let v5 = vec3<u32>(1u, 1u, 1u);
let v6 = vec3<f32>(1.0, 1.0, 1.0);
let v7 = mat3x3<f32>(v6, v6, v6);
let v8 = MyStruct(1.0);
let v9 = MyArray();
let v10 = ret_i32();
let v11 = ret_u32();
let v12 = ret_f32();
let v13 = ret_MyStruct();
let v14 = ret_MyStruct();
let v15 = ret_MyArray();
}
@stage(fragment)
fn main() -> @location(0) vec4<f32> {
return vec4<f32>(0.0,0.0,0.0,0.0);
}
struct MyStruct {
f1 : f32,
};
type MyArray = array<f32, 10>;
fn ret_i32() -> i32 { return 1; }
fn ret_u32() -> u32 { return 1u; }
fn ret_f32() -> f32 { return 1.0; }
fn ret_MyStruct() -> MyStruct { return MyStruct(); }
fn ret_MyArray() -> MyArray { return MyArray(); }
// Local lets
fn let_decls() {
let v1 = 1;
let v2 = 1u;
let v3 = 1.0;
let v4 = vec3<i32>(1, 1, 1);
let v5 = vec3<u32>(1u, 1u, 1u);
let v6 = vec3<f32>(1.0, 1.0, 1.0);
let v7 = mat3x3<f32>(v6, v6, v6);
let v8 = MyStruct(1.0);
let v9 = MyArray();
let v10 = ret_i32();
let v11 = ret_u32();
let v12 = ret_f32();
let v13 = ret_MyStruct();
let v14 = ret_MyStruct();
let v15 = ret_MyArray();
}
@stage(fragment)
fn main() -> @location(0) vec4<f32> {
return vec4<f32>(0.0,0.0,0.0,0.0);
}

View File

@@ -1,22 +1,22 @@
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
for (var i: i32 = 0; i < 4; i = i + 1) {
s1.a1[uniforms.i] = v;
}
}
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
for (var i: i32 = 0; i < 4; i = i + 1) {
s1.a1[uniforms.i] = v;
}
}

View File

@@ -1,22 +1,22 @@
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
for (var i: i32 = 0; i < 4; s1.a1[uniforms.i] = v) {
i = i + 1;
}
}
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
for (var i: i32 = 0; i < 4; s1.a1[uniforms.i] = v) {
i = i + 1;
}
}

View File

@@ -1,22 +1,22 @@
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
var i: i32 = 0;
for (s1.a1[uniforms.i] = v; i < 4; i = i + 1) {
}
}
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
var i: i32 = 0;
for (s1.a1[uniforms.i] = v; i < 4; i = i + 1) {
}
}

View File

@@ -1,31 +1,31 @@
struct Uniforms {
i : u32,
j : u32,
};
struct InnerS {
v : i32,
};
struct S1 {
a2 : array<InnerS, 8>,
};
struct OuterS {
a1 : array<S1, 8>,
};
var<private> nextIndex : u32;
fn getNextIndex() -> u32 {
nextIndex = nextIndex + 1u;
return nextIndex;
}
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s : OuterS;
s.a1[getNextIndex()].a2[uniforms.j] = v;
}
struct Uniforms {
i : u32,
j : u32,
};
struct InnerS {
v : i32,
};
struct S1 {
a2 : array<InnerS, 8>,
};
struct OuterS {
a1 : array<S1, 8>,
};
var<private> nextIndex : u32;
fn getNextIndex() -> u32 {
nextIndex = nextIndex + 1u;
return nextIndex;
}
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s : OuterS;
s.a1[getNextIndex()].a2[uniforms.j] = v;
}

View File

@@ -1,21 +1,21 @@
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
s1.a1[uniforms.i] = v;
//s1.a1[0] = v;
}
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
s1.a1[uniforms.i] = v;
//s1.a1[0] = v;
}

View File

@@ -1,21 +1,21 @@
struct Uniforms {
i : u32,
j : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<array<InnerS, 8>, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
s1.a1[uniforms.i][uniforms.j] = v;
}
struct Uniforms {
i : u32,
j : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<array<InnerS, 8>, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
s1.a1[uniforms.i][uniforms.j] = v;
}

View File

@@ -1,24 +1,24 @@
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct S1 {
s2 : InnerS,
};
struct OuterS {
a1 : array<S1, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
s1.a1[uniforms.i].s2 = v;
}
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct S1 {
s2 : InnerS,
};
struct OuterS {
a1 : array<S1, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
s1.a1[uniforms.i].s2 = v;
}

View File

@@ -1,25 +1,25 @@
struct Uniforms {
i : u32,
j : u32,
};
struct InnerS {
v : i32,
};
struct S1 {
a2 : array<InnerS, 8>,
};
struct OuterS {
a1 : array<S1, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s : OuterS;
s.a1[uniforms.i].a2[uniforms.j] = v;
}
struct Uniforms {
i : u32,
j : u32,
};
struct InnerS {
v : i32,
};
struct S1 {
a2 : array<InnerS, 8>,
};
struct OuterS {
a1 : array<S1, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s : OuterS;
s.a1[uniforms.i].a2[uniforms.j] = v;
}

View File

@@ -1,20 +1,20 @@
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@binding(0) @group(0) var<storage, read_write> s1 : OuterS;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
s1.a1[uniforms.i] = v;
}
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@binding(0) @group(0) var<storage, read_write> s1 : OuterS;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
s1.a1[uniforms.i] = v;
}

View File

@@ -1,25 +1,25 @@
struct Uniforms {
i : u32,
j : u32,
};
struct InnerS {
v : i32,
};
struct S1 {
a2 : array<InnerS, 8>,
};
struct OuterS {
a1 : array<S1>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@binding(0) @group(0) var<storage, read_write> s : OuterS;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
s.a1[uniforms.i].a2[uniforms.j] = v;
}
struct Uniforms {
i : u32,
j : u32,
};
struct InnerS {
v : i32,
};
struct S1 {
a2 : array<InnerS, 8>,
};
struct OuterS {
a1 : array<S1>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@binding(0) @group(0) var<storage, read_write> s : OuterS;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
s.a1[uniforms.i].a2[uniforms.j] = v;
}

View File

@@ -1,16 +1,16 @@
struct Uniforms {
i : u32,
};
struct OuterS {
m1 : mat2x4<f32>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var s1 : OuterS;
s1.m1[uniforms.i] = vec4<f32>(1.0);
s1.m1[uniforms.i][uniforms.i] = 1.0;
}
struct Uniforms {
i : u32,
};
struct OuterS {
m1 : mat2x4<f32>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var s1 : OuterS;
s1.m1[uniforms.i] = vec4<f32>(1.0);
s1.m1[uniforms.i][uniforms.i] = 1.0;
}

View File

@@ -1,22 +1,22 @@
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS, 8>,
a2 : array<InnerS, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
s1.a1[uniforms.i] = v;
s1.a2[uniforms.i] = v;
}
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS, 8>,
a2 : array<InnerS, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
s1.a1[uniforms.i] = v;
s1.a2[uniforms.i] = v;
}

View File

@@ -1,24 +1,24 @@
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct S1 {
a : array<InnerS, 8>,
};
struct OuterS {
s2 : S1,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
s1.s2.a[uniforms.i] = v;
}
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct S1 {
a : array<InnerS, 8>,
};
struct OuterS {
s2 : S1,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
s1.s2.a[uniforms.i] = v;
}

View File

@@ -1,15 +1,15 @@
struct Uniforms {
i : u32,
};
struct OuterS {
v1 : vec3<f32>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var s1 : OuterS;
s1.v1[uniforms.i] = 1.0;
}
struct Uniforms {
i : u32,
};
struct OuterS {
v1 : vec3<f32>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var s1 : OuterS;
s1.v1[uniforms.i] = 1.0;
}

View File

@@ -1,21 +1,21 @@
struct Uniforms {
i : u32,
};
struct OuterS {
a1 : array<u32, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
fn f(i: u32) -> u32 {
return i + 1u;
}
@stage(compute) @workgroup_size(1)
fn main() {
var s1 : OuterS;
var v : vec3<f32>;
v[s1.a1[uniforms.i]] = 1.0;
v[f(s1.a1[uniforms.i])] = 1.0;
}
struct Uniforms {
i : u32,
};
struct OuterS {
a1 : array<u32, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
fn f(i: u32) -> u32 {
return i + 1u;
}
@stage(compute) @workgroup_size(1)
fn main() {
var s1 : OuterS;
var v : vec3<f32>;
v[s1.a1[uniforms.i]] = 1.0;
v[f(s1.a1[uniforms.i])] = 1.0;
}

View File

@@ -1,21 +1,21 @@
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
let p = &(s1.a1[uniforms.i]);
*p = v;
}
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
@stage(compute) @workgroup_size(1)
fn main() {
var v : InnerS;
var s1 : OuterS;
let p = &(s1.a1[uniforms.i]);
*p = v;
}

View File

@@ -1,21 +1,21 @@
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
fn f(p : ptr<function, OuterS>) {
var v : InnerS;
(*p).a1[uniforms.i] = v;
}
@stage(compute) @workgroup_size(1)
fn main() {
var s1 : OuterS;
f(&s1);
}
struct Uniforms {
i : u32,
};
struct InnerS {
v : i32,
};
struct OuterS {
a1 : array<InnerS, 8>,
};
@group(1) @binding(4) var<uniform> uniforms : Uniforms;
fn f(p : ptr<function, OuterS>) {
var v : InnerS;
(*p).a1[uniforms.i] = v;
}
@stage(compute) @workgroup_size(1)
fn main() {
var s1 : OuterS;
f(&s1);
}

View File

@@ -1,20 +1,20 @@
@stage(compute) @workgroup_size(1)
fn f() {
var i : i32;
var result : i32;
switch(i) {
case 0: {
result = 10;
}
case 1: {
result = 22;
}
case 2: {
result = 33;
}
default: {
result = 44;
break;
}
}
}
@stage(compute) @workgroup_size(1)
fn f() {
var i : i32;
var result : i32;
switch(i) {
case 0: {
result = 10;
}
case 1: {
result = 22;
}
case 2: {
result = 33;
}
default: {
result = 44;
break;
}
}
}

View File

@@ -1,11 +1,11 @@
@stage(compute) @workgroup_size(1)
fn f() {
var i : i32;
var result : i32;
switch(i) {
default: {
result = 44;
break;
}
}
}
@stage(compute) @workgroup_size(1)
fn f() {
var i : i32;
var result : i32;
switch(i) {
default: {
result = 44;
break;
}
}
}

View File

@@ -1,39 +1,39 @@
struct MyStruct {
f1 : f32,
};
type MyArray = array<f32, 10>;
fn ret_i32() -> i32 { return 1; }
fn ret_u32() -> u32 { return 1u; }
fn ret_f32() -> f32 { return 1.0; }
fn ret_MyStruct() -> MyStruct { return MyStruct(); }
fn ret_MyArray() -> MyArray { return MyArray(); }
// Local variables
fn var_decls() {
var v1 = 1;
var v2 = 1u;
var v3 = 1.0;
var v4 = vec3<i32>(1, 1, 1);
var v5 = vec3<u32>(1u, 1u, 1u);
var v6 = vec3<f32>(1.0, 1.0, 1.0);
var v7 = mat3x3<f32>(v6, v6, v6);
var v8 = MyStruct(1.0);
var v9 = MyArray();
var v10 = ret_i32();
var v11 = ret_u32();
var v12 = ret_f32();
var v13 = ret_MyStruct();
var v14 = ret_MyStruct();
var v15 = ret_MyArray();
}
@stage(fragment)
fn main() -> @location(0) vec4<f32> {
return vec4<f32>(0.0,0.0,0.0,0.0);
}
struct MyStruct {
f1 : f32,
};
type MyArray = array<f32, 10>;
fn ret_i32() -> i32 { return 1; }
fn ret_u32() -> u32 { return 1u; }
fn ret_f32() -> f32 { return 1.0; }
fn ret_MyStruct() -> MyStruct { return MyStruct(); }
fn ret_MyArray() -> MyArray { return MyArray(); }
// Local variables
fn var_decls() {
var v1 = 1;
var v2 = 1u;
var v3 = 1.0;
var v4 = vec3<i32>(1, 1, 1);
var v5 = vec3<u32>(1u, 1u, 1u);
var v6 = vec3<f32>(1.0, 1.0, 1.0);
var v7 = mat3x3<f32>(v6, v6, v6);
var v8 = MyStruct(1.0);
var v9 = MyArray();
var v10 = ret_i32();
var v11 = ret_u32();
var v12 = ret_f32();
var v13 = ret_MyStruct();
var v14 = ret_MyStruct();
var v15 = ret_MyArray();
}
@stage(fragment)
fn main() -> @location(0) vec4<f32> {
return vec4<f32>(0.0,0.0,0.0,0.0);
}

View File

@@ -82,9 +82,9 @@ tint_symbol_2 main(tint_symbol_1 tint_symbol) {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
error: validation errors
C:\src\temp\u1jmg.0:77: error: Loop must have break.
Validation failed.
error: validation errors
C:\src\temp\u1jmg.0:77: error: Loop must have break.
Validation failed.

View File

@@ -82,9 +82,9 @@ tint_symbol_2 main(tint_symbol_1 tint_symbol) {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
error: validation errors
C:\src\temp\u1v1c.0:77: error: Loop must have break.
Validation failed.
error: validation errors
C:\src\temp\u1v1c.0:77: error: Loop must have break.
Validation failed.

View File

@@ -93,9 +93,9 @@ tint_symbol main() {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
error: validation errors
C:\src\temp\u1r54.0:88: error: Loop must have break.
Validation failed.
error: validation errors
C:\src\temp\u1r54.0:88: error: Loop must have break.
Validation failed.

View File

@@ -93,9 +93,9 @@ tint_symbol main() {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
error: validation errors
C:\src\temp\usgc.0:88: error: Loop must have break.
Validation failed.
error: validation errors
C:\src\temp\usgc.0:88: error: Loop must have break.
Validation failed.

View File

@@ -67,9 +67,9 @@ tint_symbol_2 main(tint_symbol_1 tint_symbol) {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
error: validation errors
C:\src\temp\u17p0.0:62: error: Loop must have break.
Validation failed.
error: validation errors
C:\src\temp\u17p0.0:62: error: Loop must have break.
Validation failed.

View File

@@ -67,9 +67,9 @@ tint_symbol_2 main(tint_symbol_1 tint_symbol) {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
error: validation errors
C:\src\temp\uvqg.0:62: error: Loop must have break.
Validation failed.
error: validation errors
C:\src\temp\uvqg.0:62: error: Loop must have break.
Validation failed.

View File

@@ -115,5 +115,5 @@ tint_symbol main() {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
Internal compiler error: access violation. Attempted to read from address 0x0000000000000048
Internal compiler error: access violation. Attempted to read from address 0x0000000000000048

View File

@@ -115,5 +115,5 @@ tint_symbol main() {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
Internal compiler error: access violation. Attempted to read from address 0x0000000000000048
Internal compiler error: access violation. Attempted to read from address 0x0000000000000048

View File

@@ -45,9 +45,9 @@ tint_symbol main() {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
error: validation errors
C:\src\temp\u11r8.0:40: error: Loop must have break.
Validation failed.
error: validation errors
C:\src\temp\u11r8.0:40: error: Loop must have break.
Validation failed.

View File

@@ -45,9 +45,9 @@ tint_symbol main() {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
error: validation errors
C:\src\temp\u1v50.0:40: error: Loop must have break.
Validation failed.
error: validation errors
C:\src\temp\u1v50.0:40: error: Loop must have break.
Validation failed.

View File

@@ -50,9 +50,9 @@ tint_symbol main() {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
error: validation errors
C:\src\temp\u1f84.0:45: error: Loop must have break.
Validation failed.
error: validation errors
C:\src\temp\u1f84.0:45: error: Loop must have break.
Validation failed.

View File

@@ -50,9 +50,9 @@ tint_symbol main() {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
error: validation errors
C:\src\temp\uk3k.0:45: error: Loop must have break.
Validation failed.
error: validation errors
C:\src\temp\uk3k.0:45: error: Loop must have break.
Validation failed.

View File

@@ -54,5 +54,5 @@ tint_symbol main() {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
Internal compiler error: access violation. Attempted to read from address 0x0000000000000048
Internal compiler error: access violation. Attempted to read from address 0x0000000000000048

View File

@@ -54,5 +54,5 @@ tint_symbol main() {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
Internal compiler error: access violation. Attempted to read from address 0x0000000000000048
Internal compiler error: access violation. Attempted to read from address 0x0000000000000048

View File

@@ -98,9 +98,9 @@ tint_symbol main() {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
error: validation errors
C:\src\temp\umdw.0:93: error: Loop must have break.
Validation failed.
error: validation errors
C:\src\temp\umdw.0:93: error: Loop must have break.
Validation failed.

View File

@@ -110,9 +110,9 @@ tint_symbol main() {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
error: validation errors
C:\src\temp\u1tig.0:105: error: Loop must have break.
Validation failed.
error: validation errors
C:\src\temp\u1tig.0:105: error: Loop must have break.
Validation failed.