Skip to content

Commit c5081a4

Browse files
committed
Update snapshots
Signed-off-by: sagudev <[email protected]>
1 parent b9bad54 commit c5081a4

10 files changed

+120
-166
lines changed

naga/tests/out/glsl/wgsl-functions.main.Compute.glsl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ int test_integer_dot_product() {
2020
uvec3 a_3_ = uvec3(1u);
2121
uvec3 b_3_ = uvec3(1u);
2222
uint c_3_ = ( + a_3_.x * b_3_.x + a_3_.y * b_3_.y + a_3_.z * b_3_.z);
23-
ivec4 _e11 = ivec4(4);
24-
ivec4 _e13 = ivec4(2);
25-
int c_4_ = ( + _e11.x * _e13.x + _e11.y * _e13.y + _e11.z * _e13.z + _e11.w * _e13.w);
26-
return c_4_;
23+
return 32;
2724
}
2825

2926
uint test_packed_integer_dot_product() {

naga/tests/out/glsl/wgsl-math-functions.main.Fragment.glsl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ void main() {
6464
vec4 g = refract(v, v, 1.0);
6565
ivec4 sign_b = ivec4(-1, -1, -1, -1);
6666
vec4 sign_d = vec4(-1.0, -1.0, -1.0, -1.0);
67-
int const_dot = ( + ivec2(0).x * ivec2(0).x + ivec2(0).y * ivec2(0).y);
6867
ivec2 flb_b = ivec2(-1, -1);
6968
uvec2 flb_c = uvec2(0u, 0u);
7069
ivec2 ftb_c = ivec2(0, 0);
@@ -88,12 +87,12 @@ void main() {
8887
int frexp_c = naga_frexp(1.5).exp_;
8988
int frexp_d = naga_frexp(vec4(1.5, 1.5, 1.5, 1.5)).exp_.x;
9089
float quantizeToF16_a = unpackHalf2x16(packHalf2x16(vec2(1.0))).x;
91-
vec2 _e120 = vec2(1.0, 1.0);
92-
vec2 quantizeToF16_b = unpackHalf2x16(packHalf2x16(_e120));
93-
vec3 _e125 = vec3(1.0, 1.0, 1.0);
94-
vec3 quantizeToF16_c = vec3(unpackHalf2x16(packHalf2x16(_e125.xy)), unpackHalf2x16(packHalf2x16(_e125.zz)).x);
95-
vec4 _e131 = vec4(1.0, 1.0, 1.0, 1.0);
96-
vec4 quantizeToF16_d = vec4(unpackHalf2x16(packHalf2x16(_e131.xy)), unpackHalf2x16(packHalf2x16(_e131.zw)));
90+
vec2 _e118 = vec2(1.0, 1.0);
91+
vec2 quantizeToF16_b = unpackHalf2x16(packHalf2x16(_e118));
92+
vec3 _e123 = vec3(1.0, 1.0, 1.0);
93+
vec3 quantizeToF16_c = vec3(unpackHalf2x16(packHalf2x16(_e123.xy)), unpackHalf2x16(packHalf2x16(_e123.zz)).x);
94+
vec4 _e129 = vec4(1.0, 1.0, 1.0, 1.0);
95+
vec4 quantizeToF16_d = vec4(unpackHalf2x16(packHalf2x16(_e129.xy)), unpackHalf2x16(packHalf2x16(_e129.zw)));
9796
return;
9897
}
9998

naga/tests/out/hlsl/wgsl-functions.hlsl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ int test_integer_dot_product()
1414
uint3 a_3_ = (1u).xxx;
1515
uint3 b_3_ = (1u).xxx;
1616
uint c_3_ = dot(a_3_, b_3_);
17-
int c_4_ = dot((int(4)).xxxx, (int(2)).xxxx);
18-
return c_4_;
17+
return int(32);
1918
}
2019

2120
uint test_packed_integer_dot_product()

naga/tests/out/hlsl/wgsl-math-functions.hlsl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@ _frexp_result_vec4_f32_ naga_frexp(float4 arg) {
6363
return result;
6464
}
6565

66-
int2 ZeroValueint2() {
67-
return (int2)0;
68-
}
69-
7066
void main()
7167
{
7268
float4 v = (0.0).xxxx;
@@ -78,7 +74,6 @@ void main()
7874
float4 g = refract(v, v, 1.0);
7975
int4 sign_b = int4(int(-1), int(-1), int(-1), int(-1));
8076
float4 sign_d = float4(-1.0, -1.0, -1.0, -1.0);
81-
int const_dot = dot(ZeroValueint2(), ZeroValueint2());
8277
int2 flb_b = int2(int(-1), int(-1));
8378
uint2 flb_c = uint2(0u, 0u);
8479
int2 ftb_c = int2(int(0), int(0));

naga/tests/out/msl/wgsl-functions.msl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ int test_integer_dot_product(
2121
metal::uint3 a_3_ = metal::uint3(1u);
2222
metal::uint3 b_3_ = metal::uint3(1u);
2323
uint c_3_ = ( + a_3_.x * b_3_.x + a_3_.y * b_3_.y + a_3_.z * b_3_.z);
24-
metal::int4 _e11 = metal::int4(4);
25-
metal::int4 _e13 = metal::int4(2);
26-
int c_4_ = ( + _e11.x * _e13.x + _e11.y * _e13.y + _e11.z * _e13.z + _e11.w * _e13.w);
27-
return c_4_;
24+
return 32;
2825
}
2926

3027
uint test_packed_integer_dot_product(

naga/tests/out/msl/wgsl-math-functions.msl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ fragment void main_(
6666
metal::float4 g = metal::refract(v, v, 1.0);
6767
metal::int4 sign_b = metal::int4(-1, -1, -1, -1);
6868
metal::float4 sign_d = metal::float4(-1.0, -1.0, -1.0, -1.0);
69-
int const_dot = ( + metal::int2 {}.x * metal::int2 {}.x + metal::int2 {}.y * metal::int2 {}.y);
7069
metal::int2 flb_b = metal::int2(-1, -1);
7170
metal::uint2 flb_c = metal::uint2(0u, 0u);
7271
metal::int2 ftb_c = metal::int2(0, 0);
Lines changed: 54 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
; SPIR-V
22
; Version: 1.1
33
; Generator: rspirv
4-
; Bound: 95
4+
; Bound: 75
55
OpCapability Shader
66
OpCapability DotProduct
77
OpCapability DotProductInput4x8BitPacked
88
OpExtension "SPV_KHR_integer_dot_product"
99
%1 = OpExtInstImport "GLSL.std.450"
1010
OpMemoryModel Logical GLSL450
11-
OpEntryPoint GLCompute %89 "main"
12-
OpExecutionMode %89 LocalSize 1 1 1
11+
OpEntryPoint GLCompute %69 "main"
12+
OpExecutionMode %69 LocalSize 1 1 1
1313
%2 = OpTypeVoid
1414
%4 = OpTypeFloat 32
1515
%3 = OpTypeVector %4 2
@@ -27,22 +27,18 @@ OpExecutionMode %89 LocalSize 1 1 1
2727
%22 = OpConstant %6 1
2828
%23 = OpTypeVector %6 3
2929
%24 = OpConstantComposite %23 %22 %22 %22
30-
%25 = OpConstant %5 4
31-
%26 = OpTypeVector %5 4
32-
%27 = OpConstantComposite %26 %25 %25 %25 %25
33-
%28 = OpConstant %5 2
34-
%29 = OpConstantComposite %26 %28 %28 %28 %28
35-
%32 = OpConstantNull %5
36-
%41 = OpConstantNull %6
37-
%71 = OpTypeFunction %6
38-
%72 = OpConstant %6 2
39-
%73 = OpConstant %6 3
40-
%74 = OpConstant %6 4
41-
%75 = OpConstant %6 5
42-
%76 = OpConstant %6 6
43-
%77 = OpConstant %6 7
44-
%78 = OpConstant %6 8
45-
%90 = OpTypeFunction %2
30+
%25 = OpConstant %5 32
31+
%28 = OpConstantNull %5
32+
%37 = OpConstantNull %6
33+
%51 = OpTypeFunction %6
34+
%52 = OpConstant %6 2
35+
%53 = OpConstant %6 3
36+
%54 = OpConstant %6 4
37+
%55 = OpConstant %6 5
38+
%56 = OpConstant %6 6
39+
%57 = OpConstant %6 7
40+
%58 = OpConstant %6 8
41+
%70 = OpTypeFunction %2
4642
%8 = OpFunction %3 None %9
4743
%7 = OpLabel
4844
OpBranch %14
@@ -52,66 +48,50 @@ OpReturnValue %15
5248
OpFunctionEnd
5349
%17 = OpFunction %5 None %18
5450
%16 = OpLabel
55-
OpBranch %30
56-
%30 = OpLabel
57-
%33 = OpCompositeExtract %5 %21 0
58-
%34 = OpCompositeExtract %5 %21 0
51+
OpBranch %26
52+
%26 = OpLabel
53+
%29 = OpCompositeExtract %5 %21 0
54+
%30 = OpCompositeExtract %5 %21 0
55+
%31 = OpIMul %5 %29 %30
56+
%32 = OpIAdd %5 %28 %31
57+
%33 = OpCompositeExtract %5 %21 1
58+
%34 = OpCompositeExtract %5 %21 1
5959
%35 = OpIMul %5 %33 %34
60-
%36 = OpIAdd %5 %32 %35
61-
%37 = OpCompositeExtract %5 %21 1
62-
%38 = OpCompositeExtract %5 %21 1
63-
%39 = OpIMul %5 %37 %38
64-
%31 = OpIAdd %5 %36 %39
65-
%42 = OpCompositeExtract %6 %24 0
66-
%43 = OpCompositeExtract %6 %24 0
60+
%27 = OpIAdd %5 %32 %35
61+
%38 = OpCompositeExtract %6 %24 0
62+
%39 = OpCompositeExtract %6 %24 0
63+
%40 = OpIMul %6 %38 %39
64+
%41 = OpIAdd %6 %37 %40
65+
%42 = OpCompositeExtract %6 %24 1
66+
%43 = OpCompositeExtract %6 %24 1
6767
%44 = OpIMul %6 %42 %43
6868
%45 = OpIAdd %6 %41 %44
69-
%46 = OpCompositeExtract %6 %24 1
70-
%47 = OpCompositeExtract %6 %24 1
69+
%46 = OpCompositeExtract %6 %24 2
70+
%47 = OpCompositeExtract %6 %24 2
7171
%48 = OpIMul %6 %46 %47
72-
%49 = OpIAdd %6 %45 %48
73-
%50 = OpCompositeExtract %6 %24 2
74-
%51 = OpCompositeExtract %6 %24 2
75-
%52 = OpIMul %6 %50 %51
76-
%40 = OpIAdd %6 %49 %52
77-
%54 = OpCompositeExtract %5 %27 0
78-
%55 = OpCompositeExtract %5 %29 0
79-
%56 = OpIMul %5 %54 %55
80-
%57 = OpIAdd %5 %32 %56
81-
%58 = OpCompositeExtract %5 %27 1
82-
%59 = OpCompositeExtract %5 %29 1
83-
%60 = OpIMul %5 %58 %59
84-
%61 = OpIAdd %5 %57 %60
85-
%62 = OpCompositeExtract %5 %27 2
86-
%63 = OpCompositeExtract %5 %29 2
87-
%64 = OpIMul %5 %62 %63
88-
%65 = OpIAdd %5 %61 %64
89-
%66 = OpCompositeExtract %5 %27 3
90-
%67 = OpCompositeExtract %5 %29 3
91-
%68 = OpIMul %5 %66 %67
92-
%53 = OpIAdd %5 %65 %68
93-
OpReturnValue %53
72+
%36 = OpIAdd %6 %45 %48
73+
OpReturnValue %25
9474
OpFunctionEnd
95-
%70 = OpFunction %6 None %71
96-
%69 = OpLabel
97-
OpBranch %79
98-
%79 = OpLabel
99-
%80 = OpSDot %5 %22 %72 PackedVectorFormat4x8Bit
100-
%81 = OpUDot %6 %73 %74 PackedVectorFormat4x8Bit
101-
%82 = OpIAdd %6 %75 %81
102-
%83 = OpIAdd %6 %76 %81
103-
%84 = OpSDot %5 %82 %83 PackedVectorFormat4x8Bit
104-
%85 = OpIAdd %6 %77 %81
105-
%86 = OpIAdd %6 %78 %81
106-
%87 = OpUDot %6 %85 %86 PackedVectorFormat4x8Bit
107-
OpReturnValue %87
75+
%50 = OpFunction %6 None %51
76+
%49 = OpLabel
77+
OpBranch %59
78+
%59 = OpLabel
79+
%60 = OpSDot %5 %22 %52 PackedVectorFormat4x8Bit
80+
%61 = OpUDot %6 %53 %54 PackedVectorFormat4x8Bit
81+
%62 = OpIAdd %6 %55 %61
82+
%63 = OpIAdd %6 %56 %61
83+
%64 = OpSDot %5 %62 %63 PackedVectorFormat4x8Bit
84+
%65 = OpIAdd %6 %57 %61
85+
%66 = OpIAdd %6 %58 %61
86+
%67 = OpUDot %6 %65 %66 PackedVectorFormat4x8Bit
87+
OpReturnValue %67
10888
OpFunctionEnd
109-
%89 = OpFunction %2 None %90
110-
%88 = OpLabel
111-
OpBranch %91
112-
%91 = OpLabel
113-
%92 = OpFunctionCall %3 %8
114-
%93 = OpFunctionCall %5 %17
115-
%94 = OpFunctionCall %6 %70
89+
%69 = OpFunction %2 None %70
90+
%68 = OpLabel
91+
OpBranch %71
92+
%71 = OpLabel
93+
%72 = OpFunctionCall %3 %8
94+
%73 = OpFunctionCall %5 %17
95+
%74 = OpFunctionCall %6 %50
11696
OpReturn
11797
OpFunctionEnd
Lines changed: 56 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; SPIR-V
22
; Version: 1.1
33
; Generator: rspirv
4-
; Bound: 95
4+
; Bound: 85
55
OpCapability Shader
66
%1 = OpExtInstImport "GLSL.std.450"
77
OpMemoryModel Logical GLSL450
@@ -40,76 +40,66 @@ OpMemberDecorate %15 1 Offset 16
4040
%24 = OpConstantComposite %6 %23 %23 %23 %23
4141
%25 = OpConstant %3 -1
4242
%26 = OpConstantComposite %4 %25 %25 %25 %25
43-
%27 = OpConstantNull %7
43+
%27 = OpConstant %5 0
4444
%28 = OpConstant %9 4294967295
4545
%29 = OpConstantComposite %7 %23 %23
4646
%30 = OpConstant %9 0
4747
%31 = OpConstantComposite %8 %30 %30
48-
%32 = OpConstant %5 0
49-
%33 = OpConstantComposite %7 %32 %32
50-
%34 = OpConstant %9 32
51-
%35 = OpConstant %5 32
52-
%36 = OpConstantComposite %8 %34 %34
53-
%37 = OpConstantComposite %7 %35 %35
54-
%38 = OpConstant %9 31
55-
%39 = OpConstantComposite %8 %38 %38
56-
%40 = OpConstant %5 2
57-
%41 = OpConstant %3 2
58-
%42 = OpConstantComposite %10 %20 %41
59-
%43 = OpConstant %5 3
60-
%44 = OpConstant %5 4
61-
%45 = OpConstantComposite %7 %43 %44
62-
%46 = OpConstant %3 1.5
63-
%47 = OpConstantComposite %10 %46 %46
64-
%48 = OpConstantComposite %4 %46 %46 %46 %46
65-
%49 = OpConstantComposite %10 %20 %20
66-
%50 = OpConstantComposite %16 %20 %20 %20
67-
%51 = OpConstantComposite %4 %20 %20 %20 %20
68-
%58 = OpConstantComposite %4 %20 %20 %20 %20
69-
%61 = OpConstantNull %5
48+
%32 = OpConstantComposite %7 %27 %27
49+
%33 = OpConstant %9 32
50+
%34 = OpConstant %5 32
51+
%35 = OpConstantComposite %8 %33 %33
52+
%36 = OpConstantComposite %7 %34 %34
53+
%37 = OpConstant %9 31
54+
%38 = OpConstantComposite %8 %37 %37
55+
%39 = OpConstant %5 2
56+
%40 = OpConstant %3 2
57+
%41 = OpConstantComposite %10 %20 %40
58+
%42 = OpConstant %5 3
59+
%43 = OpConstant %5 4
60+
%44 = OpConstantComposite %7 %42 %43
61+
%45 = OpConstant %3 1.5
62+
%46 = OpConstantComposite %10 %45 %45
63+
%47 = OpConstantComposite %4 %45 %45 %45 %45
64+
%48 = OpConstantComposite %10 %20 %20
65+
%49 = OpConstantComposite %16 %20 %20 %20
66+
%50 = OpConstantComposite %4 %20 %20 %20 %20
67+
%57 = OpConstantComposite %4 %20 %20 %20 %20
7068
%18 = OpFunction %2 None %19
7169
%17 = OpLabel
72-
OpBranch %52
73-
%52 = OpLabel
74-
%53 = OpExtInst %3 %1 Degrees %20
75-
%54 = OpExtInst %3 %1 Radians %20
76-
%55 = OpExtInst %4 %1 Degrees %22
77-
%56 = OpExtInst %4 %1 Radians %22
78-
%57 = OpExtInst %4 %1 FClamp %22 %22 %58
79-
%59 = OpExtInst %4 %1 Refract %22 %22 %20
80-
%62 = OpCompositeExtract %5 %27 0
81-
%63 = OpCompositeExtract %5 %27 0
82-
%64 = OpIMul %5 %62 %63
83-
%65 = OpIAdd %5 %61 %64
84-
%66 = OpCompositeExtract %5 %27 1
85-
%67 = OpCompositeExtract %5 %27 1
86-
%68 = OpIMul %5 %66 %67
87-
%60 = OpIAdd %5 %65 %68
88-
%69 = OpExtInst %3 %1 Ldexp %20 %40
89-
%70 = OpExtInst %10 %1 Ldexp %42 %45
90-
%71 = OpExtInst %11 %1 ModfStruct %46
91-
%72 = OpExtInst %11 %1 ModfStruct %46
92-
%73 = OpCompositeExtract %3 %72 0
93-
%74 = OpExtInst %11 %1 ModfStruct %46
94-
%75 = OpCompositeExtract %3 %74 1
95-
%76 = OpExtInst %12 %1 ModfStruct %47
96-
%77 = OpExtInst %13 %1 ModfStruct %48
97-
%78 = OpCompositeExtract %4 %77 1
98-
%79 = OpCompositeExtract %3 %78 0
99-
%80 = OpExtInst %12 %1 ModfStruct %47
100-
%81 = OpCompositeExtract %10 %80 0
101-
%82 = OpCompositeExtract %3 %81 1
102-
%83 = OpExtInst %14 %1 FrexpStruct %46
103-
%84 = OpExtInst %14 %1 FrexpStruct %46
104-
%85 = OpCompositeExtract %3 %84 0
105-
%86 = OpExtInst %14 %1 FrexpStruct %46
106-
%87 = OpCompositeExtract %5 %86 1
107-
%88 = OpExtInst %15 %1 FrexpStruct %48
108-
%89 = OpCompositeExtract %6 %88 1
109-
%90 = OpCompositeExtract %5 %89 0
110-
%91 = OpQuantizeToF16 %3 %20
111-
%92 = OpQuantizeToF16 %10 %49
112-
%93 = OpQuantizeToF16 %16 %50
113-
%94 = OpQuantizeToF16 %4 %51
70+
OpBranch %51
71+
%51 = OpLabel
72+
%52 = OpExtInst %3 %1 Degrees %20
73+
%53 = OpExtInst %3 %1 Radians %20
74+
%54 = OpExtInst %4 %1 Degrees %22
75+
%55 = OpExtInst %4 %1 Radians %22
76+
%56 = OpExtInst %4 %1 FClamp %22 %22 %57
77+
%58 = OpExtInst %4 %1 Refract %22 %22 %20
78+
%59 = OpExtInst %3 %1 Ldexp %20 %39
79+
%60 = OpExtInst %10 %1 Ldexp %41 %44
80+
%61 = OpExtInst %11 %1 ModfStruct %45
81+
%62 = OpExtInst %11 %1 ModfStruct %45
82+
%63 = OpCompositeExtract %3 %62 0
83+
%64 = OpExtInst %11 %1 ModfStruct %45
84+
%65 = OpCompositeExtract %3 %64 1
85+
%66 = OpExtInst %12 %1 ModfStruct %46
86+
%67 = OpExtInst %13 %1 ModfStruct %47
87+
%68 = OpCompositeExtract %4 %67 1
88+
%69 = OpCompositeExtract %3 %68 0
89+
%70 = OpExtInst %12 %1 ModfStruct %46
90+
%71 = OpCompositeExtract %10 %70 0
91+
%72 = OpCompositeExtract %3 %71 1
92+
%73 = OpExtInst %14 %1 FrexpStruct %45
93+
%74 = OpExtInst %14 %1 FrexpStruct %45
94+
%75 = OpCompositeExtract %3 %74 0
95+
%76 = OpExtInst %14 %1 FrexpStruct %45
96+
%77 = OpCompositeExtract %5 %76 1
97+
%78 = OpExtInst %15 %1 FrexpStruct %47
98+
%79 = OpCompositeExtract %6 %78 1
99+
%80 = OpCompositeExtract %5 %79 0
100+
%81 = OpQuantizeToF16 %3 %20
101+
%82 = OpQuantizeToF16 %10 %48
102+
%83 = OpQuantizeToF16 %16 %49
103+
%84 = OpQuantizeToF16 %4 %50
114104
OpReturn
115105
OpFunctionEnd

0 commit comments

Comments
 (0)