Skip to content

Commit f7f0935

Browse files
sagudevjimblandy
authored andcommitted
Update expectations
Signed-off-by: sagudev <[email protected]>
1 parent 801b29c commit f7f0935

17 files changed

+233
-261
lines changed

Diff for: naga/tests/out/glsl/image.texture_sample.Fragment.glsl

+24-24
Original file line numberDiff line numberDiff line change
@@ -11,73 +11,73 @@ layout(location = 0) out vec4 _fs2p_location0;
1111

1212
void main() {
1313
vec4 a = vec4(0.0);
14-
vec2 tc = vec2(0.5);
15-
vec3 tc3_ = vec3(0.5);
16-
ivec2 offset = ivec2(3, 1);
14+
vec2 _e1 = vec2(0.5);
15+
vec3 _e3 = vec3(0.5);
16+
ivec2 _e6 = ivec2(3, 1);
1717
vec4 _e11 = texture(_group_0_binding_0_fs, 0.5);
1818
vec4 _e12 = a;
1919
a = (_e12 + _e11);
20-
vec4 _e16 = texture(_group_0_binding_1_fs, vec2(tc));
20+
vec4 _e16 = texture(_group_0_binding_1_fs, vec2(_e1));
2121
vec4 _e17 = a;
2222
a = (_e17 + _e16);
23-
vec4 _e24 = textureOffset(_group_0_binding_1_fs, vec2(tc), ivec2(3, 1));
23+
vec4 _e24 = textureOffset(_group_0_binding_1_fs, vec2(_e1), ivec2(3, 1));
2424
vec4 _e25 = a;
2525
a = (_e25 + _e24);
26-
vec4 _e29 = textureLod(_group_0_binding_1_fs, vec2(tc), 2.3);
26+
vec4 _e29 = textureLod(_group_0_binding_1_fs, vec2(_e1), 2.3);
2727
vec4 _e30 = a;
2828
a = (_e30 + _e29);
29-
vec4 _e34 = textureLodOffset(_group_0_binding_1_fs, vec2(tc), 2.3, ivec2(3, 1));
29+
vec4 _e34 = textureLodOffset(_group_0_binding_1_fs, vec2(_e1), 2.3, ivec2(3, 1));
3030
vec4 _e35 = a;
3131
a = (_e35 + _e34);
32-
vec4 _e40 = textureOffset(_group_0_binding_1_fs, vec2(tc), ivec2(3, 1), 2.0);
32+
vec4 _e40 = textureOffset(_group_0_binding_1_fs, vec2(_e1), ivec2(3, 1), 2.0);
3333
vec4 _e41 = a;
3434
a = (_e41 + _e40);
35-
vec4 _e46 = texture(_group_0_binding_4_fs, vec3(tc, 0u));
35+
vec4 _e46 = texture(_group_0_binding_4_fs, vec3(_e1, 0u));
3636
vec4 _e47 = a;
3737
a = (_e47 + _e46);
38-
vec4 _e52 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0u), ivec2(3, 1));
38+
vec4 _e52 = textureOffset(_group_0_binding_4_fs, vec3(_e1, 0u), ivec2(3, 1));
3939
vec4 _e53 = a;
4040
a = (_e53 + _e52);
41-
vec4 _e58 = textureLod(_group_0_binding_4_fs, vec3(tc, 0u), 2.3);
41+
vec4 _e58 = textureLod(_group_0_binding_4_fs, vec3(_e1, 0u), 2.3);
4242
vec4 _e59 = a;
4343
a = (_e59 + _e58);
44-
vec4 _e64 = textureLodOffset(_group_0_binding_4_fs, vec3(tc, 0u), 2.3, ivec2(3, 1));
44+
vec4 _e64 = textureLodOffset(_group_0_binding_4_fs, vec3(_e1, 0u), 2.3, ivec2(3, 1));
4545
vec4 _e65 = a;
4646
a = (_e65 + _e64);
47-
vec4 _e71 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0u), ivec2(3, 1), 2.0);
47+
vec4 _e71 = textureOffset(_group_0_binding_4_fs, vec3(_e1, 0u), ivec2(3, 1), 2.0);
4848
vec4 _e72 = a;
4949
a = (_e72 + _e71);
50-
vec4 _e77 = texture(_group_0_binding_4_fs, vec3(tc, 0));
50+
vec4 _e77 = texture(_group_0_binding_4_fs, vec3(_e1, 0));
5151
vec4 _e78 = a;
5252
a = (_e78 + _e77);
53-
vec4 _e83 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0), ivec2(3, 1));
53+
vec4 _e83 = textureOffset(_group_0_binding_4_fs, vec3(_e1, 0), ivec2(3, 1));
5454
vec4 _e84 = a;
5555
a = (_e84 + _e83);
56-
vec4 _e89 = textureLod(_group_0_binding_4_fs, vec3(tc, 0), 2.3);
56+
vec4 _e89 = textureLod(_group_0_binding_4_fs, vec3(_e1, 0), 2.3);
5757
vec4 _e90 = a;
5858
a = (_e90 + _e89);
59-
vec4 _e95 = textureLodOffset(_group_0_binding_4_fs, vec3(tc, 0), 2.3, ivec2(3, 1));
59+
vec4 _e95 = textureLodOffset(_group_0_binding_4_fs, vec3(_e1, 0), 2.3, ivec2(3, 1));
6060
vec4 _e96 = a;
6161
a = (_e96 + _e95);
62-
vec4 _e102 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0), ivec2(3, 1), 2.0);
62+
vec4 _e102 = textureOffset(_group_0_binding_4_fs, vec3(_e1, 0), ivec2(3, 1), 2.0);
6363
vec4 _e103 = a;
6464
a = (_e103 + _e102);
65-
vec4 _e108 = texture(_group_0_binding_6_fs, vec4(tc3_, 0u));
65+
vec4 _e108 = texture(_group_0_binding_6_fs, vec4(_e3, 0u));
6666
vec4 _e109 = a;
6767
a = (_e109 + _e108);
68-
vec4 _e114 = textureLod(_group_0_binding_6_fs, vec4(tc3_, 0u), 2.3);
68+
vec4 _e114 = textureLod(_group_0_binding_6_fs, vec4(_e3, 0u), 2.3);
6969
vec4 _e115 = a;
7070
a = (_e115 + _e114);
71-
vec4 _e121 = texture(_group_0_binding_6_fs, vec4(tc3_, 0u), 2.0);
71+
vec4 _e121 = texture(_group_0_binding_6_fs, vec4(_e3, 0u), 2.0);
7272
vec4 _e122 = a;
7373
a = (_e122 + _e121);
74-
vec4 _e127 = texture(_group_0_binding_6_fs, vec4(tc3_, 0));
74+
vec4 _e127 = texture(_group_0_binding_6_fs, vec4(_e3, 0));
7575
vec4 _e128 = a;
7676
a = (_e128 + _e127);
77-
vec4 _e133 = textureLod(_group_0_binding_6_fs, vec4(tc3_, 0), 2.3);
77+
vec4 _e133 = textureLod(_group_0_binding_6_fs, vec4(_e3, 0), 2.3);
7878
vec4 _e134 = a;
7979
a = (_e134 + _e133);
80-
vec4 _e140 = texture(_group_0_binding_6_fs, vec4(tc3_, 0), 2.0);
80+
vec4 _e140 = texture(_group_0_binding_6_fs, vec4(_e3, 0), 2.0);
8181
vec4 _e141 = a;
8282
a = (_e141 + _e140);
8383
vec4 _e143 = a;

Diff for: naga/tests/out/hlsl/image.hlsl

+45-45
Original file line numberDiff line numberDiff line change
@@ -258,73 +258,73 @@ float4 texture_sample() : SV_Target0
258258
{
259259
float4 a = (float4)0;
260260

261-
float2 tc = (0.5).xx;
262-
float3 tc3_ = (0.5).xxx;
263-
int2 offset = int2(int(3), int(1));
261+
float2 _e1 = (0.5).xx;
262+
float3 _e3 = (0.5).xxx;
263+
int2 _e6 = int2(int(3), int(1));
264264
float4 _e11 = image_1d.Sample(sampler_reg, 0.5);
265265
float4 _e12 = a;
266266
a = (_e12 + _e11);
267-
float4 _e16 = image_2d.Sample(sampler_reg, tc);
267+
float4 _e16 = image_2d.Sample(sampler_reg, _e1);
268268
float4 _e17 = a;
269269
a = (_e17 + _e16);
270-
float4 _e24 = image_2d.Sample(sampler_reg, tc, int2(int2(int(3), int(1))));
270+
float4 _e24 = image_2d.Sample(sampler_reg, _e1, int2(int2(int(3), int(1))));
271271
float4 _e25 = a;
272272
a = (_e25 + _e24);
273-
float4 _e29 = image_2d.SampleLevel(sampler_reg, tc, 2.3);
273+
float4 _e29 = image_2d.SampleLevel(sampler_reg, _e1, 2.3);
274274
float4 _e30 = a;
275275
a = (_e30 + _e29);
276-
float4 _e34 = image_2d.SampleLevel(sampler_reg, tc, 2.3, int2(int2(int(3), int(1))));
276+
float4 _e34 = image_2d.SampleLevel(sampler_reg, _e1, 2.3, int2(int2(int(3), int(1))));
277277
float4 _e35 = a;
278278
a = (_e35 + _e34);
279-
float4 _e40 = image_2d.SampleBias(sampler_reg, tc, 2.0, int2(int2(int(3), int(1))));
279+
float4 _e40 = image_2d.SampleBias(sampler_reg, _e1, 2.0, int2(int2(int(3), int(1))));
280280
float4 _e41 = a;
281281
a = (_e41 + _e40);
282-
float4 _e46 = image_2d_array.Sample(sampler_reg, float3(tc, 0u));
282+
float4 _e46 = image_2d_array.Sample(sampler_reg, float3(_e1, 0u));
283283
float4 _e47 = a;
284284
a = (_e47 + _e46);
285-
float4 _e52 = image_2d_array.Sample(sampler_reg, float3(tc, 0u), int2(int2(int(3), int(1))));
285+
float4 _e52 = image_2d_array.Sample(sampler_reg, float3(_e1, 0u), int2(int2(int(3), int(1))));
286286
float4 _e53 = a;
287287
a = (_e53 + _e52);
288-
float4 _e58 = image_2d_array.SampleLevel(sampler_reg, float3(tc, 0u), 2.3);
288+
float4 _e58 = image_2d_array.SampleLevel(sampler_reg, float3(_e1, 0u), 2.3);
289289
float4 _e59 = a;
290290
a = (_e59 + _e58);
291-
float4 _e64 = image_2d_array.SampleLevel(sampler_reg, float3(tc, 0u), 2.3, int2(int2(int(3), int(1))));
291+
float4 _e64 = image_2d_array.SampleLevel(sampler_reg, float3(_e1, 0u), 2.3, int2(int2(int(3), int(1))));
292292
float4 _e65 = a;
293293
a = (_e65 + _e64);
294-
float4 _e71 = image_2d_array.SampleBias(sampler_reg, float3(tc, 0u), 2.0, int2(int2(int(3), int(1))));
294+
float4 _e71 = image_2d_array.SampleBias(sampler_reg, float3(_e1, 0u), 2.0, int2(int2(int(3), int(1))));
295295
float4 _e72 = a;
296296
a = (_e72 + _e71);
297-
float4 _e77 = image_2d_array.Sample(sampler_reg, float3(tc, int(0)));
297+
float4 _e77 = image_2d_array.Sample(sampler_reg, float3(_e1, int(0)));
298298
float4 _e78 = a;
299299
a = (_e78 + _e77);
300-
float4 _e83 = image_2d_array.Sample(sampler_reg, float3(tc, int(0)), int2(int2(int(3), int(1))));
300+
float4 _e83 = image_2d_array.Sample(sampler_reg, float3(_e1, int(0)), int2(int2(int(3), int(1))));
301301
float4 _e84 = a;
302302
a = (_e84 + _e83);
303-
float4 _e89 = image_2d_array.SampleLevel(sampler_reg, float3(tc, int(0)), 2.3);
303+
float4 _e89 = image_2d_array.SampleLevel(sampler_reg, float3(_e1, int(0)), 2.3);
304304
float4 _e90 = a;
305305
a = (_e90 + _e89);
306-
float4 _e95 = image_2d_array.SampleLevel(sampler_reg, float3(tc, int(0)), 2.3, int2(int2(int(3), int(1))));
306+
float4 _e95 = image_2d_array.SampleLevel(sampler_reg, float3(_e1, int(0)), 2.3, int2(int2(int(3), int(1))));
307307
float4 _e96 = a;
308308
a = (_e96 + _e95);
309-
float4 _e102 = image_2d_array.SampleBias(sampler_reg, float3(tc, int(0)), 2.0, int2(int2(int(3), int(1))));
309+
float4 _e102 = image_2d_array.SampleBias(sampler_reg, float3(_e1, int(0)), 2.0, int2(int2(int(3), int(1))));
310310
float4 _e103 = a;
311311
a = (_e103 + _e102);
312-
float4 _e108 = image_cube_array.Sample(sampler_reg, float4(tc3_, 0u));
312+
float4 _e108 = image_cube_array.Sample(sampler_reg, float4(_e3, 0u));
313313
float4 _e109 = a;
314314
a = (_e109 + _e108);
315-
float4 _e114 = image_cube_array.SampleLevel(sampler_reg, float4(tc3_, 0u), 2.3);
315+
float4 _e114 = image_cube_array.SampleLevel(sampler_reg, float4(_e3, 0u), 2.3);
316316
float4 _e115 = a;
317317
a = (_e115 + _e114);
318-
float4 _e121 = image_cube_array.SampleBias(sampler_reg, float4(tc3_, 0u), 2.0);
318+
float4 _e121 = image_cube_array.SampleBias(sampler_reg, float4(_e3, 0u), 2.0);
319319
float4 _e122 = a;
320320
a = (_e122 + _e121);
321-
float4 _e127 = image_cube_array.Sample(sampler_reg, float4(tc3_, int(0)));
321+
float4 _e127 = image_cube_array.Sample(sampler_reg, float4(_e3, int(0)));
322322
float4 _e128 = a;
323323
a = (_e128 + _e127);
324-
float4 _e133 = image_cube_array.SampleLevel(sampler_reg, float4(tc3_, int(0)), 2.3);
324+
float4 _e133 = image_cube_array.SampleLevel(sampler_reg, float4(_e3, int(0)), 2.3);
325325
float4 _e134 = a;
326326
a = (_e134 + _e133);
327-
float4 _e140 = image_cube_array.SampleBias(sampler_reg, float4(tc3_, int(0)), 2.0);
327+
float4 _e140 = image_cube_array.SampleBias(sampler_reg, float4(_e3, int(0)), 2.0);
328328
float4 _e141 = a;
329329
a = (_e141 + _e140);
330330
float4 _e143 = a;
@@ -335,30 +335,30 @@ float texture_sample_comparison() : SV_Target0
335335
{
336336
float a_1 = (float)0;
337337

338-
float2 tc_1 = (0.5).xx;
339-
float3 tc3_1 = (0.5).xxx;
340-
float _e8 = image_2d_depth.SampleCmp(sampler_cmp, tc_1, 0.5);
338+
float2 tc = (0.5).xx;
339+
float3 tc3_ = (0.5).xxx;
340+
float _e8 = image_2d_depth.SampleCmp(sampler_cmp, tc, 0.5);
341341
float _e9 = a_1;
342342
a_1 = (_e9 + _e8);
343-
float _e14 = image_2d_array_depth.SampleCmp(sampler_cmp, float3(tc_1, 0u), 0.5);
343+
float _e14 = image_2d_array_depth.SampleCmp(sampler_cmp, float3(tc, 0u), 0.5);
344344
float _e15 = a_1;
345345
a_1 = (_e15 + _e14);
346-
float _e20 = image_2d_array_depth.SampleCmp(sampler_cmp, float3(tc_1, int(0)), 0.5);
346+
float _e20 = image_2d_array_depth.SampleCmp(sampler_cmp, float3(tc, int(0)), 0.5);
347347
float _e21 = a_1;
348348
a_1 = (_e21 + _e20);
349-
float _e25 = image_cube_depth.SampleCmp(sampler_cmp, tc3_1, 0.5);
349+
float _e25 = image_cube_depth.SampleCmp(sampler_cmp, tc3_, 0.5);
350350
float _e26 = a_1;
351351
a_1 = (_e26 + _e25);
352-
float _e30 = image_2d_depth.SampleCmpLevelZero(sampler_cmp, tc_1, 0.5);
352+
float _e30 = image_2d_depth.SampleCmpLevelZero(sampler_cmp, tc, 0.5);
353353
float _e31 = a_1;
354354
a_1 = (_e31 + _e30);
355-
float _e36 = image_2d_array_depth.SampleCmpLevelZero(sampler_cmp, float3(tc_1, 0u), 0.5);
355+
float _e36 = image_2d_array_depth.SampleCmpLevelZero(sampler_cmp, float3(tc, 0u), 0.5);
356356
float _e37 = a_1;
357357
a_1 = (_e37 + _e36);
358-
float _e42 = image_2d_array_depth.SampleCmpLevelZero(sampler_cmp, float3(tc_1, int(0)), 0.5);
358+
float _e42 = image_2d_array_depth.SampleCmpLevelZero(sampler_cmp, float3(tc, int(0)), 0.5);
359359
float _e43 = a_1;
360360
a_1 = (_e43 + _e42);
361-
float _e47 = image_cube_depth.SampleCmpLevelZero(sampler_cmp, tc3_1, 0.5);
361+
float _e47 = image_cube_depth.SampleCmpLevelZero(sampler_cmp, tc3_, 0.5);
362362
float _e48 = a_1;
363363
a_1 = (_e48 + _e47);
364364
float _e50 = a_1;
@@ -367,22 +367,22 @@ float texture_sample_comparison() : SV_Target0
367367

368368
float4 gather() : SV_Target0
369369
{
370-
float2 tc_2 = (0.5).xx;
371-
float4 s2d = image_2d.GatherGreen(sampler_reg, tc_2);
372-
float4 s2d_offset = image_2d.GatherAlpha(sampler_reg, tc_2, int2(int2(int(3), int(1))));
373-
float4 s2d_depth = image_2d_depth.GatherCmp(sampler_cmp, tc_2, 0.5);
374-
float4 s2d_depth_offset = image_2d_depth.GatherCmp(sampler_cmp, tc_2, 0.5, int2(int2(int(3), int(1))));
375-
uint4 u = image_2d_u32_.Gather(sampler_reg, tc_2);
376-
int4 i = image_2d_i32_.Gather(sampler_reg, tc_2);
370+
float2 tc_1 = (0.5).xx;
371+
float4 s2d = image_2d.GatherGreen(sampler_reg, tc_1);
372+
float4 s2d_offset = image_2d.GatherAlpha(sampler_reg, tc_1, int2(int2(int(3), int(1))));
373+
float4 s2d_depth = image_2d_depth.GatherCmp(sampler_cmp, tc_1, 0.5);
374+
float4 s2d_depth_offset = image_2d_depth.GatherCmp(sampler_cmp, tc_1, 0.5, int2(int2(int(3), int(1))));
375+
uint4 u = image_2d_u32_.Gather(sampler_reg, tc_1);
376+
int4 i = image_2d_i32_.Gather(sampler_reg, tc_1);
377377
float4 f = (float4(u) + float4(i));
378378
return ((((s2d + s2d_offset) + s2d_depth) + s2d_depth_offset) + f);
379379
}
380380

381381
float4 depth_no_comparison() : SV_Target0
382382
{
383-
float2 tc_3 = (0.5).xx;
384-
float s2d_1 = image_2d_depth.Sample(sampler_reg, tc_3);
385-
float4 s2d_gather = image_2d_depth.Gather(sampler_reg, tc_3);
386-
float s2d_level = image_2d_depth.SampleLevel(sampler_reg, tc_3, int(1));
383+
float2 tc_2 = (0.5).xx;
384+
float s2d_1 = image_2d_depth.Sample(sampler_reg, tc_2);
385+
float4 s2d_gather = image_2d_depth.Gather(sampler_reg, tc_2);
386+
float s2d_level = image_2d_depth.SampleLevel(sampler_reg, tc_2, int(1));
387387
return (((s2d_1).xxxx + s2d_gather) + (s2d_level).xxxx);
388388
}

Diff for: naga/tests/out/ir/local-const.compact.ron

+2-16
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,8 @@
5858
arguments: [],
5959
result: None,
6060
local_variables: [],
61-
expressions: [
62-
Literal(I32(4)),
63-
Literal(U32(4)),
64-
Literal(F32(4.0)),
65-
Constant(0),
66-
Constant(1),
67-
Constant(2),
68-
],
69-
named_expressions: {
70-
0: "b",
71-
1: "c",
72-
2: "d",
73-
3: "bg",
74-
4: "cg",
75-
5: "dg",
76-
},
61+
expressions: [],
62+
named_expressions: {},
7763
body: [
7864
Emit((
7965
start: 0,

Diff for: naga/tests/out/ir/local-const.ron

+2-16
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,8 @@
5858
arguments: [],
5959
result: None,
6060
local_variables: [],
61-
expressions: [
62-
Literal(I32(4)),
63-
Literal(U32(4)),
64-
Literal(F32(4.0)),
65-
Constant(0),
66-
Constant(1),
67-
Constant(2),
68-
],
69-
named_expressions: {
70-
0: "b",
71-
1: "c",
72-
2: "d",
73-
3: "bg",
74-
4: "cg",
75-
5: "dg",
76-
},
61+
expressions: [],
62+
named_expressions: {},
7763
body: [
7864
Emit((
7965
start: 0,

0 commit comments

Comments
 (0)