diff --git a/src/intrinsic_table.inl b/src/intrinsic_table.inl index 430fa8bb0d..01328fb5ad 100644 --- a/src/intrinsic_table.inl +++ b/src/intrinsic_table.inl @@ -3812,7 +3812,7 @@ constexpr ParameterInfo kParameters[] = { { /* [388] */ /* usage */ ParameterUsage::kNone, - /* matcher indices */ &kMatcherIndices[5], + /* matcher indices */ &kMatcherIndices[6], }, { /* [389] */ @@ -3912,7 +3912,7 @@ constexpr ParameterInfo kParameters[] = { { /* [408] */ /* usage */ ParameterUsage::kNone, - /* matcher indices */ &kMatcherIndices[44], + /* matcher indices */ &kMatcherIndices[4], }, { /* [409] */ @@ -7361,9 +7361,9 @@ constexpr OverloadInfo kOverloads[] = { { /* [195] */ /* num parameters */ 2, - /* num open types */ 1, + /* num open types */ 0, /* num open numbers */ 0, - /* open types */ &kOpenTypes[2], + /* open types */ &kOpenTypes[4], /* open numbers */ &kOpenNumbers[7], /* parameters */ &kParameters[387], /* return matcher indices */ &kMatcherIndices[7], @@ -7373,9 +7373,9 @@ constexpr OverloadInfo kOverloads[] = { { /* [196] */ /* num parameters */ 2, - /* num open types */ 1, + /* num open types */ 0, /* num open numbers */ 1, - /* open types */ &kOpenTypes[2], + /* open types */ &kOpenTypes[4], /* open numbers */ &kOpenNumbers[1], /* parameters */ &kParameters[407], /* return matcher indices */ &kMatcherIndices[10], @@ -8638,8 +8638,8 @@ constexpr IntrinsicInfo kIntrinsics[] = { }, { /* [39] */ - /* fn ldexp(f32, T) -> f32 */ - /* fn ldexp(vec, vec) -> vec */ + /* fn ldexp(f32, i32) -> f32 */ + /* fn ldexp(vec, vec) -> vec */ /* num overloads */ 2, /* overloads */ &kOverloads[195], }, diff --git a/src/intrinsics.def b/src/intrinsics.def index 2c00daf6bf..cc8d200039 100644 --- a/src/intrinsics.def +++ b/src/intrinsics.def @@ -335,8 +335,8 @@ fn isNan(f32) -> bool fn isNan(vec) -> vec fn isNormal(f32) -> bool fn isNormal(vec) -> vec -fn ldexp(f32, T) -> f32 -fn ldexp(vec, vec) -> vec +fn ldexp(f32, i32) -> f32 +fn ldexp(vec, vec) -> vec fn length(f32) -> f32 fn length(vec) -> f32 fn log(f32) -> f32 diff --git a/src/writer/hlsl/generator_impl_intrinsic_test.cc b/src/writer/hlsl/generator_impl_intrinsic_test.cc index 7bc6289728..c0528739cb 100644 --- a/src/writer/hlsl/generator_impl_intrinsic_test.cc +++ b/src/writer/hlsl/generator_impl_intrinsic_test.cc @@ -102,7 +102,7 @@ ast::CallExpression* GenerateCall(IntrinsicType intrinsic, case IntrinsicType::kSign: return builder->Call(str.str(), "f2"); case IntrinsicType::kLdexp: - return builder->Call(str.str(), "f2", "u2"); + return builder->Call(str.str(), "f2", "i2"); case IntrinsicType::kAtan2: case IntrinsicType::kDot: case IntrinsicType::kDistance: @@ -157,12 +157,13 @@ using HlslIntrinsicTest = TestParamHelper; TEST_P(HlslIntrinsicTest, Emit) { auto param = GetParam(); - Global("f2", ty.vec2(), ast::StorageClass::kPrivate); - Global("f3", ty.vec3(), ast::StorageClass::kPrivate); - Global("u2", ty.vec2(), ast::StorageClass::kPrivate); + Global("f2", ty.vec2(), ast::StorageClass::kPrivate); + Global("f3", ty.vec3(), ast::StorageClass::kPrivate); + Global("u2", ty.vec2(), ast::StorageClass::kPrivate); + Global("i2", ty.vec2(), ast::StorageClass::kPrivate); Global("b2", ty.vec2(), ast::StorageClass::kPrivate); - Global("m2x2", ty.mat2x2(), ast::StorageClass::kPrivate); - Global("m3x2", ty.mat3x2(), ast::StorageClass::kPrivate); + Global("m2x2", ty.mat2x2(), ast::StorageClass::kPrivate); + Global("m3x2", ty.mat3x2(), ast::StorageClass::kPrivate); auto* call = GenerateCall(param.intrinsic, param.type, this); ASSERT_NE(nullptr, call) << "Unhandled intrinsic"; diff --git a/src/writer/msl/generator_impl_intrinsic_test.cc b/src/writer/msl/generator_impl_intrinsic_test.cc index 2be65e37de..80c07f29f5 100644 --- a/src/writer/msl/generator_impl_intrinsic_test.cc +++ b/src/writer/msl/generator_impl_intrinsic_test.cc @@ -98,7 +98,7 @@ ast::CallExpression* GenerateCall(IntrinsicType intrinsic, case IntrinsicType::kSign: return builder->Call(str.str(), "f2"); case IntrinsicType::kLdexp: - return builder->Call(str.str(), "f2", "u2"); + return builder->Call(str.str(), "f2", "i2"); case IntrinsicType::kAtan2: case IntrinsicType::kDot: case IntrinsicType::kDistance: @@ -169,14 +169,15 @@ using MslIntrinsicTest = TestParamHelper; TEST_P(MslIntrinsicTest, Emit) { auto param = GetParam(); - Global("f2", ty.vec2(), ast::StorageClass::kPrivate); - Global("f3", ty.vec3(), ast::StorageClass::kPrivate); - Global("f4", ty.vec4(), ast::StorageClass::kPrivate); + Global("f2", ty.vec2(), ast::StorageClass::kPrivate); + Global("f3", ty.vec3(), ast::StorageClass::kPrivate); + Global("f4", ty.vec4(), ast::StorageClass::kPrivate); Global("u1", ty.u32(), ast::StorageClass::kPrivate); - Global("u2", ty.vec2(), ast::StorageClass::kPrivate); + Global("u2", ty.vec2(), ast::StorageClass::kPrivate); + Global("i2", ty.vec2(), ast::StorageClass::kPrivate); Global("b2", ty.vec2(), ast::StorageClass::kPrivate); - Global("m2x2", ty.mat2x2(), ast::StorageClass::kPrivate); - Global("m3x2", ty.mat3x2(), ast::StorageClass::kPrivate); + Global("m2x2", ty.mat2x2(), ast::StorageClass::kPrivate); + Global("m3x2", ty.mat3x2(), ast::StorageClass::kPrivate); auto* call = GenerateCall(param.intrinsic, param.type, this); ASSERT_NE(nullptr, call) << "Unhandled intrinsic"; diff --git a/test/intrinsics/gen/ldexp/2cb32a.wgsl b/test/intrinsics/gen/ldexp/2cb32a.wgsl deleted file mode 100644 index 4323f205b7..0000000000 --- a/test/intrinsics/gen/ldexp/2cb32a.wgsl +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 The Tint Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//////////////////////////////////////////////////////////////////////////////// -// File generated by tools/intrinsic-gen -// using the template: -// test/intrinsics/intrinsics.wgsl.tmpl -// and the intrinsic defintion file: -// src/intrinsics.def -// -// Do not modify this file directly -//////////////////////////////////////////////////////////////////////////////// - - -// fn ldexp(vec<3, f32>, vec<3, u32>) -> vec<3, f32> -fn ldexp_2cb32a() { - var res: vec3 = ldexp(vec3(), vec3()); -} - -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { - ldexp_2cb32a(); - return vec4(); -} - -[[stage(fragment)]] -fn fragment_main() { - ldexp_2cb32a(); -} - -[[stage(compute), workgroup_size(1)]] -fn compute_main() { - ldexp_2cb32a(); -} diff --git a/test/intrinsics/gen/ldexp/2cb32a.wgsl.expected.hlsl b/test/intrinsics/gen/ldexp/2cb32a.wgsl.expected.hlsl deleted file mode 100644 index dc02f4a7be..0000000000 --- a/test/intrinsics/gen/ldexp/2cb32a.wgsl.expected.hlsl +++ /dev/null @@ -1,24 +0,0 @@ -void ldexp_2cb32a() { - float3 res = ldexp(float3(0.0f, 0.0f, 0.0f), uint3(0u, 0u, 0u)); -} - -struct tint_symbol { - float4 value : SV_Position; -}; - -tint_symbol vertex_main() { - ldexp_2cb32a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; -} - -void fragment_main() { - ldexp_2cb32a(); - return; -} - -[numthreads(1, 1, 1)] -void compute_main() { - ldexp_2cb32a(); - return; -} diff --git a/test/intrinsics/gen/ldexp/2cb32a.wgsl.expected.msl b/test/intrinsics/gen/ldexp/2cb32a.wgsl.expected.msl deleted file mode 100644 index da7795824a..0000000000 --- a/test/intrinsics/gen/ldexp/2cb32a.wgsl.expected.msl +++ /dev/null @@ -1,56 +0,0 @@ -SKIP: FAILED - - - -Validation Failure: -#include - -using namespace metal; -void ldexp_2cb32a() { - float3 res = ldexp(float3(), uint3()); -} - -vertex void vertex_main() { - ldexp_2cb32a(); - return; -} - -fragment void fragment_main() { - ldexp_2cb32a(); - return; -} - -kernel void compute_main() { - ldexp_2cb32a(); - return; -} - - -tint_UUwNAv.metal:5:18: error: no matching function for call to 'ldexp' - float3 res = ldexp(float3(), uint3()); - ^~~~~ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:3580:19: note: candidate function not viable: no known conversion from 'uint3' (vector of 3 'unsigned int' values) to 'metal::int3' (aka 'int3') for 2nd argument -METAL_FUNC float3 ldexp(float3 x, int3 k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:2116:17: note: candidate function not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'half' for 1st argument -METAL_FUNC half ldexp(half x, int k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:2360:18: note: candidate function not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'metal::half2' (aka 'half2') for 1st argument -METAL_FUNC half2 ldexp(half2 x, int2 k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:2604:18: note: candidate function not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'metal::half3' (aka 'half3') for 1st argument -METAL_FUNC half3 ldexp(half3 x, int3 k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:2848:18: note: candidate function not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'metal::half4' (aka 'half4') for 1st argument -METAL_FUNC half4 ldexp(half4 x, int4 k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:3092:18: note: candidate function not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'float' for 1st argument -METAL_FUNC float ldexp(float x, int k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:3336:19: note: candidate function not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'metal::float2' (aka 'float2') for 1st argument -METAL_FUNC float2 ldexp(float2 x, int2 k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:3824:19: note: candidate function not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'metal::float4' (aka 'float4') for 1st argument -METAL_FUNC float4 ldexp(float4 x, int4 k) - ^ -1 error generated. diff --git a/test/intrinsics/gen/ldexp/2cb32a.wgsl.expected.spvasm b/test/intrinsics/gen/ldexp/2cb32a.wgsl.expected.spvasm deleted file mode 100644 index 7c0ec55178..0000000000 --- a/test/intrinsics/gen/ldexp/2cb32a.wgsl.expected.spvasm +++ /dev/null @@ -1,72 +0,0 @@ -; SPIR-V -; Version: 1.3 -; Generator: Google Tint Compiler; 0 -; Bound: 37 -; Schema: 0 - OpCapability Shader - %15 = OpExtInstImport "GLSL.std.450" - OpMemoryModel Logical GLSL450 - OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1 - OpEntryPoint Fragment %fragment_main "fragment_main" - OpEntryPoint GLCompute %compute_main "compute_main" - OpExecutionMode %fragment_main OriginUpperLeft - OpExecutionMode %compute_main LocalSize 1 1 1 - OpName %tint_pointsize "tint_pointsize" - OpName %tint_symbol_1 "tint_symbol_1" - OpName %ldexp_2cb32a "ldexp_2cb32a" - OpName %res "res" - OpName %tint_symbol_2 "tint_symbol_2" - OpName %tint_symbol "tint_symbol" - OpName %vertex_main "vertex_main" - OpName %fragment_main "fragment_main" - OpName %compute_main "compute_main" - OpDecorate %tint_pointsize BuiltIn PointSize - OpDecorate %tint_symbol_1 BuiltIn Position - %float = OpTypeFloat 32 -%_ptr_Output_float = OpTypePointer Output %float - %4 = OpConstantNull %float -%tint_pointsize = OpVariable %_ptr_Output_float Output %4 - %v4float = OpTypeVector %float 4 -%_ptr_Output_v4float = OpTypePointer Output %v4float - %8 = OpConstantNull %v4float -%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %8 - %void = OpTypeVoid - %9 = OpTypeFunction %void - %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float - %uint = OpTypeInt 32 0 - %v3uint = OpTypeVector %uint 3 - %19 = OpConstantNull %v3uint -%_ptr_Function_v3float = OpTypePointer Function %v3float - %22 = OpTypeFunction %void %v4float - %float_1 = OpConstant %float 1 -%ldexp_2cb32a = OpFunction %void None %9 - %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Ldexp %16 %19 - OpStore %res %13 - OpReturn - OpFunctionEnd -%tint_symbol_2 = OpFunction %void None %22 -%tint_symbol = OpFunctionParameter %v4float - %25 = OpLabel - OpStore %tint_symbol_1 %tint_symbol - OpReturn - OpFunctionEnd -%vertex_main = OpFunction %void None %9 - %27 = OpLabel - OpStore %tint_pointsize %float_1 - %29 = OpFunctionCall %void %ldexp_2cb32a - %30 = OpFunctionCall %void %tint_symbol_2 %8 - OpReturn - OpFunctionEnd -%fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %ldexp_2cb32a - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %ldexp_2cb32a - OpReturn - OpFunctionEnd diff --git a/test/intrinsics/gen/ldexp/2cb32a.wgsl.expected.wgsl b/test/intrinsics/gen/ldexp/2cb32a.wgsl.expected.wgsl deleted file mode 100644 index 36bf9eb7f1..0000000000 --- a/test/intrinsics/gen/ldexp/2cb32a.wgsl.expected.wgsl +++ /dev/null @@ -1,19 +0,0 @@ -fn ldexp_2cb32a() { - var res : vec3 = ldexp(vec3(), vec3()); -} - -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { - ldexp_2cb32a(); - return vec4(); -} - -[[stage(fragment)]] -fn fragment_main() { - ldexp_2cb32a(); -} - -[[stage(compute), workgroup_size(1)]] -fn compute_main() { - ldexp_2cb32a(); -} diff --git a/test/intrinsics/gen/ldexp/4d6f6d.wgsl b/test/intrinsics/gen/ldexp/4d6f6d.wgsl deleted file mode 100644 index 29046afbde..0000000000 --- a/test/intrinsics/gen/ldexp/4d6f6d.wgsl +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 The Tint Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//////////////////////////////////////////////////////////////////////////////// -// File generated by tools/intrinsic-gen -// using the template: -// test/intrinsics/intrinsics.wgsl.tmpl -// and the intrinsic defintion file: -// src/intrinsics.def -// -// Do not modify this file directly -//////////////////////////////////////////////////////////////////////////////// - - -// fn ldexp(vec<4, f32>, vec<4, u32>) -> vec<4, f32> -fn ldexp_4d6f6d() { - var res: vec4 = ldexp(vec4(), vec4()); -} - -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { - ldexp_4d6f6d(); - return vec4(); -} - -[[stage(fragment)]] -fn fragment_main() { - ldexp_4d6f6d(); -} - -[[stage(compute), workgroup_size(1)]] -fn compute_main() { - ldexp_4d6f6d(); -} diff --git a/test/intrinsics/gen/ldexp/4d6f6d.wgsl.expected.hlsl b/test/intrinsics/gen/ldexp/4d6f6d.wgsl.expected.hlsl deleted file mode 100644 index 2033f871f0..0000000000 --- a/test/intrinsics/gen/ldexp/4d6f6d.wgsl.expected.hlsl +++ /dev/null @@ -1,24 +0,0 @@ -void ldexp_4d6f6d() { - float4 res = ldexp(float4(0.0f, 0.0f, 0.0f, 0.0f), uint4(0u, 0u, 0u, 0u)); -} - -struct tint_symbol { - float4 value : SV_Position; -}; - -tint_symbol vertex_main() { - ldexp_4d6f6d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; -} - -void fragment_main() { - ldexp_4d6f6d(); - return; -} - -[numthreads(1, 1, 1)] -void compute_main() { - ldexp_4d6f6d(); - return; -} diff --git a/test/intrinsics/gen/ldexp/4d6f6d.wgsl.expected.msl b/test/intrinsics/gen/ldexp/4d6f6d.wgsl.expected.msl deleted file mode 100644 index f65466e4de..0000000000 --- a/test/intrinsics/gen/ldexp/4d6f6d.wgsl.expected.msl +++ /dev/null @@ -1,56 +0,0 @@ -SKIP: FAILED - - - -Validation Failure: -#include - -using namespace metal; -void ldexp_4d6f6d() { - float4 res = ldexp(float4(), uint4()); -} - -vertex void vertex_main() { - ldexp_4d6f6d(); - return; -} - -fragment void fragment_main() { - ldexp_4d6f6d(); - return; -} - -kernel void compute_main() { - ldexp_4d6f6d(); - return; -} - - -tint_51Pgfs.metal:5:18: error: no matching function for call to 'ldexp' - float4 res = ldexp(float4(), uint4()); - ^~~~~ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:3824:19: note: candidate function not viable: no known conversion from 'uint4' (vector of 4 'unsigned int' values) to 'metal::int4' (aka 'int4') for 2nd argument -METAL_FUNC float4 ldexp(float4 x, int4 k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:2116:17: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'half' for 1st argument -METAL_FUNC half ldexp(half x, int k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:2360:18: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'metal::half2' (aka 'half2') for 1st argument -METAL_FUNC half2 ldexp(half2 x, int2 k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:2604:18: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'metal::half3' (aka 'half3') for 1st argument -METAL_FUNC half3 ldexp(half3 x, int3 k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:2848:18: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'metal::half4' (aka 'half4') for 1st argument -METAL_FUNC half4 ldexp(half4 x, int4 k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:3092:18: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'float' for 1st argument -METAL_FUNC float ldexp(float x, int k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:3336:19: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'metal::float2' (aka 'float2') for 1st argument -METAL_FUNC float2 ldexp(float2 x, int2 k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:3580:19: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'metal::float3' (aka 'float3') for 1st argument -METAL_FUNC float3 ldexp(float3 x, int3 k) - ^ -1 error generated. diff --git a/test/intrinsics/gen/ldexp/4d6f6d.wgsl.expected.spvasm b/test/intrinsics/gen/ldexp/4d6f6d.wgsl.expected.spvasm deleted file mode 100644 index 63d2d7408d..0000000000 --- a/test/intrinsics/gen/ldexp/4d6f6d.wgsl.expected.spvasm +++ /dev/null @@ -1,70 +0,0 @@ -; SPIR-V -; Version: 1.3 -; Generator: Google Tint Compiler; 0 -; Bound: 35 -; Schema: 0 - OpCapability Shader - %14 = OpExtInstImport "GLSL.std.450" - OpMemoryModel Logical GLSL450 - OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1 - OpEntryPoint Fragment %fragment_main "fragment_main" - OpEntryPoint GLCompute %compute_main "compute_main" - OpExecutionMode %fragment_main OriginUpperLeft - OpExecutionMode %compute_main LocalSize 1 1 1 - OpName %tint_pointsize "tint_pointsize" - OpName %tint_symbol_1 "tint_symbol_1" - OpName %ldexp_4d6f6d "ldexp_4d6f6d" - OpName %res "res" - OpName %tint_symbol_2 "tint_symbol_2" - OpName %tint_symbol "tint_symbol" - OpName %vertex_main "vertex_main" - OpName %fragment_main "fragment_main" - OpName %compute_main "compute_main" - OpDecorate %tint_pointsize BuiltIn PointSize - OpDecorate %tint_symbol_1 BuiltIn Position - %float = OpTypeFloat 32 -%_ptr_Output_float = OpTypePointer Output %float - %4 = OpConstantNull %float -%tint_pointsize = OpVariable %_ptr_Output_float Output %4 - %v4float = OpTypeVector %float 4 -%_ptr_Output_v4float = OpTypePointer Output %v4float - %8 = OpConstantNull %v4float -%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %8 - %void = OpTypeVoid - %9 = OpTypeFunction %void - %uint = OpTypeInt 32 0 - %v4uint = OpTypeVector %uint 4 - %17 = OpConstantNull %v4uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %20 = OpTypeFunction %void %v4float - %float_1 = OpConstant %float 1 -%ldexp_4d6f6d = OpFunction %void None %9 - %12 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %8 - %13 = OpExtInst %v4float %14 Ldexp %8 %17 - OpStore %res %13 - OpReturn - OpFunctionEnd -%tint_symbol_2 = OpFunction %void None %20 -%tint_symbol = OpFunctionParameter %v4float - %23 = OpLabel - OpStore %tint_symbol_1 %tint_symbol - OpReturn - OpFunctionEnd -%vertex_main = OpFunction %void None %9 - %25 = OpLabel - OpStore %tint_pointsize %float_1 - %27 = OpFunctionCall %void %ldexp_4d6f6d - %28 = OpFunctionCall %void %tint_symbol_2 %8 - OpReturn - OpFunctionEnd -%fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %ldexp_4d6f6d - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %ldexp_4d6f6d - OpReturn - OpFunctionEnd diff --git a/test/intrinsics/gen/ldexp/4d6f6d.wgsl.expected.wgsl b/test/intrinsics/gen/ldexp/4d6f6d.wgsl.expected.wgsl deleted file mode 100644 index 5852e28c64..0000000000 --- a/test/intrinsics/gen/ldexp/4d6f6d.wgsl.expected.wgsl +++ /dev/null @@ -1,19 +0,0 @@ -fn ldexp_4d6f6d() { - var res : vec4 = ldexp(vec4(), vec4()); -} - -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { - ldexp_4d6f6d(); - return vec4(); -} - -[[stage(fragment)]] -fn fragment_main() { - ldexp_4d6f6d(); -} - -[[stage(compute), workgroup_size(1)]] -fn compute_main() { - ldexp_4d6f6d(); -} diff --git a/test/intrinsics/gen/ldexp/7bc2fd.wgsl b/test/intrinsics/gen/ldexp/7bc2fd.wgsl deleted file mode 100644 index 12d5b0842b..0000000000 --- a/test/intrinsics/gen/ldexp/7bc2fd.wgsl +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 The Tint Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//////////////////////////////////////////////////////////////////////////////// -// File generated by tools/intrinsic-gen -// using the template: -// test/intrinsics/intrinsics.wgsl.tmpl -// and the intrinsic defintion file: -// src/intrinsics.def -// -// Do not modify this file directly -//////////////////////////////////////////////////////////////////////////////// - - -// fn ldexp(vec<2, f32>, vec<2, u32>) -> vec<2, f32> -fn ldexp_7bc2fd() { - var res: vec2 = ldexp(vec2(), vec2()); -} - -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { - ldexp_7bc2fd(); - return vec4(); -} - -[[stage(fragment)]] -fn fragment_main() { - ldexp_7bc2fd(); -} - -[[stage(compute), workgroup_size(1)]] -fn compute_main() { - ldexp_7bc2fd(); -} diff --git a/test/intrinsics/gen/ldexp/7bc2fd.wgsl.expected.hlsl b/test/intrinsics/gen/ldexp/7bc2fd.wgsl.expected.hlsl deleted file mode 100644 index 0d904e3004..0000000000 --- a/test/intrinsics/gen/ldexp/7bc2fd.wgsl.expected.hlsl +++ /dev/null @@ -1,24 +0,0 @@ -void ldexp_7bc2fd() { - float2 res = ldexp(float2(0.0f, 0.0f), uint2(0u, 0u)); -} - -struct tint_symbol { - float4 value : SV_Position; -}; - -tint_symbol vertex_main() { - ldexp_7bc2fd(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; -} - -void fragment_main() { - ldexp_7bc2fd(); - return; -} - -[numthreads(1, 1, 1)] -void compute_main() { - ldexp_7bc2fd(); - return; -} diff --git a/test/intrinsics/gen/ldexp/7bc2fd.wgsl.expected.msl b/test/intrinsics/gen/ldexp/7bc2fd.wgsl.expected.msl deleted file mode 100644 index 940c23200d..0000000000 --- a/test/intrinsics/gen/ldexp/7bc2fd.wgsl.expected.msl +++ /dev/null @@ -1,56 +0,0 @@ -SKIP: FAILED - - - -Validation Failure: -#include - -using namespace metal; -void ldexp_7bc2fd() { - float2 res = ldexp(float2(), uint2()); -} - -vertex void vertex_main() { - ldexp_7bc2fd(); - return; -} - -fragment void fragment_main() { - ldexp_7bc2fd(); - return; -} - -kernel void compute_main() { - ldexp_7bc2fd(); - return; -} - - -tint_aJWI1V.metal:5:18: error: no matching function for call to 'ldexp' - float2 res = ldexp(float2(), uint2()); - ^~~~~ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:3336:19: note: candidate function not viable: no known conversion from 'uint2' (vector of 2 'unsigned int' values) to 'metal::int2' (aka 'int2') for 2nd argument -METAL_FUNC float2 ldexp(float2 x, int2 k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:2116:17: note: candidate function not viable: no known conversion from 'float2' (vector of 2 'float' values) to 'half' for 1st argument -METAL_FUNC half ldexp(half x, int k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:2360:18: note: candidate function not viable: no known conversion from 'float2' (vector of 2 'float' values) to 'metal::half2' (aka 'half2') for 1st argument -METAL_FUNC half2 ldexp(half2 x, int2 k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:2604:18: note: candidate function not viable: no known conversion from 'float2' (vector of 2 'float' values) to 'metal::half3' (aka 'half3') for 1st argument -METAL_FUNC half3 ldexp(half3 x, int3 k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:2848:18: note: candidate function not viable: no known conversion from 'float2' (vector of 2 'float' values) to 'metal::half4' (aka 'half4') for 1st argument -METAL_FUNC half4 ldexp(half4 x, int4 k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:3092:18: note: candidate function not viable: no known conversion from 'float2' (vector of 2 'float' values) to 'float' for 1st argument -METAL_FUNC float ldexp(float x, int k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:3580:19: note: candidate function not viable: no known conversion from 'float2' (vector of 2 'float' values) to 'metal::float3' (aka 'float3') for 1st argument -METAL_FUNC float3 ldexp(float3 x, int3 k) - ^ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.14/include/metal/metal_math:3824:19: note: candidate function not viable: no known conversion from 'float2' (vector of 2 'float' values) to 'metal::float4' (aka 'float4') for 1st argument -METAL_FUNC float4 ldexp(float4 x, int4 k) - ^ -1 error generated. diff --git a/test/intrinsics/gen/ldexp/7bc2fd.wgsl.expected.spvasm b/test/intrinsics/gen/ldexp/7bc2fd.wgsl.expected.spvasm deleted file mode 100644 index 2c1651761c..0000000000 --- a/test/intrinsics/gen/ldexp/7bc2fd.wgsl.expected.spvasm +++ /dev/null @@ -1,72 +0,0 @@ -; SPIR-V -; Version: 1.3 -; Generator: Google Tint Compiler; 0 -; Bound: 37 -; Schema: 0 - OpCapability Shader - %15 = OpExtInstImport "GLSL.std.450" - OpMemoryModel Logical GLSL450 - OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1 - OpEntryPoint Fragment %fragment_main "fragment_main" - OpEntryPoint GLCompute %compute_main "compute_main" - OpExecutionMode %fragment_main OriginUpperLeft - OpExecutionMode %compute_main LocalSize 1 1 1 - OpName %tint_pointsize "tint_pointsize" - OpName %tint_symbol_1 "tint_symbol_1" - OpName %ldexp_7bc2fd "ldexp_7bc2fd" - OpName %res "res" - OpName %tint_symbol_2 "tint_symbol_2" - OpName %tint_symbol "tint_symbol" - OpName %vertex_main "vertex_main" - OpName %fragment_main "fragment_main" - OpName %compute_main "compute_main" - OpDecorate %tint_pointsize BuiltIn PointSize - OpDecorate %tint_symbol_1 BuiltIn Position - %float = OpTypeFloat 32 -%_ptr_Output_float = OpTypePointer Output %float - %4 = OpConstantNull %float -%tint_pointsize = OpVariable %_ptr_Output_float Output %4 - %v4float = OpTypeVector %float 4 -%_ptr_Output_v4float = OpTypePointer Output %v4float - %8 = OpConstantNull %v4float -%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %8 - %void = OpTypeVoid - %9 = OpTypeFunction %void - %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float - %uint = OpTypeInt 32 0 - %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint -%_ptr_Function_v2float = OpTypePointer Function %v2float - %22 = OpTypeFunction %void %v4float - %float_1 = OpConstant %float 1 -%ldexp_7bc2fd = OpFunction %void None %9 - %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Ldexp %16 %19 - OpStore %res %13 - OpReturn - OpFunctionEnd -%tint_symbol_2 = OpFunction %void None %22 -%tint_symbol = OpFunctionParameter %v4float - %25 = OpLabel - OpStore %tint_symbol_1 %tint_symbol - OpReturn - OpFunctionEnd -%vertex_main = OpFunction %void None %9 - %27 = OpLabel - OpStore %tint_pointsize %float_1 - %29 = OpFunctionCall %void %ldexp_7bc2fd - %30 = OpFunctionCall %void %tint_symbol_2 %8 - OpReturn - OpFunctionEnd -%fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %ldexp_7bc2fd - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %ldexp_7bc2fd - OpReturn - OpFunctionEnd diff --git a/test/intrinsics/gen/ldexp/7bc2fd.wgsl.expected.wgsl b/test/intrinsics/gen/ldexp/7bc2fd.wgsl.expected.wgsl deleted file mode 100644 index 402199347b..0000000000 --- a/test/intrinsics/gen/ldexp/7bc2fd.wgsl.expected.wgsl +++ /dev/null @@ -1,19 +0,0 @@ -fn ldexp_7bc2fd() { - var res : vec2 = ldexp(vec2(), vec2()); -} - -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { - ldexp_7bc2fd(); - return vec4(); -} - -[[stage(fragment)]] -fn fragment_main() { - ldexp_7bc2fd(); -} - -[[stage(compute), workgroup_size(1)]] -fn compute_main() { - ldexp_7bc2fd(); -} diff --git a/test/intrinsics/gen/ldexp/f54ff2.wgsl b/test/intrinsics/gen/ldexp/f54ff2.wgsl deleted file mode 100644 index 6ffdf0fcbb..0000000000 --- a/test/intrinsics/gen/ldexp/f54ff2.wgsl +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 The Tint Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//////////////////////////////////////////////////////////////////////////////// -// File generated by tools/intrinsic-gen -// using the template: -// test/intrinsics/intrinsics.wgsl.tmpl -// and the intrinsic defintion file: -// src/intrinsics.def -// -// Do not modify this file directly -//////////////////////////////////////////////////////////////////////////////// - - -// fn ldexp(f32, u32) -> f32 -fn ldexp_f54ff2() { - var res: f32 = ldexp(1.0, 1u); -} - -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { - ldexp_f54ff2(); - return vec4(); -} - -[[stage(fragment)]] -fn fragment_main() { - ldexp_f54ff2(); -} - -[[stage(compute), workgroup_size(1)]] -fn compute_main() { - ldexp_f54ff2(); -} diff --git a/test/intrinsics/gen/ldexp/f54ff2.wgsl.expected.hlsl b/test/intrinsics/gen/ldexp/f54ff2.wgsl.expected.hlsl deleted file mode 100644 index 467fdc4d53..0000000000 --- a/test/intrinsics/gen/ldexp/f54ff2.wgsl.expected.hlsl +++ /dev/null @@ -1,24 +0,0 @@ -void ldexp_f54ff2() { - float res = ldexp(1.0f, 1u); -} - -struct tint_symbol { - float4 value : SV_Position; -}; - -tint_symbol vertex_main() { - ldexp_f54ff2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; -} - -void fragment_main() { - ldexp_f54ff2(); - return; -} - -[numthreads(1, 1, 1)] -void compute_main() { - ldexp_f54ff2(); - return; -} diff --git a/test/intrinsics/gen/ldexp/f54ff2.wgsl.expected.msl b/test/intrinsics/gen/ldexp/f54ff2.wgsl.expected.msl deleted file mode 100644 index e8613892e0..0000000000 --- a/test/intrinsics/gen/ldexp/f54ff2.wgsl.expected.msl +++ /dev/null @@ -1,27 +0,0 @@ -#include - -using namespace metal; -struct tint_symbol { - float4 value [[position]]; -}; - -void ldexp_f54ff2() { - float res = ldexp(1.0f, 1u); -} - -vertex tint_symbol vertex_main() { - ldexp_f54ff2(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; -} - -fragment void fragment_main() { - ldexp_f54ff2(); - return; -} - -kernel void compute_main() { - ldexp_f54ff2(); - return; -} - diff --git a/test/intrinsics/gen/ldexp/f54ff2.wgsl.expected.spvasm b/test/intrinsics/gen/ldexp/f54ff2.wgsl.expected.spvasm deleted file mode 100644 index 221b8182d5..0000000000 --- a/test/intrinsics/gen/ldexp/f54ff2.wgsl.expected.spvasm +++ /dev/null @@ -1,69 +0,0 @@ -; SPIR-V -; Version: 1.3 -; Generator: Google Tint Compiler; 0 -; Bound: 34 -; Schema: 0 - OpCapability Shader - %14 = OpExtInstImport "GLSL.std.450" - OpMemoryModel Logical GLSL450 - OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1 - OpEntryPoint Fragment %fragment_main "fragment_main" - OpEntryPoint GLCompute %compute_main "compute_main" - OpExecutionMode %fragment_main OriginUpperLeft - OpExecutionMode %compute_main LocalSize 1 1 1 - OpName %tint_pointsize "tint_pointsize" - OpName %tint_symbol_1 "tint_symbol_1" - OpName %ldexp_f54ff2 "ldexp_f54ff2" - OpName %res "res" - OpName %tint_symbol_2 "tint_symbol_2" - OpName %tint_symbol "tint_symbol" - OpName %vertex_main "vertex_main" - OpName %fragment_main "fragment_main" - OpName %compute_main "compute_main" - OpDecorate %tint_pointsize BuiltIn PointSize - OpDecorate %tint_symbol_1 BuiltIn Position - %float = OpTypeFloat 32 -%_ptr_Output_float = OpTypePointer Output %float - %4 = OpConstantNull %float -%tint_pointsize = OpVariable %_ptr_Output_float Output %4 - %v4float = OpTypeVector %float 4 -%_ptr_Output_v4float = OpTypePointer Output %v4float - %8 = OpConstantNull %v4float -%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %8 - %void = OpTypeVoid - %9 = OpTypeFunction %void - %float_1 = OpConstant %float 1 - %uint = OpTypeInt 32 0 - %uint_1 = OpConstant %uint 1 -%_ptr_Function_float = OpTypePointer Function %float - %20 = OpTypeFunction %void %v4float -%ldexp_f54ff2 = OpFunction %void None %9 - %12 = OpLabel - %res = OpVariable %_ptr_Function_float Function %4 - %13 = OpExtInst %float %14 Ldexp %float_1 %uint_1 - OpStore %res %13 - OpReturn - OpFunctionEnd -%tint_symbol_2 = OpFunction %void None %20 -%tint_symbol = OpFunctionParameter %v4float - %23 = OpLabel - OpStore %tint_symbol_1 %tint_symbol - OpReturn - OpFunctionEnd -%vertex_main = OpFunction %void None %9 - %25 = OpLabel - OpStore %tint_pointsize %float_1 - %26 = OpFunctionCall %void %ldexp_f54ff2 - %27 = OpFunctionCall %void %tint_symbol_2 %8 - OpReturn - OpFunctionEnd -%fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %ldexp_f54ff2 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %ldexp_f54ff2 - OpReturn - OpFunctionEnd diff --git a/test/intrinsics/gen/ldexp/f54ff2.wgsl.expected.wgsl b/test/intrinsics/gen/ldexp/f54ff2.wgsl.expected.wgsl deleted file mode 100644 index 91405e5af2..0000000000 --- a/test/intrinsics/gen/ldexp/f54ff2.wgsl.expected.wgsl +++ /dev/null @@ -1,19 +0,0 @@ -fn ldexp_f54ff2() { - var res : f32 = ldexp(1.0, 1u); -} - -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { - ldexp_f54ff2(); - return vec4(); -} - -[[stage(fragment)]] -fn fragment_main() { - ldexp_f54ff2(); -} - -[[stage(compute), workgroup_size(1)]] -fn compute_main() { - ldexp_f54ff2(); -}