Add transpose intrinsic
Fixed: tint:860 Change-Id: I899e280807503064fbabaafe02d37de4187b3298 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53805 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
parent
950809f534
commit
0a2b5f22d4
|
@ -403,8 +403,8 @@ const sem::Matrix* build_mat(MatchState& state,
|
||||||
Number N,
|
Number N,
|
||||||
Number M,
|
Number M,
|
||||||
const sem::Type* T) {
|
const sem::Type* T) {
|
||||||
auto* column_type = state.builder.create<sem::Vector>(T, N.Value());
|
auto* column_type = state.builder.create<sem::Vector>(T, M.Value());
|
||||||
return state.builder.create<sem::Matrix>(column_type, M.Value());
|
return state.builder.create<sem::Matrix>(column_type, N.Value());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool match_array(const sem::Type* ty, const sem::Type*& T) {
|
bool match_array(const sem::Type* ty, const sem::Type*& T) {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -373,6 +373,7 @@ fn tan(f32) -> f32
|
||||||
fn tan<N: num>(vec<N, f32>) -> vec<N, f32>
|
fn tan<N: num>(vec<N, f32>) -> vec<N, f32>
|
||||||
fn tanh(f32) -> f32
|
fn tanh(f32) -> f32
|
||||||
fn tanh<N: num>(vec<N, f32>) -> vec<N, f32>
|
fn tanh<N: num>(vec<N, f32>) -> vec<N, f32>
|
||||||
|
fn transpose<M: num, N: num>(mat<M, N, f32>) -> mat<N, M, f32>
|
||||||
fn trunc(f32) -> f32
|
fn trunc(f32) -> f32
|
||||||
fn trunc<N: num>(vec<N, f32>) -> vec<N, f32>
|
fn trunc<N: num>(vec<N, f32>) -> vec<N, f32>
|
||||||
fn unpack2x16float(u32) -> vec2<f32>
|
fn unpack2x16float(u32) -> vec2<f32>
|
||||||
|
@ -381,6 +382,7 @@ fn unpack2x16unorm(u32) -> vec2<f32>
|
||||||
fn unpack4x8snorm(u32) -> vec4<f32>
|
fn unpack4x8snorm(u32) -> vec4<f32>
|
||||||
fn unpack4x8unorm(u32) -> vec4<f32>
|
fn unpack4x8unorm(u32) -> vec4<f32>
|
||||||
[[stage("compute")]] fn workgroupBarrier()
|
[[stage("compute")]] fn workgroupBarrier()
|
||||||
|
|
||||||
fn textureDimensions<T: fiu32>(texture: texture_1d<T>) -> i32
|
fn textureDimensions<T: fiu32>(texture: texture_1d<T>) -> i32
|
||||||
fn textureDimensions<T: fiu32>(texture: texture_2d<T>) -> vec2<i32>
|
fn textureDimensions<T: fiu32>(texture: texture_2d<T>) -> vec2<i32>
|
||||||
fn textureDimensions<T: fiu32>(texture: texture_2d<T>, level: i32) -> vec2<i32>
|
fn textureDimensions<T: fiu32>(texture: texture_2d<T>, level: i32) -> vec2<i32>
|
||||||
|
|
|
@ -229,6 +229,9 @@ IntrinsicType ParseIntrinsicType(const std::string& name) {
|
||||||
if (name == "tanh") {
|
if (name == "tanh") {
|
||||||
return IntrinsicType::kTanh;
|
return IntrinsicType::kTanh;
|
||||||
}
|
}
|
||||||
|
if (name == "transpose") {
|
||||||
|
return IntrinsicType::kTranspose;
|
||||||
|
}
|
||||||
if (name == "trunc") {
|
if (name == "trunc") {
|
||||||
return IntrinsicType::kTrunc;
|
return IntrinsicType::kTrunc;
|
||||||
}
|
}
|
||||||
|
@ -424,6 +427,8 @@ const char* str(IntrinsicType i) {
|
||||||
return "tan";
|
return "tan";
|
||||||
case IntrinsicType::kTanh:
|
case IntrinsicType::kTanh:
|
||||||
return "tanh";
|
return "tanh";
|
||||||
|
case IntrinsicType::kTranspose:
|
||||||
|
return "transpose";
|
||||||
case IntrinsicType::kTrunc:
|
case IntrinsicType::kTrunc:
|
||||||
return "trunc";
|
return "trunc";
|
||||||
case IntrinsicType::kUnpack2x16float:
|
case IntrinsicType::kUnpack2x16float:
|
||||||
|
|
|
@ -100,6 +100,7 @@ enum class IntrinsicType {
|
||||||
kStorageBarrier,
|
kStorageBarrier,
|
||||||
kTan,
|
kTan,
|
||||||
kTanh,
|
kTanh,
|
||||||
|
kTranspose,
|
||||||
kTrunc,
|
kTrunc,
|
||||||
kUnpack2x16float,
|
kUnpack2x16float,
|
||||||
kUnpack2x16snorm,
|
kUnpack2x16snorm,
|
||||||
|
|
|
@ -1181,6 +1181,7 @@ std::string GeneratorImpl::generate_builtin_name(
|
||||||
case sem::IntrinsicType::kStep:
|
case sem::IntrinsicType::kStep:
|
||||||
case sem::IntrinsicType::kTan:
|
case sem::IntrinsicType::kTan:
|
||||||
case sem::IntrinsicType::kTanh:
|
case sem::IntrinsicType::kTanh:
|
||||||
|
case sem::IntrinsicType::kTranspose:
|
||||||
case sem::IntrinsicType::kTrunc:
|
case sem::IntrinsicType::kTrunc:
|
||||||
case sem::IntrinsicType::kSign:
|
case sem::IntrinsicType::kSign:
|
||||||
case sem::IntrinsicType::kAbs:
|
case sem::IntrinsicType::kAbs:
|
||||||
|
|
|
@ -146,6 +146,8 @@ ast::CallExpression* GenerateCall(IntrinsicType intrinsic,
|
||||||
return builder->Call(str.str(), "f2", "f2", "b2");
|
return builder->Call(str.str(), "f2", "f2", "b2");
|
||||||
case IntrinsicType::kDeterminant:
|
case IntrinsicType::kDeterminant:
|
||||||
return builder->Call(str.str(), "m2x2");
|
return builder->Call(str.str(), "m2x2");
|
||||||
|
case IntrinsicType::kTranspose:
|
||||||
|
return builder->Call(str.str(), "m3x2");
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -160,6 +162,7 @@ TEST_P(HlslIntrinsicTest, Emit) {
|
||||||
Global("u2", ty.vec2<unsigned int>(), ast::StorageClass::kPrivate);
|
Global("u2", ty.vec2<unsigned int>(), ast::StorageClass::kPrivate);
|
||||||
Global("b2", ty.vec2<bool>(), ast::StorageClass::kPrivate);
|
Global("b2", ty.vec2<bool>(), ast::StorageClass::kPrivate);
|
||||||
Global("m2x2", ty.mat2x2<float>(), ast::StorageClass::kPrivate);
|
Global("m2x2", ty.mat2x2<float>(), ast::StorageClass::kPrivate);
|
||||||
|
Global("m3x2", ty.mat3x2<float>(), ast::StorageClass::kPrivate);
|
||||||
|
|
||||||
auto* call = GenerateCall(param.intrinsic, param.type, this);
|
auto* call = GenerateCall(param.intrinsic, param.type, this);
|
||||||
ASSERT_NE(nullptr, call) << "Unhandled intrinsic";
|
ASSERT_NE(nullptr, call) << "Unhandled intrinsic";
|
||||||
|
@ -247,6 +250,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||||
IntrinsicData{IntrinsicType::kStep, ParamType::kF32, "step"},
|
IntrinsicData{IntrinsicType::kStep, ParamType::kF32, "step"},
|
||||||
IntrinsicData{IntrinsicType::kTan, ParamType::kF32, "tan"},
|
IntrinsicData{IntrinsicType::kTan, ParamType::kF32, "tan"},
|
||||||
IntrinsicData{IntrinsicType::kTanh, ParamType::kF32, "tanh"},
|
IntrinsicData{IntrinsicType::kTanh, ParamType::kF32, "tanh"},
|
||||||
|
IntrinsicData{IntrinsicType::kTranspose, ParamType::kF32, "transpose"},
|
||||||
IntrinsicData{IntrinsicType::kTrunc, ParamType::kF32, "trunc"}));
|
IntrinsicData{IntrinsicType::kTrunc, ParamType::kF32, "trunc"}));
|
||||||
|
|
||||||
TEST_F(HlslGeneratorImplTest_Intrinsic, DISABLED_Intrinsic_IsNormal) {
|
TEST_F(HlslGeneratorImplTest_Intrinsic, DISABLED_Intrinsic_IsNormal) {
|
||||||
|
@ -416,10 +420,9 @@ TEST_F(HlslGeneratorImplTest_Intrinsic, Unpack2x16Unorm) {
|
||||||
gen.increment_indent();
|
gen.increment_indent();
|
||||||
ASSERT_TRUE(gen.EmitExpression(pre, out, call)) << gen.error();
|
ASSERT_TRUE(gen.EmitExpression(pre, out, call)) << gen.error();
|
||||||
EXPECT_THAT(pre_result(), HasSubstr("uint tint_tmp_1 = p1;"));
|
EXPECT_THAT(pre_result(), HasSubstr("uint tint_tmp_1 = p1;"));
|
||||||
EXPECT_THAT(
|
EXPECT_THAT(pre_result(),
|
||||||
pre_result(),
|
HasSubstr("uint2 tint_tmp = uint2(tint_tmp_1 & 0xffff, "
|
||||||
HasSubstr(
|
"tint_tmp_1 >> 16);"));
|
||||||
"uint2 tint_tmp = uint2(tint_tmp_1 & 0xffff, tint_tmp_1 >> 16);"));
|
|
||||||
EXPECT_THAT(result(), HasSubstr("float2(tint_tmp) / 65535.0"));
|
EXPECT_THAT(result(), HasSubstr("float2(tint_tmp) / 65535.0"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -764,6 +764,7 @@ std::string GeneratorImpl::generate_builtin_name(
|
||||||
case sem::IntrinsicType::kStep:
|
case sem::IntrinsicType::kStep:
|
||||||
case sem::IntrinsicType::kTan:
|
case sem::IntrinsicType::kTan:
|
||||||
case sem::IntrinsicType::kTanh:
|
case sem::IntrinsicType::kTanh:
|
||||||
|
case sem::IntrinsicType::kTranspose:
|
||||||
case sem::IntrinsicType::kTrunc:
|
case sem::IntrinsicType::kTrunc:
|
||||||
case sem::IntrinsicType::kSign:
|
case sem::IntrinsicType::kSign:
|
||||||
case sem::IntrinsicType::kClamp:
|
case sem::IntrinsicType::kClamp:
|
||||||
|
|
|
@ -157,6 +157,8 @@ ast::CallExpression* GenerateCall(IntrinsicType intrinsic,
|
||||||
return builder->Call(str.str(), "u1");
|
return builder->Call(str.str(), "u1");
|
||||||
case IntrinsicType::kWorkgroupBarrier:
|
case IntrinsicType::kWorkgroupBarrier:
|
||||||
return builder->Call(str.str());
|
return builder->Call(str.str());
|
||||||
|
case IntrinsicType::kTranspose:
|
||||||
|
return builder->Call(str.str(), "m3x2");
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -174,6 +176,7 @@ TEST_P(MslIntrinsicTest, Emit) {
|
||||||
Global("u2", ty.vec2<unsigned int>(), ast::StorageClass::kPrivate);
|
Global("u2", ty.vec2<unsigned int>(), ast::StorageClass::kPrivate);
|
||||||
Global("b2", ty.vec2<bool>(), ast::StorageClass::kPrivate);
|
Global("b2", ty.vec2<bool>(), ast::StorageClass::kPrivate);
|
||||||
Global("m2x2", ty.mat2x2<float>(), ast::StorageClass::kPrivate);
|
Global("m2x2", ty.mat2x2<float>(), ast::StorageClass::kPrivate);
|
||||||
|
Global("m3x2", ty.mat3x2<float>(), ast::StorageClass::kPrivate);
|
||||||
|
|
||||||
auto* call = GenerateCall(param.intrinsic, param.type, this);
|
auto* call = GenerateCall(param.intrinsic, param.type, this);
|
||||||
ASSERT_NE(nullptr, call) << "Unhandled intrinsic";
|
ASSERT_NE(nullptr, call) << "Unhandled intrinsic";
|
||||||
|
@ -268,6 +271,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||||
IntrinsicData{IntrinsicType::kStep, ParamType::kF32, "step"},
|
IntrinsicData{IntrinsicType::kStep, ParamType::kF32, "step"},
|
||||||
IntrinsicData{IntrinsicType::kTan, ParamType::kF32, "tan"},
|
IntrinsicData{IntrinsicType::kTan, ParamType::kF32, "tan"},
|
||||||
IntrinsicData{IntrinsicType::kTanh, ParamType::kF32, "tanh"},
|
IntrinsicData{IntrinsicType::kTanh, ParamType::kF32, "tanh"},
|
||||||
|
IntrinsicData{IntrinsicType::kTranspose, ParamType::kF32, "transpose"},
|
||||||
IntrinsicData{IntrinsicType::kTrunc, ParamType::kF32, "trunc"},
|
IntrinsicData{IntrinsicType::kTrunc, ParamType::kF32, "trunc"},
|
||||||
IntrinsicData{IntrinsicType::kUnpack4x8snorm, ParamType::kU32,
|
IntrinsicData{IntrinsicType::kUnpack4x8snorm, ParamType::kU32,
|
||||||
"unpack_snorm4x8_to_float"},
|
"unpack_snorm4x8_to_float"},
|
||||||
|
|
|
@ -2373,6 +2373,9 @@ uint32_t Builder::GenerateIntrinsic(ast::CallExpression* call,
|
||||||
}
|
}
|
||||||
return result_id;
|
return result_id;
|
||||||
}
|
}
|
||||||
|
case IntrinsicType::kTranspose:
|
||||||
|
op = spv::Op::OpTranspose;
|
||||||
|
break;
|
||||||
default: {
|
default: {
|
||||||
auto set_id = GetGLSLstd450Import();
|
auto set_id = GetGLSLstd450Import();
|
||||||
auto inst_id = intrinsic_to_glsl_method(intrinsic);
|
auto inst_id = intrinsic_to_glsl_method(intrinsic);
|
||||||
|
|
|
@ -1534,6 +1534,43 @@ OpFunctionEnd
|
||||||
)");
|
)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(IntrinsicBuilderTest, Call_Transpose) {
|
||||||
|
auto* var = Global("var", ty.mat2x3<f32>(), ast::StorageClass::kPrivate);
|
||||||
|
|
||||||
|
auto* expr = Call("transpose", "var");
|
||||||
|
WrapInFunction(expr);
|
||||||
|
|
||||||
|
auto* func = Func("a_func", ast::VariableList{}, ty.void_(),
|
||||||
|
ast::StatementList{}, ast::DecorationList{});
|
||||||
|
|
||||||
|
spirv::Builder& b = Build();
|
||||||
|
|
||||||
|
ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
|
||||||
|
|
||||||
|
ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
|
||||||
|
EXPECT_EQ(b.GenerateCallExpression(expr), 11u) << b.error();
|
||||||
|
|
||||||
|
EXPECT_EQ(DumpBuilder(b), R"(OpName %3 "a_func"
|
||||||
|
OpName %5 "var"
|
||||||
|
%2 = OpTypeVoid
|
||||||
|
%1 = OpTypeFunction %2
|
||||||
|
%9 = OpTypeFloat 32
|
||||||
|
%8 = OpTypeVector %9 3
|
||||||
|
%7 = OpTypeMatrix %8 2
|
||||||
|
%6 = OpTypePointer Private %7
|
||||||
|
%10 = OpConstantNull %7
|
||||||
|
%5 = OpVariable %6 Private %10
|
||||||
|
%13 = OpTypeVector %9 2
|
||||||
|
%12 = OpTypeMatrix %13 3
|
||||||
|
%3 = OpFunction %2 None %1
|
||||||
|
%4 = OpLabel
|
||||||
|
%14 = OpLoad %7 %5
|
||||||
|
%11 = OpTranspose %12 %14
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
)");
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(IntrinsicBuilderTest, Call_ArrayLength) {
|
TEST_F(IntrinsicBuilderTest, Call_ArrayLength) {
|
||||||
auto* s = Structure("my_struct", {Member(0, "a", ty.array<f32>(4))},
|
auto* s = Structure("my_struct", {Member(0, "a", ty.array<f32>(4))},
|
||||||
{create<ast::StructBlockDecoration>()});
|
{create<ast::StructBlockDecoration>()});
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
// 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 transpose_2585cd() {
|
||||||
|
var res: mat3x4<f32> = transpose(mat4x3<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_2585cd();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_2585cd();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_2585cd();
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value : SV_Position;
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_2585cd() {
|
||||||
|
float3x4 res = transpose(float4x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
transpose_2585cd();
|
||||||
|
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
transpose_2585cd();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
transpose_2585cd();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value [[position]];
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_2585cd() {
|
||||||
|
float3x4 res = transpose(float4x3());
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex tint_symbol vertex_main() {
|
||||||
|
transpose_2585cd();
|
||||||
|
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment void fragment_main() {
|
||||||
|
transpose_2585cd();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
kernel void compute_main() {
|
||||||
|
transpose_2585cd();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
|
; Bound: 36
|
||||||
|
; Schema: 0
|
||||||
|
OpCapability Shader
|
||||||
|
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 %transpose_2585cd "transpose_2585cd"
|
||||||
|
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
|
||||||
|
%mat3v4float = OpTypeMatrix %v4float 3
|
||||||
|
%v3float = OpTypeVector %float 3
|
||||||
|
%mat4v3float = OpTypeMatrix %v3float 4
|
||||||
|
%17 = OpConstantNull %mat4v3float
|
||||||
|
%_ptr_Function_mat3v4float = OpTypePointer Function %mat3v4float
|
||||||
|
%20 = OpConstantNull %mat3v4float
|
||||||
|
%21 = OpTypeFunction %void %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%transpose_2585cd = OpFunction %void None %9
|
||||||
|
%12 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_mat3v4float Function %20
|
||||||
|
%13 = OpTranspose %mat3v4float %17
|
||||||
|
OpStore %res %13
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%tint_symbol_2 = OpFunction %void None %21
|
||||||
|
%tint_symbol = OpFunctionParameter %v4float
|
||||||
|
%24 = OpLabel
|
||||||
|
OpStore %tint_symbol_1 %tint_symbol
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main = OpFunction %void None %9
|
||||||
|
%26 = OpLabel
|
||||||
|
OpStore %tint_pointsize %float_1
|
||||||
|
%28 = OpFunctionCall %void %transpose_2585cd
|
||||||
|
%29 = OpFunctionCall %void %tint_symbol_2 %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %9
|
||||||
|
%31 = OpLabel
|
||||||
|
%32 = OpFunctionCall %void %transpose_2585cd
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %9
|
||||||
|
%34 = OpLabel
|
||||||
|
%35 = OpFunctionCall %void %transpose_2585cd
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -0,0 +1,19 @@
|
||||||
|
fn transpose_2585cd() {
|
||||||
|
var res : mat3x4<f32> = transpose(mat4x3<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_2585cd();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_2585cd();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_2585cd();
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
// 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 transpose_31d679() {
|
||||||
|
var res: mat2x2<f32> = transpose(mat2x2<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_31d679();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_31d679();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_31d679();
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value : SV_Position;
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_31d679() {
|
||||||
|
float2x2 res = transpose(float2x2(0.0f, 0.0f, 0.0f, 0.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
transpose_31d679();
|
||||||
|
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
transpose_31d679();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
transpose_31d679();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value [[position]];
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_31d679() {
|
||||||
|
float2x2 res = transpose(float2x2());
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex tint_symbol vertex_main() {
|
||||||
|
transpose_31d679();
|
||||||
|
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment void fragment_main() {
|
||||||
|
transpose_31d679();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
kernel void compute_main() {
|
||||||
|
transpose_31d679();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
|
; Bound: 34
|
||||||
|
; Schema: 0
|
||||||
|
OpCapability Shader
|
||||||
|
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 %transpose_31d679 "transpose_31d679"
|
||||||
|
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
|
||||||
|
%mat2v2float = OpTypeMatrix %v2float 2
|
||||||
|
%16 = OpConstantNull %mat2v2float
|
||||||
|
%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
|
||||||
|
%19 = OpTypeFunction %void %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%transpose_31d679 = OpFunction %void None %9
|
||||||
|
%12 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_mat2v2float Function %16
|
||||||
|
%13 = OpTranspose %mat2v2float %16
|
||||||
|
OpStore %res %13
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%tint_symbol_2 = OpFunction %void None %19
|
||||||
|
%tint_symbol = OpFunctionParameter %v4float
|
||||||
|
%22 = OpLabel
|
||||||
|
OpStore %tint_symbol_1 %tint_symbol
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main = OpFunction %void None %9
|
||||||
|
%24 = OpLabel
|
||||||
|
OpStore %tint_pointsize %float_1
|
||||||
|
%26 = OpFunctionCall %void %transpose_31d679
|
||||||
|
%27 = OpFunctionCall %void %tint_symbol_2 %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %9
|
||||||
|
%29 = OpLabel
|
||||||
|
%30 = OpFunctionCall %void %transpose_31d679
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %9
|
||||||
|
%32 = OpLabel
|
||||||
|
%33 = OpFunctionCall %void %transpose_31d679
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -0,0 +1,19 @@
|
||||||
|
fn transpose_31d679() {
|
||||||
|
var res : mat2x2<f32> = transpose(mat2x2<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_31d679();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_31d679();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_31d679();
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
// 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 transpose_31e37e() {
|
||||||
|
var res: mat2x4<f32> = transpose(mat4x2<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_31e37e();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_31e37e();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_31e37e();
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value : SV_Position;
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_31e37e() {
|
||||||
|
float2x4 res = transpose(float4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
transpose_31e37e();
|
||||||
|
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
transpose_31e37e();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
transpose_31e37e();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value [[position]];
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_31e37e() {
|
||||||
|
float2x4 res = transpose(float4x2());
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex tint_symbol vertex_main() {
|
||||||
|
transpose_31e37e();
|
||||||
|
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment void fragment_main() {
|
||||||
|
transpose_31e37e();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
kernel void compute_main() {
|
||||||
|
transpose_31e37e();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
|
; Bound: 36
|
||||||
|
; Schema: 0
|
||||||
|
OpCapability Shader
|
||||||
|
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 %transpose_31e37e "transpose_31e37e"
|
||||||
|
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
|
||||||
|
%mat2v4float = OpTypeMatrix %v4float 2
|
||||||
|
%v2float = OpTypeVector %float 2
|
||||||
|
%mat4v2float = OpTypeMatrix %v2float 4
|
||||||
|
%17 = OpConstantNull %mat4v2float
|
||||||
|
%_ptr_Function_mat2v4float = OpTypePointer Function %mat2v4float
|
||||||
|
%20 = OpConstantNull %mat2v4float
|
||||||
|
%21 = OpTypeFunction %void %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%transpose_31e37e = OpFunction %void None %9
|
||||||
|
%12 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_mat2v4float Function %20
|
||||||
|
%13 = OpTranspose %mat2v4float %17
|
||||||
|
OpStore %res %13
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%tint_symbol_2 = OpFunction %void None %21
|
||||||
|
%tint_symbol = OpFunctionParameter %v4float
|
||||||
|
%24 = OpLabel
|
||||||
|
OpStore %tint_symbol_1 %tint_symbol
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main = OpFunction %void None %9
|
||||||
|
%26 = OpLabel
|
||||||
|
OpStore %tint_pointsize %float_1
|
||||||
|
%28 = OpFunctionCall %void %transpose_31e37e
|
||||||
|
%29 = OpFunctionCall %void %tint_symbol_2 %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %9
|
||||||
|
%31 = OpLabel
|
||||||
|
%32 = OpFunctionCall %void %transpose_31e37e
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %9
|
||||||
|
%34 = OpLabel
|
||||||
|
%35 = OpFunctionCall %void %transpose_31e37e
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -0,0 +1,19 @@
|
||||||
|
fn transpose_31e37e() {
|
||||||
|
var res : mat2x4<f32> = transpose(mat4x2<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_31e37e();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_31e37e();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_31e37e();
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
// 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 transpose_4ce359() {
|
||||||
|
var res: mat4x2<f32> = transpose(mat2x4<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_4ce359();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_4ce359();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_4ce359();
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value : SV_Position;
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_4ce359() {
|
||||||
|
float4x2 res = transpose(float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
transpose_4ce359();
|
||||||
|
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
transpose_4ce359();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
transpose_4ce359();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value [[position]];
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_4ce359() {
|
||||||
|
float4x2 res = transpose(float2x4());
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex tint_symbol vertex_main() {
|
||||||
|
transpose_4ce359();
|
||||||
|
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment void fragment_main() {
|
||||||
|
transpose_4ce359();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
kernel void compute_main() {
|
||||||
|
transpose_4ce359();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
|
; Bound: 36
|
||||||
|
; Schema: 0
|
||||||
|
OpCapability Shader
|
||||||
|
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 %transpose_4ce359 "transpose_4ce359"
|
||||||
|
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
|
||||||
|
%mat4v2float = OpTypeMatrix %v2float 4
|
||||||
|
%mat2v4float = OpTypeMatrix %v4float 2
|
||||||
|
%17 = OpConstantNull %mat2v4float
|
||||||
|
%_ptr_Function_mat4v2float = OpTypePointer Function %mat4v2float
|
||||||
|
%20 = OpConstantNull %mat4v2float
|
||||||
|
%21 = OpTypeFunction %void %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%transpose_4ce359 = OpFunction %void None %9
|
||||||
|
%12 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_mat4v2float Function %20
|
||||||
|
%13 = OpTranspose %mat4v2float %17
|
||||||
|
OpStore %res %13
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%tint_symbol_2 = OpFunction %void None %21
|
||||||
|
%tint_symbol = OpFunctionParameter %v4float
|
||||||
|
%24 = OpLabel
|
||||||
|
OpStore %tint_symbol_1 %tint_symbol
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main = OpFunction %void None %9
|
||||||
|
%26 = OpLabel
|
||||||
|
OpStore %tint_pointsize %float_1
|
||||||
|
%28 = OpFunctionCall %void %transpose_4ce359
|
||||||
|
%29 = OpFunctionCall %void %tint_symbol_2 %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %9
|
||||||
|
%31 = OpLabel
|
||||||
|
%32 = OpFunctionCall %void %transpose_4ce359
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %9
|
||||||
|
%34 = OpLabel
|
||||||
|
%35 = OpFunctionCall %void %transpose_4ce359
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -0,0 +1,19 @@
|
||||||
|
fn transpose_4ce359() {
|
||||||
|
var res : mat4x2<f32> = transpose(mat2x4<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_4ce359();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_4ce359();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_4ce359();
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
// 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 transpose_4dc9a1() {
|
||||||
|
var res: mat3x2<f32> = transpose(mat2x3<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_4dc9a1();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_4dc9a1();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_4dc9a1();
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value : SV_Position;
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_4dc9a1() {
|
||||||
|
float3x2 res = transpose(float2x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
transpose_4dc9a1();
|
||||||
|
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
transpose_4dc9a1();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
transpose_4dc9a1();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value [[position]];
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_4dc9a1() {
|
||||||
|
float3x2 res = transpose(float2x3());
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex tint_symbol vertex_main() {
|
||||||
|
transpose_4dc9a1();
|
||||||
|
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment void fragment_main() {
|
||||||
|
transpose_4dc9a1();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
kernel void compute_main() {
|
||||||
|
transpose_4dc9a1();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
|
; Bound: 37
|
||||||
|
; Schema: 0
|
||||||
|
OpCapability Shader
|
||||||
|
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 %transpose_4dc9a1 "transpose_4dc9a1"
|
||||||
|
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
|
||||||
|
%mat3v2float = OpTypeMatrix %v2float 3
|
||||||
|
%v3float = OpTypeVector %float 3
|
||||||
|
%mat2v3float = OpTypeMatrix %v3float 2
|
||||||
|
%18 = OpConstantNull %mat2v3float
|
||||||
|
%_ptr_Function_mat3v2float = OpTypePointer Function %mat3v2float
|
||||||
|
%21 = OpConstantNull %mat3v2float
|
||||||
|
%22 = OpTypeFunction %void %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%transpose_4dc9a1 = OpFunction %void None %9
|
||||||
|
%12 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_mat3v2float Function %21
|
||||||
|
%13 = OpTranspose %mat3v2float %18
|
||||||
|
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 %transpose_4dc9a1
|
||||||
|
%30 = OpFunctionCall %void %tint_symbol_2 %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %9
|
||||||
|
%32 = OpLabel
|
||||||
|
%33 = OpFunctionCall %void %transpose_4dc9a1
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %9
|
||||||
|
%35 = OpLabel
|
||||||
|
%36 = OpFunctionCall %void %transpose_4dc9a1
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -0,0 +1,19 @@
|
||||||
|
fn transpose_4dc9a1() {
|
||||||
|
var res : mat3x2<f32> = transpose(mat2x3<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_4dc9a1();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_4dc9a1();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_4dc9a1();
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
// 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 transpose_854336() {
|
||||||
|
var res: mat3x3<f32> = transpose(mat3x3<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_854336();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_854336();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_854336();
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value : SV_Position;
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_854336() {
|
||||||
|
float3x3 res = transpose(float3x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
transpose_854336();
|
||||||
|
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
transpose_854336();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
transpose_854336();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value [[position]];
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_854336() {
|
||||||
|
float3x3 res = transpose(float3x3());
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex tint_symbol vertex_main() {
|
||||||
|
transpose_854336();
|
||||||
|
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment void fragment_main() {
|
||||||
|
transpose_854336();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
kernel void compute_main() {
|
||||||
|
transpose_854336();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
|
; Bound: 34
|
||||||
|
; Schema: 0
|
||||||
|
OpCapability Shader
|
||||||
|
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 %transpose_854336 "transpose_854336"
|
||||||
|
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
|
||||||
|
%mat3v3float = OpTypeMatrix %v3float 3
|
||||||
|
%16 = OpConstantNull %mat3v3float
|
||||||
|
%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float
|
||||||
|
%19 = OpTypeFunction %void %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%transpose_854336 = OpFunction %void None %9
|
||||||
|
%12 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_mat3v3float Function %16
|
||||||
|
%13 = OpTranspose %mat3v3float %16
|
||||||
|
OpStore %res %13
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%tint_symbol_2 = OpFunction %void None %19
|
||||||
|
%tint_symbol = OpFunctionParameter %v4float
|
||||||
|
%22 = OpLabel
|
||||||
|
OpStore %tint_symbol_1 %tint_symbol
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main = OpFunction %void None %9
|
||||||
|
%24 = OpLabel
|
||||||
|
OpStore %tint_pointsize %float_1
|
||||||
|
%26 = OpFunctionCall %void %transpose_854336
|
||||||
|
%27 = OpFunctionCall %void %tint_symbol_2 %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %9
|
||||||
|
%29 = OpLabel
|
||||||
|
%30 = OpFunctionCall %void %transpose_854336
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %9
|
||||||
|
%32 = OpLabel
|
||||||
|
%33 = OpFunctionCall %void %transpose_854336
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -0,0 +1,19 @@
|
||||||
|
fn transpose_854336() {
|
||||||
|
var res : mat3x3<f32> = transpose(mat3x3<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_854336();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_854336();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_854336();
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
// 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 transpose_c1b600() {
|
||||||
|
var res: mat4x4<f32> = transpose(mat4x4<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_c1b600();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_c1b600();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_c1b600();
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value : SV_Position;
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_c1b600() {
|
||||||
|
float4x4 res = transpose(float4x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
transpose_c1b600();
|
||||||
|
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
transpose_c1b600();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
transpose_c1b600();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value [[position]];
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_c1b600() {
|
||||||
|
float4x4 res = transpose(float4x4());
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex tint_symbol vertex_main() {
|
||||||
|
transpose_c1b600();
|
||||||
|
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment void fragment_main() {
|
||||||
|
transpose_c1b600();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
kernel void compute_main() {
|
||||||
|
transpose_c1b600();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
|
; Bound: 33
|
||||||
|
; Schema: 0
|
||||||
|
OpCapability Shader
|
||||||
|
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 %transpose_c1b600 "transpose_c1b600"
|
||||||
|
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
|
||||||
|
%mat4v4float = OpTypeMatrix %v4float 4
|
||||||
|
%15 = OpConstantNull %mat4v4float
|
||||||
|
%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float
|
||||||
|
%18 = OpTypeFunction %void %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%transpose_c1b600 = OpFunction %void None %9
|
||||||
|
%12 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_mat4v4float Function %15
|
||||||
|
%13 = OpTranspose %mat4v4float %15
|
||||||
|
OpStore %res %13
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%tint_symbol_2 = OpFunction %void None %18
|
||||||
|
%tint_symbol = OpFunctionParameter %v4float
|
||||||
|
%21 = OpLabel
|
||||||
|
OpStore %tint_symbol_1 %tint_symbol
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main = OpFunction %void None %9
|
||||||
|
%23 = OpLabel
|
||||||
|
OpStore %tint_pointsize %float_1
|
||||||
|
%25 = OpFunctionCall %void %transpose_c1b600
|
||||||
|
%26 = OpFunctionCall %void %tint_symbol_2 %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %9
|
||||||
|
%28 = OpLabel
|
||||||
|
%29 = OpFunctionCall %void %transpose_c1b600
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %9
|
||||||
|
%31 = OpLabel
|
||||||
|
%32 = OpFunctionCall %void %transpose_c1b600
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -0,0 +1,19 @@
|
||||||
|
fn transpose_c1b600() {
|
||||||
|
var res : mat4x4<f32> = transpose(mat4x4<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_c1b600();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_c1b600();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_c1b600();
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
// 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 transpose_d8f8ba() {
|
||||||
|
var res: mat4x3<f32> = transpose(mat3x4<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_d8f8ba();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_d8f8ba();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_d8f8ba();
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value : SV_Position;
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_d8f8ba() {
|
||||||
|
float4x3 res = transpose(float3x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
transpose_d8f8ba();
|
||||||
|
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
transpose_d8f8ba();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
transpose_d8f8ba();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value [[position]];
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_d8f8ba() {
|
||||||
|
float4x3 res = transpose(float3x4());
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex tint_symbol vertex_main() {
|
||||||
|
transpose_d8f8ba();
|
||||||
|
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment void fragment_main() {
|
||||||
|
transpose_d8f8ba();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
kernel void compute_main() {
|
||||||
|
transpose_d8f8ba();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
|
; Bound: 36
|
||||||
|
; Schema: 0
|
||||||
|
OpCapability Shader
|
||||||
|
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 %transpose_d8f8ba "transpose_d8f8ba"
|
||||||
|
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
|
||||||
|
%mat4v3float = OpTypeMatrix %v3float 4
|
||||||
|
%mat3v4float = OpTypeMatrix %v4float 3
|
||||||
|
%17 = OpConstantNull %mat3v4float
|
||||||
|
%_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float
|
||||||
|
%20 = OpConstantNull %mat4v3float
|
||||||
|
%21 = OpTypeFunction %void %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%transpose_d8f8ba = OpFunction %void None %9
|
||||||
|
%12 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_mat4v3float Function %20
|
||||||
|
%13 = OpTranspose %mat4v3float %17
|
||||||
|
OpStore %res %13
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%tint_symbol_2 = OpFunction %void None %21
|
||||||
|
%tint_symbol = OpFunctionParameter %v4float
|
||||||
|
%24 = OpLabel
|
||||||
|
OpStore %tint_symbol_1 %tint_symbol
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main = OpFunction %void None %9
|
||||||
|
%26 = OpLabel
|
||||||
|
OpStore %tint_pointsize %float_1
|
||||||
|
%28 = OpFunctionCall %void %transpose_d8f8ba
|
||||||
|
%29 = OpFunctionCall %void %tint_symbol_2 %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %9
|
||||||
|
%31 = OpLabel
|
||||||
|
%32 = OpFunctionCall %void %transpose_d8f8ba
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %9
|
||||||
|
%34 = OpLabel
|
||||||
|
%35 = OpFunctionCall %void %transpose_d8f8ba
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -0,0 +1,19 @@
|
||||||
|
fn transpose_d8f8ba() {
|
||||||
|
var res : mat4x3<f32> = transpose(mat3x4<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_d8f8ba();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_d8f8ba();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_d8f8ba();
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
// 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 transpose_ed4bdc() {
|
||||||
|
var res: mat2x3<f32> = transpose(mat3x2<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_ed4bdc();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_ed4bdc();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_ed4bdc();
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value : SV_Position;
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_ed4bdc() {
|
||||||
|
float2x3 res = transpose(float3x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
transpose_ed4bdc();
|
||||||
|
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
transpose_ed4bdc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
transpose_ed4bdc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
struct tint_symbol {
|
||||||
|
float4 value [[position]];
|
||||||
|
};
|
||||||
|
|
||||||
|
void transpose_ed4bdc() {
|
||||||
|
float2x3 res = transpose(float3x2());
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex tint_symbol vertex_main() {
|
||||||
|
transpose_ed4bdc();
|
||||||
|
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||||
|
return tint_symbol_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment void fragment_main() {
|
||||||
|
transpose_ed4bdc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
kernel void compute_main() {
|
||||||
|
transpose_ed4bdc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
|
; Bound: 37
|
||||||
|
; Schema: 0
|
||||||
|
OpCapability Shader
|
||||||
|
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 %transpose_ed4bdc "transpose_ed4bdc"
|
||||||
|
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
|
||||||
|
%mat2v3float = OpTypeMatrix %v3float 2
|
||||||
|
%v2float = OpTypeVector %float 2
|
||||||
|
%mat3v2float = OpTypeMatrix %v2float 3
|
||||||
|
%18 = OpConstantNull %mat3v2float
|
||||||
|
%_ptr_Function_mat2v3float = OpTypePointer Function %mat2v3float
|
||||||
|
%21 = OpConstantNull %mat2v3float
|
||||||
|
%22 = OpTypeFunction %void %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%transpose_ed4bdc = OpFunction %void None %9
|
||||||
|
%12 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_mat2v3float Function %21
|
||||||
|
%13 = OpTranspose %mat2v3float %18
|
||||||
|
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 %transpose_ed4bdc
|
||||||
|
%30 = OpFunctionCall %void %tint_symbol_2 %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %9
|
||||||
|
%32 = OpLabel
|
||||||
|
%33 = OpFunctionCall %void %transpose_ed4bdc
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %9
|
||||||
|
%35 = OpLabel
|
||||||
|
%36 = OpFunctionCall %void %transpose_ed4bdc
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -0,0 +1,19 @@
|
||||||
|
fn transpose_ed4bdc() {
|
||||||
|
var res : mat2x3<f32> = transpose(mat3x2<f32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(vertex)]]
|
||||||
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||||
|
transpose_ed4bdc();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(fragment)]]
|
||||||
|
fn fragment_main() {
|
||||||
|
transpose_ed4bdc();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute)]]
|
||||||
|
fn compute_main() {
|
||||||
|
transpose_ed4bdc();
|
||||||
|
}
|
Loading…
Reference in New Issue