Skip to content

Commit

Permalink
Update test expectations
Browse files Browse the repository at this point in the history
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
  • Loading branch information
sagudev committed Aug 25, 2024
1 parent f313a39 commit 233d160
Show file tree
Hide file tree
Showing 11 changed files with 224 additions and 224 deletions.
4 changes: 2 additions & 2 deletions naga/tests/out/wgsl/binding-arrays.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ fn main(fragment_in: FragmentIn) -> @location(0) vec4<f32> {

let uniform_index = uni.index;
let non_uniform_index = fragment_in.index;
let uv = vec2(0f);
let pix = vec2(0i);
const uv = vec2(0f);
const pix = vec2(0i);
let _e21 = textureDimensions(texture_array_unbounded[0]);
let _e22 = u2_;
u2_ = (_e22 + _e21);
Expand Down
14 changes: 7 additions & 7 deletions naga/tests/out/wgsl/constructors.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ fn main() {
var foo: Foo;

foo = Foo(vec4(1f), 1i);
let m0_ = mat2x2<f32>(vec2<f32>(1f, 0f), vec2<f32>(0f, 1f));
let m1_ = mat4x4<f32>(vec4<f32>(1f, 0f, 0f, 0f), vec4<f32>(0f, 1f, 0f, 0f), vec4<f32>(0f, 0f, 1f, 0f), vec4<f32>(0f, 0f, 0f, 1f));
let cit0_ = vec2(0u);
let cit1_ = mat2x2<f32>(vec2(0f), vec2(0f));
let cit2_ = array<i32, 4>(0i, 1i, 2i, 3i);
let ic4_ = vec2<u32>(0u, 0u);
let ic5_ = mat2x3<f32>(vec3<f32>(0f, 0f, 0f), vec3<f32>(0f, 0f, 0f));
const m0_ = mat2x2<f32>(vec2<f32>(1f, 0f), vec2<f32>(0f, 1f));
const m1_ = mat4x4<f32>(vec4<f32>(1f, 0f, 0f, 0f), vec4<f32>(0f, 1f, 0f, 0f), vec4<f32>(0f, 0f, 1f, 0f), vec4<f32>(0f, 0f, 0f, 1f));
const cit0_ = vec2(0u);
const cit1_ = mat2x2<f32>(vec2(0f), vec2(0f));
const cit2_ = array<i32, 4>(0i, 1i, 2i, 3i);
const ic4_ = vec2<u32>(0u, 0u);
const ic5_ = mat2x3<f32>(vec3<f32>(0f, 0f, 0f), vec3<f32>(0f, 0f, 0f));
}
4 changes: 2 additions & 2 deletions naga/tests/out/wgsl/expressions.frag.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,12 @@ fn testUnaryOpMat(a_16: mat3x3<f32>) {
let _e3 = a_17;
v_8 = -(_e3);
let _e5 = a_17;
let _e7 = vec3(1f);
const _e7 = vec3(1f);
let _e9 = (_e5 - mat3x3<f32>(_e7, _e7, _e7));
a_17 = _e9;
v_8 = _e9;
let _e10 = a_17;
let _e12 = vec3(1f);
const _e12 = vec3(1f);
a_17 = (_e10 - mat3x3<f32>(_e12, _e12, _e12));
v_8 = _e10;
return;
Expand Down
2 changes: 1 addition & 1 deletion naga/tests/out/wgsl/f64.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var<private> v: f64 = 1.0lf;
fn f(x: f64) -> f64 {
var z: f64;

let y = (30.0lf + 400.0lf);
const y = (30.0lf + 400.0lf);
z = (y + 5.0lf);
return (((x + y) + k) + 5.0lf);
}
Expand Down
20 changes: 10 additions & 10 deletions naga/tests/out/wgsl/functions.wgsl
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
fn test_fma() -> vec2<f32> {
let a = vec2<f32>(2f, 2f);
let b = vec2<f32>(0.5f, 0.5f);
let c = vec2<f32>(0.5f, 0.5f);
const a = vec2<f32>(2f, 2f);
const b = vec2<f32>(0.5f, 0.5f);
const c = vec2<f32>(0.5f, 0.5f);
return fma(a, b, c);
}

fn test_integer_dot_product() -> i32 {
let a_2_ = vec2(1i);
let b_2_ = vec2(1i);
let c_2_ = dot(a_2_, b_2_);
let a_3_ = vec3(1u);
let b_3_ = vec3(1u);
let c_3_ = dot(a_3_, b_3_);
let c_4_ = dot(vec4(4i), vec4(2i));
const a_2_ = vec2(1i);
const b_2_ = vec2(1i);
const c_2_ = dot(a_2_, b_2_);
const a_3_ = vec3(1u);
const b_3_ = vec3(1u);
const c_3_ = dot(a_3_, b_3_);
const c_4_ = dot(vec4(4i), vec4(2i));
return c_4_;
}

Expand Down
12 changes: 6 additions & 6 deletions naga/tests/out/wgsl/image.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ fn levels_queries() -> @builtin(position) vec4<f32> {
fn texture_sample() -> @location(0) vec4<f32> {
var a: vec4<f32>;

let tc = vec2(0.5f);
let tc3_ = vec3(0.5f);
const tc = vec2(0.5f);
const tc3_ = vec3(0.5f);
let _e9 = textureSample(image_1d, sampler_reg, tc.x);
let _e10 = a;
a = (_e10 + _e9);
Expand Down Expand Up @@ -186,8 +186,8 @@ fn texture_sample() -> @location(0) vec4<f32> {
fn texture_sample_comparison() -> @location(0) f32 {
var a_1: f32;

let tc_1 = vec2(0.5f);
let tc3_1 = vec3(0.5f);
const tc_1 = vec2(0.5f);
const tc3_1 = vec3(0.5f);
let _e8 = textureSampleCompare(image_2d_depth, sampler_cmp, tc_1, 0.5f);
let _e9 = a_1;
a_1 = (_e9 + _e8);
Expand Down Expand Up @@ -218,7 +218,7 @@ fn texture_sample_comparison() -> @location(0) f32 {

@fragment
fn gather() -> @location(0) vec4<f32> {
let tc_2 = vec2(0.5f);
const tc_2 = vec2(0.5f);
let s2d = textureGather(1, image_2d, sampler_reg, tc_2);
let s2d_offset = textureGather(3, image_2d, sampler_reg, tc_2, vec2<i32>(3i, 1i));
let s2d_depth = textureGatherCompare(image_2d_depth, sampler_cmp, tc_2, 0.5f);
Expand All @@ -231,7 +231,7 @@ fn gather() -> @location(0) vec4<f32> {

@fragment
fn depth_no_comparison() -> @location(0) vec4<f32> {
let tc_3 = vec2(0.5f);
const tc_3 = vec2(0.5f);
let s2d_1 = textureSample(image_2d_depth, sampler_reg, tc_3);
let s2d_gather = textureGather(image_2d_depth, sampler_reg, tc_3);
return (vec4(s2d_1) + s2d_gather);
Expand Down
64 changes: 32 additions & 32 deletions naga/tests/out/wgsl/math-functions.wgsl
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
@fragment
fn main() {
let v = vec4(0f);
let a = degrees(1f);
let b = radians(1f);
let c = degrees(v);
let d = radians(v);
let e = saturate(v);
let g = refract(v, v, 1f);
let sign_b = vec4<i32>(-1i, -1i, -1i, -1i);
let sign_d = vec4<f32>(-1f, -1f, -1f, -1f);
let const_dot = dot(vec2<i32>(), vec2<i32>());
let flb_b = vec2<i32>(-1i, -1i);
let flb_c = vec2<u32>(0u, 0u);
let ftb_c = vec2<i32>(0i, 0i);
let ftb_d = vec2<u32>(0u, 0u);
let ctz_e = vec2<u32>(32u, 32u);
let ctz_f = vec2<i32>(32i, 32i);
let ctz_g = vec2<u32>(0u, 0u);
let ctz_h = vec2<i32>(0i, 0i);
let clz_c = vec2<i32>(0i, 0i);
let clz_d = vec2<u32>(31u, 31u);
let lde_a = ldexp(1f, 2i);
let lde_b = ldexp(vec2<f32>(1f, 2f), vec2<i32>(3i, 4i));
let modf_a = modf(1.5f);
let modf_b = modf(1.5f).fract;
let modf_c = modf(1.5f).whole;
let modf_d = modf(vec2<f32>(1.5f, 1.5f));
let modf_e = modf(vec4<f32>(1.5f, 1.5f, 1.5f, 1.5f)).whole.x;
let modf_f = modf(vec2<f32>(1.5f, 1.5f)).fract.y;
let frexp_a = frexp(1.5f);
let frexp_b = frexp(1.5f).fract;
let frexp_c = frexp(1.5f).exp;
let frexp_d = frexp(vec4<f32>(1.5f, 1.5f, 1.5f, 1.5f)).exp.x;
const v = vec4(0f);
const a = degrees(1f);
const b = radians(1f);
const c = degrees(v);
const d = radians(v);
const e = saturate(v);
const g = refract(v, v, 1f);
const sign_b = vec4<i32>(-1i, -1i, -1i, -1i);
const sign_d = vec4<f32>(-1f, -1f, -1f, -1f);
const const_dot = dot(vec2<i32>(), vec2<i32>());
const flb_b = vec2<i32>(-1i, -1i);
const flb_c = vec2<u32>(0u, 0u);
const ftb_c = vec2<i32>(0i, 0i);
const ftb_d = vec2<u32>(0u, 0u);
const ctz_e = vec2<u32>(32u, 32u);
const ctz_f = vec2<i32>(32i, 32i);
const ctz_g = vec2<u32>(0u, 0u);
const ctz_h = vec2<i32>(0i, 0i);
const clz_c = vec2<i32>(0i, 0i);
const clz_d = vec2<u32>(31u, 31u);
const lde_a = ldexp(1f, 2i);
const lde_b = ldexp(vec2<f32>(1f, 2f), vec2<i32>(3i, 4i));
const modf_a = modf(1.5f);
const modf_b = modf(1.5f).fract;
const modf_c = modf(1.5f).whole;
const modf_d = modf(vec2<f32>(1.5f, 1.5f));
const modf_e = modf(vec4<f32>(1.5f, 1.5f, 1.5f, 1.5f)).whole.x;
const modf_f = modf(vec2<f32>(1.5f, 1.5f)).fract.y;
const frexp_a = frexp(1.5f);
const frexp_b = frexp(1.5f).fract;
const frexp_c = frexp(1.5f).exp;
const frexp_d = frexp(vec4<f32>(1.5f, 1.5f, 1.5f, 1.5f)).exp.x;
}
Loading

0 comments on commit 233d160

Please sign in to comment.