mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-13 10:51:35 +00:00
writers: Use the new sem::Module::DependencyOrderedDeclarations
As the resolver currently enforces in-order declarations, this does not change the declaration order from iterating over the ast::Module::GlobalDeclarations. The MSL backend has been changed to use the sem::Module::DependencyOrderedDeclarations list instead of looping over different declaration types separately. Bug: tint:1266 Change-Id: I698d612032285311017bfceab3c42adae1928a0e Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/79767 Reviewed-by: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
a52be6c9ec
commit
8ec32a6ec9
@ -36,6 +36,7 @@
|
||||
#include "src/sem/depth_texture_type.h"
|
||||
#include "src/sem/function.h"
|
||||
#include "src/sem/member_accessor_expression.h"
|
||||
#include "src/sem/module.h"
|
||||
#include "src/sem/multisampled_texture_type.h"
|
||||
#include "src/sem/sampled_texture_type.h"
|
||||
#include "src/sem/statement.h"
|
||||
@ -147,7 +148,8 @@ bool GeneratorImpl::Generate() {
|
||||
|
||||
line();
|
||||
|
||||
for (auto* decl : builder_.AST().GlobalDeclarations()) {
|
||||
auto* mod = builder_.Sem().Module();
|
||||
for (auto* decl : mod->DependencyOrderedDeclarations()) {
|
||||
if (decl->Is<ast::Alias>()) {
|
||||
continue; // Ignore aliases.
|
||||
}
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "src/sem/depth_texture_type.h"
|
||||
#include "src/sem/function.h"
|
||||
#include "src/sem/member_accessor_expression.h"
|
||||
#include "src/sem/module.h"
|
||||
#include "src/sem/multisampled_texture_type.h"
|
||||
#include "src/sem/sampled_texture_type.h"
|
||||
#include "src/sem/statement.h"
|
||||
@ -223,7 +224,8 @@ bool GeneratorImpl::Generate() {
|
||||
const TypeInfo* last_kind = nullptr;
|
||||
size_t last_padding_line = 0;
|
||||
|
||||
for (auto* decl : builder_.AST().GlobalDeclarations()) {
|
||||
auto* mod = builder_.Sem().Module();
|
||||
for (auto* decl : mod->DependencyOrderedDeclarations()) {
|
||||
if (decl->Is<ast::Alias>()) {
|
||||
continue; // Ignore aliases.
|
||||
}
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include "src/sem/i32_type.h"
|
||||
#include "src/sem/matrix_type.h"
|
||||
#include "src/sem/member_accessor_expression.h"
|
||||
#include "src/sem/module.h"
|
||||
#include "src/sem/multisampled_texture_type.h"
|
||||
#include "src/sem/pointer_type.h"
|
||||
#include "src/sem/reference_type.h"
|
||||
@ -207,44 +208,46 @@ bool GeneratorImpl::Generate() {
|
||||
|
||||
auto helpers_insertion_point = current_buffer_->lines.size();
|
||||
|
||||
for (auto* const type_decl : program_->AST().TypeDecls()) {
|
||||
if (!type_decl->Is<ast::Alias>()) {
|
||||
if (!EmitTypeDecl(TypeOf(type_decl))) {
|
||||
return false;
|
||||
}
|
||||
auto* mod = builder_.Sem().Module();
|
||||
for (auto* decl : mod->DependencyOrderedDeclarations()) {
|
||||
bool ok = Switch(
|
||||
decl, //
|
||||
[&](const ast::Struct* str) {
|
||||
TINT_DEFER(line());
|
||||
return EmitTypeDecl(TypeOf(str));
|
||||
},
|
||||
[&](const ast::Alias*) {
|
||||
return true; // folded away by the writer
|
||||
},
|
||||
[&](const ast::Variable* var) {
|
||||
if (var->is_const) {
|
||||
TINT_DEFER(line());
|
||||
return EmitProgramConstVariable(var);
|
||||
}
|
||||
// These are pushed into the entry point by sanitizer transforms.
|
||||
TINT_ICE(Writer, diagnostics_)
|
||||
<< "module-scope variables should have been handled by the MSL "
|
||||
"sanitizer";
|
||||
return false;
|
||||
},
|
||||
[&](const ast::Function* func) {
|
||||
TINT_DEFER(line());
|
||||
if (func->IsEntryPoint()) {
|
||||
return EmitEntryPointFunction(func);
|
||||
}
|
||||
return EmitFunction(func);
|
||||
},
|
||||
[&](Default) {
|
||||
// These are pushed into the entry point by sanitizer transforms.
|
||||
TINT_ICE(Writer, diagnostics_)
|
||||
<< "unhandled type: " << decl->TypeInfo().name;
|
||||
return false;
|
||||
});
|
||||
if (!ok) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!program_->AST().TypeDecls().empty()) {
|
||||
line();
|
||||
}
|
||||
|
||||
for (auto* var : program_->AST().GlobalVariables()) {
|
||||
if (var->is_const) {
|
||||
if (!EmitProgramConstVariable(var)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// These are pushed into the entry point by sanitizer transforms.
|
||||
TINT_ICE(Writer, diagnostics_) << "module-scope variables should have "
|
||||
"been handled by the MSL sanitizer";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto* func : program_->AST().Functions()) {
|
||||
if (!func->IsEntryPoint()) {
|
||||
if (!EmitFunction(func)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!EmitEntryPointFunction(func)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
line();
|
||||
}
|
||||
|
||||
if (!invariant_define_name_.empty()) {
|
||||
// 'invariant' attribute requires MSL 2.1 or higher.
|
||||
// WGSL can ignore the invariant attribute on pre MSL 2.1 devices.
|
||||
@ -1555,11 +1558,12 @@ bool GeneratorImpl::EmitLiteral(std::ostream& out,
|
||||
return true;
|
||||
},
|
||||
[&](const ast::SintLiteralExpression* l) {
|
||||
// MSL (and C++) parse `-2147483648` as a `long` because it parses unary
|
||||
// minus and `2147483648` as separate tokens, and the latter doesn't
|
||||
// fit into an (32-bit) `int`. WGSL, OTOH, parses this as an `i32`. To
|
||||
// avoid issues with `long` to `int` casts, emit `(2147483647 - 1)`
|
||||
// instead, which ensures the expression type is `int`.
|
||||
// MSL (and C++) parse `-2147483648` as a `long` because it parses
|
||||
// unary minus and `2147483648` as separate tokens, and the latter
|
||||
// doesn't fit into an (32-bit) `int`. WGSL, OTOH, parses this as an
|
||||
// `i32`. To avoid issues with `long` to `int` casts, emit
|
||||
// `(2147483647 - 1)` instead, which ensures the expression type is
|
||||
// `int`.
|
||||
const auto int_min = std::numeric_limits<int32_t>::min();
|
||||
if (l->ValueAsI32() == int_min) {
|
||||
out << "(" << int_min + 1 << " - 1)";
|
||||
@ -1741,8 +1745,8 @@ std::string GeneratorImpl::interpolation_to_attribute(
|
||||
bool GeneratorImpl::EmitEntryPointFunction(const ast::Function* func) {
|
||||
auto func_name = program_->Symbols().NameFor(func->symbol);
|
||||
|
||||
// Returns the binding index of a variable, requiring that the group attribute
|
||||
// have a value of zero.
|
||||
// Returns the binding index of a variable, requiring that the group
|
||||
// attribute have a value of zero.
|
||||
const uint32_t kInvalidBindingIndex = std::numeric_limits<uint32_t>::max();
|
||||
auto get_binding_index = [&](const ast::Variable* var) -> uint32_t {
|
||||
auto bp = var->BindingPoint();
|
||||
@ -1923,14 +1927,14 @@ bool GeneratorImpl::EmitForLoop(const ast::ForLoopStatement* stmt) {
|
||||
}
|
||||
}
|
||||
|
||||
// If the for-loop has a multi-statement conditional and / or continuing, then
|
||||
// we cannot emit this as a regular for-loop in MSL. Instead we need to
|
||||
// If the for-loop has a multi-statement conditional and / or continuing,
|
||||
// then we cannot emit this as a regular for-loop in MSL. Instead we need to
|
||||
// generate a `while(true)` loop.
|
||||
bool emit_as_loop = cond_pre.lines.size() > 0 || cont_buf.lines.size() > 1;
|
||||
|
||||
// If the for-loop has multi-statement initializer, or is going to be emitted
|
||||
// as a `while(true)` loop, then declare the initializer statement(s) before
|
||||
// the loop in a new block.
|
||||
// If the for-loop has multi-statement initializer, or is going to be
|
||||
// emitted as a `while(true)` loop, then declare the initializer
|
||||
// statement(s) before the loop in a new block.
|
||||
bool nest_in_block =
|
||||
init_buf.lines.size() > 1 || (stmt->initializer && emit_as_loop);
|
||||
if (nest_in_block) {
|
||||
|
@ -107,6 +107,7 @@ using namespace metal;
|
||||
struct tint_symbol_1 {
|
||||
float foo [[user(locn0)]];
|
||||
};
|
||||
|
||||
struct tint_symbol_2 {
|
||||
float value [[color(1)]];
|
||||
};
|
||||
@ -207,15 +208,12 @@ struct Interface {
|
||||
float col2;
|
||||
float4 pos;
|
||||
};
|
||||
|
||||
struct tint_symbol {
|
||||
float col1 [[user(locn1)]];
|
||||
float col2 [[user(locn2)]];
|
||||
float4 pos [[position]];
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
float col1 [[user(locn1)]];
|
||||
float col2 [[user(locn2)]];
|
||||
};
|
||||
|
||||
Interface vert_main_inner() {
|
||||
Interface const tint_symbol_3 = {.col1=0.5f, .col2=0.25f, .pos=float4()};
|
||||
@ -231,6 +229,11 @@ vertex tint_symbol vert_main() {
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
struct tint_symbol_2 {
|
||||
float col1 [[user(locn1)]];
|
||||
float col2 [[user(locn2)]];
|
||||
};
|
||||
|
||||
void frag_main_inner(Interface colors) {
|
||||
float const r = colors.col1;
|
||||
float const g = colors.col2;
|
||||
@ -285,18 +288,16 @@ using namespace metal;
|
||||
struct VertexOutput {
|
||||
float4 pos;
|
||||
};
|
||||
struct tint_symbol {
|
||||
float4 pos [[position]];
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 pos [[position]];
|
||||
};
|
||||
|
||||
VertexOutput foo(float x) {
|
||||
VertexOutput const tint_symbol_2 = {.pos=float4(x, x, x, 1.0f)};
|
||||
return tint_symbol_2;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 pos [[position]];
|
||||
};
|
||||
|
||||
VertexOutput vert_main1_inner() {
|
||||
return foo(0.5f);
|
||||
}
|
||||
@ -308,6 +309,10 @@ vertex tint_symbol vert_main1() {
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
struct tint_symbol_1 {
|
||||
float4 pos [[position]];
|
||||
};
|
||||
|
||||
VertexOutput vert_main2_inner() {
|
||||
return foo(0.25f);
|
||||
}
|
||||
|
@ -57,6 +57,7 @@ using namespace metal;
|
||||
struct tint_symbol {
|
||||
/* 0x0000 */ uint4 buffer_size[1];
|
||||
};
|
||||
|
||||
struct my_struct {
|
||||
float a[1];
|
||||
};
|
||||
@ -103,6 +104,7 @@ using namespace metal;
|
||||
struct tint_symbol {
|
||||
/* 0x0000 */ uint4 buffer_size[1];
|
||||
};
|
||||
|
||||
struct my_struct {
|
||||
float z;
|
||||
float a[1];
|
||||
@ -152,6 +154,7 @@ using namespace metal;
|
||||
struct tint_symbol {
|
||||
/* 0x0000 */ uint4 buffer_size[1];
|
||||
};
|
||||
|
||||
struct my_struct {
|
||||
float a[1];
|
||||
};
|
||||
@ -208,6 +211,7 @@ using namespace metal;
|
||||
struct tint_symbol {
|
||||
/* 0x0000 */ uint4 buffer_size[2];
|
||||
};
|
||||
|
||||
struct my_struct {
|
||||
float a[1];
|
||||
};
|
||||
|
@ -190,6 +190,7 @@ using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
float2x2 arr[4];
|
||||
};
|
||||
|
||||
struct tint_symbol_3 {
|
||||
tint_array_wrapper m;
|
||||
};
|
||||
@ -240,9 +241,11 @@ struct S1 {
|
||||
float2x2 m1;
|
||||
float4x4 m2;
|
||||
};
|
||||
|
||||
struct S2 {
|
||||
S1 s;
|
||||
};
|
||||
|
||||
struct tint_symbol_4 {
|
||||
S2 s;
|
||||
};
|
||||
@ -316,11 +319,13 @@ struct tint_symbol_7 {
|
||||
float2x3 m2;
|
||||
float2x4 m3;
|
||||
};
|
||||
|
||||
struct tint_symbol_15 {
|
||||
float3x2 m4;
|
||||
float3x3 m5;
|
||||
float3x4 m6;
|
||||
};
|
||||
|
||||
struct tint_symbol_23 {
|
||||
float4x2 m7;
|
||||
float4x3 m8;
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "src/sem/depth_texture_type.h"
|
||||
#include "src/sem/function.h"
|
||||
#include "src/sem/member_accessor_expression.h"
|
||||
#include "src/sem/module.h"
|
||||
#include "src/sem/multisampled_texture_type.h"
|
||||
#include "src/sem/reference_type.h"
|
||||
#include "src/sem/sampled_texture_type.h"
|
||||
@ -308,9 +309,12 @@ bool Builder::Build() {
|
||||
}
|
||||
}
|
||||
|
||||
for (auto* func : builder_.AST().Functions()) {
|
||||
if (!GenerateFunction(func)) {
|
||||
return false;
|
||||
auto* mod = builder_.Sem().Module();
|
||||
for (auto* decl : mod->DependencyOrderedDeclarations()) {
|
||||
if (auto* func = decl->As<ast::Function>()) {
|
||||
if (!GenerateFunction(func)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,18 +4,10 @@ using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ int4 arr[4];
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ tint_array_wrapper arr;
|
||||
};
|
||||
struct tint_array_wrapper_3 {
|
||||
int arr[2];
|
||||
};
|
||||
struct tint_array_wrapper_2 {
|
||||
tint_array_wrapper_3 arr[3];
|
||||
};
|
||||
struct tint_array_wrapper_1 {
|
||||
tint_array_wrapper_2 arr[4];
|
||||
};
|
||||
|
||||
tint_array_wrapper ret_arr() {
|
||||
tint_array_wrapper const tint_symbol = {.arr={}};
|
||||
@ -27,6 +19,18 @@ S ret_struct_arr() {
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
struct tint_array_wrapper_3 {
|
||||
int arr[2];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_2 {
|
||||
tint_array_wrapper_3 arr[3];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
tint_array_wrapper_2 arr[4];
|
||||
};
|
||||
|
||||
void foo(tint_array_wrapper src_param, thread tint_array_wrapper* const tint_symbol_3, threadgroup tint_array_wrapper* const tint_symbol_4, const constant S* const tint_symbol_5, device S* const tint_symbol_6) {
|
||||
tint_array_wrapper src_function = {};
|
||||
tint_array_wrapper dst = {};
|
||||
|
@ -4,15 +4,19 @@ using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ int4 arr[4];
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ tint_array_wrapper arr;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_3 {
|
||||
int arr[2];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_2 {
|
||||
tint_array_wrapper_3 arr[3];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
tint_array_wrapper_2 arr[4];
|
||||
};
|
||||
|
@ -4,18 +4,23 @@ using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ int4 arr[4];
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ tint_array_wrapper arr;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_3 {
|
||||
/* 0x0000 */ int arr[2];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_2 {
|
||||
/* 0x0000 */ tint_array_wrapper_3 arr[3];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
/* 0x0000 */ tint_array_wrapper_2 arr[4];
|
||||
};
|
||||
|
||||
struct S_nested {
|
||||
/* 0x0000 */ tint_array_wrapper_1 arr;
|
||||
};
|
||||
|
@ -4,9 +4,11 @@ using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
int arr[4];
|
||||
};
|
||||
|
||||
struct S {
|
||||
tint_array_wrapper arr;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
tint_array_wrapper arr[2];
|
||||
};
|
||||
|
@ -4,15 +4,19 @@ using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ int4 arr[4];
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ tint_array_wrapper arr;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_3 {
|
||||
int arr[2];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_2 {
|
||||
tint_array_wrapper_3 arr[3];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
tint_array_wrapper_2 arr[4];
|
||||
};
|
||||
|
@ -4,21 +4,23 @@ using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
float arr[4];
|
||||
};
|
||||
struct tint_array_wrapper_1 {
|
||||
tint_array_wrapper arr[3];
|
||||
};
|
||||
struct tint_array_wrapper_2 {
|
||||
tint_array_wrapper_1 arr[2];
|
||||
};
|
||||
|
||||
float f1(tint_array_wrapper a) {
|
||||
return a.arr[3];
|
||||
}
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
tint_array_wrapper arr[3];
|
||||
};
|
||||
|
||||
float f2(tint_array_wrapper_1 a) {
|
||||
return a.arr[2].arr[3];
|
||||
}
|
||||
|
||||
struct tint_array_wrapper_2 {
|
||||
tint_array_wrapper_1 arr[2];
|
||||
};
|
||||
|
||||
float f3(tint_array_wrapper_2 a) {
|
||||
return a.arr[1].arr[2].arr[3];
|
||||
}
|
||||
|
@ -4,23 +4,25 @@ using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
float arr[4];
|
||||
};
|
||||
struct tint_array_wrapper_1 {
|
||||
tint_array_wrapper arr[3];
|
||||
};
|
||||
struct tint_array_wrapper_2 {
|
||||
tint_array_wrapper_1 arr[2];
|
||||
};
|
||||
|
||||
tint_array_wrapper f1() {
|
||||
tint_array_wrapper const tint_symbol_1 = {.arr={}};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
tint_array_wrapper arr[3];
|
||||
};
|
||||
|
||||
tint_array_wrapper_1 f2() {
|
||||
tint_array_wrapper_1 const tint_symbol_2 = {.arr={f1(), f1(), f1()}};
|
||||
return tint_symbol_2;
|
||||
}
|
||||
|
||||
struct tint_array_wrapper_2 {
|
||||
tint_array_wrapper_1 arr[2];
|
||||
};
|
||||
|
||||
tint_array_wrapper_2 f3() {
|
||||
tint_array_wrapper_2 const tint_symbol_3 = {.arr={f2(), f2()}};
|
||||
return tint_symbol_3;
|
||||
|
@ -1,12 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
constant int slen = 4;
|
||||
|
||||
constant uint ulen = 4u;
|
||||
|
||||
struct tint_array_wrapper {
|
||||
float arr[4];
|
||||
};
|
||||
|
||||
constant int slen = 4;
|
||||
constant uint ulen = 4u;
|
||||
fragment void tint_symbol() {
|
||||
tint_array_wrapper signed_literal = {};
|
||||
tint_array_wrapper unsigned_literal = {};
|
||||
|
@ -5,19 +5,24 @@ struct strided_arr {
|
||||
/* 0x0000 */ float el;
|
||||
/* 0x0004 */ int8_t tint_pad[4];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ strided_arr arr[2];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
/* 0x0000 */ tint_array_wrapper arr[3];
|
||||
};
|
||||
|
||||
struct strided_arr_1 {
|
||||
/* 0x0000 */ tint_array_wrapper_1 el;
|
||||
/* 0x0030 */ int8_t tint_pad_1[80];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_2 {
|
||||
/* 0x0000 */ strided_arr_1 arr[4];
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ tint_array_wrapper_2 a;
|
||||
};
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
int arr[4];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_2 {
|
||||
tint_array_wrapper arr[3];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
tint_array_wrapper_2 arr[2];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_3 {
|
||||
tint_array_wrapper arr[2];
|
||||
};
|
||||
|
@ -15,6 +15,7 @@ inline vec<T, N> operator*(packed_vec<T, M> lhs, matrix<T, N, M> rhs) {
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ int4 arr[4];
|
||||
};
|
||||
|
||||
struct Inner {
|
||||
/* 0x0000 */ packed_int3 a;
|
||||
/* 0x000c */ int b;
|
||||
@ -27,6 +28,7 @@ struct Inner {
|
||||
/* 0x0068 */ int8_t tint_pad[8];
|
||||
/* 0x0070 */ tint_array_wrapper i;
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ Inner arr[1];
|
||||
};
|
||||
|
@ -15,6 +15,7 @@ inline vec<T, N> operator*(packed_vec<T, M> lhs, matrix<T, N, M> rhs) {
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ int4 arr[4];
|
||||
};
|
||||
|
||||
struct Inner {
|
||||
/* 0x0000 */ packed_int3 a;
|
||||
/* 0x000c */ int b;
|
||||
@ -27,6 +28,7 @@ struct Inner {
|
||||
/* 0x0068 */ int8_t tint_pad[8];
|
||||
/* 0x0070 */ tint_array_wrapper i;
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ Inner arr[1];
|
||||
};
|
||||
|
@ -15,9 +15,11 @@ inline vec<T, N> operator*(packed_vec<T, M> lhs, matrix<T, N, M> rhs) {
|
||||
struct Inner {
|
||||
/* 0x0000 */ int x;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ Inner arr[4];
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ packed_int3 a;
|
||||
/* 0x000c */ int b;
|
||||
|
@ -15,9 +15,11 @@ inline vec<T, N> operator*(packed_vec<T, M> lhs, matrix<T, N, M> rhs) {
|
||||
struct Inner {
|
||||
/* 0x0000 */ int x;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ Inner arr[4];
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ packed_int3 a;
|
||||
/* 0x000c */ int b;
|
||||
|
@ -4,9 +4,11 @@ using namespace metal;
|
||||
struct S {
|
||||
/* 0x0000 */ float f;
|
||||
};
|
||||
|
||||
struct tint_symbol_2 {
|
||||
/* 0x0000 */ S arr[1];
|
||||
};
|
||||
|
||||
struct tint_symbol_4 {
|
||||
/* 0x0000 */ S arr[1];
|
||||
};
|
||||
|
@ -4,6 +4,7 @@ using namespace metal;
|
||||
struct Inner {
|
||||
/* 0x0000 */ float f;
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ Inner inner;
|
||||
};
|
||||
|
@ -15,6 +15,7 @@ inline vec<T, N> operator*(packed_vec<T, M> lhs, matrix<T, N, M> rhs) {
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ int4 arr[4];
|
||||
};
|
||||
|
||||
struct Inner {
|
||||
/* 0x0000 */ packed_int3 a;
|
||||
/* 0x000c */ int b;
|
||||
@ -29,9 +30,11 @@ struct Inner {
|
||||
/* 0x0078 */ int8_t tint_pad[8];
|
||||
/* 0x0080 */ tint_array_wrapper k;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
/* 0x0000 */ Inner arr[8];
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ tint_array_wrapper_1 arr;
|
||||
};
|
||||
|
@ -16,9 +16,11 @@ struct Inner {
|
||||
/* 0x0000 */ int x;
|
||||
/* 0x0004 */ int8_t tint_pad[12];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ Inner arr[4];
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ packed_int3 a;
|
||||
/* 0x000c */ int b;
|
||||
|
@ -4,6 +4,7 @@ using namespace metal;
|
||||
struct Inner {
|
||||
/* 0x0000 */ float f;
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ Inner inner;
|
||||
};
|
||||
|
@ -2,3 +2,4 @@
|
||||
|
||||
using namespace metal;
|
||||
constant int H = 1;
|
||||
|
||||
|
@ -5,16 +5,19 @@ struct VertexInputs0 {
|
||||
uint vertex_index;
|
||||
int loc0;
|
||||
};
|
||||
|
||||
struct VertexInputs1 {
|
||||
uint loc1;
|
||||
float4 loc3;
|
||||
};
|
||||
|
||||
struct tint_symbol_2 {
|
||||
int loc0 [[attribute(0)]];
|
||||
uint loc1 [[attribute(1)]];
|
||||
uint loc1_1 [[attribute(2)]];
|
||||
float4 loc3 [[attribute(3)]];
|
||||
};
|
||||
|
||||
struct tint_symbol_3 {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
@ -32,6 +32,14 @@ inline vec<T, N> operator*(packed_vec<T, M> lhs, matrix<T, N, M> rhs) {
|
||||
return vec<T, M>(lhs) * rhs;
|
||||
}
|
||||
|
||||
void marg8uintin() {
|
||||
isnormal(4.0f);
|
||||
isnormal(float4());
|
||||
isnormal(0.0f);
|
||||
isnormal(4.0f);
|
||||
isnormal(2.0f);
|
||||
}
|
||||
|
||||
struct Uniforms {
|
||||
/* 0x0000 */ uint numTriangles;
|
||||
/* 0x0004 */ uint gridSize;
|
||||
@ -42,6 +50,7 @@ struct Uniforms {
|
||||
/* 0x0020 */ packed_float3 bbMax;
|
||||
/* 0x002c */ int8_t tint_pad_1[4];
|
||||
};
|
||||
|
||||
struct Dbg {
|
||||
/* 0x0000 */ atomic_uint offsetCounter;
|
||||
/* 0x0004 */ uint pad0;
|
||||
@ -56,30 +65,27 @@ struct Dbg {
|
||||
/* 0x0028 */ float value_f32_2;
|
||||
/* 0x002c */ float value_f32_3;
|
||||
};
|
||||
|
||||
struct F32s {
|
||||
/* 0x0000 */ float values[1];
|
||||
};
|
||||
|
||||
struct U32s {
|
||||
/* 0x0000 */ uint values[1];
|
||||
};
|
||||
|
||||
struct I32s {
|
||||
int values[1];
|
||||
};
|
||||
|
||||
struct AU32s {
|
||||
/* 0x0000 */ atomic_uint values[1];
|
||||
};
|
||||
|
||||
struct AI32s {
|
||||
/* 0x0000 */ atomic_int values[1];
|
||||
};
|
||||
|
||||
void marg8uintin() {
|
||||
isnormal(4.0f);
|
||||
isnormal(float4());
|
||||
isnormal(0.0f);
|
||||
isnormal(4.0f);
|
||||
isnormal(2.0f);
|
||||
}
|
||||
|
||||
float3 toVoxelPos(float3 position, const constant Uniforms* const tint_symbol) {
|
||||
float3 bbMin = float3((*(tint_symbol)).bbMin[0], (*(tint_symbol)).bbMin[1], (*(tint_symbol)).bbMin[2]);
|
||||
float3 bbMax = float3((*(tint_symbol)).bbMax[0], (*(tint_symbol)).bbMax[1], (*(tint_symbol)).bbMax[2]);
|
||||
|
@ -4,6 +4,7 @@ using namespace metal;
|
||||
struct A {
|
||||
int a;
|
||||
};
|
||||
|
||||
struct B {
|
||||
int b;
|
||||
};
|
||||
|
@ -4,6 +4,7 @@ using namespace metal;
|
||||
struct tint_symbol_1 {
|
||||
/* 0x0000 */ uint4 buffer_size[1];
|
||||
};
|
||||
|
||||
struct S {
|
||||
float f;
|
||||
};
|
||||
|
@ -5,23 +5,20 @@ struct Uniforms {
|
||||
/* 0x0000 */ float2 u_scale;
|
||||
/* 0x0008 */ float2 u_offset;
|
||||
};
|
||||
|
||||
struct VertexOutputs {
|
||||
float2 texcoords;
|
||||
float4 position;
|
||||
};
|
||||
|
||||
struct tint_symbol {
|
||||
float2 texcoords [[user(locn0)]];
|
||||
float4 position [[position]];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
float2 arr[3];
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
float2 texcoord [[user(locn0)]];
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
float4 value [[color(0)]];
|
||||
};
|
||||
|
||||
VertexOutputs vs_main_inner(uint VertexIndex, const constant Uniforms* const tint_symbol_4) {
|
||||
tint_array_wrapper texcoord = {.arr={float2(-0.5f, 0.0f), float2(1.5f, 0.0f), float2(0.5f, 2.0f)}};
|
||||
@ -44,6 +41,14 @@ vertex tint_symbol vs_main(const constant Uniforms* tint_symbol_5 [[buffer(0)]],
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
struct tint_symbol_2 {
|
||||
float2 texcoord [[user(locn0)]];
|
||||
};
|
||||
|
||||
struct tint_symbol_3 {
|
||||
float4 value [[color(0)]];
|
||||
};
|
||||
|
||||
float4 fs_main_inner(float2 texcoord, texture2d<float, access::sample> tint_symbol_6, sampler tint_symbol_7) {
|
||||
float2 clampedTexcoord = clamp(texcoord, float2(0.0f, 0.0f), float2(1.0f, 1.0f));
|
||||
if (!(all((clampedTexcoord == texcoord)))) {
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct UBO {
|
||||
/* 0x0000 */ int dynamic_idx;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
int arr[64];
|
||||
};
|
||||
|
||||
struct S {
|
||||
tint_array_wrapper data;
|
||||
};
|
||||
|
||||
struct Result {
|
||||
/* 0x0000 */ int out;
|
||||
};
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct UBO {
|
||||
/* 0x0000 */ int dynamic_idx;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
int arr[64];
|
||||
};
|
||||
|
||||
struct S {
|
||||
tint_array_wrapper data;
|
||||
};
|
||||
|
||||
struct Result {
|
||||
/* 0x0000 */ int out;
|
||||
};
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct UBO {
|
||||
/* 0x0000 */ int dynamic_idx;
|
||||
};
|
||||
|
||||
struct Result {
|
||||
/* 0x0000 */ int out;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ int arr[4];
|
||||
};
|
||||
|
||||
struct SSBO {
|
||||
/* 0x0000 */ tint_array_wrapper data;
|
||||
};
|
||||
|
@ -4,11 +4,13 @@ using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ int4 arr[4];
|
||||
};
|
||||
|
||||
struct UBO {
|
||||
/* 0x0000 */ tint_array_wrapper data;
|
||||
/* 0x0040 */ int dynamic_idx;
|
||||
/* 0x0044 */ int8_t tint_pad[12];
|
||||
};
|
||||
|
||||
struct Result {
|
||||
/* 0x0000 */ int out;
|
||||
};
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct UBO {
|
||||
/* 0x0000 */ int dynamic_idx;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
int arr[64];
|
||||
};
|
||||
|
||||
struct S {
|
||||
tint_array_wrapper data;
|
||||
};
|
||||
|
||||
struct Result {
|
||||
/* 0x0000 */ int out;
|
||||
};
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct UBO {
|
||||
/* 0x0000 */ int dynamic_idx;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
int arr[64];
|
||||
};
|
||||
|
||||
struct S {
|
||||
tint_array_wrapper data;
|
||||
};
|
||||
|
||||
struct Result {
|
||||
/* 0x0000 */ int out;
|
||||
};
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct UBO {
|
||||
/* 0x0000 */ int dynamic_idx;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
int arr[64];
|
||||
};
|
||||
|
||||
struct S {
|
||||
tint_array_wrapper data;
|
||||
};
|
||||
|
||||
struct Result {
|
||||
/* 0x0000 */ int out;
|
||||
};
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct UBO {
|
||||
/* 0x0000 */ int dynamic_idx;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
int arr[64];
|
||||
};
|
||||
|
||||
struct S {
|
||||
tint_array_wrapper data;
|
||||
};
|
||||
|
||||
struct Result {
|
||||
/* 0x0000 */ int out;
|
||||
};
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct UBO {
|
||||
/* 0x0000 */ int dynamic_idx;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
int arr[64];
|
||||
};
|
||||
|
||||
struct S {
|
||||
tint_array_wrapper data;
|
||||
};
|
||||
|
||||
struct Result {
|
||||
/* 0x0000 */ int out;
|
||||
};
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct UBO {
|
||||
/* 0x0000 */ int dynamic_idx;
|
||||
};
|
||||
|
||||
struct Result {
|
||||
/* 0x0000 */ int out;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ int arr[4];
|
||||
};
|
||||
|
||||
struct SSBO {
|
||||
/* 0x0000 */ tint_array_wrapper data;
|
||||
};
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct UBO {
|
||||
/* 0x0000 */ int dynamic_idx;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
int arr[64];
|
||||
};
|
||||
|
||||
struct S {
|
||||
tint_array_wrapper data;
|
||||
};
|
||||
|
||||
struct Result {
|
||||
/* 0x0000 */ int out;
|
||||
};
|
||||
|
@ -4,6 +4,7 @@ using namespace metal;
|
||||
struct tint_symbol_2 {
|
||||
float2 vUV [[user(locn0)]];
|
||||
};
|
||||
|
||||
struct tint_symbol_3 {
|
||||
float4 value [[color(0)]];
|
||||
};
|
||||
|
@ -15,9 +15,11 @@ inline vec<T, N> operator*(packed_vec<T, M> lhs, matrix<T, N, M> rhs) {
|
||||
struct Simulation {
|
||||
/* 0x0000 */ uint i;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ float3 arr[8];
|
||||
};
|
||||
|
||||
struct Particle {
|
||||
/* 0x0000 */ tint_array_wrapper position;
|
||||
/* 0x0080 */ float lifetime;
|
||||
@ -26,6 +28,7 @@ struct Particle {
|
||||
/* 0x00a0 */ packed_float3 velocity;
|
||||
/* 0x00ac */ int8_t tint_pad_1[4];
|
||||
};
|
||||
|
||||
struct Particles {
|
||||
/* 0x0000 */ Particle p[1];
|
||||
};
|
||||
|
@ -4,9 +4,11 @@ using namespace metal;
|
||||
struct PointLight {
|
||||
float4 position;
|
||||
};
|
||||
|
||||
struct PointLights {
|
||||
PointLight values[1];
|
||||
};
|
||||
|
||||
struct Uniforms {
|
||||
/* 0x0000 */ float4x4 worldView;
|
||||
/* 0x0040 */ float4x4 proj;
|
||||
@ -15,6 +17,7 @@ struct Uniforms {
|
||||
/* 0x0088 */ int8_t tint_pad[8];
|
||||
/* 0x0090 */ float4 color;
|
||||
};
|
||||
|
||||
struct FragmentInput {
|
||||
float4 position;
|
||||
float4 view_position;
|
||||
@ -22,18 +25,10 @@ struct FragmentInput {
|
||||
float2 uv;
|
||||
float4 color;
|
||||
};
|
||||
|
||||
struct FragmentOutput {
|
||||
float4 color;
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
float4 view_position [[user(locn0)]];
|
||||
float4 normal [[user(locn1)]];
|
||||
float2 uv [[user(locn2)]];
|
||||
float4 color [[user(locn3)]];
|
||||
};
|
||||
struct tint_symbol_4 {
|
||||
float4 color [[color(0)]];
|
||||
};
|
||||
|
||||
float4 getColor(FragmentInput tint_symbol, const constant Uniforms* const tint_symbol_6, texture2d<float, access::sample> tint_symbol_7, sampler tint_symbol_8) {
|
||||
float4 color = 0.0f;
|
||||
@ -56,6 +51,17 @@ float4 getColor(FragmentInput tint_symbol, const constant Uniforms* const tint_s
|
||||
return color;
|
||||
}
|
||||
|
||||
struct tint_symbol_3 {
|
||||
float4 view_position [[user(locn0)]];
|
||||
float4 normal [[user(locn1)]];
|
||||
float2 uv [[user(locn2)]];
|
||||
float4 color [[user(locn3)]];
|
||||
};
|
||||
|
||||
struct tint_symbol_4 {
|
||||
float4 color [[color(0)]];
|
||||
};
|
||||
|
||||
FragmentOutput tint_symbol_1_inner(FragmentInput tint_symbol) {
|
||||
FragmentOutput output = {};
|
||||
output.color = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
@ -5,10 +5,12 @@ struct FragIn {
|
||||
float a;
|
||||
uint mask;
|
||||
};
|
||||
|
||||
struct tint_symbol_2 {
|
||||
float a [[user(locn0)]];
|
||||
float b [[user(locn1)]];
|
||||
};
|
||||
|
||||
struct tint_symbol_3 {
|
||||
float a [[color(0)]];
|
||||
uint mask [[sample_mask]];
|
||||
|
@ -1,13 +1,6 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol_2 {
|
||||
int3 x [[user(locn1)]] [[flat]];
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
int value [[color(2)]];
|
||||
};
|
||||
|
||||
int f(int x) {
|
||||
if ((x == 10)) {
|
||||
discard_fragment();
|
||||
@ -15,6 +8,14 @@ int f(int x) {
|
||||
return x;
|
||||
}
|
||||
|
||||
struct tint_symbol_2 {
|
||||
int3 x [[user(locn1)]] [[flat]];
|
||||
};
|
||||
|
||||
struct tint_symbol_3 {
|
||||
int value [[color(2)]];
|
||||
};
|
||||
|
||||
int tint_symbol_inner(int3 x) {
|
||||
int y = x[0];
|
||||
while (true) {
|
||||
|
@ -4,13 +4,16 @@ using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ float4x4 arr[2];
|
||||
};
|
||||
|
||||
struct strided_arr {
|
||||
/* 0x0000 */ float el;
|
||||
/* 0x0004 */ int8_t tint_pad[12];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
/* 0x0000 */ strided_arr arr[4];
|
||||
};
|
||||
|
||||
struct LeftOver {
|
||||
/* 0x0000 */ float4x4 worldViewProjection;
|
||||
/* 0x0040 */ float time;
|
||||
@ -18,19 +21,6 @@ struct LeftOver {
|
||||
/* 0x0050 */ tint_array_wrapper test2;
|
||||
/* 0x00d0 */ tint_array_wrapper_1 test;
|
||||
};
|
||||
struct main_out {
|
||||
float4 gl_Position;
|
||||
float2 vUV_1;
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
float3 position_param [[attribute(0)]];
|
||||
float3 normal_param [[attribute(1)]];
|
||||
float2 uv_param [[attribute(2)]];
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
float2 vUV_1 [[user(locn0)]];
|
||||
float4 gl_Position [[position]];
|
||||
};
|
||||
|
||||
void main_1(thread float3* const tint_symbol_5, const constant LeftOver* const tint_symbol_6, thread float4* const tint_symbol_7, thread float2* const tint_symbol_8, thread float2* const tint_symbol_9) {
|
||||
float4 q = 0.0f;
|
||||
@ -57,6 +47,22 @@ void main_1(thread float3* const tint_symbol_5, const constant LeftOver* const t
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
float4 gl_Position;
|
||||
float2 vUV_1;
|
||||
};
|
||||
|
||||
struct tint_symbol_2 {
|
||||
float3 position_param [[attribute(0)]];
|
||||
float3 normal_param [[attribute(1)]];
|
||||
float2 uv_param [[attribute(2)]];
|
||||
};
|
||||
|
||||
struct tint_symbol_3 {
|
||||
float2 vUV_1 [[user(locn0)]];
|
||||
float4 gl_Position [[position]];
|
||||
};
|
||||
|
||||
main_out tint_symbol_inner(float3 position_param, float2 uv_param, float3 normal_param, thread float3* const tint_symbol_10, thread float2* const tint_symbol_11, thread float3* const tint_symbol_12, const constant LeftOver* const tint_symbol_13, thread float4* const tint_symbol_14, thread float2* const tint_symbol_15) {
|
||||
*(tint_symbol_10) = position_param;
|
||||
*(tint_symbol_11) = uv_param;
|
||||
|
@ -22,6 +22,7 @@ struct Uniforms {
|
||||
/* 0x0020 */ packed_float3 bbMax;
|
||||
/* 0x002c */ int8_t tint_pad_1[4];
|
||||
};
|
||||
|
||||
struct Dbg {
|
||||
/* 0x0000 */ atomic_uint offsetCounter;
|
||||
/* 0x0004 */ uint pad0;
|
||||
@ -36,18 +37,23 @@ struct Dbg {
|
||||
/* 0x0028 */ float value_f32_2;
|
||||
/* 0x002c */ float value_f32_3;
|
||||
};
|
||||
|
||||
struct F32s {
|
||||
/* 0x0000 */ float values[1];
|
||||
};
|
||||
|
||||
struct U32s {
|
||||
/* 0x0000 */ uint values[1];
|
||||
};
|
||||
|
||||
struct I32s {
|
||||
int values[1];
|
||||
};
|
||||
|
||||
struct AU32s {
|
||||
/* 0x0000 */ atomic_uint values[1];
|
||||
};
|
||||
|
||||
struct AI32s {
|
||||
/* 0x0000 */ atomic_int values[1];
|
||||
};
|
||||
|
@ -17,22 +17,28 @@ struct LightData {
|
||||
/* 0x0010 */ packed_float3 color;
|
||||
/* 0x001c */ float radius;
|
||||
};
|
||||
|
||||
struct LightsBuffer {
|
||||
/* 0x0000 */ LightData lights[1];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ uint arr[64];
|
||||
};
|
||||
|
||||
struct TileLightIdData {
|
||||
/* 0x0000 */ atomic_uint count;
|
||||
/* 0x0004 */ tint_array_wrapper lightId;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
/* 0x0000 */ TileLightIdData arr[4];
|
||||
};
|
||||
|
||||
struct Tiles {
|
||||
/* 0x0000 */ tint_array_wrapper_1 data;
|
||||
};
|
||||
|
||||
struct Config {
|
||||
/* 0x0000 */ uint numLights;
|
||||
/* 0x0004 */ uint numTiles;
|
||||
@ -41,6 +47,7 @@ struct Config {
|
||||
/* 0x0010 */ uint numTileLightSlot;
|
||||
/* 0x0014 */ uint tileSize;
|
||||
};
|
||||
|
||||
struct Uniforms {
|
||||
/* 0x0000 */ float4 min;
|
||||
/* 0x0010 */ float4 max;
|
||||
@ -48,6 +55,7 @@ struct Uniforms {
|
||||
/* 0x0060 */ float4x4 projectionMatrix;
|
||||
/* 0x00a0 */ float4 fullScreenSize;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_2 {
|
||||
float4 arr[6];
|
||||
};
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
float arr[4];
|
||||
};
|
||||
|
||||
int foo() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct tint_array_wrapper {
|
||||
float arr[4];
|
||||
};
|
||||
|
||||
fragment void tint_symbol() {
|
||||
tint_array_wrapper arr = {.arr={}};
|
||||
int const a_save = foo();
|
||||
|
@ -4,6 +4,7 @@ using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ uint arr[50];
|
||||
};
|
||||
|
||||
struct Buf {
|
||||
/* 0x0000 */ uint count;
|
||||
/* 0x0004 */ tint_array_wrapper data;
|
||||
|
@ -5,6 +5,7 @@ struct Light {
|
||||
float3 position;
|
||||
float3 colour;
|
||||
};
|
||||
|
||||
struct Lights {
|
||||
Light light[1];
|
||||
};
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct vertexUniformBuffer1 {
|
||||
/* 0x0000 */ float2x2 transform1;
|
||||
};
|
||||
|
||||
struct vertexUniformBuffer2 {
|
||||
/* 0x0000 */ float2x2 transform2;
|
||||
};
|
||||
|
||||
struct tint_symbol_1 {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
float2 arr[3];
|
||||
};
|
||||
|
@ -7,6 +7,7 @@ struct Uniforms {
|
||||
/* 0x0008 */ uint isRGB10A2Unorm;
|
||||
/* 0x000c */ uint channelCount;
|
||||
};
|
||||
|
||||
struct OutputBuf {
|
||||
/* 0x0000 */ uint result[1];
|
||||
};
|
||||
|
@ -6,6 +6,7 @@ struct Uniforms {
|
||||
/* 0x0008 */ uint2 bShape;
|
||||
/* 0x0010 */ uint2 outShape;
|
||||
};
|
||||
|
||||
struct Matrix {
|
||||
/* 0x0000 */ uint numbers[1];
|
||||
};
|
||||
|
@ -4,18 +4,14 @@ using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
int arr[10];
|
||||
};
|
||||
|
||||
struct QuicksortObject {
|
||||
tint_array_wrapper numbers;
|
||||
};
|
||||
|
||||
struct buf0 {
|
||||
/* 0x0000 */ float2 resolution;
|
||||
};
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 x_GLF_color_1 [[color(0)]];
|
||||
};
|
||||
|
||||
void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_81) {
|
||||
int temp = 0;
|
||||
@ -1547,6 +1543,14 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
|
||||
struct tint_symbol_1 {
|
||||
float4 x_GLF_color_1 [[color(0)]];
|
||||
};
|
||||
|
||||
main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_88, thread QuicksortObject* const tint_symbol_89, const constant buf0* const tint_symbol_90, thread float4* const tint_symbol_91) {
|
||||
*(tint_symbol_88) = gl_FragCoord_param;
|
||||
main_1(tint_symbol_89, tint_symbol_88, tint_symbol_90, tint_symbol_91);
|
||||
|
@ -4,6 +4,7 @@ using namespace metal;
|
||||
struct Constants {
|
||||
int level;
|
||||
};
|
||||
|
||||
struct Result {
|
||||
/* 0x0000 */ float values[1];
|
||||
};
|
||||
|
@ -5,13 +5,16 @@ struct Output {
|
||||
float4 Position;
|
||||
float4 color;
|
||||
};
|
||||
|
||||
struct tint_symbol_1 {
|
||||
float4 color [[user(locn0)]];
|
||||
float4 Position [[position]];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
float2 arr[4];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
float4 arr[4];
|
||||
};
|
||||
|
@ -6,6 +6,7 @@ struct Result {
|
||||
};
|
||||
|
||||
constant uint width = 128u;
|
||||
|
||||
void tint_symbol_inner(uint3 GlobalInvocationId, device Result* const tint_symbol_1, depth2d<float, access::sample> tint_symbol_2) {
|
||||
(*(tint_symbol_1)).values[((GlobalInvocationId[1] * width) + GlobalInvocationId[0])] = tint_symbol_2.read(uint2(int2(int(GlobalInvocationId[0]), int(GlobalInvocationId[1]))), 0);
|
||||
}
|
||||
|
@ -4,12 +4,14 @@ using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ int arr[6];
|
||||
};
|
||||
|
||||
struct sspp962805860buildInformationS {
|
||||
/* 0x0000 */ float4 footprint;
|
||||
/* 0x0010 */ float4 offset;
|
||||
/* 0x0020 */ int essence;
|
||||
/* 0x0024 */ tint_array_wrapper orientation;
|
||||
};
|
||||
|
||||
struct x_B4_BuildInformation {
|
||||
/* 0x0000 */ sspp962805860buildInformationS passthru;
|
||||
};
|
||||
|
@ -8,6 +8,7 @@ struct Uniforms {
|
||||
/* 0x0010 */ uint2 dstCopyOrigin;
|
||||
/* 0x0018 */ uint2 copySize;
|
||||
};
|
||||
|
||||
struct OutputBuf {
|
||||
/* 0x0000 */ uint result[1];
|
||||
};
|
||||
|
@ -6,27 +6,11 @@ struct Uniforms {
|
||||
/* 0x0004 */ uint dimInner;
|
||||
/* 0x0008 */ uint dimBOuter;
|
||||
};
|
||||
|
||||
struct Matrix {
|
||||
/* 0x0000 */ float numbers[1];
|
||||
};
|
||||
struct tint_array_wrapper_1 {
|
||||
float arr[64];
|
||||
};
|
||||
struct tint_array_wrapper {
|
||||
tint_array_wrapper_1 arr[64];
|
||||
};
|
||||
struct tint_array_wrapper_2 {
|
||||
float arr[16];
|
||||
};
|
||||
struct tint_array_wrapper_3 {
|
||||
float arr[4];
|
||||
};
|
||||
|
||||
constant uint RowPerThread = 4u;
|
||||
constant uint ColPerThread = 4u;
|
||||
constant uint TileAOuter = 64u;
|
||||
constant uint TileBOuter = 64u;
|
||||
constant uint TileInner = 64u;
|
||||
float mm_readA(uint row, uint col, const constant Uniforms* const tint_symbol_1, const device Matrix* const tint_symbol_2) {
|
||||
if (((row < (*(tint_symbol_1)).dimAOuter) && (col < (*(tint_symbol_1)).dimInner))) {
|
||||
float const result = (*(tint_symbol_2)).numbers[((row * (*(tint_symbol_1)).dimInner) + col)];
|
||||
@ -50,6 +34,32 @@ void mm_write(uint row, uint col, float value, const constant Uniforms* const ti
|
||||
}
|
||||
}
|
||||
|
||||
constant uint RowPerThread = 4u;
|
||||
|
||||
constant uint ColPerThread = 4u;
|
||||
|
||||
constant uint TileAOuter = 64u;
|
||||
|
||||
constant uint TileBOuter = 64u;
|
||||
|
||||
constant uint TileInner = 64u;
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
float arr[64];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
tint_array_wrapper_1 arr[64];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_2 {
|
||||
float arr[16];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_3 {
|
||||
float arr[4];
|
||||
};
|
||||
|
||||
void tint_symbol_inner(uint3 local_id, uint3 global_id, uint local_invocation_index, threadgroup tint_array_wrapper* const tint_symbol_7, threadgroup tint_array_wrapper* const tint_symbol_8, const constant Uniforms* const tint_symbol_9, const device Matrix* const tint_symbol_10, const device Matrix* const tint_symbol_11, device Matrix* const tint_symbol_12) {
|
||||
for(uint idx = local_invocation_index; (idx < 4096u); idx = (idx + 256u)) {
|
||||
uint const i = (idx / 64u);
|
||||
|
@ -7,48 +7,44 @@ struct Mat4x4_ {
|
||||
/* 0x0020 */ float4 mz;
|
||||
/* 0x0030 */ float4 mw;
|
||||
};
|
||||
|
||||
struct Mat4x3_ {
|
||||
/* 0x0000 */ float4 mx;
|
||||
/* 0x0010 */ float4 my;
|
||||
/* 0x0020 */ float4 mz;
|
||||
};
|
||||
|
||||
struct Mat4x2_ {
|
||||
/* 0x0000 */ float4 mx;
|
||||
/* 0x0010 */ float4 my;
|
||||
};
|
||||
|
||||
struct ub_SceneParams {
|
||||
/* 0x0000 */ Mat4x4_ u_Projection;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ Mat4x2_ arr[1];
|
||||
};
|
||||
|
||||
struct ub_MaterialParams {
|
||||
/* 0x0000 */ tint_array_wrapper u_TexMtx;
|
||||
/* 0x0020 */ float4 u_Misc0_;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
/* 0x0000 */ Mat4x3_ arr[32];
|
||||
};
|
||||
|
||||
struct ub_PacketParams {
|
||||
/* 0x0000 */ tint_array_wrapper_1 u_PosMtx;
|
||||
};
|
||||
|
||||
struct VertexOutput {
|
||||
float4 v_Color;
|
||||
float2 v_TexCoord;
|
||||
float4 member;
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
float3 a_Position [[attribute(0)]];
|
||||
float2 a_UV [[attribute(1)]];
|
||||
float4 a_Color [[attribute(2)]];
|
||||
float3 a_Normal [[attribute(3)]];
|
||||
float a_PosMtxIdx [[attribute(4)]];
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
float4 v_Color [[user(locn0)]];
|
||||
float2 v_TexCoord [[user(locn1)]];
|
||||
float4 member [[position]];
|
||||
};
|
||||
|
||||
float3 Mat4x3GetCol0_(Mat4x3_ m) {
|
||||
Mat4x3_ m1 = {};
|
||||
@ -269,6 +265,20 @@ void main1(thread float* const tint_symbol_5, const constant ub_PacketParams* co
|
||||
}
|
||||
}
|
||||
|
||||
struct tint_symbol_2 {
|
||||
float3 a_Position [[attribute(0)]];
|
||||
float2 a_UV [[attribute(1)]];
|
||||
float4 a_Color [[attribute(2)]];
|
||||
float3 a_Normal [[attribute(3)]];
|
||||
float a_PosMtxIdx [[attribute(4)]];
|
||||
};
|
||||
|
||||
struct tint_symbol_3 {
|
||||
float4 v_Color [[user(locn0)]];
|
||||
float2 v_TexCoord [[user(locn1)]];
|
||||
float4 member [[position]];
|
||||
};
|
||||
|
||||
VertexOutput tint_symbol_inner(float3 a_Position, float2 a_UV, float4 a_Color, float3 a_Normal, float a_PosMtxIdx, thread float3* const tint_symbol_16, thread float2* const tint_symbol_17, thread float4* const tint_symbol_18, thread float3* const tint_symbol_19, thread float* const tint_symbol_20, const constant ub_PacketParams* const tint_symbol_21, const constant ub_SceneParams* const tint_symbol_22, thread float4* const tint_symbol_23, thread float4* const tint_symbol_24, const constant ub_MaterialParams* const tint_symbol_25, thread float2* const tint_symbol_26) {
|
||||
*(tint_symbol_16) = a_Position;
|
||||
*(tint_symbol_17) = a_UV;
|
||||
|
@ -5,12 +5,15 @@ struct Params {
|
||||
/* 0x0000 */ uint filterDim;
|
||||
/* 0x0004 */ uint blockDim;
|
||||
};
|
||||
|
||||
struct Flip {
|
||||
/* 0x0000 */ uint value;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
float3 arr[256];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
tint_array_wrapper_1 arr[4];
|
||||
};
|
||||
|
@ -12,30 +12,34 @@ struct Uniforms {
|
||||
/* 0x003c */ int8_t tint_pad_3[4];
|
||||
/* 0x0040 */ int2 outShapeStrides;
|
||||
};
|
||||
|
||||
struct ssbOut {
|
||||
/* 0x0000 */ float result[1];
|
||||
};
|
||||
|
||||
struct ssbA {
|
||||
/* 0x0000 */ float A[1];
|
||||
};
|
||||
|
||||
struct ssbB {
|
||||
/* 0x0000 */ float B[1];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_1 {
|
||||
float arr[64];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
tint_array_wrapper_1 arr[64];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_3 {
|
||||
float arr[1];
|
||||
};
|
||||
|
||||
struct tint_array_wrapper_2 {
|
||||
tint_array_wrapper_3 arr[64];
|
||||
};
|
||||
struct tint_array_wrapper_4 {
|
||||
tint_array_wrapper_3 arr[1];
|
||||
};
|
||||
|
||||
bool coordsInBounds_vi2_vi2_(thread int2* const coord, thread int2* const shape) {
|
||||
bool x_87 = false;
|
||||
@ -168,6 +172,10 @@ void mm_write_i1_i1_f1_(thread int* const row_2, thread int* const col_2, thread
|
||||
return;
|
||||
}
|
||||
|
||||
struct tint_array_wrapper_4 {
|
||||
tint_array_wrapper_3 arr[1];
|
||||
};
|
||||
|
||||
void mm_matMul_i1_i1_i1_(thread int* const dimAOuter, thread int* const dimInner, thread int* const dimBOuter, thread uint3* const tint_symbol_19, thread uint3* const tint_symbol_20, const constant Uniforms* const tint_symbol_21, thread int* const tint_symbol_22, thread int* const tint_symbol_23, thread int* const tint_symbol_24, const device ssbA* const tint_symbol_25, threadgroup tint_array_wrapper* const tint_symbol_26, thread int* const tint_symbol_27, const device ssbB* const tint_symbol_28, threadgroup tint_array_wrapper_2* const tint_symbol_29, device ssbOut* const tint_symbol_30) {
|
||||
int tileRow = 0;
|
||||
int tileCol = 0;
|
||||
|
@ -25,20 +25,6 @@ struct LeftOver {
|
||||
/* 0x0070 */ packed_float3 colorMul;
|
||||
/* 0x007c */ int8_t tint_pad_1[4];
|
||||
};
|
||||
struct main_out {
|
||||
float4 glFragColor_1;
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
float3 vPosition_param [[user(locn0)]];
|
||||
float2 vUV_param [[user(locn1)]];
|
||||
float2 tUV_param [[user(locn2)]];
|
||||
float2 stageUnits_1_param [[user(locn3)]];
|
||||
float2 levelUnits_param [[user(locn4)]];
|
||||
float2 tileID_1_param [[user(locn5)]];
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
float4 glFragColor_1 [[color(0)]];
|
||||
};
|
||||
|
||||
float4x4 getFrameData_f1_(thread float* const frameID, const constant LeftOver* const tint_symbol_5, texture2d<float, access::sample> tint_symbol_6, sampler tint_symbol_7) {
|
||||
float fX = 0.0f;
|
||||
@ -204,6 +190,23 @@ void main_1(thread float2* const tint_symbol_8, const constant LeftOver* const t
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
float4 glFragColor_1;
|
||||
};
|
||||
|
||||
struct tint_symbol_2 {
|
||||
float3 vPosition_param [[user(locn0)]];
|
||||
float2 vUV_param [[user(locn1)]];
|
||||
float2 tUV_param [[user(locn2)]];
|
||||
float2 stageUnits_1_param [[user(locn3)]];
|
||||
float2 levelUnits_param [[user(locn4)]];
|
||||
float2 tileID_1_param [[user(locn5)]];
|
||||
};
|
||||
|
||||
struct tint_symbol_3 {
|
||||
float4 glFragColor_1 [[color(0)]];
|
||||
};
|
||||
|
||||
main_out tint_symbol_inner(float2 tUV_param, float2 tileID_1_param, float2 levelUnits_param, float2 stageUnits_1_param, float3 vPosition_param, float2 vUV_param, thread float2* const tint_symbol_21, thread float2* const tint_symbol_22, thread float2* const tint_symbol_23, thread float2* const tint_symbol_24, thread float3* const tint_symbol_25, thread float2* const tint_symbol_26, const constant LeftOver* const tint_symbol_27, texture2d<float, access::sample> tint_symbol_28, sampler tint_symbol_29, texture2d<float, access::sample> tint_symbol_30, texture2d<float, access::sample> tint_symbol_31, sampler tint_symbol_32, thread float* const tint_symbol_33, texture2d<float, access::sample> tint_symbol_34, sampler tint_symbol_35, texture2d<float, access::sample> tint_symbol_36, sampler tint_symbol_37, thread float4* const tint_symbol_38) {
|
||||
*(tint_symbol_21) = tUV_param;
|
||||
*(tint_symbol_22) = tileID_1_param;
|
||||
|
@ -16,6 +16,7 @@ struct lightingInfo {
|
||||
float3 diffuse;
|
||||
float3 specular;
|
||||
};
|
||||
|
||||
struct LeftOver {
|
||||
/* 0x0000 */ float4x4 u_World;
|
||||
/* 0x0040 */ float4x4 u_ViewProjection;
|
||||
@ -28,6 +29,7 @@ struct LeftOver {
|
||||
/* 0x00a4 */ uint padding_1;
|
||||
/* 0x00a8 */ float2 tangentSpaceParameter0;
|
||||
};
|
||||
|
||||
struct Light0 {
|
||||
/* 0x0000 */ float4 vLightData;
|
||||
/* 0x0010 */ float4 vLightDiffuse;
|
||||
@ -38,18 +40,6 @@ struct Light0 {
|
||||
/* 0x0050 */ float2 depthValues;
|
||||
/* 0x0058 */ int8_t tint_pad_1[8];
|
||||
};
|
||||
struct main_out {
|
||||
float4 glFragColor_1;
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
float4 v_output1_param [[user(locn0)]];
|
||||
float2 vMainuv_param [[user(locn1)]];
|
||||
float4 v_output2_param [[user(locn2)]];
|
||||
float2 v_uv_param [[user(locn3)]];
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
float4 glFragColor_1 [[color(0)]];
|
||||
};
|
||||
|
||||
float3x3 cotangent_frame_vf3_vf3_vf2_vf2_(thread float3* const normal_1, thread float3* const p, thread float2* const uv, thread float2* const tangentSpaceParams) {
|
||||
float3 dp1 = 0.0f;
|
||||
@ -425,6 +415,21 @@ void main_1(thread float* const tint_symbol_5, thread float3* const tint_symbol_
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
float4 glFragColor_1;
|
||||
};
|
||||
|
||||
struct tint_symbol_2 {
|
||||
float4 v_output1_param [[user(locn0)]];
|
||||
float2 vMainuv_param [[user(locn1)]];
|
||||
float4 v_output2_param [[user(locn2)]];
|
||||
float2 v_uv_param [[user(locn3)]];
|
||||
};
|
||||
|
||||
struct tint_symbol_3 {
|
||||
float4 glFragColor_1 [[color(0)]];
|
||||
};
|
||||
|
||||
main_out tint_symbol_inner(float2 vMainuv_param, float4 v_output1_param, bool gl_FrontFacing_param, float2 v_uv_param, float4 v_output2_param, thread float2* const tint_symbol_19, thread float4* const tint_symbol_20, thread bool* const tint_symbol_21, thread float2* const tint_symbol_22, thread float4* const tint_symbol_23, thread float* const tint_symbol_24, thread float3* const tint_symbol_25, texture2d<float, access::sample> tint_symbol_26, sampler tint_symbol_27, const constant LeftOver* const tint_symbol_28, texture2d<float, access::sample> tint_symbol_29, sampler tint_symbol_30, const constant Light0* const tint_symbol_31, thread float4* const tint_symbol_32) {
|
||||
*(tint_symbol_19) = vMainuv_param;
|
||||
*(tint_symbol_20) = v_output1_param;
|
||||
|
@ -4,9 +4,11 @@ using namespace metal;
|
||||
struct ssbOut {
|
||||
/* 0x0000 */ float result[1];
|
||||
};
|
||||
|
||||
struct ssbA {
|
||||
/* 0x0000 */ float A[1];
|
||||
};
|
||||
|
||||
struct Uniforms {
|
||||
/* 0x0000 */ float tint_symbol;
|
||||
/* 0x0004 */ int aShape;
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct ResultMatrix {
|
||||
/* 0x0000 */ float numbers[1];
|
||||
};
|
||||
|
||||
struct FirstMatrix {
|
||||
float numbers[1];
|
||||
};
|
||||
|
||||
struct SecondMatrix {
|
||||
float numbers[1];
|
||||
};
|
||||
|
||||
struct Uniforms {
|
||||
float tint_symbol;
|
||||
int sizeA;
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct FragmentInput {
|
||||
float2 vUv;
|
||||
};
|
||||
|
||||
struct FragmentOutput {
|
||||
float4 color;
|
||||
};
|
||||
|
||||
struct tint_symbol_2 {
|
||||
float2 vUv [[user(locn2)]];
|
||||
};
|
||||
|
||||
struct tint_symbol_3 {
|
||||
float4 color [[color(0)]];
|
||||
};
|
||||
|
@ -12,17 +12,17 @@ inline vec<T, N> operator*(packed_vec<T, M> lhs, matrix<T, N, M> rhs) {
|
||||
return vec<T, M>(lhs) * rhs;
|
||||
}
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ packed_float3 v;
|
||||
/* 0x000c */ uint i;
|
||||
};
|
||||
|
||||
float3 Bad(uint index, float3 rd) {
|
||||
float3 normal = float3(0.0f);
|
||||
normal[index] = -(sign(rd[index]));
|
||||
return normalize(normal);
|
||||
}
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ packed_float3 v;
|
||||
/* 0x000c */ uint i;
|
||||
};
|
||||
|
||||
void tint_symbol_inner(uint idx, device S* const tint_symbol_1) {
|
||||
(*(tint_symbol_1)).v = Bad((*(tint_symbol_1)).i, (*(tint_symbol_1)).v);
|
||||
}
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct Constants {
|
||||
/* 0x0000 */ uint zero;
|
||||
};
|
||||
|
||||
struct Result {
|
||||
/* 0x0000 */ uint value;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ atomic_int arr[3];
|
||||
};
|
||||
|
||||
struct TestData {
|
||||
/* 0x0000 */ tint_array_wrapper data;
|
||||
};
|
||||
|
@ -4,12 +4,15 @@ using namespace metal;
|
||||
struct Constants {
|
||||
/* 0x0000 */ uint zero;
|
||||
};
|
||||
|
||||
struct Result {
|
||||
uint value;
|
||||
};
|
||||
|
||||
struct tint_array_wrapper {
|
||||
uint arr[3];
|
||||
};
|
||||
|
||||
struct S {
|
||||
tint_array_wrapper data;
|
||||
};
|
||||
|
@ -4,6 +4,7 @@ using namespace metal;
|
||||
struct tint_symbol_1 {
|
||||
/* 0x0000 */ uint4 buffer_size[1];
|
||||
};
|
||||
|
||||
struct S {
|
||||
int a[1];
|
||||
};
|
||||
|
@ -4,6 +4,7 @@ using namespace metal;
|
||||
struct tint_symbol_1 {
|
||||
/* 0x0000 */ uint4 buffer_size[1];
|
||||
};
|
||||
|
||||
struct S {
|
||||
int a[1];
|
||||
};
|
||||
|
@ -4,6 +4,7 @@ using namespace metal;
|
||||
struct tint_symbol_1 {
|
||||
/* 0x0000 */ uint4 buffer_size[1];
|
||||
};
|
||||
|
||||
struct S {
|
||||
int a[1];
|
||||
};
|
||||
|
@ -4,6 +4,7 @@ using namespace metal;
|
||||
struct tint_symbol_1 {
|
||||
/* 0x0000 */ uint4 buffer_size[1];
|
||||
};
|
||||
|
||||
struct S {
|
||||
int a[1];
|
||||
};
|
||||
|
@ -4,6 +4,7 @@ using namespace metal;
|
||||
struct tint_symbol_1 {
|
||||
/* 0x0000 */ uint4 buffer_size[1];
|
||||
};
|
||||
|
||||
struct S {
|
||||
int a[1];
|
||||
};
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void abs_002533() {
|
||||
float4 res = fabs(float4());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_002533();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void abs_005174() {
|
||||
float3 res = fabs(float3());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_005174();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void abs_1ce782() {
|
||||
uint4 res = abs(uint4());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_1ce782();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void abs_1e9d53() {
|
||||
float2 res = fabs(float2());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_1e9d53();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void abs_467cd1() {
|
||||
uint res = abs(1u);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_467cd1();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void abs_4ad288() {
|
||||
int res = abs(1);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_4ad288();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void abs_5ad50a() {
|
||||
int3 res = abs(int3());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_5ad50a();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void abs_7326de() {
|
||||
uint3 res = abs(uint3());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_7326de();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void abs_7f28e6() {
|
||||
uint2 res = abs(uint2());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_7f28e6();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void abs_7faa9e() {
|
||||
int2 res = abs(int2());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_7faa9e();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void abs_9c80a6() {
|
||||
int4 res = abs(int4());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_9c80a6();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void abs_b96037() {
|
||||
float res = fabs(1.0f);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_b96037();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void acos_489247() {
|
||||
float res = acos(1.0f);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_489247();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void acos_8e2acf() {
|
||||
float4 res = acos(float4());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_8e2acf();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void acos_a610c4() {
|
||||
float3 res = acos(float3());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_a610c4();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void acos_dfc915() {
|
||||
float2 res = acos(float2());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_dfc915();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void all_353d6a() {
|
||||
bool res = all(bool());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
all_353d6a();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void all_986c7b() {
|
||||
bool res = all(bool4());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
all_986c7b();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void all_bd2dba() {
|
||||
bool res = all(bool3());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
all_bd2dba();
|
||||
return float4();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
void all_f46790() {
|
||||
bool res = all(bool2());
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
all_f46790();
|
||||
return float4();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user