Migrate more tests from Ignore() to phony-assignment

The `Ignore()` intrinsic is about to be deprecated, so don't use it for testing.

Bug: tint:1213
Change-Id: I314ecaeb9a9c337c7b6980189054120a74807ebd
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67066
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
Ben Clayton
2021-10-22 00:21:44 +00:00
committed by Tint LUCI CQ
parent cc7c4f309b
commit c2fa68e551
171 changed files with 520 additions and 839 deletions

View File

@@ -69,11 +69,11 @@ fn main(fragment : FragmentInput) -> FragmentOutput {
var output : FragmentOutput;
output.color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
ignore(uniforms);
ignore(mySampler);
ignore(myTexture);
_ = uniforms;
_ = mySampler;
_ = myTexture;
ignore(pointLights);
_ = &pointLights;
// output.color.x = output.color.x + pointLights.values[0].position.x;
return output;

View File

@@ -51,10 +51,6 @@ struct tint_symbol_2 {
FragmentOutput main_inner(FragmentInput fragment) {
FragmentOutput output = (FragmentOutput)0;
output.color = float4(1.0f, 0.0f, 0.0f, 1.0f);
uniforms;
mySampler;
myTexture;
pointLights;
return output;
}

View File

@@ -56,19 +56,15 @@ float4 getColor(constant Uniforms& uniforms, FragmentInput tint_symbol, texture2
return color;
}
FragmentOutput tint_symbol_1_inner(constant Uniforms& uniforms, const device PointLights& pointLights, FragmentInput tint_symbol, sampler tint_symbol_8, texture2d<float, access::sample> tint_symbol_9) {
FragmentOutput tint_symbol_1_inner(FragmentInput tint_symbol, sampler tint_symbol_8, texture2d<float, access::sample> tint_symbol_9) {
FragmentOutput output = {};
output.color = float4(1.0f, 0.0f, 0.0f, 1.0f);
(void) uniforms;
(void) tint_symbol_8;
(void) tint_symbol_9;
(void) pointLights;
return output;
}
fragment tint_symbol_4 tint_symbol_1(sampler tint_symbol_10 [[sampler(0)]], texture2d<float, access::sample> tint_symbol_11 [[texture(0)]], float4 position [[position]], tint_symbol_3 tint_symbol_2 [[stage_in]], constant Uniforms& uniforms [[buffer(0)]], const device PointLights& pointLights [[buffer(1)]]) {
fragment tint_symbol_4 tint_symbol_1(sampler tint_symbol_10 [[sampler(0)]], texture2d<float, access::sample> tint_symbol_11 [[texture(0)]], float4 position [[position]], tint_symbol_3 tint_symbol_2 [[stage_in]]) {
FragmentInput const tint_symbol_5 = {.position=position, .view_position=tint_symbol_2.view_position, .normal=tint_symbol_2.normal, .uv=tint_symbol_2.uv, .color=tint_symbol_2.color};
FragmentOutput const inner_result = tint_symbol_1_inner(uniforms, pointLights, tint_symbol_5, tint_symbol_10, tint_symbol_11);
FragmentOutput const inner_result = tint_symbol_1_inner(tint_symbol_5, tint_symbol_10, tint_symbol_11);
tint_symbol_4 wrapper_result = {};
wrapper_result.color = inner_result.color;
return wrapper_result;

View File

@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 110
; Bound: 107
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -128,7 +128,7 @@
%float_0 = OpConstant %float 0
%92 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%void = OpTypeVoid
%99 = OpTypeFunction %void
%95 = OpTypeFunction %void
%getColor = OpFunction %v4float None %30
%fragment = OpFunctionParameter %FragmentInput
%34 = OpLabel
@@ -195,19 +195,19 @@
%output = OpVariable %_ptr_Function_FragmentOutput Function %89
%90 = OpAccessChain %_ptr_Function_v4float %output %uint_0
OpStore %90 %92
%98 = OpLoad %FragmentOutput %output
OpReturnValue %98
%94 = OpLoad %FragmentOutput %output
OpReturnValue %94
OpFunctionEnd
%main = OpFunction %void None %99
%101 = OpLabel
%103 = OpLoad %v4float %position_1
%104 = OpLoad %v4float %view_position_1
%105 = OpLoad %v4float %normal_1
%106 = OpLoad %v2float %uv_1
%107 = OpLoad %v4float %color_1
%108 = OpCompositeConstruct %FragmentInput %103 %104 %105 %106 %107
%102 = OpFunctionCall %FragmentOutput %main_inner %108
%109 = OpCompositeExtract %v4float %102 0
OpStore %color_2 %109
%main = OpFunction %void None %95
%98 = OpLabel
%100 = OpLoad %v4float %position_1
%101 = OpLoad %v4float %view_position_1
%102 = OpLoad %v4float %normal_1
%103 = OpLoad %v2float %uv_1
%104 = OpLoad %v4float %color_1
%105 = OpCompositeConstruct %FragmentInput %100 %101 %102 %103 %104
%99 = OpFunctionCall %FragmentOutput %main_inner %105
%106 = OpCompositeExtract %v4float %99 0
OpStore %color_2 %106
OpReturn
OpFunctionEnd

View File

@@ -61,9 +61,9 @@ fn getColor(fragment : FragmentInput) -> vec4<f32> {
fn main(fragment : FragmentInput) -> FragmentOutput {
var output : FragmentOutput;
output.color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
ignore(uniforms);
ignore(mySampler);
ignore(myTexture);
ignore(pointLights);
_ = uniforms;
_ = mySampler;
_ = myTexture;
_ = &(pointLights);
return output;
}

View File

@@ -61,54 +61,54 @@ struct S {
[[stage(fragment)]]
fn main() {
ignore(b0);
ignore(b1);
ignore(b2);
ignore(b3);
ignore(b4);
ignore(b5);
ignore(b6);
ignore(b7);
ignore(b8);
ignore(b9);
ignore(b10);
ignore(b11);
ignore(b12);
ignore(b13);
ignore(b14);
ignore(b15);
_ = b0;
_ = b1;
_ = b2;
_ = b3;
_ = b4;
_ = b5;
_ = b6;
_ = b7;
_ = b8;
_ = b9;
_ = b10;
_ = b11;
_ = b12;
_ = b13;
_ = b14;
_ = b15;
ignore(t0);
ignore(t1);
ignore(t2);
ignore(t3);
ignore(t4);
ignore(t5);
ignore(t6);
ignore(t7);
ignore(t8);
ignore(t9);
ignore(t10);
ignore(t11);
ignore(t12);
ignore(t13);
ignore(t14);
ignore(t15);
_ = t0;
_ = t1;
_ = t2;
_ = t3;
_ = t4;
_ = t5;
_ = t6;
_ = t7;
_ = t8;
_ = t9;
_ = t10;
_ = t11;
_ = t12;
_ = t13;
_ = t14;
_ = t15;
ignore(s0);
ignore(s1);
ignore(s2);
ignore(s3);
ignore(s4);
ignore(s5);
ignore(s6);
ignore(s7);
ignore(s8);
ignore(s9);
ignore(s10);
ignore(s11);
ignore(s12);
ignore(s13);
ignore(s14);
ignore(s15);
_ = s0;
_ = s1;
_ = s2;
_ = s3;
_ = s4;
_ = s5;
_ = s6;
_ = s7;
_ = s8;
_ = s9;
_ = s10;
_ = s11;
_ = s12;
_ = s13;
_ = s14;
_ = s15;
}

View File

@@ -64,53 +64,5 @@ SamplerComparisonState s14 : register(s300, space14);
SamplerComparisonState s15 : register(s300, space15);
void main() {
b0;
b1;
b2;
b3;
b4;
b5;
b6;
b7;
b8;
b9;
b10;
b11;
b12;
b13;
b14;
b15;
t0;
t1;
t2;
t3;
t4;
t5;
t6;
t7;
t8;
t9;
t10;
t11;
t12;
t13;
t14;
t15;
s0;
s1;
s2;
s3;
s4;
s5;
s6;
s7;
s8;
s9;
s10;
s11;
s12;
s13;
s14;
s15;
return;
}

View File

@@ -5,55 +5,7 @@ struct S {
/* 0x0000 */ float a;
};
fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_1 [[texture(0)]], texture2d<float, access::sample> tint_symbol_2 [[texture(1)]], texture2d<float, access::sample> tint_symbol_3 [[texture(2)]], texture2d<float, access::sample> tint_symbol_4 [[texture(3)]], texture2d<float, access::sample> tint_symbol_5 [[texture(4)]], texture2d<float, access::sample> tint_symbol_6 [[texture(5)]], texture2d<float, access::sample> tint_symbol_7 [[texture(6)]], texture2d<float, access::sample> tint_symbol_8 [[texture(7)]], depth2d<float, access::sample> tint_symbol_9 [[texture(8)]], depth2d<float, access::sample> tint_symbol_10 [[texture(9)]], depth2d<float, access::sample> tint_symbol_11 [[texture(10)]], depth2d<float, access::sample> tint_symbol_12 [[texture(11)]], depth2d<float, access::sample> tint_symbol_13 [[texture(12)]], depth2d<float, access::sample> tint_symbol_14 [[texture(13)]], depth2d<float, access::sample> tint_symbol_15 [[texture(14)]], depth2d<float, access::sample> tint_symbol_16 [[texture(15)]], sampler tint_symbol_17 [[sampler(0)]], sampler tint_symbol_18 [[sampler(1)]], sampler tint_symbol_19 [[sampler(2)]], sampler tint_symbol_20 [[sampler(3)]], sampler tint_symbol_21 [[sampler(4)]], sampler tint_symbol_22 [[sampler(5)]], sampler tint_symbol_23 [[sampler(6)]], sampler tint_symbol_24 [[sampler(7)]], sampler tint_symbol_25 [[sampler(8)]], sampler tint_symbol_26 [[sampler(9)]], sampler tint_symbol_27 [[sampler(10)]], sampler tint_symbol_28 [[sampler(11)]], sampler tint_symbol_29 [[sampler(12)]], sampler tint_symbol_30 [[sampler(13)]], sampler tint_symbol_31 [[sampler(14)]], sampler tint_symbol_32 [[sampler(15)]], constant S& b8 [[buffer(0)]], constant S& b9 [[buffer(1)]], constant S& b10 [[buffer(2)]], constant S& b11 [[buffer(3)]], constant S& b12 [[buffer(4)]], constant S& b13 [[buffer(5)]], constant S& b14 [[buffer(6)]], constant S& b15 [[buffer(7)]], const device S& b0 [[buffer(8)]], const device S& b1 [[buffer(9)]], const device S& b2 [[buffer(10)]], const device S& b3 [[buffer(11)]], const device S& b4 [[buffer(12)]], const device S& b5 [[buffer(13)]], const device S& b6 [[buffer(14)]], const device S& b7 [[buffer(15)]]) {
(void) b0;
(void) b1;
(void) b2;
(void) b3;
(void) b4;
(void) b5;
(void) b6;
(void) b7;
(void) b8;
(void) b9;
(void) b10;
(void) b11;
(void) b12;
(void) b13;
(void) b14;
(void) b15;
(void) tint_symbol_1;
(void) tint_symbol_2;
(void) tint_symbol_3;
(void) tint_symbol_4;
(void) tint_symbol_5;
(void) tint_symbol_6;
(void) tint_symbol_7;
(void) tint_symbol_8;
(void) tint_symbol_9;
(void) tint_symbol_10;
(void) tint_symbol_11;
(void) tint_symbol_12;
(void) tint_symbol_13;
(void) tint_symbol_14;
(void) tint_symbol_15;
(void) tint_symbol_16;
(void) tint_symbol_17;
(void) tint_symbol_18;
(void) tint_symbol_19;
(void) tint_symbol_20;
(void) tint_symbol_21;
(void) tint_symbol_22;
(void) tint_symbol_23;
(void) tint_symbol_24;
(void) tint_symbol_25;
(void) tint_symbol_26;
(void) tint_symbol_27;
(void) tint_symbol_28;
(void) tint_symbol_29;
(void) tint_symbol_30;
(void) tint_symbol_31;
(void) tint_symbol_32;
fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_1 [[texture(0)]], texture2d<float, access::sample> tint_symbol_2 [[texture(1)]], texture2d<float, access::sample> tint_symbol_3 [[texture(2)]], texture2d<float, access::sample> tint_symbol_4 [[texture(3)]], texture2d<float, access::sample> tint_symbol_5 [[texture(4)]], texture2d<float, access::sample> tint_symbol_6 [[texture(5)]], texture2d<float, access::sample> tint_symbol_7 [[texture(6)]], texture2d<float, access::sample> tint_symbol_8 [[texture(7)]], depth2d<float, access::sample> tint_symbol_9 [[texture(8)]], depth2d<float, access::sample> tint_symbol_10 [[texture(9)]], depth2d<float, access::sample> tint_symbol_11 [[texture(10)]], depth2d<float, access::sample> tint_symbol_12 [[texture(11)]], depth2d<float, access::sample> tint_symbol_13 [[texture(12)]], depth2d<float, access::sample> tint_symbol_14 [[texture(13)]], depth2d<float, access::sample> tint_symbol_15 [[texture(14)]], depth2d<float, access::sample> tint_symbol_16 [[texture(15)]], sampler tint_symbol_17 [[sampler(0)]], sampler tint_symbol_18 [[sampler(1)]], sampler tint_symbol_19 [[sampler(2)]], sampler tint_symbol_20 [[sampler(3)]], sampler tint_symbol_21 [[sampler(4)]], sampler tint_symbol_22 [[sampler(5)]], sampler tint_symbol_23 [[sampler(6)]], sampler tint_symbol_24 [[sampler(7)]], sampler tint_symbol_25 [[sampler(8)]], sampler tint_symbol_26 [[sampler(9)]], sampler tint_symbol_27 [[sampler(10)]], sampler tint_symbol_28 [[sampler(11)]], sampler tint_symbol_29 [[sampler(12)]], sampler tint_symbol_30 [[sampler(13)]], sampler tint_symbol_31 [[sampler(14)]], sampler tint_symbol_32 [[sampler(15)]]) {
return;
}

View File

@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 112
; Bound: 64
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450

View File

@@ -101,52 +101,52 @@ struct S {
[[stage(fragment)]]
fn main() {
ignore(b0);
ignore(b1);
ignore(b2);
ignore(b3);
ignore(b4);
ignore(b5);
ignore(b6);
ignore(b7);
ignore(b8);
ignore(b9);
ignore(b10);
ignore(b11);
ignore(b12);
ignore(b13);
ignore(b14);
ignore(b15);
ignore(t0);
ignore(t1);
ignore(t2);
ignore(t3);
ignore(t4);
ignore(t5);
ignore(t6);
ignore(t7);
ignore(t8);
ignore(t9);
ignore(t10);
ignore(t11);
ignore(t12);
ignore(t13);
ignore(t14);
ignore(t15);
ignore(s0);
ignore(s1);
ignore(s2);
ignore(s3);
ignore(s4);
ignore(s5);
ignore(s6);
ignore(s7);
ignore(s8);
ignore(s9);
ignore(s10);
ignore(s11);
ignore(s12);
ignore(s13);
ignore(s14);
ignore(s15);
_ = b0;
_ = b1;
_ = b2;
_ = b3;
_ = b4;
_ = b5;
_ = b6;
_ = b7;
_ = b8;
_ = b9;
_ = b10;
_ = b11;
_ = b12;
_ = b13;
_ = b14;
_ = b15;
_ = t0;
_ = t1;
_ = t2;
_ = t3;
_ = t4;
_ = t5;
_ = t6;
_ = t7;
_ = t8;
_ = t9;
_ = t10;
_ = t11;
_ = t12;
_ = t13;
_ = t14;
_ = t15;
_ = s0;
_ = s1;
_ = s2;
_ = s3;
_ = s4;
_ = s5;
_ = s6;
_ = s7;
_ = s8;
_ = s9;
_ = s10;
_ = s11;
_ = s12;
_ = s13;
_ = s14;
_ = s15;
}