diff --git a/src/transform/canonicalize_entry_point_io.cc b/src/transform/canonicalize_entry_point_io.cc index 921ae6b0f8..4eee792af5 100644 --- a/src/transform/canonicalize_entry_point_io.cc +++ b/src/transform/canonicalize_entry_point_io.cc @@ -16,14 +16,12 @@ #include #include +#include #include +#include #include "src/program_builder.h" -#include "src/sem/block_statement.h" #include "src/sem/function.h" -#include "src/sem/statement.h" -#include "src/sem/struct.h" -#include "src/sem/variable.h" TINT_INSTANTIATE_TYPEINFO(tint::transform::CanonicalizeEntryPointIO); TINT_INSTANTIATE_TYPEINFO(tint::transform::CanonicalizeEntryPointIO::Config); @@ -62,8 +60,396 @@ bool StructMemberComparator(const ast::StructMember* a, } } +// Returns true if `deco` is a shader IO decoration. +bool IsShaderIODecoration(const ast::Decoration* deco) { + return deco->IsAnyOf(); +} + } // namespace +/// State holds the current transform state for a single entry point. +struct CanonicalizeEntryPointIO::State { + /// OutputValue represents a shader result that the wrapper function produces. + struct OutputValue { + /// The name of the output value. + std::string name; + /// The type of the output value. + ast::Type* type; + /// The shader IO attributes. + ast::DecorationList attributes; + /// The value itself. + ast::Expression* value; + }; + + /// The clone context. + CloneContext& ctx; + /// The transform config. + CanonicalizeEntryPointIO::Config const cfg; + /// The entry point function (AST). + ast::Function* func_ast; + /// The entry point function (SEM). + sem::Function const* func_sem; + + /// The new entry point wrapper function's parameters. + ast::VariableList wrapper_ep_parameters; + /// The members of the wrapper function's struct parameter. + ast::StructMemberList wrapper_struct_param_members; + /// The name of the wrapper function's struct parameter. + Symbol wrapper_struct_param_name; + /// The parameters that will be passed to the original function. + ast::ExpressionList inner_call_parameters; + /// The members of the wrapper function's struct return type. + ast::StructMemberList wrapper_struct_output_members; + /// The wrapper function output values. + std::vector wrapper_output_values; + /// The body of the wrapper function. + ast::StatementList wrapper_body; + + /// Constructor + /// @param context the clone context + /// @param config the transform config + /// @param function the entry point function + State(CloneContext& context, + const CanonicalizeEntryPointIO::Config& config, + ast::Function* function) + : ctx(context), + cfg(config), + func_ast(function), + func_sem(ctx.src->Sem().Get(function)) {} + + /// Clones the shader IO decorations from `src`. + /// @param src the decorations to clone + /// @return the cloned decorations + ast::DecorationList CloneShaderIOAttributes(const ast::DecorationList& src) { + ast::DecorationList new_decorations; + for (auto* deco : src) { + if (IsShaderIODecoration(deco)) { + new_decorations.push_back(ctx.Clone(deco)); + } + } + return new_decorations; + } + + /// Create or return a symbol for the wrapper function's struct parameter. + /// @returns the symbol for the struct parameter + Symbol InputStructSymbol() { + if (!wrapper_struct_param_name.IsValid()) { + wrapper_struct_param_name = ctx.dst->Sym(); + } + return wrapper_struct_param_name; + } + + /// Add a shader input to the entry point. + /// @param name the name of the shader input + /// @param type the type of the shader input + /// @param attributes the attributes to apply to the shader input + /// @returns an expression which evaluates to the value of the shader input + ast::Expression* AddInput(std::string name, + ast::Type* type, + ast::DecorationList attributes) { + if (cfg.builtin_style == BuiltinStyle::kParameter && + ast::HasDecoration(attributes)) { + // If this input is a builtin and we are emitting those as parameters, + // then add it to the parameter list and pass it directly to the inner + // function. + wrapper_ep_parameters.push_back( + ctx.dst->Param(name, type, std::move(attributes))); + return ctx.dst->Expr(name); + } else { + // Otherwise, move it to the new structure member list. + wrapper_struct_param_members.push_back( + ctx.dst->Member(name, type, std::move(attributes))); + return ctx.dst->MemberAccessor(InputStructSymbol(), name); + } + } + + /// Add a shader output to the entry point. + /// @param name the name of the shader output + /// @param type the type of the shader output + /// @param attributes the attributes to apply to the shader output + /// @param value the value of the shader output + void AddOutput(std::string name, + ast::Type* type, + ast::DecorationList attributes, + ast::Expression* value) { + OutputValue output; + output.name = name; + output.type = type; + output.attributes = std::move(attributes); + output.value = value; + wrapper_output_values.push_back(output); + } + + /// Process a non-struct parameter. + /// This creates a new object for the shader input, moving the shader IO + /// attributes to it. It also adds an expression to the list of parameters + /// that will be passed to the original function. + /// @param param the original function parameter + void ProcessNonStructParameter(const sem::Parameter* param) { + // Remove the shader IO attributes from the inner function parameter, and + // attach them to the new object instead. + ast::DecorationList attributes; + for (auto* deco : param->Declaration()->decorations()) { + if (IsShaderIODecoration(deco)) { + ctx.Remove(param->Declaration()->decorations(), deco); + attributes.push_back(ctx.Clone(deco)); + } + } + + auto name = ctx.src->Symbols().NameFor(param->Declaration()->symbol()); + auto* type = ctx.Clone(param->Declaration()->type()); + auto* input_expr = AddInput(name, type, std::move(attributes)); + inner_call_parameters.push_back(input_expr); + } + + /// Process a struct parameter. + /// This creates new objects for each struct member, moving the shader IO + /// attributes to them. It also creates the structure that will be passed to + /// the original function. + /// @param param the original function parameter + void ProcessStructParameter(const sem::Parameter* param) { + auto* str = param->Type()->As(); + + // Recreate struct members in the outer entry point and build an initializer + // list to pass them through to the inner function. + ast::ExpressionList inner_struct_values; + for (auto* member : str->Members()) { + if (member->Type()->Is()) { + TINT_ICE(Transform, ctx.dst->Diagnostics()) << "nested IO struct"; + continue; + } + + auto* member_ast = member->Declaration(); + auto name = ctx.src->Symbols().NameFor(member_ast->symbol()); + auto* type = ctx.Clone(member_ast->type()); + auto attributes = CloneShaderIOAttributes(member_ast->decorations()); + auto* input_expr = AddInput(name, type, std::move(attributes)); + inner_struct_values.push_back(input_expr); + } + + // Construct the original structure using the new shader input objects. + inner_call_parameters.push_back(ctx.dst->Construct( + ctx.Clone(param->Declaration()->type()), inner_struct_values)); + } + + /// Process the entry point return type. + /// This generates a list of output values that are returned by the original + /// function. + /// @param inner_ret_type the original function return type + /// @param original_result the result object produced by the original function + void ProcessReturnType(const sem::Type* inner_ret_type, + Symbol original_result) { + if (auto* str = inner_ret_type->As()) { + for (auto* member : str->Members()) { + if (member->Type()->Is()) { + TINT_ICE(Transform, ctx.dst->Diagnostics()) << "nested IO struct"; + continue; + } + + auto* member_ast = member->Declaration(); + auto name = ctx.src->Symbols().NameFor(member_ast->symbol()); + auto* type = ctx.Clone(member_ast->type()); + auto attributes = CloneShaderIOAttributes(member_ast->decorations()); + + // Extract the original structure member. + AddOutput(name, type, std::move(attributes), + ctx.dst->MemberAccessor(original_result, name)); + } + } else if (!inner_ret_type->Is()) { + auto* type = ctx.Clone(func_ast->return_type()); + auto attributes = + CloneShaderIOAttributes(func_ast->return_type_decorations()); + + // Propagate the non-struct return value as is. + AddOutput("value", type, std::move(attributes), + ctx.dst->Expr(original_result)); + } + } + + /// Add a fixed sample mask to the wrapper function output. + /// If there is already a sample mask, bitwise-and it with the fixed mask. + /// Otherwise, create a new output value from the fixed mask. + void AddFixedSampleMask() { + // Check the existing output values for a sample mask builtin. + for (auto& outval : wrapper_output_values) { + auto* builtin = + ast::GetDecoration(outval.attributes); + if (builtin && builtin->value() == ast::Builtin::kSampleMask) { + // Combine the authored sample mask with the fixed mask. + outval.value = ctx.dst->And(outval.value, cfg.fixed_sample_mask); + return; + } + } + + // No existing sample mask builtin was found, so create a new output value + // using the fixed sample mask. + AddOutput("fixed_sample_mask", ctx.dst->ty.u32(), + {ctx.dst->Builtin(ast::Builtin::kSampleMask)}, + ctx.dst->Expr(cfg.fixed_sample_mask)); + } + + /// Create the wrapper function's struct parameter and type objects. + void CreateInputStruct() { + // Sort the struct members to satisfy HLSL interfacing matching rules. + std::sort(wrapper_struct_param_members.begin(), + wrapper_struct_param_members.end(), StructMemberComparator); + + // Create the new struct type. + auto struct_name = ctx.dst->Sym(); + auto* in_struct = ctx.dst->create( + struct_name, wrapper_struct_param_members, ast::DecorationList{}); + ctx.InsertBefore(ctx.src->AST().GlobalDeclarations(), func_ast, in_struct); + + // Create a new function parameter using this struct type. + auto* param = + ctx.dst->Param(InputStructSymbol(), ctx.dst->ty.type_name(struct_name)); + wrapper_ep_parameters.push_back(param); + } + + /// Create and return the wrapper function's struct result object. + /// @returns the struct type + ast::Struct* CreateOutputStruct() { + ast::StatementList assignments; + + auto wrapper_result = ctx.dst->Symbols().New("wrapper_result"); + + // Create the struct members and their corresponding assignment statements. + std::unordered_set member_names; + for (auto& outval : wrapper_output_values) { + // Use the original output name, unless that is already taken. + Symbol name; + if (member_names.count(outval.name)) { + name = ctx.dst->Symbols().New(outval.name); + } else { + name = ctx.dst->Symbols().Register(outval.name); + } + member_names.insert(ctx.dst->Symbols().NameFor(name)); + + wrapper_struct_output_members.push_back( + ctx.dst->Member(name, outval.type, std::move(outval.attributes))); + assignments.push_back(ctx.dst->Assign( + ctx.dst->MemberAccessor(wrapper_result, name), outval.value)); + } + + // Sort the struct members to satisfy HLSL interfacing matching rules. + std::sort(wrapper_struct_output_members.begin(), + wrapper_struct_output_members.end(), StructMemberComparator); + + // Create the new struct type. + auto* out_struct = ctx.dst->create( + ctx.dst->Sym(), wrapper_struct_output_members, ast::DecorationList{}); + ctx.InsertBefore(ctx.src->AST().GlobalDeclarations(), func_ast, out_struct); + + // Create the output struct object, assign its members, and return it. + auto* result_object = + ctx.dst->Var(wrapper_result, ctx.dst->ty.type_name(out_struct->name())); + wrapper_body.push_back(ctx.dst->Decl(result_object)); + wrapper_body.insert(wrapper_body.end(), assignments.begin(), + assignments.end()); + wrapper_body.push_back(ctx.dst->Return(wrapper_result)); + + return out_struct; + } + + // Recreate the original function without entry point attributes and call it. + /// @returns the inner function call expression + ast::CallExpression* CallInnerFunction() { + // Add a suffix to the function name, as the wrapper function will take the + // original entry point name. + auto ep_name = ctx.src->Symbols().NameFor(func_ast->symbol()); + auto inner_name = ctx.dst->Symbols().New(ep_name + "_inner"); + + // Clone everything, dropping the function and return type attributes. + // The parameter attributes will have already been stripped during + // processing. + auto* inner_function = ctx.dst->create( + inner_name, ctx.Clone(func_ast->params()), + ctx.Clone(func_ast->return_type()), ctx.Clone(func_ast->body()), + ast::DecorationList{}, ast::DecorationList{}); + ctx.Replace(func_ast, inner_function); + + // Call the function. + return ctx.dst->Call(inner_function->symbol(), inner_call_parameters); + } + + /// Process the entry point function. + void Process() { + bool needs_fixed_sample_mask = false; + if (func_ast->pipeline_stage() == ast::PipelineStage::kFragment && + cfg.fixed_sample_mask != 0xFFFFFFFF) { + needs_fixed_sample_mask = true; + } + + // Exit early if there is no shader IO to handle. + if (func_sem->Parameters().size() == 0 && + func_sem->ReturnType()->Is() && !needs_fixed_sample_mask) { + return; + } + + // Process the entry point parameters, collecting those that need to be + // aggregated into a single structure. + if (!func_sem->Parameters().empty()) { + for (auto* param : func_sem->Parameters()) { + if (param->Type()->Is()) { + ProcessStructParameter(param); + } else { + ProcessNonStructParameter(param); + } + } + + // Create a structure parameter for the outer entry point if necessary. + if (!wrapper_struct_param_members.empty()) { + CreateInputStruct(); + } + } + + // Recreate the original function and call it. + auto* call_inner = CallInnerFunction(); + + // Process the return type, and start building the wrapper function body. + std::function wrapper_ret_type = [&] { + return ctx.dst->ty.void_(); + }; + if (func_sem->ReturnType()->Is()) { + // The function call is just a statement with no result. + wrapper_body.push_back(ctx.dst->create(call_inner)); + } else { + // Capture the result of calling the original function. + auto* inner_result = ctx.dst->Const( + ctx.dst->Symbols().New("inner_result"), nullptr, call_inner); + wrapper_body.push_back(ctx.dst->Decl(inner_result)); + + // Process the original return type to determine the outputs that the + // outer function needs to produce. + ProcessReturnType(func_sem->ReturnType(), inner_result->symbol()); + } + + // Add a fixed sample mask, if necessary. + if (needs_fixed_sample_mask) { + AddFixedSampleMask(); + } + + // Produce the entry point outputs, if necessary. + if (!wrapper_output_values.empty()) { + auto* output_struct = CreateOutputStruct(); + wrapper_ret_type = [&, output_struct] { + return ctx.dst->ty.type_name(output_struct->name()); + }; + } + + // Create the wrapper entry point function. + // Take the name of the original entry point function. + auto name = ctx.Clone(func_ast->symbol()); + auto* wrapper_func = ctx.dst->create( + name, wrapper_ep_parameters, wrapper_ret_type(), + ctx.dst->Block(wrapper_body), ctx.Clone(func_ast->decorations()), + ast::DecorationList{}); + ctx.InsertAfter(ctx.src->AST().GlobalDeclarations(), func_ast, + wrapper_func); + } +}; + void CanonicalizeEntryPointIO::Run(CloneContext& ctx, const DataMap& inputs, DataMap&) { @@ -75,302 +461,27 @@ void CanonicalizeEntryPointIO::Run(CloneContext& ctx, return; } - // Strip entry point IO decorations from struct declarations. - // TODO(jrprice): This code is duplicated with the SPIR-V transform. + // Remove entry point IO attributes from struct declarations. + // New structures will be created for each entry point, as necessary. for (auto* ty : ctx.src->AST().TypeDecls()) { if (auto* struct_ty = ty->As()) { - // Build new list of struct members without entry point IO decorations. - ast::StructMemberList new_struct_members; for (auto* member : struct_ty->members()) { - ast::DecorationList new_decorations = RemoveDecorations( - ctx, member->decorations(), [](const ast::Decoration* deco) { - return deco->IsAnyOf< - ast::BuiltinDecoration, ast::InterpolateDecoration, - ast::InvariantDecoration, ast::LocationDecoration>(); - }); - new_struct_members.push_back( - ctx.dst->Member(ctx.Clone(member->symbol()), - ctx.Clone(member->type()), new_decorations)); + for (auto* deco : member->decorations()) { + if (IsShaderIODecoration(deco)) { + ctx.Remove(member->decorations(), deco); + } + } } - - // Redeclare the struct. - auto new_struct_name = ctx.Clone(struct_ty->name()); - auto* new_struct = - ctx.dst->create(new_struct_name, new_struct_members, - ctx.Clone(struct_ty->decorations())); - ctx.Replace(struct_ty, new_struct); } } - // Returns true if `decos` contains a `sample_mask` builtin. - auto has_sample_mask_builtin = [](const ast::DecorationList& decos) { - if (auto* builtin = ast::GetDecoration(decos)) { - return builtin->value() == ast::Builtin::kSampleMask; - } - return false; - }; - for (auto* func_ast : ctx.src->AST().Functions()) { if (!func_ast->IsEntryPoint()) { continue; } - auto* func = ctx.src->Sem().Get(func_ast); - - bool needs_fixed_sample_mask = - func_ast->pipeline_stage() == ast::PipelineStage::kFragment && - cfg->fixed_sample_mask != 0xFFFFFFFF; - - ast::VariableList new_parameters; - - if (!func->Parameters().empty()) { - // Collect all parameters and build a list of new struct members. - auto new_struct_param_symbol = ctx.dst->Sym(); - ast::StructMemberList new_struct_members; - for (auto* param : func->Parameters()) { - if (cfg->builtin_style == BuiltinStyle::kParameter && - ast::HasDecoration( - param->Declaration()->decorations())) { - // If this parameter is a builtin and we are emitting those as - // parameters, then just clone it as is. - new_parameters.push_back( - ctx.Clone(const_cast(param->Declaration()))); - continue; - } - - auto param_name = ctx.Clone(param->Declaration()->symbol()); - auto* param_ty = param->Type(); - auto* param_declared_ty = param->Declaration()->type(); - - ast::Expression* func_const_initializer = nullptr; - - if (auto* str = param_ty->As()) { - // Pull out all struct members and build initializer list. - ast::ExpressionList init_values; - for (auto* member : str->Members()) { - if (member->Type()->Is()) { - TINT_ICE(Transform, ctx.dst->Diagnostics()) - << "nested pipeline IO struct"; - } - - ast::DecorationList new_decorations = RemoveDecorations( - ctx, member->Declaration()->decorations(), - [](const ast::Decoration* deco) { - return !deco->IsAnyOf< - ast::BuiltinDecoration, ast::InterpolateDecoration, - ast::InvariantDecoration, ast::LocationDecoration>(); - }); - - if (cfg->builtin_style == BuiltinStyle::kParameter && - ast::HasDecoration( - member->Declaration()->decorations())) { - // If this struct member is a builtin and we are emitting those as - // parameters, then move it to the parameter list. - auto* member_ty = CreateASTTypeFor(ctx, member->Type()); - auto new_param_name = ctx.dst->Sym(); - new_parameters.push_back( - ctx.dst->Param(new_param_name, member_ty, new_decorations)); - init_values.push_back(ctx.dst->Expr(new_param_name)); - continue; - } - - auto member_name = ctx.Clone(member->Declaration()->symbol()); - auto* member_type = ctx.Clone(member->Declaration()->type()); - new_struct_members.push_back( - ctx.dst->Member(member_name, member_type, new_decorations)); - init_values.push_back( - ctx.dst->MemberAccessor(new_struct_param_symbol, member_name)); - } - - func_const_initializer = - ctx.dst->Construct(ctx.Clone(param_declared_ty), init_values); - } else { - new_struct_members.push_back( - ctx.dst->Member(param_name, ctx.Clone(param_declared_ty), - ctx.Clone(param->Declaration()->decorations()))); - func_const_initializer = - ctx.dst->MemberAccessor(new_struct_param_symbol, param_name); - } - - // Create a function-scope const to replace the parameter. - // Initialize it with the value extracted from the new struct parameter. - auto* func_const = ctx.dst->Const( - param_name, ctx.Clone(param_declared_ty), func_const_initializer); - ctx.InsertFront(func_ast->body()->statements(), - ctx.dst->WrapInStatement(func_const)); - - // Replace all uses of the function parameter with the function const. - for (auto* user : param->Users()) { - ctx.Replace(user->Declaration(), - ctx.dst->Expr(param_name)); - } - } - - if (!new_struct_members.empty()) { - // Sort struct members to satisfy HLSL interfacing matching rules. - std::sort(new_struct_members.begin(), new_struct_members.end(), - StructMemberComparator); - - // Create the new struct type. - auto in_struct_name = ctx.dst->Sym(); - auto* in_struct = ctx.dst->create( - in_struct_name, new_struct_members, ast::DecorationList{}); - ctx.InsertBefore(ctx.src->AST().GlobalDeclarations(), func_ast, - in_struct); - - // Create a new function parameter using this struct type. - auto* struct_param = ctx.dst->Param( - new_struct_param_symbol, ctx.dst->ty.type_name(in_struct_name)); - new_parameters.push_back(struct_param); - } - } - - // Handle return type. - auto* ret_type = func->ReturnType(); - std::function new_ret_type; - if (ret_type->Is() && !needs_fixed_sample_mask) { - new_ret_type = [&ctx] { return ctx.dst->ty.void_(); }; - } else { - ast::StructMemberList new_struct_members; - - bool has_authored_sample_mask = false; - - if (auto* str = ret_type->As()) { - // Rebuild struct with only the entry point IO attributes. - for (auto* member : str->Members()) { - if (member->Type()->Is()) { - TINT_ICE(Transform, ctx.dst->Diagnostics()) - << "nested pipeline IO struct"; - } - - ast::DecorationList new_decorations = RemoveDecorations( - ctx, member->Declaration()->decorations(), - [](const ast::Decoration* deco) { - return !deco->IsAnyOf< - ast::BuiltinDecoration, ast::InterpolateDecoration, - ast::InvariantDecoration, ast::LocationDecoration>(); - }); - auto symbol = ctx.Clone(member->Declaration()->symbol()); - auto* member_ty = ctx.Clone(member->Declaration()->type()); - new_struct_members.push_back( - ctx.dst->Member(symbol, member_ty, new_decorations)); - - if (has_sample_mask_builtin(new_decorations)) { - has_authored_sample_mask = true; - } - } - } else if (!ret_type->Is()) { - auto* member_ty = ctx.Clone(func->Declaration()->return_type()); - auto decos = ctx.Clone(func_ast->return_type_decorations()); - new_struct_members.push_back( - ctx.dst->Member("value", member_ty, std::move(decos))); - - if (has_sample_mask_builtin(func_ast->return_type_decorations())) { - has_authored_sample_mask = true; - } - } - - // If a sample mask builtin is required and the shader source did not - // contain one, create one now. - if (needs_fixed_sample_mask && !has_authored_sample_mask) { - new_struct_members.push_back( - ctx.dst->Member(ctx.dst->Sym(), ctx.dst->ty.u32(), - {ctx.dst->Builtin(ast::Builtin::kSampleMask)})); - } - - // Sort struct members to satisfy HLSL interfacing matching rules. - std::sort(new_struct_members.begin(), new_struct_members.end(), - StructMemberComparator); - - // Create the new struct type. - auto out_struct_name = ctx.dst->Sym(); - auto* out_struct = ctx.dst->create( - out_struct_name, new_struct_members, ast::DecorationList{}); - ctx.InsertBefore(ctx.src->AST().GlobalDeclarations(), func_ast, - out_struct); - new_ret_type = [out_struct_name, &ctx] { - return ctx.dst->ty.type_name(out_struct_name); - }; - - // Replace all return statements. - for (auto* ret : func->ReturnStatements()) { - auto* ret_sem = ctx.src->Sem().Get(ret); - // Reconstruct the return value using the newly created struct. - std::function new_ret_value = [&ctx, ret] { - return ctx.Clone(ret->value()); - }; - - ast::ExpressionList ret_values; - if (ret_type->Is()) { - if (!ret->value()->Is()) { - // Create a const to hold the return value expression to avoid - // re-evaluating it multiple times. - auto temp = ctx.dst->Sym(); - auto* ty = CreateASTTypeFor(ctx, ret_type); - auto* temp_var = - ctx.dst->Decl(ctx.dst->Const(temp, ty, new_ret_value())); - ctx.InsertBefore(ret_sem->Block()->Declaration()->statements(), ret, - temp_var); - new_ret_value = [&ctx, temp] { return ctx.dst->Expr(temp); }; - } - - for (auto* member : new_struct_members) { - ast::Expression* expr = nullptr; - - if (needs_fixed_sample_mask && - has_sample_mask_builtin(member->decorations())) { - // Use the fixed sample mask, combining it with the authored value - // if there is one. - expr = ctx.dst->Expr(cfg->fixed_sample_mask); - if (has_authored_sample_mask) { - expr = ctx.dst->And( - ctx.dst->MemberAccessor(new_ret_value(), member->symbol()), - expr); - } - } else { - expr = ctx.dst->MemberAccessor(new_ret_value(), member->symbol()); - } - ret_values.push_back(expr); - } - } else { - if (!ret_type->Is()) { - ret_values.push_back(new_ret_value()); - } - - if (needs_fixed_sample_mask) { - // If the original return value was a sample mask, `and` it with the - // fixed mask and return the result. - // Otherwise, append the fixed mask to the list of return values, - // since it will be the last element of the output struct. - if (has_authored_sample_mask) { - ret_values[0] = - ctx.dst->And(ret_values[0], cfg->fixed_sample_mask); - } else { - ret_values.push_back(ctx.dst->Expr(cfg->fixed_sample_mask)); - } - } - } - - auto* new_ret = - ctx.dst->Return(ctx.dst->Construct(new_ret_type(), ret_values)); - ctx.Replace(ret, new_ret); - } - - if (needs_fixed_sample_mask && func->ReturnStatements().empty()) { - // There we no return statements but we need to return a fixed sample - // mask, so add a return statement that does this. - ctx.InsertBack(func_ast->body()->statements(), - ctx.dst->Return(ctx.dst->Construct( - new_ret_type(), cfg->fixed_sample_mask))); - } - } - - // Rewrite the function header with the new parameters. - auto* new_func = ctx.dst->create( - func_ast->source(), ctx.Clone(func_ast->symbol()), new_parameters, - new_ret_type(), ctx.Clone(func_ast->body()), - ctx.Clone(func_ast->decorations()), ast::DecorationList{}); - ctx.Replace(func_ast, new_func); + State state(ctx, *cfg, func_ast); + state.Process(); } ctx.Clone(); diff --git a/src/transform/canonicalize_entry_point_io.h b/src/transform/canonicalize_entry_point_io.h index 5d9a47b30a..60a1584f9a 100644 --- a/src/transform/canonicalize_entry_point_io.h +++ b/src/transform/canonicalize_entry_point_io.h @@ -21,10 +21,12 @@ namespace tint { namespace transform { /// CanonicalizeEntryPointIO is a transform used to rewrite shader entry point -/// interfaces into a form that the generators can handle. After the transform, -/// an entry point's parameters will be aggregated into a single struct, and its -/// return type will either be a struct or void. All structs in the module that -/// have entry point IO decorations will have exactly one pipeline stage usage. +/// interfaces into a form that the generators can handle. Each entry point +/// function is stripped of all shader IO attributes and wrapped in a function +/// that provides the shader interface. +/// The transform config determines how shader IO parameters will be exposed. +/// Entry point return values are always produced as a structure, and optionally +/// include additional builtins as per the transform config. /// /// Before: /// ``` @@ -36,12 +38,15 @@ namespace transform { /// [[stage(fragment)]] /// fn frag_main([[builtin(position)]] coord : vec4, /// locations : Locations) -> [[location(0)]] f32 { +/// if (coord.w > 1.0) { +/// return 0.0; +/// } /// var col : f32 = (coord.x * locations.loc1); /// return col; /// } /// ``` /// -/// After: +/// After (using structures for all parameters): /// ``` /// struct Locations{ /// loc1 : f32; @@ -58,14 +63,21 @@ namespace transform { /// [[location(0)]] loc0 : f32; /// }; /// +/// fn frag_main_inner(coord : vec4, +/// locations : Locations) -> f32 { +/// if (coord.w > 1.0) { +/// return 0.0; +/// } +/// var col : f32 = (coord.x * locations.loc1); +/// return col; +/// } +/// /// [[stage(fragment)]] /// fn frag_main(in : frag_main_in) -> frag_main_out { -/// const coord = in.coord; -/// const locations = Locations(in.loc1, in.loc2); -/// var col : f32 = (coord.x * locations.loc1); -/// var retval : frag_main_out; -/// retval.loc0 = col; -/// return retval; +/// let inner_retval = frag_main_inner(in.coord, Locations(in.loc1, in.loc2)); +/// var wrapper_result : frag_main_out; +/// wrapper_result.loc0 = inner_retval; +/// return wrapper_result; /// } /// ``` class CanonicalizeEntryPointIO @@ -111,6 +123,8 @@ class CanonicalizeEntryPointIO /// @param inputs optional extra transform-specific input data /// @param outputs optional extra transform-specific output data void Run(CloneContext& ctx, const DataMap& inputs, DataMap& outputs) override; + + struct State; }; } // namespace transform diff --git a/src/transform/canonicalize_entry_point_io_test.cc b/src/transform/canonicalize_entry_point_io_test.cc index 1f12d40e8e..504d60d88f 100644 --- a/src/transform/canonicalize_entry_point_io_test.cc +++ b/src/transform/canonicalize_entry_point_io_test.cc @@ -34,6 +34,29 @@ TEST_F(CanonicalizeEntryPointIOTest, Error_MissingTransformData) { EXPECT_EQ(expect, str(got)); } +TEST_F(CanonicalizeEntryPointIOTest, NoShaderIO) { + // Test that we do not introduce wrapper functions when there is no shader IO + // to process. + auto* src = R"( +[[stage(fragment)]] +fn frag_main() { +} + +[[stage(compute), workgroup_size(1)]] +fn comp_main() { +} +)"; + + auto* expect = src; + + DataMap data; + data.Add( + CanonicalizeEntryPointIO::BuiltinStyle::kParameter); + auto got = Run(src, data); + + EXPECT_EQ(expect, str(got)); +} + TEST_F(CanonicalizeEntryPointIOTest, Parameters_BuiltinsAsParameters) { auto* src = R"( [[stage(fragment)]] @@ -52,11 +75,13 @@ struct tint_symbol_1 { loc2 : vec4; }; +fn frag_main_inner(loc1 : f32, loc2 : vec4, coord : vec4) { + var col : f32 = (coord.x * loc1); +} + [[stage(fragment)]] fn frag_main([[builtin(position)]] coord : vec4, tint_symbol : tint_symbol_1) { - let loc1 : f32 = tint_symbol.loc1; - let loc2 : vec4 = tint_symbol.loc2; - var col : f32 = (coord.x * loc1); + frag_main_inner(tint_symbol.loc1, tint_symbol.loc2, coord); } )"; @@ -88,12 +113,13 @@ struct tint_symbol_1 { coord : vec4; }; +fn frag_main_inner(loc1 : f32, loc2 : vec4, coord : vec4) { + var col : f32 = (coord.x * loc1); +} + [[stage(fragment)]] fn frag_main(tint_symbol : tint_symbol_1) { - let loc1 : f32 = tint_symbol.loc1; - let loc2 : vec4 = tint_symbol.loc2; - let coord : vec4 = tint_symbol.coord; - var col : f32 = (coord.x * loc1); + frag_main_inner(tint_symbol.loc1, tint_symbol.loc2, tint_symbol.coord); } )"; @@ -123,10 +149,13 @@ struct tint_symbol_1 { loc1 : myf32; }; +fn frag_main_inner(loc1 : myf32) { + var x : myf32 = loc1; +} + [[stage(fragment)]] fn frag_main(tint_symbol : tint_symbol_1) { - let loc1 : myf32 = tint_symbol.loc1; - var x : myf32 = loc1; + frag_main_inner(tint_symbol.loc1); } )"; @@ -156,10 +185,12 @@ struct tint_symbol_1 { loc2 : vec4; }; +fn frag_main_inner(loc1 : f32, loc2 : vec4, coord : vec4) { +} + [[stage(fragment)]] fn frag_main([[builtin(position)]] coord : vec4, tint_symbol : tint_symbol_1) { - let loc1 : f32 = tint_symbol.loc1; - let loc2 : vec4 = tint_symbol.loc2; + frag_main_inner(tint_symbol.loc1, tint_symbol.loc2, coord); } )"; @@ -191,11 +222,12 @@ struct tint_symbol_1 { coord : vec4; }; +fn frag_main_inner(loc1 : f32, loc2 : vec4, coord : vec4) { +} + [[stage(fragment)]] fn frag_main(tint_symbol : tint_symbol_1) { - let loc1 : f32 = tint_symbol.loc1; - let loc2 : vec4 = tint_symbol.loc2; - let coord : vec4 = tint_symbol.coord; + frag_main_inner(tint_symbol.loc1, tint_symbol.loc2, tint_symbol.coord); } )"; @@ -235,7 +267,7 @@ struct FragLocations { loc2 : vec4; }; -struct tint_symbol_2 { +struct tint_symbol_1 { [[location(0)]] loc0 : f32; [[location(1)]] @@ -244,13 +276,14 @@ struct tint_symbol_2 { loc2 : vec4; }; -[[stage(fragment)]] -fn frag_main([[builtin(position)]] tint_symbol_1 : vec4, tint_symbol : tint_symbol_2) { - let loc0 : f32 = tint_symbol.loc0; - let locations : FragLocations = FragLocations(tint_symbol.loc1, tint_symbol.loc2); - let builtins : FragBuiltins = FragBuiltins(tint_symbol_1); +fn frag_main_inner(loc0 : f32, locations : FragLocations, builtins : FragBuiltins) { var col : f32 = ((builtins.coord.x * locations.loc1) + loc0); } + +[[stage(fragment)]] +fn frag_main([[builtin(position)]] coord : vec4, tint_symbol : tint_symbol_1) { + frag_main_inner(tint_symbol.loc0, FragLocations(tint_symbol.loc1, tint_symbol.loc2), FragBuiltins(coord)); +} )"; DataMap data; @@ -300,12 +333,13 @@ struct tint_symbol_1 { coord : vec4; }; +fn frag_main_inner(loc0 : f32, locations : FragLocations, builtins : FragBuiltins) { + var col : f32 = ((builtins.coord.x * locations.loc1) + loc0); +} + [[stage(fragment)]] fn frag_main(tint_symbol : tint_symbol_1) { - let loc0 : f32 = tint_symbol.loc0; - let locations : FragLocations = FragLocations(tint_symbol.loc1, tint_symbol.loc2); - let builtins : FragBuiltins = FragBuiltins(tint_symbol.coord); - var col : f32 = ((builtins.coord.x * locations.loc1) + loc0); + frag_main_inner(tint_symbol.loc0, FragLocations(tint_symbol.loc1, tint_symbol.loc2), FragBuiltins(tint_symbol.coord)); } )"; @@ -331,9 +365,16 @@ struct tint_symbol { value : f32; }; +fn frag_main_inner() -> f32 { + return 1.0; +} + [[stage(fragment)]] fn frag_main() -> tint_symbol { - return tint_symbol(1.0); + let inner_result = frag_main_inner(); + var wrapper_result : tint_symbol; + wrapper_result.value = inner_result; + return wrapper_result; } )"; @@ -379,13 +420,22 @@ struct tint_symbol { mask : u32; }; -[[stage(fragment)]] -fn frag_main() -> tint_symbol { +fn frag_main_inner() -> FragOutput { var output : FragOutput; output.depth = 1.0; output.mask = 7u; output.color = vec4(0.5, 0.5, 0.5, 1.0); - return tint_symbol(output.color, output.depth, output.mask); + return output; +} + +[[stage(fragment)]] +fn frag_main() -> tint_symbol { + let inner_result = frag_main_inner(); + var wrapper_result : tint_symbol; + wrapper_result.color = inner_result.color; + wrapper_result.depth = inner_result.depth; + wrapper_result.mask = inner_result.mask; + return wrapper_result; } )"; @@ -436,10 +486,13 @@ struct tint_symbol_1 { mul : f32; }; +fn frag_main1_inner(inputs : FragmentInput) { + var x : f32 = foo(inputs); +} + [[stage(fragment)]] fn frag_main1(tint_symbol : tint_symbol_1) { - let inputs : FragmentInput = FragmentInput(tint_symbol.value, tint_symbol.mul); - var x : f32 = foo(inputs); + frag_main1_inner(FragmentInput(tint_symbol.value, tint_symbol.mul)); } struct tint_symbol_3 { @@ -449,10 +502,13 @@ struct tint_symbol_3 { mul : f32; }; +fn frag_main2_inner(inputs : FragmentInput) { + var x : f32 = foo(inputs); +} + [[stage(fragment)]] fn frag_main2(tint_symbol_2 : tint_symbol_3) { - let inputs : FragmentInput = FragmentInput(tint_symbol_2.value, tint_symbol_2.mul); - var x : f32 = foo(inputs); + frag_main2_inner(FragmentInput(tint_symbol_2.value, tint_symbol_2.mul)); } )"; @@ -512,13 +568,16 @@ struct tint_symbol_1 { col2 : f32; }; -[[stage(fragment)]] -fn frag_main1(tint_symbol : tint_symbol_1) { - let inputs : FragmentInput = FragmentInput(tint_symbol.col1, tint_symbol.col2); +fn frag_main1_inner(inputs : FragmentInput) { global_inputs = inputs; var r : f32 = foo(); var g : f32 = bar(); } + +[[stage(fragment)]] +fn frag_main1(tint_symbol : tint_symbol_1) { + frag_main1_inner(FragmentInput(tint_symbol.col1, tint_symbol.col2)); +} )"; DataMap data; @@ -593,12 +652,18 @@ struct tint_symbol_2 { col2 : myf32; }; +fn frag_main_inner(inputs : MyFragmentInput) -> MyFragmentOutput { + var x : myf32 = foo(inputs); + return MyFragmentOutput(x, inputs.col2); +} + [[stage(fragment)]] fn frag_main(tint_symbol : tint_symbol_1) -> tint_symbol_2 { - let inputs : MyFragmentInput = MyFragmentInput(tint_symbol.col1, tint_symbol.col2); - var x : myf32 = foo(inputs); - let tint_symbol_3 : FragmentOutput = MyFragmentOutput(x, inputs.col2); - return tint_symbol_2(tint_symbol_3.col1, tint_symbol_3.col2); + let inner_result = frag_main_inner(MyFragmentInput(tint_symbol.col1, tint_symbol.col2)); + var wrapper_result : tint_symbol_2; + wrapper_result.col1 = inner_result.col1; + wrapper_result.col2 = inner_result.col2; + return wrapper_result; } )"; @@ -660,13 +725,22 @@ struct tint_symbol { pos : vec4; }; -[[stage(vertex)]] -fn vert_main() -> tint_symbol { - let tint_symbol_1 : VertexOut = VertexOut(); - return tint_symbol(tint_symbol_1.loc1, tint_symbol_1.loc2, tint_symbol_1.loc3, tint_symbol_1.pos); +fn vert_main_inner() -> VertexOut { + return VertexOut(); } -struct tint_symbol_3 { +[[stage(vertex)]] +fn vert_main() -> tint_symbol { + let inner_result = vert_main_inner(); + var wrapper_result : tint_symbol; + wrapper_result.pos = inner_result.pos; + wrapper_result.loc1 = inner_result.loc1; + wrapper_result.loc2 = inner_result.loc2; + wrapper_result.loc3 = inner_result.loc3; + return wrapper_result; +} + +struct tint_symbol_2 { [[location(1), interpolate(flat)]] loc1 : f32; [[location(2), interpolate(linear, sample)]] @@ -675,12 +749,14 @@ struct tint_symbol_3 { loc3 : f32; }; -[[stage(fragment)]] -fn frag_main(tint_symbol_2 : tint_symbol_3) { - let inputs : FragmentIn = FragmentIn(tint_symbol_2.loc1, tint_symbol_2.loc2); - let loc3 : f32 = tint_symbol_2.loc3; +fn frag_main_inner(inputs : FragmentIn, loc3 : f32) { let x = ((inputs.loc1 + inputs.loc2) + loc3); } + +[[stage(fragment)]] +fn frag_main(tint_symbol_1 : tint_symbol_2) { + frag_main_inner(FragmentIn(tint_symbol_1.loc1, tint_symbol_1.loc2), tint_symbol_1.loc3); +} )"; DataMap data; @@ -718,20 +794,33 @@ struct tint_symbol { pos : vec4; }; -[[stage(vertex)]] -fn main1() -> tint_symbol { - let tint_symbol_1 : VertexOut = VertexOut(); - return tint_symbol(tint_symbol_1.pos); +fn main1_inner() -> VertexOut { + return VertexOut(); } -struct tint_symbol_2 { +[[stage(vertex)]] +fn main1() -> tint_symbol { + let inner_result = main1_inner(); + var wrapper_result : tint_symbol; + wrapper_result.pos = inner_result.pos; + return wrapper_result; +} + +struct tint_symbol_1 { [[builtin(position), invariant]] value : vec4; }; +fn main2_inner() -> vec4 { + return vec4(); +} + [[stage(vertex)]] -fn main2() -> tint_symbol_2 { - return tint_symbol_2(vec4()); +fn main2() -> tint_symbol_1 { + let inner_result_1 = main2_inner(); + var wrapper_result_1 : tint_symbol_1; + wrapper_result_1.value = inner_result_1; + return wrapper_result_1; } )"; @@ -792,11 +881,16 @@ struct tint_symbol_2 { value : f32; }; +fn frag_main_inner(inputs : FragmentInput) -> FragmentOutput { + return FragmentOutput(((inputs.coord.x * inputs.value) + inputs.loc0)); +} + [[stage(fragment)]] fn frag_main(tint_symbol : tint_symbol_1) -> tint_symbol_2 { - let inputs : FragmentInput = FragmentInput(tint_symbol.value, tint_symbol.coord, tint_symbol.loc0); - let tint_symbol_3 : FragmentOutput = FragmentOutput(((inputs.coord.x * inputs.value) + inputs.loc0)); - return tint_symbol_2(tint_symbol_3.value); + let inner_result = frag_main_inner(FragmentInput(tint_symbol.value, tint_symbol.coord, tint_symbol.loc0)); + var wrapper_result : tint_symbol_2; + wrapper_result.value = inner_result.value; + return wrapper_result; } )"; @@ -865,13 +959,23 @@ struct tint_symbol { pos : vec4; }; -[[stage(vertex)]] -fn vert_main() -> tint_symbol { - let tint_symbol_1 : VertexOutput = VertexOutput(); - return tint_symbol(tint_symbol_1.a, tint_symbol_1.b, tint_symbol_1.c, tint_symbol_1.d, tint_symbol_1.pos); +fn vert_main_inner() -> VertexOutput { + return VertexOutput(); } -struct tint_symbol_3 { +[[stage(vertex)]] +fn vert_main() -> tint_symbol { + let inner_result = vert_main_inner(); + var wrapper_result : tint_symbol; + wrapper_result.b = inner_result.b; + wrapper_result.pos = inner_result.pos; + wrapper_result.d = inner_result.d; + wrapper_result.a = inner_result.a; + wrapper_result.c = inner_result.c; + return wrapper_result; +} + +struct tint_symbol_2 { [[location(0)]] a : f32; [[location(1)]] @@ -886,12 +990,12 @@ struct tint_symbol_3 { ff : bool; }; +fn frag_main_inner(ff : bool, c : i32, inputs : FragmentInputExtra, b : u32) { +} + [[stage(fragment)]] -fn frag_main(tint_symbol_2 : tint_symbol_3) { - let ff : bool = tint_symbol_2.ff; - let c : i32 = tint_symbol_2.c; - let inputs : FragmentInputExtra = FragmentInputExtra(tint_symbol_2.d, tint_symbol_2.pos, tint_symbol_2.a); - let b : u32 = tint_symbol_2.b; +fn frag_main(tint_symbol_1 : tint_symbol_2) { + frag_main_inner(tint_symbol_1.ff, tint_symbol_1.c, FragmentInputExtra(tint_symbol_1.d, tint_symbol_1.pos, tint_symbol_1.a), tint_symbol_1.b); } )"; @@ -916,9 +1020,12 @@ struct tint_symbol_2 { col : f32; }; +fn tint_symbol_1_inner(col : f32) { +} + [[stage(fragment)]] fn tint_symbol_1(tint_symbol : tint_symbol_2) { - let col : f32 = tint_symbol.col; + tint_symbol_1_inner(tint_symbol.col); } )"; @@ -938,14 +1045,20 @@ fn frag_main() { )"; auto* expect = R"( -struct tint_symbol_1 { +struct tint_symbol { [[builtin(sample_mask)]] - tint_symbol : u32; + fixed_sample_mask : u32; }; +fn frag_main_inner() { +} + [[stage(fragment)]] -fn frag_main() -> tint_symbol_1 { - return tint_symbol_1(3u); +fn frag_main() -> tint_symbol { + frag_main_inner(); + var wrapper_result : tint_symbol; + wrapper_result.fixed_sample_mask = 3u; + return wrapper_result; } )"; @@ -966,14 +1079,21 @@ fn frag_main() { )"; auto* expect = R"( -struct tint_symbol_1 { +struct tint_symbol { [[builtin(sample_mask)]] - tint_symbol : u32; + fixed_sample_mask : u32; }; +fn frag_main_inner() { + return; +} + [[stage(fragment)]] -fn frag_main() -> tint_symbol_1 { - return tint_symbol_1(3u); +fn frag_main() -> tint_symbol { + frag_main_inner(); + var wrapper_result : tint_symbol; + wrapper_result.fixed_sample_mask = 3u; + return wrapper_result; } )"; @@ -999,9 +1119,16 @@ struct tint_symbol { value : u32; }; +fn frag_main_inner() -> u32 { + return 7u; +} + [[stage(fragment)]] fn frag_main() -> tint_symbol { - return tint_symbol((7u & 3u)); + let inner_result = frag_main_inner(); + var wrapper_result : tint_symbol; + wrapper_result.value = (inner_result & 3u); + return wrapper_result; } )"; @@ -1022,16 +1149,24 @@ fn frag_main() -> [[location(0)]] f32 { )"; auto* expect = R"( -struct tint_symbol_1 { +struct tint_symbol { [[location(0)]] value : f32; [[builtin(sample_mask)]] - tint_symbol : u32; + fixed_sample_mask : u32; }; +fn frag_main_inner() -> f32 { + return 1.0; +} + [[stage(fragment)]] -fn frag_main() -> tint_symbol_1 { - return tint_symbol_1(1.0, 3u); +fn frag_main() -> tint_symbol { + let inner_result = frag_main_inner(); + var wrapper_result : tint_symbol; + wrapper_result.value = inner_result; + wrapper_result.fixed_sample_mask = 3u; + return wrapper_result; } )"; @@ -1073,10 +1208,18 @@ struct tint_symbol { mask : u32; }; +fn frag_main_inner() -> Output { + return Output(0.5, 7u, 1.0); +} + [[stage(fragment)]] fn frag_main() -> tint_symbol { - let tint_symbol_1 : Output = Output(0.5, 7u, 1.0); - return tint_symbol(tint_symbol_1.value, tint_symbol_1.depth, (tint_symbol_1.mask & 3u)); + let inner_result = frag_main_inner(); + var wrapper_result : tint_symbol; + wrapper_result.depth = inner_result.depth; + wrapper_result.mask = (inner_result.mask & 3u); + wrapper_result.value = inner_result.value; + return wrapper_result; } )"; @@ -1108,19 +1251,27 @@ struct Output { value : f32; }; -struct tint_symbol_1 { +struct tint_symbol { [[location(0)]] value : f32; [[builtin(frag_depth)]] depth : f32; [[builtin(sample_mask)]] - tint_symbol : u32; + fixed_sample_mask : u32; }; +fn frag_main_inner() -> Output { + return Output(0.5, 1.0); +} + [[stage(fragment)]] -fn frag_main() -> tint_symbol_1 { - let tint_symbol_2 : Output = Output(0.5, 1.0); - return tint_symbol_1(tint_symbol_2.value, tint_symbol_2.depth, 3u); +fn frag_main() -> tint_symbol { + let inner_result = frag_main_inner(); + var wrapper_result : tint_symbol; + wrapper_result.depth = inner_result.depth; + wrapper_result.value = inner_result.value; + wrapper_result.fixed_sample_mask = 3u; + return wrapper_result; } )"; @@ -1160,31 +1311,53 @@ struct tint_symbol { value : u32; }; -[[stage(fragment)]] -fn frag_main1() -> tint_symbol { - return tint_symbol((7u & 3u)); +fn frag_main1_inner() -> u32 { + return 7u; } -struct tint_symbol_2 { +[[stage(fragment)]] +fn frag_main1() -> tint_symbol { + let inner_result = frag_main1_inner(); + var wrapper_result : tint_symbol; + wrapper_result.value = (inner_result & 3u); + return wrapper_result; +} + +struct tint_symbol_1 { [[location(0)]] value : f32; [[builtin(sample_mask)]] - tint_symbol_1 : u32; + fixed_sample_mask : u32; }; -[[stage(fragment)]] -fn frag_main2() -> tint_symbol_2 { - return tint_symbol_2(1.0, 3u); +fn frag_main2_inner() -> f32 { + return 1.0; } -struct tint_symbol_3 { +[[stage(fragment)]] +fn frag_main2() -> tint_symbol_1 { + let inner_result_1 = frag_main2_inner(); + var wrapper_result_1 : tint_symbol_1; + wrapper_result_1.value = inner_result_1; + wrapper_result_1.fixed_sample_mask = 3u; + return wrapper_result_1; +} + +struct tint_symbol_2 { [[builtin(position)]] value : vec4; }; +fn vert_main1_inner() -> vec4 { + return vec4(); +} + [[stage(vertex)]] -fn vert_main1() -> tint_symbol_3 { - return tint_symbol_3(vec4()); +fn vert_main1() -> tint_symbol_2 { + let inner_result_2 = vert_main1_inner(); + var wrapper_result_2 : tint_symbol_2; + wrapper_result_2.value = inner_result_2; + return wrapper_result_2; } [[stage(compute), workgroup_size(1)]] @@ -1200,6 +1373,57 @@ fn comp_main1() { EXPECT_EQ(expect, str(got)); } +TEST_F(CanonicalizeEntryPointIOTest, FixedSampleMask_AvoidNameClash) { + auto* src = R"( +struct FragOut { + [[location(0)]] fixed_sample_mask : vec4; + [[location(1)]] fixed_sample_mask_1 : vec4; +}; + +[[stage(fragment)]] +fn frag_main() -> FragOut { + return FragOut(); +} +)"; + + auto* expect = R"( +struct FragOut { + fixed_sample_mask : vec4; + fixed_sample_mask_1 : vec4; +}; + +struct tint_symbol { + [[location(0)]] + fixed_sample_mask : vec4; + [[location(1)]] + fixed_sample_mask_1 : vec4; + [[builtin(sample_mask)]] + fixed_sample_mask_2 : u32; +}; + +fn frag_main_inner() -> FragOut { + return FragOut(); +} + +[[stage(fragment)]] +fn frag_main() -> tint_symbol { + let inner_result = frag_main_inner(); + var wrapper_result : tint_symbol; + wrapper_result.fixed_sample_mask = inner_result.fixed_sample_mask; + wrapper_result.fixed_sample_mask_1 = inner_result.fixed_sample_mask_1; + wrapper_result.fixed_sample_mask_2 = 3u; + return wrapper_result; +} +)"; + + DataMap data; + data.Add( + CanonicalizeEntryPointIO::BuiltinStyle::kParameter, 0x03); + auto got = Run(src, data); + + EXPECT_EQ(expect, str(got)); +} + } // namespace } // namespace transform } // namespace tint diff --git a/src/transform/msl_test.cc b/src/transform/msl_test.cc index 95f125d9ff..ed4062b6f5 100644 --- a/src/transform/msl_test.cc +++ b/src/transform/msl_test.cc @@ -34,15 +34,19 @@ fn main() { )"; auto* expect = R"( -[[stage(compute), workgroup_size(1)]] -fn main([[builtin(local_invocation_index)]] local_invocation_index : u32) { - [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_1 : f32; - [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_2 : f32; +fn main_inner(local_invocation_index : u32, tint_symbol : ptr, tint_symbol_1 : ptr) { { - tint_symbol_1 = f32(); + *(tint_symbol) = f32(); } workgroupBarrier(); - tint_symbol_1 = tint_symbol_2; + *(tint_symbol) = *(tint_symbol_1); +} + +[[stage(compute), workgroup_size(1)]] +fn main([[builtin(local_invocation_index)]] local_invocation_index : u32) { + [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_2 : f32; + [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_3 : f32; + main_inner(local_invocation_index, &(tint_symbol_2), &(tint_symbol_3)); } )"; @@ -80,26 +84,30 @@ fn main() { fn no_uses() { } -fn bar(a : f32, b : f32, tint_symbol_1 : ptr, tint_symbol_2 : ptr) { - *(tint_symbol_1) = a; - *(tint_symbol_2) = b; +fn bar(a : f32, b : f32, tint_symbol : ptr, tint_symbol_1 : ptr) { + *(tint_symbol) = a; + *(tint_symbol_1) = b; } -fn foo(a : f32, tint_symbol_3 : ptr, tint_symbol_4 : ptr) { +fn foo(a : f32, tint_symbol_2 : ptr, tint_symbol_3 : ptr) { let b : f32 = 2.0; - bar(a, b, tint_symbol_3, tint_symbol_4); + bar(a, b, tint_symbol_2, tint_symbol_3); no_uses(); } +fn main_inner(local_invocation_index : u32, tint_symbol_4 : ptr, tint_symbol_5 : ptr) { + { + *(tint_symbol_4) = f32(); + } + workgroupBarrier(); + foo(1.0, tint_symbol_5, tint_symbol_4); +} + [[stage(compute), workgroup_size(1)]] fn main([[builtin(local_invocation_index)]] local_invocation_index : u32) { - [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_5 : f32; - [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_6 : f32; - { - tint_symbol_5 = f32(); - } - workgroupBarrier(); - foo(1.0, &(tint_symbol_6), &(tint_symbol_5)); + [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_6 : f32; + [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_7 : f32; + main_inner(local_invocation_index, &(tint_symbol_6), &(tint_symbol_7)); } )"; @@ -148,16 +156,20 @@ fn main() { )"; auto* expect = R"( -[[stage(compute), workgroup_size(1)]] -fn main([[builtin(local_invocation_index)]] local_invocation_index : u32) { - [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_1 : f32; - [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_2 : f32; +fn main_inner(local_invocation_index : u32, tint_symbol : ptr, tint_symbol_1 : ptr) { { - tint_symbol_1 = f32(); + *(tint_symbol) = f32(); } workgroupBarrier(); - let x : f32 = (tint_symbol_2 + tint_symbol_1); - tint_symbol_2 = x; + let x : f32 = (*(tint_symbol_1) + *(tint_symbol)); + *(tint_symbol_1) = x; +} + +[[stage(compute), workgroup_size(1)]] +fn main([[builtin(local_invocation_index)]] local_invocation_index : u32) { + [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_2 : f32; + [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_3 : f32; + main_inner(local_invocation_index, &(tint_symbol_2), &(tint_symbol_3)); } )"; diff --git a/src/writer/hlsl/generator_impl_function_test.cc b/src/writer/hlsl/generator_impl_function_test.cc index 59ea1e7542..41b2294203 100644 --- a/src/writer/hlsl/generator_impl_function_test.cc +++ b/src/writer/hlsl/generator_impl_function_test.cc @@ -130,10 +130,15 @@ struct tint_symbol_2 { float value : SV_Target1; }; +float frag_main_inner(float foo) { + return foo; +} + tint_symbol_2 frag_main(tint_symbol_1 tint_symbol) { - const float foo = tint_symbol.foo; - const tint_symbol_2 tint_symbol_3 = {foo}; - return tint_symbol_3; + const float inner_result = frag_main_inner(tint_symbol.foo); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.value = inner_result; + return wrapper_result; } )"); } @@ -160,10 +165,15 @@ struct tint_symbol_2 { float value : SV_Depth; }; +float frag_main_inner(float4 coord) { + return coord.x; +} + tint_symbol_2 frag_main(tint_symbol_1 tint_symbol) { - const float4 coord = tint_symbol.coord; - const tint_symbol_2 tint_symbol_3 = {coord.x}; - return tint_symbol_3; + const float inner_result = frag_main_inner(tint_symbol.coord); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.value = inner_result; + return wrapper_result; } )"); } @@ -218,23 +228,35 @@ struct tint_symbol { float4 pos : SV_Position; }; -tint_symbol vert_main() { - const Interface tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f), 0.5f, 0.25f}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.col1, tint_symbol_1.col2, tint_symbol_1.pos}; - return tint_symbol_4; +Interface vert_main_inner() { + const Interface tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f), 0.5f, 0.25f}; + return tint_symbol_3; } -struct tint_symbol_3 { +tint_symbol vert_main() { + const Interface inner_result = vert_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.pos = inner_result.pos; + wrapper_result.col1 = inner_result.col1; + wrapper_result.col2 = inner_result.col2; + return wrapper_result; +} + +struct tint_symbol_2 { float col1 : TEXCOORD1; float col2 : TEXCOORD2; float4 pos : SV_Position; }; -void frag_main(tint_symbol_3 tint_symbol_2) { - const Interface inputs = {tint_symbol_2.pos, tint_symbol_2.col1, tint_symbol_2.col2}; +void frag_main_inner(Interface inputs) { const float r = inputs.col1; const float g = inputs.col2; const float4 p = inputs.pos; +} + +void frag_main(tint_symbol_2 tint_symbol_1) { + const Interface tint_symbol_4 = {tint_symbol_1.pos, tint_symbol_1.col1, tint_symbol_1.col2}; + frag_main_inner(tint_symbol_4); return; } )"); @@ -278,28 +300,38 @@ TEST_F(HlslGeneratorImplTest_Function, }; VertexOutput foo(float x) { - const VertexOutput tint_symbol_4 = {float4(x, x, x, 1.0f)}; - return tint_symbol_4; + const VertexOutput tint_symbol_2 = {float4(x, x, x, 1.0f)}; + return tint_symbol_2; } struct tint_symbol { float4 pos : SV_Position; }; -tint_symbol vert_main1() { - const VertexOutput tint_symbol_1 = foo(0.5f); - const tint_symbol tint_symbol_5 = {tint_symbol_1.pos}; - return tint_symbol_5; +VertexOutput vert_main1_inner() { + return foo(0.5f); } -struct tint_symbol_2 { +tint_symbol vert_main1() { + const VertexOutput inner_result = vert_main1_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.pos = inner_result.pos; + return wrapper_result; +} + +struct tint_symbol_1 { float4 pos : SV_Position; }; -tint_symbol_2 vert_main2() { - const VertexOutput tint_symbol_3 = foo(0.25f); - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.pos}; - return tint_symbol_6; +VertexOutput vert_main2_inner() { + return foo(0.25f); +} + +tint_symbol_1 vert_main2() { + const VertexOutput inner_result_1 = vert_main2_inner(); + tint_symbol_1 wrapper_result_1 = (tint_symbol_1)0; + wrapper_result_1.pos = inner_result_1.pos; + return wrapper_result_1; } )"); } diff --git a/src/writer/msl/generator_impl_function_test.cc b/src/writer/msl/generator_impl_function_test.cc index 9ad9b821b6..226c53ace5 100644 --- a/src/writer/msl/generator_impl_function_test.cc +++ b/src/writer/msl/generator_impl_function_test.cc @@ -111,10 +111,15 @@ struct tint_symbol_2 { float value [[color(1)]]; }; +float frag_main_inner(float foo) { + return foo; +} + fragment tint_symbol_2 frag_main(tint_symbol_1 tint_symbol [[stage_in]]) { - float const foo = tint_symbol.foo; - tint_symbol_2 const tint_symbol_3 = {.value=foo}; - return tint_symbol_3; + float const inner_result = frag_main_inner(tint_symbol.foo); + tint_symbol_2 wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } )"); @@ -137,13 +142,19 @@ TEST_F(MslGeneratorImplTest, Emit_Decoration_EntryPoint_WithInOut_Builtins) { EXPECT_EQ(gen.result(), R"(#include using namespace metal; -struct tint_symbol_1 { +struct tint_symbol { float value [[depth(any)]]; }; -fragment tint_symbol_1 frag_main(float4 coord [[position]]) { - tint_symbol_1 const tint_symbol_2 = {.value=coord.x}; - return tint_symbol_2; +float frag_main_inner(float4 coord) { + return coord.x; +} + +fragment tint_symbol frag_main(float4 coord [[position]]) { + float const inner_result = frag_main_inner(coord); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } )"); @@ -201,21 +212,33 @@ struct tint_symbol { float col2 [[user(locn2)]]; float4 pos [[position]]; }; -struct tint_symbol_4 { +struct tint_symbol_2 { float col1 [[user(locn1)]]; float col2 [[user(locn2)]]; }; -vertex tint_symbol vert_main() { - Interface const tint_symbol_1 = {.col1=0.5f, .col2=0.25f, .pos=float4()}; - tint_symbol const tint_symbol_5 = {.col1=tint_symbol_1.col1, .col2=tint_symbol_1.col2, .pos=tint_symbol_1.pos}; - return tint_symbol_5; +Interface vert_main_inner() { + Interface const tint_symbol_3 = {.col1=0.5f, .col2=0.25f, .pos=float4()}; + return tint_symbol_3; } -fragment void frag_main(float4 tint_symbol_3 [[position]], tint_symbol_4 tint_symbol_2 [[stage_in]]) { - Interface const colors = {.col1=tint_symbol_2.col1, .col2=tint_symbol_2.col2, .pos=tint_symbol_3}; +vertex tint_symbol vert_main() { + Interface const inner_result = vert_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.col1 = inner_result.col1; + wrapper_result.col2 = inner_result.col2; + wrapper_result.pos = inner_result.pos; + return wrapper_result; +} + +void frag_main_inner(Interface colors) { float const r = colors.col1; float const g = colors.col2; +} + +fragment void frag_main(float4 pos [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + Interface const tint_symbol_4 = {.col1=tint_symbol_1.col1, .col2=tint_symbol_1.col2, .pos=pos}; + frag_main_inner(tint_symbol_4); return; } @@ -265,25 +288,35 @@ struct VertexOutput { struct tint_symbol { float4 pos [[position]]; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 pos [[position]]; }; VertexOutput foo(float x) { - VertexOutput const tint_symbol_4 = {.pos=float4(x, x, x, 1.0f)}; - return tint_symbol_4; + VertexOutput const tint_symbol_2 = {.pos=float4(x, x, x, 1.0f)}; + return tint_symbol_2; +} + +VertexOutput vert_main1_inner() { + return foo(0.5f); } vertex tint_symbol vert_main1() { - VertexOutput const tint_symbol_1 = foo(0.5f); - tint_symbol const tint_symbol_5 = {.pos=tint_symbol_1.pos}; - return tint_symbol_5; + VertexOutput const inner_result = vert_main1_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.pos = inner_result.pos; + return wrapper_result; } -vertex tint_symbol_2 vert_main2() { - VertexOutput const tint_symbol_3 = foo(0.25f); - tint_symbol_2 const tint_symbol_6 = {.pos=tint_symbol_3.pos}; - return tint_symbol_6; +VertexOutput vert_main2_inner() { + return foo(0.25f); +} + +vertex tint_symbol_1 vert_main2() { + VertexOutput const inner_result_1 = vert_main2_inner(); + tint_symbol_1 wrapper_result_1 = {}; + wrapper_result_1.pos = inner_result_1.pos; + return wrapper_result_1; } )"); diff --git a/test/buffer/storage/dynamic_index/read.wgsl.expected.hlsl b/test/buffer/storage/dynamic_index/read.wgsl.expected.hlsl index 24312d1f54..789126bf81 100644 --- a/test/buffer/storage/dynamic_index/read.wgsl.expected.hlsl +++ b/test/buffer/storage/dynamic_index/read.wgsl.expected.hlsl @@ -23,9 +23,7 @@ tint_symbol_11_ret tint_symbol_11(ByteAddressBuffer buffer, uint offset) { return arr_1; } -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint idx = tint_symbol.idx; +void main_inner(uint idx) { const int3 a = asint(s.Load3((176u * idx))); const int b = asint(s.Load(((176u * idx) + 12u))); const uint3 c = s.Load3(((176u * idx) + 16u)); @@ -35,5 +33,10 @@ void main(tint_symbol_1 tint_symbol) { const float2x3 g = tint_symbol_8(s, ((176u * idx) + 48u)); const float3x2 h = tint_symbol_9(s, ((176u * idx) + 80u)); const int4 i[4] = tint_symbol_11(s, ((176u * idx) + 112u)); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.idx); return; } diff --git a/test/buffer/storage/dynamic_index/read.wgsl.expected.msl b/test/buffer/storage/dynamic_index/read.wgsl.expected.msl index b9aa14f712..6b40e48bd5 100644 --- a/test/buffer/storage/dynamic_index/read.wgsl.expected.msl +++ b/test/buffer/storage/dynamic_index/read.wgsl.expected.msl @@ -20,7 +20,7 @@ struct S { /* 0x0000 */ Inner arr[1]; }; -kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], const device S& s [[buffer(0)]]) { +void tint_symbol_inner(const device S& s, uint idx) { int3 const a = s.arr[idx].a; int const b = s.arr[idx].b; uint3 const c = s.arr[idx].c; @@ -30,6 +30,10 @@ kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], const device S float2x3 const g = s.arr[idx].g; float3x2 const h = s.arr[idx].h; tint_array_wrapper const i = s.arr[idx].i; +} + +kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], const device S& s [[buffer(0)]]) { + tint_symbol_inner(s, idx); return; } diff --git a/test/buffer/storage/dynamic_index/write.wgsl.expected.hlsl b/test/buffer/storage/dynamic_index/write.wgsl.expected.hlsl index c18b7c6845..d267673c0e 100644 --- a/test/buffer/storage/dynamic_index/write.wgsl.expected.hlsl +++ b/test/buffer/storage/dynamic_index/write.wgsl.expected.hlsl @@ -24,9 +24,7 @@ void tint_symbol_11(RWByteAddressBuffer buffer, uint offset, int4 value[4]) { } } -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint idx = tint_symbol.idx; +void main_inner(uint idx) { s.Store3((176u * idx), asuint(int3(0, 0, 0))); s.Store(((176u * idx) + 12u), asuint(0)); s.Store3(((176u * idx) + 16u), asuint(uint3(0u, 0u, 0u))); @@ -37,5 +35,10 @@ void main(tint_symbol_1 tint_symbol) { tint_symbol_9(s, ((176u * idx) + 80u), float3x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)); const int4 tint_symbol_13[4] = (int4[4])0; tint_symbol_11(s, ((176u * idx) + 112u), tint_symbol_13); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.idx); return; } diff --git a/test/buffer/storage/dynamic_index/write.wgsl.expected.msl b/test/buffer/storage/dynamic_index/write.wgsl.expected.msl index be0d4db07d..fcb9558edc 100644 --- a/test/buffer/storage/dynamic_index/write.wgsl.expected.msl +++ b/test/buffer/storage/dynamic_index/write.wgsl.expected.msl @@ -20,7 +20,7 @@ struct S { /* 0x0000 */ Inner arr[1]; }; -kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], device S& s [[buffer(0)]]) { +void tint_symbol_inner(device S& s, uint idx) { s.arr[idx].a = int3(); s.arr[idx].b = int(); s.arr[idx].c = uint3(); @@ -29,8 +29,12 @@ kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], device S& s [[ s.arr[idx].f = float(); s.arr[idx].g = float2x3(); s.arr[idx].h = float3x2(); - tint_array_wrapper const tint_symbol_2 = {.arr={}}; - s.arr[idx].i = tint_symbol_2; + tint_array_wrapper const tint_symbol_1 = {.arr={}}; + s.arr[idx].i = tint_symbol_1; +} + +kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], device S& s [[buffer(0)]]) { + tint_symbol_inner(s, idx); return; } diff --git a/test/buffer/uniform/dynamic_index/read.wgsl.expected.hlsl b/test/buffer/uniform/dynamic_index/read.wgsl.expected.hlsl index 22133cc826..351446d745 100644 --- a/test/buffer/uniform/dynamic_index/read.wgsl.expected.hlsl +++ b/test/buffer/uniform/dynamic_index/read.wgsl.expected.hlsl @@ -12,9 +12,7 @@ float2x3 tint_symbol_9(uint4 buffer[96], uint offset) { return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz)); } -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint idx = tint_symbol.idx; +void main_inner(uint idx) { const uint scalar_offset_2 = ((192u * idx)) / 4; const int3 a = asint(s[scalar_offset_2 / 4].xyz); const uint scalar_offset_3 = (((192u * idx) + 12u)) / 4; @@ -34,5 +32,10 @@ void main(tint_symbol_1 tint_symbol) { uint4 ubo_load_1 = s[scalar_offset_9 / 4]; const int2 h = asint(((scalar_offset_9 & 2) ? ubo_load_1.zw : ubo_load_1.xy)); const float2x3 i = tint_symbol_9(s, ((192u * idx) + 64u)); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.idx); return; } diff --git a/test/buffer/uniform/dynamic_index/read.wgsl.expected.msl b/test/buffer/uniform/dynamic_index/read.wgsl.expected.msl index 08c4e7d197..f33e9a7d56 100644 --- a/test/buffer/uniform/dynamic_index/read.wgsl.expected.msl +++ b/test/buffer/uniform/dynamic_index/read.wgsl.expected.msl @@ -25,7 +25,7 @@ struct S { /* 0x0000 */ tint_array_wrapper_1 arr; }; -kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], constant S& s [[buffer(0)]]) { +void tint_symbol_inner(constant S& s, uint idx) { int3 const a = s.arr.arr[idx].a; int const b = s.arr.arr[idx].b; uint3 const c = s.arr.arr[idx].c; @@ -35,6 +35,10 @@ kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], constant S& s int2 const g = s.arr.arr[idx].g; int2 const h = s.arr.arr[idx].h; float2x3 const i = s.arr.arr[idx].i; +} + +kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], constant S& s [[buffer(0)]]) { + tint_symbol_inner(s, idx); return; } diff --git a/test/bug/dawn/947.wgsl.expected.hlsl b/test/bug/dawn/947.wgsl.expected.hlsl index 56a42504bd..5c18116c6a 100644 --- a/test/bug/dawn/947.wgsl.expected.hlsl +++ b/test/bug/dawn/947.wgsl.expected.hlsl @@ -14,8 +14,7 @@ struct tint_symbol_2 { float4 position : SV_Position; }; -tint_symbol_2 vs_main(tint_symbol_1 tint_symbol) { - const uint VertexIndex = tint_symbol.VertexIndex; +VertexOutputs vs_main_inner(uint VertexIndex) { float2 texcoord[3] = {float2(-0.5f, 0.0f), float2(1.5f, 0.0f), float2(0.5f, 2.0f)}; VertexOutputs output = (VertexOutputs)0; output.position = float4(((texcoord[VertexIndex] * 2.0f) - float2(1.0f, 1.0f)), 0.0f, 1.0f); @@ -25,8 +24,15 @@ tint_symbol_2 vs_main(tint_symbol_1 tint_symbol) { } else { output.texcoords = ((((texcoord[VertexIndex] * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f)) * asfloat(uniforms[0].xy)) + asfloat(uniforms[0].zw)); } - const tint_symbol_2 tint_symbol_8 = {output.texcoords, output.position}; - return tint_symbol_8; + return output; +} + +tint_symbol_2 vs_main(tint_symbol_1 tint_symbol) { + const VertexOutputs inner_result = vs_main_inner(tint_symbol.VertexIndex); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.texcoords = inner_result.texcoords; + wrapper_result.position = inner_result.position; + return wrapper_result; } SamplerState mySampler : register(s1, space0); @@ -39,13 +45,18 @@ struct tint_symbol_5 { float4 value : SV_Target0; }; -tint_symbol_5 fs_main(tint_symbol_4 tint_symbol_3) { - const float2 texcoord = tint_symbol_3.texcoord; +float4 fs_main_inner(float2 texcoord) { float2 clampedTexcoord = clamp(texcoord, float2(0.0f, 0.0f), float2(1.0f, 1.0f)); if (!(all((clampedTexcoord == texcoord)))) { discard; } float4 srcColor = myTexture.Sample(mySampler, texcoord); - const tint_symbol_5 tint_symbol_9 = {srcColor}; - return tint_symbol_9; + return srcColor; +} + +tint_symbol_5 fs_main(tint_symbol_4 tint_symbol_3) { + const float4 inner_result_1 = fs_main_inner(tint_symbol_3.texcoord); + tint_symbol_5 wrapper_result_1 = (tint_symbol_5)0; + wrapper_result_1.value = inner_result_1; + return wrapper_result_1; } diff --git a/test/bug/dawn/947.wgsl.expected.msl b/test/bug/dawn/947.wgsl.expected.msl index 2ad00ea14f..4003d16474 100644 --- a/test/bug/dawn/947.wgsl.expected.msl +++ b/test/bug/dawn/947.wgsl.expected.msl @@ -9,21 +9,21 @@ struct VertexOutputs { float2 texcoords; float4 position; }; -struct tint_symbol_1 { +struct tint_symbol { float2 texcoords [[user(locn0)]]; float4 position [[position]]; }; struct tint_array_wrapper { float2 arr[3]; }; -struct tint_symbol_3 { +struct tint_symbol_2 { float2 texcoord [[user(locn0)]]; }; -struct tint_symbol_4 { +struct tint_symbol_3 { float4 value [[color(0)]]; }; -vertex tint_symbol_1 vs_main(uint VertexIndex [[vertex_id]], constant Uniforms& uniforms [[buffer(0)]]) { +VertexOutputs vs_main_inner(constant Uniforms& uniforms, uint VertexIndex) { tint_array_wrapper texcoord = {.arr={float2(-0.5f, 0.0f), float2(1.5f, 0.0f), float2(0.5f, 2.0f)}}; VertexOutputs output = {}; output.position = float4(((texcoord.arr[VertexIndex] * 2.0f) - float2(1.0f, 1.0f)), 0.0f, 1.0f); @@ -33,18 +33,30 @@ vertex tint_symbol_1 vs_main(uint VertexIndex [[vertex_id]], constant Uniforms& } else { output.texcoords = ((((texcoord.arr[VertexIndex] * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f)) * uniforms.u_scale) + uniforms.u_offset); } - tint_symbol_1 const tint_symbol_5 = {.texcoords=output.texcoords, .position=output.position}; - return tint_symbol_5; + return output; } -fragment tint_symbol_4 fs_main(texture2d tint_symbol_7 [[texture(2)]], sampler tint_symbol_8 [[sampler(1)]], tint_symbol_3 tint_symbol_2 [[stage_in]]) { - float2 const texcoord = tint_symbol_2.texcoord; +vertex tint_symbol vs_main(uint VertexIndex [[vertex_id]], constant Uniforms& uniforms [[buffer(0)]]) { + VertexOutputs const inner_result = vs_main_inner(uniforms, VertexIndex); + tint_symbol wrapper_result = {}; + wrapper_result.texcoords = inner_result.texcoords; + wrapper_result.position = inner_result.position; + return wrapper_result; +} + +float4 fs_main_inner(float2 texcoord, texture2d tint_symbol_4, sampler tint_symbol_5) { float2 clampedTexcoord = clamp(texcoord, float2(0.0f, 0.0f), float2(1.0f, 1.0f)); if (!(all((clampedTexcoord == texcoord)))) { discard_fragment(); } - float4 srcColor = tint_symbol_7.sample(tint_symbol_8, texcoord); - tint_symbol_4 const tint_symbol_6 = {.value=srcColor}; - return tint_symbol_6; + float4 srcColor = tint_symbol_4.sample(tint_symbol_5, texcoord); + return srcColor; +} + +fragment tint_symbol_3 fs_main(texture2d tint_symbol_6 [[texture(2)]], sampler tint_symbol_7 [[sampler(1)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + float4 const inner_result_1 = fs_main_inner(tint_symbol_1.texcoord, tint_symbol_6, tint_symbol_7); + tint_symbol_3 wrapper_result_1 = {}; + wrapper_result_1.value = inner_result_1; + return wrapper_result_1; } diff --git a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.hlsl b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.hlsl index 60d283112b..0ea2ad60c6 100644 --- a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.hlsl +++ b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.hlsl @@ -13,9 +13,7 @@ struct tint_symbol_2 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void f(tint_symbol_2 tint_symbol_1) { - const uint local_invocation_index = tint_symbol_1.local_invocation_index; +void f_inner(uint local_invocation_index) { { for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) { const uint i = idx; @@ -24,5 +22,10 @@ void f(tint_symbol_2 tint_symbol_1) { } GroupMemoryBarrierWithGroupSync(); result.Store(0u, asuint(s.data[asint(ubo[0].x)])); +} + +[numthreads(1, 1, 1)] +void f(tint_symbol_2 tint_symbol_1) { + f_inner(tint_symbol_1.local_invocation_index); return; } diff --git a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.msl b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.msl index 0d586be148..973bbf664b 100644 --- a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.msl +++ b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.msl @@ -14,14 +14,18 @@ struct Result { /* 0x0000 */ int out; }; -kernel void f(uint local_invocation_index [[thread_index_in_threadgroup]], constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) { - threadgroup S tint_symbol_1; +void f_inner(constant UBO& ubo, device Result& result, uint local_invocation_index, threadgroup S* const tint_symbol) { for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) { uint const i = idx; - tint_symbol_1.data.arr[i] = int(); + (*(tint_symbol)).data.arr[i] = int(); } threadgroup_barrier(mem_flags::mem_threadgroup); - result.out = tint_symbol_1.data.arr[ubo.dynamic_idx]; + result.out = (*(tint_symbol)).data.arr[ubo.dynamic_idx]; +} + +kernel void f(uint local_invocation_index [[thread_index_in_threadgroup]], constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) { + threadgroup S tint_symbol_1; + f_inner(ubo, result, local_invocation_index, &(tint_symbol_1)); return; } diff --git a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.hlsl b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.hlsl index ba5fff99b5..1098254f3a 100644 --- a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.hlsl +++ b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.hlsl @@ -13,9 +13,7 @@ struct tint_symbol_2 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void f(tint_symbol_2 tint_symbol_1) { - const uint local_invocation_index = tint_symbol_1.local_invocation_index; +void f_inner(uint local_invocation_index) { { for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) { const uint i = idx; @@ -25,5 +23,10 @@ void f(tint_symbol_2 tint_symbol_1) { GroupMemoryBarrierWithGroupSync(); s.data[asint(ubo[0].x)] = 1; result.Store(0u, asuint(s.data[3])); +} + +[numthreads(1, 1, 1)] +void f(tint_symbol_2 tint_symbol_1) { + f_inner(tint_symbol_1.local_invocation_index); return; } diff --git a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.msl b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.msl index a79848a852..dd5b422cb3 100644 --- a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.msl +++ b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.msl @@ -14,15 +14,19 @@ struct Result { /* 0x0000 */ int out; }; -kernel void f(uint local_invocation_index [[thread_index_in_threadgroup]], constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) { - threadgroup S tint_symbol_1; +void f_inner(constant UBO& ubo, device Result& result, uint local_invocation_index, threadgroup S* const tint_symbol) { for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) { uint const i = idx; - tint_symbol_1.data.arr[i] = int(); + (*(tint_symbol)).data.arr[i] = int(); } threadgroup_barrier(mem_flags::mem_threadgroup); - tint_symbol_1.data.arr[ubo.dynamic_idx] = 1; - result.out = tint_symbol_1.data.arr[3]; + (*(tint_symbol)).data.arr[ubo.dynamic_idx] = 1; + result.out = (*(tint_symbol)).data.arr[3]; +} + +kernel void f(uint local_invocation_index [[thread_index_in_threadgroup]], constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) { + threadgroup S tint_symbol_1; + f_inner(ubo, result, local_invocation_index, &(tint_symbol_1)); return; } diff --git a/test/bug/tint/1046.wgsl.expected.hlsl b/test/bug/tint/1046.wgsl.expected.hlsl index fd700b1950..d37918bdc3 100644 --- a/test/bug/tint/1046.wgsl.expected.hlsl +++ b/test/bug/tint/1046.wgsl.expected.hlsl @@ -48,14 +48,20 @@ struct tint_symbol_2 { float4 color : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const FragmentInput fragment = {tint_symbol.position, tint_symbol.view_position, tint_symbol.normal, tint_symbol.uv, tint_symbol.color}; +FragmentOutput main_inner(FragmentInput fragment) { FragmentOutput output = (FragmentOutput)0; output.color = float4(1.0f, 0.0f, 0.0f, 1.0f); uniforms; mySampler; myTexture; pointLights; - const tint_symbol_2 tint_symbol_5 = {output.color}; - return tint_symbol_5; + return output; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const FragmentInput tint_symbol_5 = {tint_symbol.position, tint_symbol.view_position, tint_symbol.normal, tint_symbol.uv, tint_symbol.color}; + const FragmentOutput inner_result = main_inner(tint_symbol_5); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.color = inner_result.color; + return wrapper_result; } diff --git a/test/bug/tint/1046.wgsl.expected.msl b/test/bug/tint/1046.wgsl.expected.msl index 0de4fdfc5c..77d314a11c 100644 --- a/test/bug/tint/1046.wgsl.expected.msl +++ b/test/bug/tint/1046.wgsl.expected.msl @@ -25,17 +25,17 @@ struct FragmentInput { struct FragmentOutput { float4 color; }; -struct tint_symbol_4 { +struct tint_symbol_3 { float4 view_position [[user(locn0)]]; float4 normal [[user(locn1)]]; float2 uv [[user(locn2)]]; float4 color [[user(locn3)]]; }; -struct tint_symbol_5 { +struct tint_symbol_4 { float4 color [[color(0)]]; }; -float4 getColor(constant Uniforms& uniforms, FragmentInput tint_symbol, texture2d tint_symbol_7, sampler tint_symbol_8) { +float4 getColor(constant Uniforms& uniforms, FragmentInput tint_symbol, texture2d tint_symbol_6, sampler tint_symbol_7) { float4 color = 0.0f; if ((uniforms.color_source == 0u)) { color = tint_symbol.color; @@ -48,7 +48,7 @@ float4 getColor(constant Uniforms& uniforms, FragmentInput tint_symbol, texture2 color = uniforms.color; } else { if ((uniforms.color_source == 3u)) { - color = tint_symbol_7.sample(tint_symbol_8, tint_symbol.uv); + color = tint_symbol_6.sample(tint_symbol_7, tint_symbol.uv); } } } @@ -56,15 +56,21 @@ float4 getColor(constant Uniforms& uniforms, FragmentInput tint_symbol, texture2 return color; } -fragment tint_symbol_5 tint_symbol_1(sampler tint_symbol_9 [[sampler(2)]], texture2d tint_symbol_10 [[texture(3)]], float4 tint_symbol_3 [[position]], tint_symbol_4 tint_symbol_2 [[stage_in]], constant Uniforms& uniforms [[buffer(0)]], const device PointLights& pointLights [[buffer(1)]]) { - FragmentInput const tint_symbol = {.position=tint_symbol_3, .view_position=tint_symbol_2.view_position, .normal=tint_symbol_2.normal, .uv=tint_symbol_2.uv, .color=tint_symbol_2.color}; +FragmentOutput tint_symbol_1_inner(constant Uniforms& uniforms, const device PointLights& pointLights, FragmentInput tint_symbol, sampler tint_symbol_8, texture2d tint_symbol_9) { FragmentOutput output = {}; output.color = float4(1.0f, 0.0f, 0.0f, 1.0f); (void) uniforms; + (void) tint_symbol_8; (void) tint_symbol_9; - (void) tint_symbol_10; (void) pointLights; - tint_symbol_5 const tint_symbol_6 = {.color=output.color}; - return tint_symbol_6; + return output; +} + +fragment tint_symbol_4 tint_symbol_1(sampler tint_symbol_10 [[sampler(2)]], texture2d tint_symbol_11 [[texture(3)]], float4 position [[position]], tint_symbol_3 tint_symbol_2 [[stage_in]], constant Uniforms& uniforms [[buffer(0)]], const device PointLights& pointLights [[buffer(1)]]) { + FragmentInput const tint_symbol_5 = {.position=position, .view_position=tint_symbol_2.view_position, .normal=tint_symbol_2.normal, .uv=tint_symbol_2.uv, .color=tint_symbol_2.color}; + FragmentOutput const inner_result = tint_symbol_1_inner(uniforms, pointLights, tint_symbol_5, tint_symbol_10, tint_symbol_11); + tint_symbol_4 wrapper_result = {}; + wrapper_result.color = inner_result.color; + return wrapper_result; } diff --git a/test/bug/tint/1076.wgsl b/test/bug/tint/1076.wgsl new file mode 100644 index 0000000000..b854b18ede --- /dev/null +++ b/test/bug/tint/1076.wgsl @@ -0,0 +1,12 @@ +struct FragIn { + [[location(0)]] a : f32; + [[builtin(sample_mask)]] mask : u32; +}; + +[[stage(fragment)]] +fn main(in : FragIn, [[location(1)]] b : f32) -> FragIn { + if (in.mask == 0u) { + return in; + } + return FragIn(b, 1u); +} diff --git a/test/bug/tint/1076.wgsl.expected.hlsl b/test/bug/tint/1076.wgsl.expected.hlsl new file mode 100644 index 0000000000..868773bfbf --- /dev/null +++ b/test/bug/tint/1076.wgsl.expected.hlsl @@ -0,0 +1,30 @@ +struct FragIn { + float a; + uint mask; +}; +struct tint_symbol_2 { + float a : TEXCOORD0; + float b : TEXCOORD1; + uint mask : SV_Coverage; +}; +struct tint_symbol_3 { + float a : SV_Target0; + uint mask : SV_Coverage; +}; + +FragIn main_inner(FragIn tint_symbol, float b) { + if ((tint_symbol.mask == 0u)) { + return tint_symbol; + } + const FragIn tint_symbol_4 = {b, 1u}; + return tint_symbol_4; +} + +tint_symbol_3 main(tint_symbol_2 tint_symbol_1) { + const FragIn tint_symbol_5 = {tint_symbol_1.a, tint_symbol_1.mask}; + const FragIn inner_result = main_inner(tint_symbol_5, tint_symbol_1.b); + tint_symbol_3 wrapper_result = (tint_symbol_3)0; + wrapper_result.a = inner_result.a; + wrapper_result.mask = inner_result.mask; + return wrapper_result; +} diff --git a/test/bug/tint/1076.wgsl.expected.msl b/test/bug/tint/1076.wgsl.expected.msl new file mode 100644 index 0000000000..e1870331a0 --- /dev/null +++ b/test/bug/tint/1076.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +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]]; +}; + +FragIn tint_symbol_inner(FragIn in, float b) { + if ((in.mask == 0u)) { + return in; + } + FragIn const tint_symbol_4 = {.a=b, .mask=1u}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(uint mask [[sample_mask]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + FragIn const tint_symbol_5 = {.a=tint_symbol_1.a, .mask=mask}; + FragIn const inner_result = tint_symbol_inner(tint_symbol_5, tint_symbol_1.b); + tint_symbol_3 wrapper_result = {}; + wrapper_result.a = inner_result.a; + wrapper_result.mask = inner_result.mask; + return wrapper_result; +} + diff --git a/test/bug/tint/1076.wgsl.expected.spvasm b/test/bug/tint/1076.wgsl.expected.spvasm new file mode 100644 index 0000000000..09023fcf28 --- /dev/null +++ b/test/bug/tint/1076.wgsl.expected.spvasm @@ -0,0 +1,82 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 46 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_1 %tint_symbol_5 %tint_symbol_6 %tint_symbol_3 + OpExecutionMode %main OriginUpperLeft + OpName %tint_symbol "tint_symbol" + OpName %tint_symbol_1 "tint_symbol_1" + OpName %tint_symbol_3 "tint_symbol_3" + OpName %tint_symbol_5 "tint_symbol_5" + OpName %tint_symbol_6 "tint_symbol_6" + OpName %FragIn "FragIn" + OpMemberName %FragIn 0 "a" + OpMemberName %FragIn 1 "mask" + OpName %tint_symbol_7 "tint_symbol_7" + OpName %tint_symbol_4 "tint_symbol_4" + OpName %main "main" + OpDecorate %tint_symbol Location 0 + OpDecorate %_arr_uint_uint_1 ArrayStride 4 + OpDecorate %tint_symbol_1 BuiltIn SampleMask + OpDecorate %tint_symbol_3 Location 1 + OpDecorate %tint_symbol_5 Location 0 + OpDecorate %tint_symbol_6 BuiltIn SampleMask + OpMemberDecorate %FragIn 0 Offset 0 + OpMemberDecorate %FragIn 1 Offset 4 + %float = OpTypeFloat 32 +%_ptr_Input_float = OpTypePointer Input %float +%tint_symbol = OpVariable %_ptr_Input_float Input + %uint = OpTypeInt 32 0 + %uint_1 = OpConstant %uint 1 +%_arr_uint_uint_1 = OpTypeArray %uint %uint_1 +%_ptr_Input__arr_uint_uint_1 = OpTypePointer Input %_arr_uint_uint_1 +%tint_symbol_1 = OpVariable %_ptr_Input__arr_uint_uint_1 Input +%tint_symbol_3 = OpVariable %_ptr_Input_float Input +%_ptr_Output_float = OpTypePointer Output %float + %12 = OpConstantNull %float +%tint_symbol_5 = OpVariable %_ptr_Output_float Output %12 +%_ptr_Output__arr_uint_uint_1 = OpTypePointer Output %_arr_uint_uint_1 + %15 = OpConstantNull %_arr_uint_uint_1 +%tint_symbol_6 = OpVariable %_ptr_Output__arr_uint_uint_1 Output %15 + %void = OpTypeVoid + %FragIn = OpTypeStruct %float %uint + %16 = OpTypeFunction %void %FragIn + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 +%_ptr_Output_uint = OpTypePointer Output %uint + %28 = OpTypeFunction %void +%_ptr_Input_uint = OpTypePointer Input %uint + %uint_0 = OpConstant %uint 0 + %bool = OpTypeBool +%tint_symbol_7 = OpFunction %void None %16 +%tint_symbol_4 = OpFunctionParameter %FragIn + %21 = OpLabel + %22 = OpCompositeExtract %float %tint_symbol_4 0 + OpStore %tint_symbol_5 %22 + %26 = OpAccessChain %_ptr_Output_uint %tint_symbol_6 %int_0 + %27 = OpCompositeExtract %uint %tint_symbol_4 1 + OpStore %26 %27 + OpReturn + OpFunctionEnd + %main = OpFunction %void None %28 + %30 = OpLabel + %31 = OpLoad %float %tint_symbol + %33 = OpAccessChain %_ptr_Input_uint %tint_symbol_1 %int_0 + %34 = OpLoad %uint %33 + %35 = OpCompositeConstruct %FragIn %31 %34 + %36 = OpCompositeExtract %uint %35 1 + %38 = OpIEqual %bool %36 %uint_0 + OpSelectionMerge %40 None + OpBranchConditional %38 %41 %40 + %41 = OpLabel + %42 = OpFunctionCall %void %tint_symbol_7 %35 + OpReturn + %40 = OpLabel + %44 = OpLoad %float %tint_symbol_3 + %45 = OpCompositeConstruct %FragIn %44 %uint_1 + %43 = OpFunctionCall %void %tint_symbol_7 %45 + OpReturn + OpFunctionEnd diff --git a/test/bug/tint/1076.wgsl.expected.wgsl b/test/bug/tint/1076.wgsl.expected.wgsl new file mode 100644 index 0000000000..311d625cd5 --- /dev/null +++ b/test/bug/tint/1076.wgsl.expected.wgsl @@ -0,0 +1,14 @@ +struct FragIn { + [[location(0)]] + a : f32; + [[builtin(sample_mask)]] + mask : u32; +}; + +[[stage(fragment)]] +fn main(in : FragIn, [[location(1)]] b : f32) -> FragIn { + if ((in.mask == 0u)) { + return in; + } + return FragIn(b, 1u); +} diff --git a/test/bug/tint/292.wgsl.expected.hlsl b/test/bug/tint/292.wgsl.expected.hlsl index fe6d7b61a9..37debaef76 100644 --- a/test/bug/tint/292.wgsl.expected.hlsl +++ b/test/bug/tint/292.wgsl.expected.hlsl @@ -2,9 +2,15 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol main() { +float4 main_inner() { float3 light = float3(1.200000048f, 1.0f, 2.0f); float3 negative_light = -(light); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol main() { + const float4 inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/bug/tint/292.wgsl.expected.msl b/test/bug/tint/292.wgsl.expected.msl index 8d10ef8d72..4874e057df 100644 --- a/test/bug/tint/292.wgsl.expected.msl +++ b/test/bug/tint/292.wgsl.expected.msl @@ -5,10 +5,16 @@ struct tint_symbol_1 { float4 value [[position]]; }; -vertex tint_symbol_1 tint_symbol() { +float4 tint_symbol_inner() { float3 light = float3(1.200000048f, 1.0f, 2.0f); float3 negative_light = -(light); - tint_symbol_1 const tint_symbol_2 = {.value=float4()}; - return tint_symbol_2; + return float4(); +} + +vertex tint_symbol_1 tint_symbol() { + float4 const inner_result = tint_symbol_inner(); + tint_symbol_1 wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/bug/tint/403.wgsl.expected.hlsl b/test/bug/tint/403.wgsl.expected.hlsl index f7981958e9..69c48bed02 100644 --- a/test/bug/tint/403.wgsl.expected.hlsl +++ b/test/bug/tint/403.wgsl.expected.hlsl @@ -28,8 +28,7 @@ float2x2 tint_symbol_5(uint4 buffer[1], uint offset) { return float2x2(asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy))); } -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint gl_VertexIndex = tint_symbol.gl_VertexIndex; +float4 main_inner(uint gl_VertexIndex) { float2 indexable[3] = (float2[3])0; const float2x2 x_23 = tint_symbol_3(x_20, 0u); const float2x2 x_28 = tint_symbol_5(x_26, 0u); @@ -38,6 +37,12 @@ tint_symbol_2 main(tint_symbol_1 tint_symbol) { indexable = tint_symbol_7; const float2 x_51 = indexable[x_46]; const float2 x_52 = mul(x_51, float2x2((x_23[0u] + x_28[0u]), (x_23[1u] + x_28[1u]))); - const tint_symbol_2 tint_symbol_8 = {float4(x_52.x, x_52.y, 0.0f, 1.0f)}; - return tint_symbol_8; + return float4(x_52.x, x_52.y, 0.0f, 1.0f); +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const float4 inner_result = main_inner(tint_symbol.gl_VertexIndex); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/bug/tint/534.wgsl.expected.hlsl b/test/bug/tint/534.wgsl.expected.hlsl index 9c8466cee5..03518c791a 100644 --- a/test/bug/tint/534.wgsl.expected.hlsl +++ b/test/bug/tint/534.wgsl.expected.hlsl @@ -17,9 +17,7 @@ struct tint_symbol_2 { uint3 GlobalInvocationID : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_2 tint_symbol_1) { - const uint3 GlobalInvocationID = tint_symbol_1.GlobalInvocationID; +void main_inner(uint3 GlobalInvocationID) { int2 tint_tmp; src.GetDimensions(tint_tmp.x, tint_tmp.y); int2 size = tint_tmp; @@ -49,5 +47,10 @@ void main(tint_symbol_2 tint_symbol_1) { } else { output.Store((4u * outputIndex), asuint(uint(0))); } +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_2 tint_symbol_1) { + main_inner(tint_symbol_1.GlobalInvocationID); return; } diff --git a/test/bug/tint/534.wgsl.expected.msl b/test/bug/tint/534.wgsl.expected.msl index c363fc74c1..9cdcaeeeef 100644 --- a/test/bug/tint/534.wgsl.expected.msl +++ b/test/bug/tint/534.wgsl.expected.msl @@ -15,15 +15,15 @@ uint ConvertToFp16FloatValue(float fp32) { return 1u; } -kernel void tint_symbol(texture2d tint_symbol_2 [[texture(0)]], texture2d tint_symbol_3 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(3)]], device OutputBuf& output [[buffer(2)]]) { - int2 size = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void tint_symbol_inner(constant Uniforms& uniforms, device OutputBuf& output, uint3 GlobalInvocationID, texture2d tint_symbol_1, texture2d tint_symbol_2) { + int2 size = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); int2 dstTexCoord = int2(GlobalInvocationID.xy); int2 srcTexCoord = dstTexCoord; if ((uniforms.dstTextureFlipY == 1u)) { srcTexCoord.y = as_type((as_type(as_type((as_type(size.y) - as_type(dstTexCoord.y)))) - as_type(1))); } - float4 srcColor = tint_symbol_2.read(uint2(srcTexCoord), 0); - float4 dstColor = tint_symbol_3.read(uint2(dstTexCoord), 0); + float4 srcColor = tint_symbol_1.read(uint2(srcTexCoord), 0); + float4 dstColor = tint_symbol_2.read(uint2(dstTexCoord), 0); bool success = true; uint4 srcColorBits = 0u; uint4 dstColorBits = uint4(dstColor); @@ -37,6 +37,10 @@ kernel void tint_symbol(texture2d tint_symbol_2 [[texture } else { output.result[outputIndex] = uint(0); } +} + +kernel void tint_symbol(texture2d tint_symbol_3 [[texture(0)]], texture2d tint_symbol_4 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(3)]], device OutputBuf& output [[buffer(2)]]) { + tint_symbol_inner(uniforms, output, GlobalInvocationID, tint_symbol_3, tint_symbol_4); return; } diff --git a/test/bug/tint/744.wgsl.expected.hlsl b/test/bug/tint/744.wgsl.expected.hlsl index c7bab90040..0b1434e1fe 100644 --- a/test/bug/tint/744.wgsl.expected.hlsl +++ b/test/bug/tint/744.wgsl.expected.hlsl @@ -9,9 +9,7 @@ struct tint_symbol_1 { uint3 global_id : SV_DispatchThreadID; }; -[numthreads(2, 2, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 global_id = tint_symbol.global_id; +void main_inner(uint3 global_id) { const uint2 resultCell = uint2(global_id.y, global_id.x); const uint dimInner = uniforms[0].y; const uint dimOutter = uniforms[1].y; @@ -25,5 +23,10 @@ void main(tint_symbol_1 tint_symbol) { } const uint index = (resultCell.y + (resultCell.x * dimOutter)); resultMatrix.Store((4u * index), asuint(result)); +} + +[numthreads(2, 2, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.global_id); return; } diff --git a/test/bug/tint/744.wgsl.expected.msl b/test/bug/tint/744.wgsl.expected.msl index 16ebd85adc..d7964c7fbc 100644 --- a/test/bug/tint/744.wgsl.expected.msl +++ b/test/bug/tint/744.wgsl.expected.msl @@ -10,7 +10,7 @@ struct Matrix { /* 0x0000 */ uint numbers[1]; }; -kernel void tint_symbol(uint3 global_id [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(3)]], const device Matrix& firstMatrix [[buffer(0)]], const device Matrix& secondMatrix [[buffer(1)]], device Matrix& resultMatrix [[buffer(2)]]) { +void tint_symbol_inner(constant Uniforms& uniforms, const device Matrix& firstMatrix, const device Matrix& secondMatrix, device Matrix& resultMatrix, uint3 global_id) { uint2 const resultCell = uint2(global_id.y, global_id.x); uint const dimInner = uniforms.aShape.y; uint const dimOutter = uniforms.outShape.y; @@ -22,6 +22,10 @@ kernel void tint_symbol(uint3 global_id [[thread_position_in_grid]], constant Un } uint const index = (resultCell.y + (resultCell.x * dimOutter)); resultMatrix.numbers[index] = result; +} + +kernel void tint_symbol(uint3 global_id [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(3)]], const device Matrix& firstMatrix [[buffer(0)]], const device Matrix& secondMatrix [[buffer(1)]], device Matrix& resultMatrix [[buffer(2)]]) { + tint_symbol_inner(uniforms, firstMatrix, secondMatrix, resultMatrix, global_id); return; } diff --git a/test/bug/tint/749.spvasm.expected.hlsl b/test/bug/tint/749.spvasm.expected.hlsl index c0db54ce5c..3fef834a3c 100644 --- a/test/bug/tint/749.spvasm.expected.hlsl +++ b/test/bug/tint/749.spvasm.expected.hlsl @@ -57,18 +57,18 @@ void swap_i1_i1_(inout int i, inout int j) { const int x_34_save = x_33; const int x_35 = obj.numbers[x_34_save]; const QuicksortObject x_943 = obj; - const int tint_symbol_5[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_6 = {tint_symbol_5}; - obj = tint_symbol_6; + const int tint_symbol_4[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_5 = {tint_symbol_4}; + obj = tint_symbol_5; obj = x_943; const float2 x_527 = float2(x_526.x, x_526.x); const int x_36_save = x_32; const float3 x_528 = float3(x_524.x, x_524.z, x_524.x); obj.numbers[x_36_save] = x_35; const QuicksortObject x_944 = obj; - const int tint_symbol_7[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_8 = {tint_symbol_7}; - obj = tint_symbol_8; + const int tint_symbol_6[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_7 = {tint_symbol_6}; + obj = tint_symbol_7; obj = x_944; const float3 x_529 = float3(x_526.y, x_526.z, x_526.x); const int x_945 = i; @@ -91,9 +91,9 @@ void swap_i1_i1_(inout int i, inout int j) { obj.numbers[x_36_save] = 0; obj.numbers[x_36_save] = x_949; const QuicksortObject x_950 = obj; - const int tint_symbol_9[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_10 = {tint_symbol_9}; - obj = tint_symbol_10; + const int tint_symbol_8[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_9 = {tint_symbol_8}; + obj = tint_symbol_9; obj = x_950; const float3 x_532 = float3(x_528.x, x_528.y, x_528.x); const int x_951 = obj.numbers[x_34_save]; @@ -149,9 +149,9 @@ int performPartition_i1_i1_(inout int l, inout int h) { const float3 x_536 = float3(x_534.x, x_534.z, x_535.x); j_1 = 10; const QuicksortObject x_960 = obj; - const int tint_symbol_11[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_12 = {tint_symbol_11}; - obj = tint_symbol_12; + const int tint_symbol_10[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_11 = {tint_symbol_10}; + obj = tint_symbol_11; obj = x_960; while (true) { const int x_961 = pivot; @@ -166,9 +166,9 @@ int performPartition_i1_i1_(inout int l, inout int h) { pivot = x_963; x_537 = float2(float3(1.0f, 2.0f, 3.0f).y, float3(1.0f, 2.0f, 3.0f).z); const QuicksortObject x_964 = obj; - const int tint_symbol_13[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_14 = {tint_symbol_13}; - obj = tint_symbol_14; + const int tint_symbol_12[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_13 = {tint_symbol_12}; + obj = tint_symbol_13; obj = x_964; const int x_56 = h; const int x_965 = h; @@ -202,9 +202,9 @@ int performPartition_i1_i1_(inout int l, inout int h) { param_1 = x_971; const int x_62 = obj.numbers[x_61_save]; const QuicksortObject x_972 = obj; - const int tint_symbol_15[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_16 = {tint_symbol_15}; - obj = tint_symbol_16; + const int tint_symbol_14[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_15 = {tint_symbol_14}; + obj = tint_symbol_15; obj = x_972; const int x_63 = pivot; const float2 x_540 = float2(float3(1.0f, 2.0f, 3.0f).y, x_534.z); @@ -262,9 +262,9 @@ int performPartition_i1_i1_(inout int l, inout int h) { param_1 = x_985; } const QuicksortObject x_986 = obj; - const int tint_symbol_17[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_18 = {tint_symbol_17}; - obj = tint_symbol_18; + const int tint_symbol_16[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_17 = {tint_symbol_16}; + obj = tint_symbol_17; obj = x_986; { const int x_987 = h; @@ -297,9 +297,9 @@ int performPartition_i1_i1_(inout int l, inout int h) { obj.numbers[x_42_save] = x_993; const float2 x_549 = float2(x_534.x, x_534.y); const QuicksortObject x_994 = obj; - const int tint_symbol_19[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_20 = {tint_symbol_19}; - obj = tint_symbol_20; + const int tint_symbol_18[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_19 = {tint_symbol_18}; + obj = tint_symbol_19; obj = x_994; const int x_995 = h; h = 0; @@ -367,8 +367,8 @@ void quicksort_() { param_5 = x_1007; h_1 = 9; const int x_1008[10] = stack; - const int tint_symbol_21[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - stack = tint_symbol_21; + const int tint_symbol_20[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + stack = tint_symbol_20; stack = x_1008; const float2 x_556 = float2(float3(1.0f, 2.0f, 3.0f).y, float3(1.0f, 2.0f, 3.0f).y); const int x_1009 = param_5; @@ -401,15 +401,15 @@ void quicksort_() { param_4 = x_1015; const int x_95 = l_1; const QuicksortObject x_1016 = obj; - const int tint_symbol_22[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_23 = {tint_symbol_22}; - obj = tint_symbol_23; + const int tint_symbol_21[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_22 = {tint_symbol_21}; + obj = tint_symbol_22; obj = x_1016; const float3 x_560 = float3(x_559.y, x_559.x, x_557.x); const int x_96_save = x_94; const int x_1017[10] = stack; - const int tint_symbol_24[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - stack = tint_symbol_24; + const int tint_symbol_23[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + stack = tint_symbol_23; stack = x_1017; const float3 x_561 = float3(x_556.y, x_556.y, x_556.y); const int x_1018 = l_1; @@ -459,13 +459,13 @@ void quicksort_() { h_1 = 0; h_1 = x_1028; const int x_1029[10] = stack; - const int tint_symbol_25[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - stack = tint_symbol_25; + const int tint_symbol_24[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + stack = tint_symbol_24; stack = x_1029; const int x_106 = top; const int x_1030[10] = stack; - const int tint_symbol_26[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - stack = tint_symbol_26; + const int tint_symbol_25[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + stack = tint_symbol_25; stack = x_1030; const float2 x_567 = float2(x_558.x, x_564.z); const int x_1031 = param_4; @@ -476,9 +476,9 @@ void quicksort_() { break; } const QuicksortObject x_1032 = obj; - const int tint_symbol_27[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_28 = {tint_symbol_27}; - obj = tint_symbol_28; + const int tint_symbol_26[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_27 = {tint_symbol_26}; + obj = tint_symbol_27; obj = x_1032; const float3 x_568 = float3(x_559.y, x_559.x, x_563.y); const int x_1033 = param_4; @@ -503,8 +503,8 @@ void quicksort_() { stack[x_96_save] = x_1037; const int x_111 = stack[x_110_save]; const int x_1038[10] = stack; - const int tint_symbol_29[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - stack = tint_symbol_29; + const int tint_symbol_28[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + stack = tint_symbol_28; stack = x_1038; const float3 x_571 = float3(x_559.y, x_559.x, x_564.y); const int x_1039 = l_1; @@ -512,8 +512,8 @@ void quicksort_() { l_1 = x_1039; h_1 = x_111; const int x_1040[10] = stack; - const int tint_symbol_30[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - stack = tint_symbol_30; + const int tint_symbol_29[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + stack = tint_symbol_29; stack = x_1040; const float2 x_572 = float2(x_562.y, x_561.y); const int x_1041 = p; @@ -604,8 +604,8 @@ void quicksort_() { stack[x_100_save] = 0; stack[x_100_save] = x_1061; const int x_1062[10] = stack; - const int tint_symbol_31[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - stack = tint_symbol_31; + const int tint_symbol_30[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + stack = tint_symbol_30; stack = x_1062; const float2 x_584 = float2(x_569.z, x_569.y); const float3 x_585 = float3(x_580.y, x_577.x, x_577.x); @@ -644,8 +644,8 @@ void quicksort_() { h_1 = x_1070; top = x_133; const int x_1071[10] = stack; - const int tint_symbol_32[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - stack = tint_symbol_32; + const int tint_symbol_31[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + stack = tint_symbol_31; stack = x_1071; const int x_134 = p; const float2 x_590 = float2(x_576.x, x_573.y); @@ -670,9 +670,9 @@ void quicksort_() { stack[x_96_save] = x_1076; const float2 x_592 = float2(float3(1.0f, 2.0f, 3.0f).x, float3(1.0f, 2.0f, 3.0f).y); const QuicksortObject x_1077 = obj; - const int tint_symbol_33[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_34 = {tint_symbol_33}; - obj = tint_symbol_34; + const int tint_symbol_32[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_33 = {tint_symbol_32}; + obj = tint_symbol_33; obj = x_1077; const int x_137 = p; const int x_1078 = stack[x_114_save]; @@ -737,8 +737,8 @@ void quicksort_() { const float2 x_601 = float2(x_563.x, x_563.y); stack[x_147_save] = asint((1u + asuint(x_145))); const int x_1093[10] = stack; - const int tint_symbol_35[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - stack = tint_symbol_35; + const int tint_symbol_34[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + stack = tint_symbol_34; stack = x_1093; const int x_148 = top; const int x_1094 = stack[x_114_save]; @@ -746,8 +746,8 @@ void quicksort_() { stack[x_114_save] = x_1094; const float2 x_602 = float2(x_565.y, x_599.y); const int x_1095[10] = stack; - const int tint_symbol_36[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - stack = tint_symbol_36; + const int tint_symbol_35[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + stack = tint_symbol_35; stack = x_1095; const int x_149 = (x_148 + asint(1u)); const int x_1096 = stack[x_147_save]; @@ -782,9 +782,9 @@ void quicksort_() { l_1 = x_1103; const float2 x_604 = float2(x_563.z, x_564.x); const QuicksortObject x_1104 = obj; - const int tint_symbol_37[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_38 = {tint_symbol_37}; - obj = tint_symbol_38; + const int tint_symbol_36[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_37 = {tint_symbol_36}; + obj = tint_symbol_37; obj = x_1104; } } @@ -803,15 +803,15 @@ void main_1() { uv = x_717; i_2 = 0; const QuicksortObject x_721 = obj; - const int tint_symbol_39[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_40 = {tint_symbol_39}; - obj = tint_symbol_40; + const int tint_symbol_38[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_39 = {tint_symbol_38}; + obj = tint_symbol_39; obj = x_721; if (true) { const QuicksortObject x_722 = obj; - const int tint_symbol_41[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_42 = {tint_symbol_41}; - obj = tint_symbol_42; + const int tint_symbol_40[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_41 = {tint_symbol_40}; + obj = tint_symbol_41; obj = x_722; const float2 x_431 = float2(float3(1.0f, 2.0f, 3.0f).x, float3(1.0f, 2.0f, 3.0f).x); const int x_158 = i_2; @@ -823,15 +823,15 @@ void main_1() { color = x_725; const float2 x_432 = float2(x_431.y, x_431.y); const QuicksortObject x_726 = obj; - const int tint_symbol_43[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_44 = {tint_symbol_43}; - obj = tint_symbol_44; + const int tint_symbol_42[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_43 = {tint_symbol_42}; + obj = tint_symbol_43; obj = x_726; } const QuicksortObject x_756 = obj; - const int tint_symbol_45[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_46 = {tint_symbol_45}; - obj = tint_symbol_46; + const int tint_symbol_44[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_45 = {tint_symbol_44}; + obj = tint_symbol_45; obj = x_756; const float2 x_446 = float2(float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).x); const int x_757 = i_2; @@ -839,9 +839,9 @@ void main_1() { i_2 = x_757; quicksort_(); const QuicksortObject x_758 = obj; - const int tint_symbol_47[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_48 = {tint_symbol_47}; - obj = tint_symbol_48; + const int tint_symbol_46[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_47 = {tint_symbol_46}; + obj = tint_symbol_47; obj = x_758; const float4 x_184 = gl_FragCoord; const float2 x_759 = uv; @@ -854,18 +854,18 @@ void main_1() { const float2 x_185 = float2(x_184.x, x_184.y); const float3 x_448 = float3(x_185.y, x_446.y, x_446.y); const QuicksortObject x_761 = obj; - const int tint_symbol_49[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_50 = {tint_symbol_49}; - obj = tint_symbol_50; + const int tint_symbol_48[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_49 = {tint_symbol_48}; + obj = tint_symbol_49; obj = x_761; const float2 x_762 = uv; uv = float2(0.0f, 0.0f); uv = x_762; const float2 x_191 = asfloat(x_188[0].xy); const QuicksortObject x_763 = obj; - const int tint_symbol_51[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_52 = {tint_symbol_51}; - obj = tint_symbol_52; + const int tint_symbol_50[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_51 = {tint_symbol_50}; + obj = tint_symbol_51; obj = x_763; const float3 x_449 = float3(x_184.y, float3(1.0f, 2.0f, 3.0f).z, x_184.w); const float3 x_764 = color; @@ -873,9 +873,9 @@ void main_1() { color = x_764; const float2 x_192 = (x_185 / x_191); const QuicksortObject x_765 = obj; - const int tint_symbol_53[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_54 = {tint_symbol_53}; - obj = tint_symbol_54; + const int tint_symbol_52[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_53 = {tint_symbol_52}; + obj = tint_symbol_53; obj = x_765; const float2 x_450 = float2(x_447.x, x_185.y); const float3 x_766 = color; @@ -891,18 +891,18 @@ void main_1() { color = x_768; const float3 x_451 = float3(x_185.x, x_185.y, x_446.y); const QuicksortObject x_769 = obj; - const int tint_symbol_55[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_56 = {tint_symbol_55}; - obj = tint_symbol_56; + const int tint_symbol_54[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_55 = {tint_symbol_54}; + obj = tint_symbol_55; obj = x_769; const int x_770 = obj.numbers[0u]; obj.numbers[0u] = 0; obj.numbers[0u] = x_770; const int x_201 = obj.numbers[0u]; const QuicksortObject x_771 = obj; - const int tint_symbol_57[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_58 = {tint_symbol_57}; - obj = tint_symbol_58; + const int tint_symbol_56[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_57 = {tint_symbol_56}; + obj = tint_symbol_57; obj = x_771; const int x_772 = obj.numbers[0u]; obj.numbers[0u] = 0; @@ -916,9 +916,9 @@ void main_1() { i_2 = 0; i_2 = x_774; const QuicksortObject x_775 = obj; - const int tint_symbol_59[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_60 = {tint_symbol_59}; - obj = tint_symbol_60; + const int tint_symbol_58[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_59 = {tint_symbol_58}; + obj = tint_symbol_59; obj = x_775; const float3 x_453 = float3(x_451.x, x_450.x, x_450.y); color.x = (x_206 + float(x_201)); @@ -935,9 +935,9 @@ void main_1() { uv.x = 0.0f; uv.x = x_778; const QuicksortObject x_779 = obj; - const int tint_symbol_61[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_62 = {tint_symbol_61}; - obj = tint_symbol_62; + const int tint_symbol_60[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_61 = {tint_symbol_60}; + obj = tint_symbol_61; obj = x_779; if ((x_210 > 0.25f)) { const int x_780 = i_2; @@ -952,18 +952,18 @@ void main_1() { uv.x = x_782; const int x_216 = obj.numbers[1]; const QuicksortObject x_783 = obj; - const int tint_symbol_63[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_64 = {tint_symbol_63}; - obj = tint_symbol_64; + const int tint_symbol_62[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_63 = {tint_symbol_62}; + obj = tint_symbol_63; obj = x_783; const float2 x_457 = float2(x_454.x, x_454.x); const float2 x_784 = uv; uv = float2(0.0f, 0.0f); uv = x_784; const QuicksortObject x_785 = obj; - const int tint_symbol_65[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_66 = {tint_symbol_65}; - obj = tint_symbol_66; + const int tint_symbol_64[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_65 = {tint_symbol_64}; + obj = tint_symbol_65; obj = x_785; const float2 x_458 = float2(float3(1.0f, 2.0f, 3.0f).z, float2(0.0f, 0.0f).y); const int x_786 = i_2; @@ -1081,9 +1081,9 @@ void main_1() { color.x = 0.0f; color.x = x_816; const QuicksortObject x_817 = obj; - const int tint_symbol_67[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_68 = {tint_symbol_67}; - obj = tint_symbol_68; + const int tint_symbol_66[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_67 = {tint_symbol_66}; + obj = tint_symbol_67; obj = x_817; const float3 x_468 = float3(x_467.x, x_467.x, x_467.x); const float x_818 = uv[0]; @@ -1192,9 +1192,9 @@ void main_1() { uv[0] = x_844; const float3 x_482 = float3(x_455.x, x_475.y, x_455.y); const QuicksortObject x_845 = obj; - const int tint_symbol_69[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_70 = {tint_symbol_69}; - obj = tint_symbol_70; + const int tint_symbol_68[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_69 = {tint_symbol_68}; + obj = tint_symbol_69; obj = x_845; const float x_846 = uv.y; uv.y = 0.0f; @@ -1265,9 +1265,9 @@ void main_1() { obj.numbers[6u] = x_863; const float2 x_490 = float2(x_480.z, x_480.z); const QuicksortObject x_864 = obj; - const int tint_symbol_71[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_72 = {tint_symbol_71}; - obj = tint_symbol_72; + const int tint_symbol_70[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_71 = {tint_symbol_70}; + obj = tint_symbol_71; obj = x_864; color.y = (float(x_280) + x_283); const float x_865 = color.x; @@ -1284,9 +1284,9 @@ void main_1() { color.x = x_867; const float x_287 = uv.y; const QuicksortObject x_868 = obj; - const int tint_symbol_73[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_74 = {tint_symbol_73}; - obj = tint_symbol_74; + const int tint_symbol_72[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_73 = {tint_symbol_72}; + obj = tint_symbol_73; obj = x_868; const float2 x_493 = float2(x_475.x, x_475.y); const float x_869 = uv[0]; @@ -1446,9 +1446,9 @@ void main_1() { uv.x = 0.0f; uv.x = x_910; const QuicksortObject x_911 = obj; - const int tint_symbol_75[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_76 = {tint_symbol_75}; - obj = tint_symbol_76; + const int tint_symbol_74[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_75 = {tint_symbol_74}; + obj = tint_symbol_75; obj = x_911; const float3 x_513 = float3(x_505.z, x_505.x, x_448.x); const int x_912 = obj.numbers[8]; @@ -1500,14 +1500,14 @@ void main_1() { uv.x = 0.0f; uv.x = x_923; const QuicksortObject x_924 = obj; - const int tint_symbol_77[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_78 = {tint_symbol_77}; - obj = tint_symbol_78; + const int tint_symbol_76[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_77 = {tint_symbol_76}; + obj = tint_symbol_77; obj = x_924; const QuicksortObject x_925 = obj; - const int tint_symbol_79[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_80 = {tint_symbol_79}; - obj = tint_symbol_80; + const int tint_symbol_78[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_79 = {tint_symbol_78}; + obj = tint_symbol_79; obj = x_925; const float x_926 = color.y; color.y = 0.0f; @@ -1526,9 +1526,9 @@ void main_1() { uv.x = x_929; x_GLF_color = x_330; const QuicksortObject x_930 = obj; - const int tint_symbol_81[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - const QuicksortObject tint_symbol_82 = {tint_symbol_81}; - obj = tint_symbol_82; + const int tint_symbol_80[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + const QuicksortObject tint_symbol_81 = {tint_symbol_80}; + obj = tint_symbol_81; obj = x_930; const float3 x_522 = float3(x_330.w, x_330.y, x_493.x); const float x_931 = color.x; @@ -1547,11 +1547,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_83 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_83; + const main_out tint_symbol_82 = {x_GLF_color}; + return tint_symbol_82; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/bug/tint/749.spvasm.expected.msl b/test/bug/tint/749.spvasm.expected.msl index 51883a63c5..46339a7d02 100644 --- a/test/bug/tint/749.spvasm.expected.msl +++ b/test/bug/tint/749.spvasm.expected.msl @@ -13,11 +13,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +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_83) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_81) { int temp = 0; int const x_932 = temp; temp = 0; @@ -35,10 +35,10 @@ void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObjec temp = 0; temp = x_935; int const x_30_save = x_28; - int const x_936 = (*(tint_symbol_83)).numbers.arr[x_30_save]; - (*(tint_symbol_83)).numbers.arr[x_30_save] = 0; - (*(tint_symbol_83)).numbers.arr[x_30_save] = x_936; - int const x_31 = (*(tint_symbol_83)).numbers.arr[x_30_save]; + int const x_936 = (*(tint_symbol_81)).numbers.arr[x_30_save]; + (*(tint_symbol_81)).numbers.arr[x_30_save] = 0; + (*(tint_symbol_81)).numbers.arr[x_30_save] = x_936; + int const x_31 = (*(tint_symbol_81)).numbers.arr[x_30_save]; int const x_937 = temp; temp = 0; temp = x_937; @@ -51,33 +51,33 @@ void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObjec *(i) = 0; *(i) = x_939; int const x_32 = *(i); - int const x_940 = (*(tint_symbol_83)).numbers.arr[x_30_save]; - (*(tint_symbol_83)).numbers.arr[x_30_save] = 0; - (*(tint_symbol_83)).numbers.arr[x_30_save] = x_940; + int const x_940 = (*(tint_symbol_81)).numbers.arr[x_30_save]; + (*(tint_symbol_81)).numbers.arr[x_30_save] = 0; + (*(tint_symbol_81)).numbers.arr[x_30_save] = x_940; int const x_33 = *(j); int const x_941 = *(i); *(i) = 0; *(i) = x_941; float3 const x_526 = float3(x_525.x, x_525.z, x_525.z); - int const x_942 = (*(tint_symbol_83)).numbers.arr[x_30_save]; - (*(tint_symbol_83)).numbers.arr[x_30_save] = 0; - (*(tint_symbol_83)).numbers.arr[x_30_save] = x_942; + int const x_942 = (*(tint_symbol_81)).numbers.arr[x_30_save]; + (*(tint_symbol_81)).numbers.arr[x_30_save] = 0; + (*(tint_symbol_81)).numbers.arr[x_30_save] = x_942; int const x_34_save = x_33; - int const x_35 = (*(tint_symbol_83)).numbers.arr[x_34_save]; - QuicksortObject const x_943 = *(tint_symbol_83); - tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_5 = {.numbers=tint_symbol_4}; - *(tint_symbol_83) = tint_symbol_5; - *(tint_symbol_83) = x_943; + int const x_35 = (*(tint_symbol_81)).numbers.arr[x_34_save]; + QuicksortObject const x_943 = *(tint_symbol_81); + tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_3 = {.numbers=tint_symbol_2}; + *(tint_symbol_81) = tint_symbol_3; + *(tint_symbol_81) = x_943; float2 const x_527 = float2(x_526.x, x_526.x); int const x_36_save = x_32; float3 const x_528 = float3(x_524.x, x_524.z, x_524.x); - (*(tint_symbol_83)).numbers.arr[x_36_save] = x_35; - QuicksortObject const x_944 = *(tint_symbol_83); - tint_array_wrapper const tint_symbol_6 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_7 = {.numbers=tint_symbol_6}; - *(tint_symbol_83) = tint_symbol_7; - *(tint_symbol_83) = x_944; + (*(tint_symbol_81)).numbers.arr[x_36_save] = x_35; + QuicksortObject const x_944 = *(tint_symbol_81); + tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_5 = {.numbers=tint_symbol_4}; + *(tint_symbol_81) = tint_symbol_5; + *(tint_symbol_81) = x_944; float3 const x_529 = float3(x_526.y, x_526.z, x_526.x); int const x_945 = *(i); *(i) = 0; @@ -87,31 +87,31 @@ void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObjec temp = 0; temp = x_946; float2 const x_530 = float2(x_529.z, x_529.y); - int const x_947 = (*(tint_symbol_83)).numbers.arr[x_34_save]; - (*(tint_symbol_83)).numbers.arr[x_34_save] = 0; - (*(tint_symbol_83)).numbers.arr[x_34_save] = x_947; + int const x_947 = (*(tint_symbol_81)).numbers.arr[x_34_save]; + (*(tint_symbol_81)).numbers.arr[x_34_save] = 0; + (*(tint_symbol_81)).numbers.arr[x_34_save] = x_947; int const x_38 = temp; int const x_948 = *(j); *(j) = 0; *(j) = x_948; float3 const x_531 = float3(x_527.x, x_526.y, x_526.x); - int const x_949 = (*(tint_symbol_83)).numbers.arr[x_36_save]; - (*(tint_symbol_83)).numbers.arr[x_36_save] = 0; - (*(tint_symbol_83)).numbers.arr[x_36_save] = x_949; - QuicksortObject const x_950 = *(tint_symbol_83); - tint_array_wrapper const tint_symbol_8 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_9 = {.numbers=tint_symbol_8}; - *(tint_symbol_83) = tint_symbol_9; - *(tint_symbol_83) = x_950; + int const x_949 = (*(tint_symbol_81)).numbers.arr[x_36_save]; + (*(tint_symbol_81)).numbers.arr[x_36_save] = 0; + (*(tint_symbol_81)).numbers.arr[x_36_save] = x_949; + QuicksortObject const x_950 = *(tint_symbol_81); + tint_array_wrapper const tint_symbol_6 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_7 = {.numbers=tint_symbol_6}; + *(tint_symbol_81) = tint_symbol_7; + *(tint_symbol_81) = x_950; float3 const x_532 = float3(x_528.x, x_528.y, x_528.x); - int const x_951 = (*(tint_symbol_83)).numbers.arr[x_34_save]; - (*(tint_symbol_83)).numbers.arr[x_34_save] = 0; - (*(tint_symbol_83)).numbers.arr[x_34_save] = x_951; - (*(tint_symbol_83)).numbers.arr[x_37] = x_38; + int const x_951 = (*(tint_symbol_81)).numbers.arr[x_34_save]; + (*(tint_symbol_81)).numbers.arr[x_34_save] = 0; + (*(tint_symbol_81)).numbers.arr[x_34_save] = x_951; + (*(tint_symbol_81)).numbers.arr[x_37] = x_38; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_84) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_82) { int param_3 = 0; int i_1 = 0; int j_1 = 0; @@ -129,10 +129,10 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui *(l) = 0; *(l) = x_953; int const x_42_save = x_41; - int const x_954 = (*(tint_symbol_84)).numbers.arr[x_42_save]; - (*(tint_symbol_84)).numbers.arr[x_42_save] = 0; - (*(tint_symbol_84)).numbers.arr[x_42_save] = x_954; - int const x_43 = (*(tint_symbol_84)).numbers.arr[x_42_save]; + int const x_954 = (*(tint_symbol_82)).numbers.arr[x_42_save]; + (*(tint_symbol_82)).numbers.arr[x_42_save] = 0; + (*(tint_symbol_82)).numbers.arr[x_42_save] = x_954; + int const x_43 = (*(tint_symbol_82)).numbers.arr[x_42_save]; int const x_955 = param_3; param_3 = 0; param_3 = x_955; @@ -156,11 +156,11 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_49 = *(l); float3 const x_536 = float3(x_534.x, x_534.z, x_535.x); j_1 = 10; - QuicksortObject const x_960 = *(tint_symbol_84); - tint_array_wrapper const tint_symbol_10 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_11 = {.numbers=tint_symbol_10}; - *(tint_symbol_84) = tint_symbol_11; - *(tint_symbol_84) = x_960; + QuicksortObject const x_960 = *(tint_symbol_82); + tint_array_wrapper const tint_symbol_8 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_9 = {.numbers=tint_symbol_8}; + *(tint_symbol_82) = tint_symbol_9; + *(tint_symbol_82) = x_960; while (true) { int const x_961 = pivot; pivot = 0; @@ -173,11 +173,11 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui pivot = 0; pivot = x_963; x_537 = float2(float3(1.0f, 2.0f, 3.0f).y, float3(1.0f, 2.0f, 3.0f).z); - QuicksortObject const x_964 = *(tint_symbol_84); - tint_array_wrapper const tint_symbol_12 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_13 = {.numbers=tint_symbol_12}; - *(tint_symbol_84) = tint_symbol_13; - *(tint_symbol_84) = x_964; + QuicksortObject const x_964 = *(tint_symbol_82); + tint_array_wrapper const tint_symbol_10 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_11 = {.numbers=tint_symbol_10}; + *(tint_symbol_82) = tint_symbol_11; + *(tint_symbol_82) = x_964; int const x_56 = *(h); int const x_965 = *(h); *(h) = 0; @@ -197,9 +197,9 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_60 = j_1; - int const x_969 = (*(tint_symbol_84)).numbers.arr[x_42_save]; - (*(tint_symbol_84)).numbers.arr[x_42_save] = 0; - (*(tint_symbol_84)).numbers.arr[x_42_save] = x_969; + int const x_969 = (*(tint_symbol_82)).numbers.arr[x_42_save]; + (*(tint_symbol_82)).numbers.arr[x_42_save] = 0; + (*(tint_symbol_82)).numbers.arr[x_42_save] = x_969; int const x_61_save = x_60; int const x_970 = *(h); *(h) = 0; @@ -208,12 +208,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_971 = param_1; param_1 = 0; param_1 = x_971; - int const x_62 = (*(tint_symbol_84)).numbers.arr[x_61_save]; - QuicksortObject const x_972 = *(tint_symbol_84); - tint_array_wrapper const tint_symbol_14 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_15 = {.numbers=tint_symbol_14}; - *(tint_symbol_84) = tint_symbol_15; - *(tint_symbol_84) = x_972; + int const x_62 = (*(tint_symbol_82)).numbers.arr[x_61_save]; + QuicksortObject const x_972 = *(tint_symbol_82); + tint_array_wrapper const tint_symbol_12 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_13 = {.numbers=tint_symbol_12}; + *(tint_symbol_82) = tint_symbol_13; + *(tint_symbol_82) = x_972; int const x_63 = pivot; float2 const x_540 = float2(float3(1.0f, 2.0f, 3.0f).y, x_534.z); int const x_973 = i_1; @@ -265,16 +265,16 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_984 = param_3; param_3 = 0; param_3 = x_984; - swap_i1_i1_(&(param), &(param_1), tint_symbol_84); + swap_i1_i1_(&(param), &(param_1), tint_symbol_82); int const x_985 = param_1; param_1 = 0; param_1 = x_985; } - QuicksortObject const x_986 = *(tint_symbol_84); - tint_array_wrapper const tint_symbol_16 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_17 = {.numbers=tint_symbol_16}; - *(tint_symbol_84) = tint_symbol_17; - *(tint_symbol_84) = x_986; + QuicksortObject const x_986 = *(tint_symbol_82); + tint_array_wrapper const tint_symbol_14 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_15 = {.numbers=tint_symbol_14}; + *(tint_symbol_82) = tint_symbol_15; + *(tint_symbol_82) = x_986; { int const x_987 = *(h); *(h) = 0; @@ -284,9 +284,9 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui *(h) = 0; *(h) = x_988; float3 const x_547 = float3(x_539.x, x_541.z, x_541.z); - int const x_989 = (*(tint_symbol_84)).numbers.arr[x_61_save]; - (*(tint_symbol_84)).numbers.arr[x_61_save] = 0; - (*(tint_symbol_84)).numbers.arr[x_61_save] = x_989; + int const x_989 = (*(tint_symbol_82)).numbers.arr[x_61_save]; + (*(tint_symbol_82)).numbers.arr[x_61_save] = 0; + (*(tint_symbol_82)).numbers.arr[x_61_save] = x_989; int const x_990 = param; param = 0; param = x_990; @@ -295,21 +295,21 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_1 = 0; param_1 = x_991; float3 const x_548 = float3(x_541.y, x_541.z, x_541.x); - int const x_992 = (*(tint_symbol_84)).numbers.arr[x_61_save]; - (*(tint_symbol_84)).numbers.arr[x_61_save] = 0; - (*(tint_symbol_84)).numbers.arr[x_61_save] = x_992; + int const x_992 = (*(tint_symbol_82)).numbers.arr[x_61_save]; + (*(tint_symbol_82)).numbers.arr[x_61_save] = 0; + (*(tint_symbol_82)).numbers.arr[x_61_save] = x_992; } } int const x_76 = i_1; - int const x_993 = (*(tint_symbol_84)).numbers.arr[x_42_save]; - (*(tint_symbol_84)).numbers.arr[x_42_save] = 0; - (*(tint_symbol_84)).numbers.arr[x_42_save] = x_993; + int const x_993 = (*(tint_symbol_82)).numbers.arr[x_42_save]; + (*(tint_symbol_82)).numbers.arr[x_42_save] = 0; + (*(tint_symbol_82)).numbers.arr[x_42_save] = x_993; float2 const x_549 = float2(x_534.x, x_534.y); - QuicksortObject const x_994 = *(tint_symbol_84); - tint_array_wrapper const tint_symbol_18 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_19 = {.numbers=tint_symbol_18}; - *(tint_symbol_84) = tint_symbol_19; - *(tint_symbol_84) = x_994; + QuicksortObject const x_994 = *(tint_symbol_82); + tint_array_wrapper const tint_symbol_16 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_17 = {.numbers=tint_symbol_16}; + *(tint_symbol_82) = tint_symbol_17; + *(tint_symbol_82) = x_994; int const x_995 = *(h); *(h) = 0; *(h) = x_995; @@ -343,7 +343,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_1002 = *(h); *(h) = 0; *(h) = x_1002; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_84); + swap_i1_i1_(&(param_2), &(param_3), tint_symbol_82); int const x_1003 = *(l); *(l) = 0; *(l) = x_1003; @@ -362,7 +362,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui return x_83; } -void quicksort_(thread QuicksortObject* const tint_symbol_85) { +void quicksort_(thread QuicksortObject* const tint_symbol_83) { int param_4 = 0; int h_1 = 0; int p = 0; @@ -376,8 +376,8 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { param_5 = x_1007; h_1 = 9; tint_array_wrapper const x_1008 = stack; - tint_array_wrapper const tint_symbol_20 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - stack = tint_symbol_20; + tint_array_wrapper const tint_symbol_18 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + stack = tint_symbol_18; stack = x_1008; float2 const x_556 = float2(float3(1.0f, 2.0f, 3.0f).y, float3(1.0f, 2.0f, 3.0f).y); int const x_1009 = param_5; @@ -409,16 +409,16 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { param_4 = 0; param_4 = x_1015; int const x_95 = l_1; - QuicksortObject const x_1016 = *(tint_symbol_85); - tint_array_wrapper const tint_symbol_21 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_22 = {.numbers=tint_symbol_21}; - *(tint_symbol_85) = tint_symbol_22; - *(tint_symbol_85) = x_1016; + QuicksortObject const x_1016 = *(tint_symbol_83); + tint_array_wrapper const tint_symbol_19 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_20 = {.numbers=tint_symbol_19}; + *(tint_symbol_83) = tint_symbol_20; + *(tint_symbol_83) = x_1016; float3 const x_560 = float3(x_559.y, x_559.x, x_557.x); int const x_96_save = x_94; tint_array_wrapper const x_1017 = stack; - tint_array_wrapper const tint_symbol_23 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - stack = tint_symbol_23; + tint_array_wrapper const tint_symbol_21 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + stack = tint_symbol_21; stack = x_1017; float3 const x_561 = float3(x_556.y, x_556.y, x_556.y); int const x_1018 = l_1; @@ -468,13 +468,13 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { h_1 = 0; h_1 = x_1028; tint_array_wrapper const x_1029 = stack; - tint_array_wrapper const tint_symbol_24 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - stack = tint_symbol_24; + tint_array_wrapper const tint_symbol_22 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + stack = tint_symbol_22; stack = x_1029; int const x_106 = top; tint_array_wrapper const x_1030 = stack; - tint_array_wrapper const tint_symbol_25 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - stack = tint_symbol_25; + tint_array_wrapper const tint_symbol_23 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + stack = tint_symbol_23; stack = x_1030; float2 const x_567 = float2(x_558.x, x_564.z); int const x_1031 = param_4; @@ -484,11 +484,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { } else { break; } - QuicksortObject const x_1032 = *(tint_symbol_85); - tint_array_wrapper const tint_symbol_26 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_27 = {.numbers=tint_symbol_26}; - *(tint_symbol_85) = tint_symbol_27; - *(tint_symbol_85) = x_1032; + QuicksortObject const x_1032 = *(tint_symbol_83); + tint_array_wrapper const tint_symbol_24 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_25 = {.numbers=tint_symbol_24}; + *(tint_symbol_83) = tint_symbol_25; + *(tint_symbol_83) = x_1032; float3 const x_568 = float3(x_559.y, x_559.x, x_563.y); int const x_1033 = param_4; param_4 = 0; @@ -512,8 +512,8 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { stack.arr[x_96_save] = x_1037; int const x_111 = stack.arr[x_110_save]; tint_array_wrapper const x_1038 = stack; - tint_array_wrapper const tint_symbol_28 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - stack = tint_symbol_28; + tint_array_wrapper const tint_symbol_26 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + stack = tint_symbol_26; stack = x_1038; float3 const x_571 = float3(x_559.y, x_559.x, x_564.y); int const x_1039 = l_1; @@ -521,8 +521,8 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { l_1 = x_1039; h_1 = x_111; tint_array_wrapper const x_1040 = stack; - tint_array_wrapper const tint_symbol_29 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - stack = tint_symbol_29; + tint_array_wrapper const tint_symbol_27 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + stack = tint_symbol_27; stack = x_1040; float2 const x_572 = float2(x_562.y, x_561.y); int const x_1041 = p; @@ -573,7 +573,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { int const x_1051 = stack.arr[x_100_save]; stack.arr[x_100_save] = 0; stack.arr[x_100_save] = x_1051; - int const x_121 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_85); + int const x_121 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_83); float2 const x_579 = float2(x_567.x, x_568.x); int const x_1052 = param_5; param_5 = 0; @@ -614,8 +614,8 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { stack.arr[x_100_save] = 0; stack.arr[x_100_save] = x_1061; tint_array_wrapper const x_1062 = stack; - tint_array_wrapper const tint_symbol_30 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - stack = tint_symbol_30; + tint_array_wrapper const tint_symbol_28 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + stack = tint_symbol_28; stack = x_1062; float2 const x_584 = float2(x_569.z, x_569.y); float3 const x_585 = float3(x_580.y, x_577.x, x_577.x); @@ -654,8 +654,8 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { h_1 = x_1070; top = x_133; tint_array_wrapper const x_1071 = stack; - tint_array_wrapper const tint_symbol_31 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - stack = tint_symbol_31; + tint_array_wrapper const tint_symbol_29 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + stack = tint_symbol_29; stack = x_1071; int const x_134 = p; float2 const x_590 = float2(x_576.x, x_573.y); @@ -679,11 +679,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { stack.arr[x_96_save] = 0; stack.arr[x_96_save] = x_1076; float2 const x_592 = float2(float3(1.0f, 2.0f, 3.0f).x, float3(1.0f, 2.0f, 3.0f).y); - QuicksortObject const x_1077 = *(tint_symbol_85); - tint_array_wrapper const tint_symbol_32 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_33 = {.numbers=tint_symbol_32}; - *(tint_symbol_85) = tint_symbol_33; - *(tint_symbol_85) = x_1077; + QuicksortObject const x_1077 = *(tint_symbol_83); + tint_array_wrapper const tint_symbol_30 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_31 = {.numbers=tint_symbol_30}; + *(tint_symbol_83) = tint_symbol_31; + *(tint_symbol_83) = x_1077; int const x_137 = p; int const x_1078 = stack.arr[x_114_save]; stack.arr[x_114_save] = 0; @@ -747,8 +747,8 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { float2 const x_601 = float2(x_563.x, x_563.y); stack.arr[x_147_save] = as_type((1u + as_type(x_145))); tint_array_wrapper const x_1093 = stack; - tint_array_wrapper const tint_symbol_34 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - stack = tint_symbol_34; + tint_array_wrapper const tint_symbol_32 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + stack = tint_symbol_32; stack = x_1093; int const x_148 = top; int const x_1094 = stack.arr[x_114_save]; @@ -756,8 +756,8 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { stack.arr[x_114_save] = x_1094; float2 const x_602 = float2(x_565.y, x_599.y); tint_array_wrapper const x_1095 = stack; - tint_array_wrapper const tint_symbol_35 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - stack = tint_symbol_35; + tint_array_wrapper const tint_symbol_33 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + stack = tint_symbol_33; stack = x_1095; int const x_149 = as_type((as_type(x_148) + as_type(as_type(1u)))); int const x_1096 = stack.arr[x_147_save]; @@ -791,11 +791,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { l_1 = 0; l_1 = x_1103; float2 const x_604 = float2(x_563.z, x_564.x); - QuicksortObject const x_1104 = *(tint_symbol_85); - tint_array_wrapper const tint_symbol_36 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_37 = {.numbers=tint_symbol_36}; - *(tint_symbol_85) = tint_symbol_37; - *(tint_symbol_85) = x_1104; + QuicksortObject const x_1104 = *(tint_symbol_83); + tint_array_wrapper const tint_symbol_34 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_35 = {.numbers=tint_symbol_34}; + *(tint_symbol_83) = tint_symbol_35; + *(tint_symbol_83) = x_1104; } } int const x_1105 = h_1; @@ -804,7 +804,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { return; } -void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, thread float4* const tint_symbol_87, thread float4* const tint_symbol_88) { +void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_84, thread float4* const tint_symbol_85, thread float4* const tint_symbol_86) { float3 color = 0.0f; int i_2 = 0; float2 uv = 0.0f; @@ -812,17 +812,17 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, uv = float2(0.0f, 0.0f); uv = x_717; i_2 = 0; - QuicksortObject const x_721 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_38 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_39 = {.numbers=tint_symbol_38}; - *(tint_symbol_86) = tint_symbol_39; - *(tint_symbol_86) = x_721; + QuicksortObject const x_721 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_36 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_37 = {.numbers=tint_symbol_36}; + *(tint_symbol_84) = tint_symbol_37; + *(tint_symbol_84) = x_721; if (true) { - QuicksortObject const x_722 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_40 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_41 = {.numbers=tint_symbol_40}; - *(tint_symbol_86) = tint_symbol_41; - *(tint_symbol_86) = x_722; + QuicksortObject const x_722 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_38 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_39 = {.numbers=tint_symbol_38}; + *(tint_symbol_84) = tint_symbol_39; + *(tint_symbol_84) = x_722; float2 const x_431 = float2(float3(1.0f, 2.0f, 3.0f).x, float3(1.0f, 2.0f, 3.0f).x); int const x_158 = i_2; float2 const x_723 = uv; @@ -832,28 +832,28 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, color = float3(0.0f, 0.0f, 0.0f); color = x_725; float2 const x_432 = float2(x_431.y, x_431.y); - QuicksortObject const x_726 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_42 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_43 = {.numbers=tint_symbol_42}; - *(tint_symbol_86) = tint_symbol_43; - *(tint_symbol_86) = x_726; + QuicksortObject const x_726 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_40 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_41 = {.numbers=tint_symbol_40}; + *(tint_symbol_84) = tint_symbol_41; + *(tint_symbol_84) = x_726; } - QuicksortObject const x_756 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_44 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_45 = {.numbers=tint_symbol_44}; - *(tint_symbol_86) = tint_symbol_45; - *(tint_symbol_86) = x_756; + QuicksortObject const x_756 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_42 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_43 = {.numbers=tint_symbol_42}; + *(tint_symbol_84) = tint_symbol_43; + *(tint_symbol_84) = x_756; float2 const x_446 = float2(float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).x); int const x_757 = i_2; i_2 = 0; i_2 = x_757; - quicksort_(tint_symbol_86); - QuicksortObject const x_758 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_46 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_47 = {.numbers=tint_symbol_46}; - *(tint_symbol_86) = tint_symbol_47; - *(tint_symbol_86) = x_758; - float4 const x_184 = *(tint_symbol_87); + quicksort_(tint_symbol_84); + QuicksortObject const x_758 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_44 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_45 = {.numbers=tint_symbol_44}; + *(tint_symbol_84) = tint_symbol_45; + *(tint_symbol_84) = x_758; + float4 const x_184 = *(tint_symbol_85); float2 const x_759 = uv; uv = float2(0.0f, 0.0f); uv = x_759; @@ -863,30 +863,30 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, uv = x_760; float2 const x_185 = float2(x_184.x, x_184.y); float3 const x_448 = float3(x_185.y, x_446.y, x_446.y); - QuicksortObject const x_761 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_48 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_49 = {.numbers=tint_symbol_48}; - *(tint_symbol_86) = tint_symbol_49; - *(tint_symbol_86) = x_761; + QuicksortObject const x_761 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_46 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_47 = {.numbers=tint_symbol_46}; + *(tint_symbol_84) = tint_symbol_47; + *(tint_symbol_84) = x_761; float2 const x_762 = uv; uv = float2(0.0f, 0.0f); uv = x_762; float2 const x_191 = x_188.resolution; - QuicksortObject const x_763 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_50 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_51 = {.numbers=tint_symbol_50}; - *(tint_symbol_86) = tint_symbol_51; - *(tint_symbol_86) = x_763; + QuicksortObject const x_763 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_48 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_49 = {.numbers=tint_symbol_48}; + *(tint_symbol_84) = tint_symbol_49; + *(tint_symbol_84) = x_763; float3 const x_449 = float3(x_184.y, float3(1.0f, 2.0f, 3.0f).z, x_184.w); float3 const x_764 = color; color = float3(0.0f, 0.0f, 0.0f); color = x_764; float2 const x_192 = (x_185 / x_191); - QuicksortObject const x_765 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_52 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_53 = {.numbers=tint_symbol_52}; - *(tint_symbol_86) = tint_symbol_53; - *(tint_symbol_86) = x_765; + QuicksortObject const x_765 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_50 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_51 = {.numbers=tint_symbol_50}; + *(tint_symbol_84) = tint_symbol_51; + *(tint_symbol_84) = x_765; float2 const x_450 = float2(x_447.x, x_185.y); float3 const x_766 = color; color = float3(0.0f, 0.0f, 0.0f); @@ -900,23 +900,23 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, color = float3(0.0f, 0.0f, 0.0f); color = x_768; float3 const x_451 = float3(x_185.x, x_185.y, x_446.y); - QuicksortObject const x_769 = *(tint_symbol_86); + QuicksortObject const x_769 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_52 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_53 = {.numbers=tint_symbol_52}; + *(tint_symbol_84) = tint_symbol_53; + *(tint_symbol_84) = x_769; + int const x_770 = (*(tint_symbol_84)).numbers.arr[0u]; + (*(tint_symbol_84)).numbers.arr[0u] = 0; + (*(tint_symbol_84)).numbers.arr[0u] = x_770; + int const x_201 = (*(tint_symbol_84)).numbers.arr[0u]; + QuicksortObject const x_771 = *(tint_symbol_84); tint_array_wrapper const tint_symbol_54 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; QuicksortObject const tint_symbol_55 = {.numbers=tint_symbol_54}; - *(tint_symbol_86) = tint_symbol_55; - *(tint_symbol_86) = x_769; - int const x_770 = (*(tint_symbol_86)).numbers.arr[0u]; - (*(tint_symbol_86)).numbers.arr[0u] = 0; - (*(tint_symbol_86)).numbers.arr[0u] = x_770; - int const x_201 = (*(tint_symbol_86)).numbers.arr[0u]; - QuicksortObject const x_771 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_56 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_57 = {.numbers=tint_symbol_56}; - *(tint_symbol_86) = tint_symbol_57; - *(tint_symbol_86) = x_771; - int const x_772 = (*(tint_symbol_86)).numbers.arr[0u]; - (*(tint_symbol_86)).numbers.arr[0u] = 0; - (*(tint_symbol_86)).numbers.arr[0u] = x_772; + *(tint_symbol_84) = tint_symbol_55; + *(tint_symbol_84) = x_771; + int const x_772 = (*(tint_symbol_84)).numbers.arr[0u]; + (*(tint_symbol_84)).numbers.arr[0u] = 0; + (*(tint_symbol_84)).numbers.arr[0u] = x_772; float const x_206 = color.x; float const x_773 = color.x; color.x = 0.0f; @@ -925,11 +925,11 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, int const x_774 = i_2; i_2 = 0; i_2 = x_774; - QuicksortObject const x_775 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_58 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_59 = {.numbers=tint_symbol_58}; - *(tint_symbol_86) = tint_symbol_59; - *(tint_symbol_86) = x_775; + QuicksortObject const x_775 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_56 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_57 = {.numbers=tint_symbol_56}; + *(tint_symbol_84) = tint_symbol_57; + *(tint_symbol_84) = x_775; float3 const x_453 = float3(x_451.x, x_450.x, x_450.y); color.x = (x_206 + float(x_201)); float2 const x_776 = uv; @@ -944,37 +944,37 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, float const x_778 = uv.x; uv.x = 0.0f; uv.x = x_778; - QuicksortObject const x_779 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_60 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_61 = {.numbers=tint_symbol_60}; - *(tint_symbol_86) = tint_symbol_61; - *(tint_symbol_86) = x_779; + QuicksortObject const x_779 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_58 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_59 = {.numbers=tint_symbol_58}; + *(tint_symbol_84) = tint_symbol_59; + *(tint_symbol_84) = x_779; if ((x_210 > 0.25f)) { int const x_780 = i_2; i_2 = 0; i_2 = x_780; - int const x_781 = (*(tint_symbol_86)).numbers.arr[0u]; - (*(tint_symbol_86)).numbers.arr[0u] = 0; - (*(tint_symbol_86)).numbers.arr[0u] = x_781; + int const x_781 = (*(tint_symbol_84)).numbers.arr[0u]; + (*(tint_symbol_84)).numbers.arr[0u] = 0; + (*(tint_symbol_84)).numbers.arr[0u] = x_781; float3 const x_456 = float3(float2(0.0f, 0.0f).y, x_448.y, x_448.y); float const x_782 = uv.x; uv.x = 0.0f; uv.x = x_782; - int const x_216 = (*(tint_symbol_86)).numbers.arr[1]; - QuicksortObject const x_783 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_62 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_63 = {.numbers=tint_symbol_62}; - *(tint_symbol_86) = tint_symbol_63; - *(tint_symbol_86) = x_783; + int const x_216 = (*(tint_symbol_84)).numbers.arr[1]; + QuicksortObject const x_783 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_60 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_61 = {.numbers=tint_symbol_60}; + *(tint_symbol_84) = tint_symbol_61; + *(tint_symbol_84) = x_783; float2 const x_457 = float2(x_454.x, x_454.x); float2 const x_784 = uv; uv = float2(0.0f, 0.0f); uv = x_784; - QuicksortObject const x_785 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_64 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_65 = {.numbers=tint_symbol_64}; - *(tint_symbol_86) = tint_symbol_65; - *(tint_symbol_86) = x_785; + QuicksortObject const x_785 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_62 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_63 = {.numbers=tint_symbol_62}; + *(tint_symbol_84) = tint_symbol_63; + *(tint_symbol_84) = x_785; float2 const x_458 = float2(float3(1.0f, 2.0f, 3.0f).z, float2(0.0f, 0.0f).y); int const x_786 = i_2; i_2 = 0; @@ -994,9 +994,9 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, color[0] = 0.0f; color[0] = x_790; color.x = (float(x_216) + x_219); - int const x_791 = (*(tint_symbol_86)).numbers.arr[0u]; - (*(tint_symbol_86)).numbers.arr[0u] = 0; - (*(tint_symbol_86)).numbers.arr[0u] = x_791; + int const x_791 = (*(tint_symbol_84)).numbers.arr[0u]; + (*(tint_symbol_84)).numbers.arr[0u] = 0; + (*(tint_symbol_84)).numbers.arr[0u] = x_791; } float const x_792 = uv.x; uv.x = 0.0f; @@ -1034,24 +1034,24 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, float const x_801 = color.x; color.x = 0.0f; color.x = x_801; - int const x_230 = (*(tint_symbol_86)).numbers.arr[2u]; + int const x_230 = (*(tint_symbol_84)).numbers.arr[2u]; float const x_802 = uv.x; uv.x = 0.0f; uv.x = x_802; float const x_803 = color.x; color.x = 0.0f; color.x = x_803; - int const x_804 = (*(tint_symbol_86)).numbers.arr[2u]; - (*(tint_symbol_86)).numbers.arr[2u] = 0; - (*(tint_symbol_86)).numbers.arr[2u] = x_804; + int const x_804 = (*(tint_symbol_84)).numbers.arr[2u]; + (*(tint_symbol_84)).numbers.arr[2u] = 0; + (*(tint_symbol_84)).numbers.arr[2u] = x_804; float2 const x_464 = float2(x_450.y, x_191.x); float const x_805 = color.y; color.y = 0.0f; color.y = x_805; float const x_234 = color.y; - int const x_806 = (*(tint_symbol_86)).numbers.arr[2u]; - (*(tint_symbol_86)).numbers.arr[2u] = 0; - (*(tint_symbol_86)).numbers.arr[2u] = x_806; + int const x_806 = (*(tint_symbol_84)).numbers.arr[2u]; + (*(tint_symbol_84)).numbers.arr[2u] = 0; + (*(tint_symbol_84)).numbers.arr[2u] = x_806; float2 const x_465 = float2(x_463.x, x_185.x); float const x_807 = color.x; color.x = 0.0f; @@ -1086,15 +1086,15 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, float const x_815 = color.x; color.x = 0.0f; color.x = x_815; - int const x_245 = (*(tint_symbol_86)).numbers.arr[3]; + int const x_245 = (*(tint_symbol_84)).numbers.arr[3]; float const x_816 = color.x; color.x = 0.0f; color.x = x_816; - QuicksortObject const x_817 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_66 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_67 = {.numbers=tint_symbol_66}; - *(tint_symbol_86) = tint_symbol_67; - *(tint_symbol_86) = x_817; + QuicksortObject const x_817 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_64 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_65 = {.numbers=tint_symbol_64}; + *(tint_symbol_84) = tint_symbol_65; + *(tint_symbol_84) = x_817; float3 const x_468 = float3(x_467.x, x_467.x, x_467.x); float const x_818 = uv[0]; uv[0] = 0.0f; @@ -1110,9 +1110,9 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, float const x_821 = color.z; color.z = 0.0f; color.z = x_821; - int const x_822 = (*(tint_symbol_86)).numbers.arr[0u]; - (*(tint_symbol_86)).numbers.arr[0u] = 0; - (*(tint_symbol_86)).numbers.arr[0u] = x_822; + int const x_822 = (*(tint_symbol_84)).numbers.arr[0u]; + (*(tint_symbol_84)).numbers.arr[0u] = 0; + (*(tint_symbol_84)).numbers.arr[0u] = x_822; float2 const x_470 = float2(float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).y); float const x_823 = color.z; color.z = 0.0f; @@ -1127,7 +1127,7 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, uv[0] = 0.0f; uv[0] = x_825; float3 const x_472 = float3(x_454.x, x_454.y, x_454.y); - int const x_254 = (*(tint_symbol_86)).numbers.arr[4]; + int const x_254 = (*(tint_symbol_84)).numbers.arr[4]; float const x_826 = uv[0]; uv[0] = 0.0f; uv[0] = x_826; @@ -1135,9 +1135,9 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, color = float3(0.0f, 0.0f, 0.0f); color = x_827; float3 const x_473 = float3(x_446.y, x_453.x, x_453.x); - int const x_828 = (*(tint_symbol_86)).numbers.arr[4]; - (*(tint_symbol_86)).numbers.arr[4] = 0; - (*(tint_symbol_86)).numbers.arr[4] = x_828; + int const x_828 = (*(tint_symbol_84)).numbers.arr[4]; + (*(tint_symbol_84)).numbers.arr[4] = 0; + (*(tint_symbol_84)).numbers.arr[4] = x_828; float2 const x_474 = float2(x_191.x, x_184.z); float const x_829 = uv.x; uv.x = 0.0f; @@ -1171,9 +1171,9 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, i_2 = 0; i_2 = x_836; float3 const x_479 = float3(float2(0.0f, 0.0f).y, x_454.y, float2(0.0f, 0.0f).x); - int const x_837 = (*(tint_symbol_86)).numbers.arr[0u]; - (*(tint_symbol_86)).numbers.arr[0u] = 0; - (*(tint_symbol_86)).numbers.arr[0u] = x_837; + int const x_837 = (*(tint_symbol_84)).numbers.arr[0u]; + (*(tint_symbol_84)).numbers.arr[0u] = 0; + (*(tint_symbol_84)).numbers.arr[0u] = x_837; float const x_838 = color.y; color.y = 0.0f; color.y = x_838; @@ -1186,7 +1186,7 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, float3 const x_840 = color; color = float3(0.0f, 0.0f, 0.0f); color = x_840; - int const x_267 = (*(tint_symbol_86)).numbers.arr[5u]; + int const x_267 = (*(tint_symbol_84)).numbers.arr[5u]; float const x_841 = color.x; color.x = 0.0f; color.x = x_841; @@ -1201,11 +1201,11 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, uv[0] = 0.0f; uv[0] = x_844; float3 const x_482 = float3(x_455.x, x_475.y, x_455.y); - QuicksortObject const x_845 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_68 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_69 = {.numbers=tint_symbol_68}; - *(tint_symbol_86) = tint_symbol_69; - *(tint_symbol_86) = x_845; + QuicksortObject const x_845 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_66 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_67 = {.numbers=tint_symbol_66}; + *(tint_symbol_84) = tint_symbol_67; + *(tint_symbol_84) = x_845; float const x_846 = uv.y; uv.y = 0.0f; uv.y = x_846; @@ -1229,13 +1229,13 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, float const x_851 = uv.y; uv.y = 0.0f; uv.y = x_851; - int const x_852 = (*(tint_symbol_86)).numbers.arr[4]; - (*(tint_symbol_86)).numbers.arr[4] = 0; - (*(tint_symbol_86)).numbers.arr[4] = x_852; + int const x_852 = (*(tint_symbol_84)).numbers.arr[4]; + (*(tint_symbol_84)).numbers.arr[4] = 0; + (*(tint_symbol_84)).numbers.arr[4] = x_852; float const x_274 = uv.y; - int const x_853 = (*(tint_symbol_86)).numbers.arr[0u]; - (*(tint_symbol_86)).numbers.arr[0u] = 0; - (*(tint_symbol_86)).numbers.arr[0u] = x_853; + int const x_853 = (*(tint_symbol_84)).numbers.arr[0u]; + (*(tint_symbol_84)).numbers.arr[0u] = 0; + (*(tint_symbol_84)).numbers.arr[0u] = x_853; if ((x_274 > 0.5f)) { float const x_854 = uv.x; uv.x = 0.0f; @@ -1248,16 +1248,16 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, float const x_856 = uv.y; uv.y = 0.0f; uv.y = x_856; - int const x_280 = (*(tint_symbol_86)).numbers.arr[6u]; + int const x_280 = (*(tint_symbol_84)).numbers.arr[6u]; float const x_857 = uv.y; uv.y = 0.0f; uv.y = x_857; int const x_858 = i_2; i_2 = 0; i_2 = x_858; - int const x_859 = (*(tint_symbol_86)).numbers.arr[4]; - (*(tint_symbol_86)).numbers.arr[4] = 0; - (*(tint_symbol_86)).numbers.arr[4] = x_859; + int const x_859 = (*(tint_symbol_84)).numbers.arr[4]; + (*(tint_symbol_84)).numbers.arr[4] = 0; + (*(tint_symbol_84)).numbers.arr[4] = x_859; float2 const x_488 = float2(x_473.z, x_473.y); float const x_283 = color.y; float2 const x_860 = uv; @@ -1267,18 +1267,18 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, color.x = 0.0f; color.x = x_861; float2 const x_489 = float2(x_475.y, x_475.x); - int const x_862 = (*(tint_symbol_86)).numbers.arr[6u]; - (*(tint_symbol_86)).numbers.arr[6u] = 0; - (*(tint_symbol_86)).numbers.arr[6u] = x_862; - int const x_863 = (*(tint_symbol_86)).numbers.arr[6u]; - (*(tint_symbol_86)).numbers.arr[6u] = 0; - (*(tint_symbol_86)).numbers.arr[6u] = x_863; + int const x_862 = (*(tint_symbol_84)).numbers.arr[6u]; + (*(tint_symbol_84)).numbers.arr[6u] = 0; + (*(tint_symbol_84)).numbers.arr[6u] = x_862; + int const x_863 = (*(tint_symbol_84)).numbers.arr[6u]; + (*(tint_symbol_84)).numbers.arr[6u] = 0; + (*(tint_symbol_84)).numbers.arr[6u] = x_863; float2 const x_490 = float2(x_480.z, x_480.z); - QuicksortObject const x_864 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_70 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_71 = {.numbers=tint_symbol_70}; - *(tint_symbol_86) = tint_symbol_71; - *(tint_symbol_86) = x_864; + QuicksortObject const x_864 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_68 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_69 = {.numbers=tint_symbol_68}; + *(tint_symbol_84) = tint_symbol_69; + *(tint_symbol_84) = x_864; color.y = (float(x_280) + x_283); float const x_865 = color.x; color.x = 0.0f; @@ -1293,11 +1293,11 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, color.x = 0.0f; color.x = x_867; float const x_287 = uv.y; - QuicksortObject const x_868 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_72 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_73 = {.numbers=tint_symbol_72}; - *(tint_symbol_86) = tint_symbol_73; - *(tint_symbol_86) = x_868; + QuicksortObject const x_868 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_70 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_71 = {.numbers=tint_symbol_70}; + *(tint_symbol_84) = tint_symbol_71; + *(tint_symbol_84) = x_868; float2 const x_493 = float2(x_475.x, x_475.y); float const x_869 = uv[0]; uv[0] = 0.0f; @@ -1306,9 +1306,9 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, color.y = 0.0f; color.y = x_870; float3 const x_494 = float3(x_191.x, x_191.y, x_191.y); - int const x_871 = (*(tint_symbol_86)).numbers.arr[4]; - (*(tint_symbol_86)).numbers.arr[4] = 0; - (*(tint_symbol_86)).numbers.arr[4] = x_871; + int const x_871 = (*(tint_symbol_84)).numbers.arr[4]; + (*(tint_symbol_84)).numbers.arr[4] = 0; + (*(tint_symbol_84)).numbers.arr[4] = x_871; if ((x_287 > 0.75f)) { float3 const x_872 = color; color = float3(0.0f, 0.0f, 0.0f); @@ -1320,7 +1320,7 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, float3 const x_874 = color; color = float3(0.0f, 0.0f, 0.0f); color = x_874; - int const x_293 = (*(tint_symbol_86)).numbers.arr[7]; + int const x_293 = (*(tint_symbol_84)).numbers.arr[7]; float const x_875 = uv.x; uv.x = 0.0f; uv.x = x_875; @@ -1329,9 +1329,9 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, color.y = 0.0f; color.y = x_876; float2 const x_497 = float2(x_477.x, x_461.y); - int const x_877 = (*(tint_symbol_86)).numbers.arr[0u]; - (*(tint_symbol_86)).numbers.arr[0u] = 0; - (*(tint_symbol_86)).numbers.arr[0u] = x_877; + int const x_877 = (*(tint_symbol_84)).numbers.arr[0u]; + (*(tint_symbol_84)).numbers.arr[0u] = 0; + (*(tint_symbol_84)).numbers.arr[0u] = x_877; float const x_878 = color.y; color.y = 0.0f; color.y = x_878; @@ -1373,14 +1373,14 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, float2 const x_888 = uv; uv = float2(0.0f, 0.0f); uv = x_888; - int const x_301 = (*(tint_symbol_86)).numbers.arr[8]; + int const x_301 = (*(tint_symbol_84)).numbers.arr[8]; int const x_889 = i_2; i_2 = 0; i_2 = x_889; float2 const x_503 = float2(x_185.x, x_451.z); - int const x_890 = (*(tint_symbol_86)).numbers.arr[8]; - (*(tint_symbol_86)).numbers.arr[8] = 0; - (*(tint_symbol_86)).numbers.arr[8] = x_890; + int const x_890 = (*(tint_symbol_84)).numbers.arr[8]; + (*(tint_symbol_84)).numbers.arr[8] = 0; + (*(tint_symbol_84)).numbers.arr[8] = x_890; float const x_891 = color.y; color.y = 0.0f; color.y = x_891; @@ -1397,9 +1397,9 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, color.x = 0.0f; color.x = x_894; float2 const x_506 = float2(x_493.x, x_492.x); - int const x_895 = (*(tint_symbol_86)).numbers.arr[4]; - (*(tint_symbol_86)).numbers.arr[4] = 0; - (*(tint_symbol_86)).numbers.arr[4] = x_895; + int const x_895 = (*(tint_symbol_84)).numbers.arr[4]; + (*(tint_symbol_84)).numbers.arr[4] = 0; + (*(tint_symbol_84)).numbers.arr[4] = x_895; float const x_896 = uv.y; uv.y = 0.0f; uv.y = x_896; @@ -1448,23 +1448,23 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, uv.y = 0.0f; uv.y = x_908; float3 const x_512 = float3(x_455.y, x_455.y, x_455.y); - int const x_909 = (*(tint_symbol_86)).numbers.arr[4]; - (*(tint_symbol_86)).numbers.arr[4] = 0; - (*(tint_symbol_86)).numbers.arr[4] = x_909; + int const x_909 = (*(tint_symbol_84)).numbers.arr[4]; + (*(tint_symbol_84)).numbers.arr[4] = 0; + (*(tint_symbol_84)).numbers.arr[4] = x_909; if ((fabs((x_308 - x_310)) < 0.25f)) { float const x_910 = uv.x; uv.x = 0.0f; uv.x = x_910; - QuicksortObject const x_911 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_74 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_75 = {.numbers=tint_symbol_74}; - *(tint_symbol_86) = tint_symbol_75; - *(tint_symbol_86) = x_911; + QuicksortObject const x_911 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_72 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_73 = {.numbers=tint_symbol_72}; + *(tint_symbol_84) = tint_symbol_73; + *(tint_symbol_84) = x_911; float3 const x_513 = float3(x_505.z, x_505.x, x_448.x); - int const x_912 = (*(tint_symbol_86)).numbers.arr[8]; - (*(tint_symbol_86)).numbers.arr[8] = 0; - (*(tint_symbol_86)).numbers.arr[8] = x_912; - int const x_317 = (*(tint_symbol_86)).numbers.arr[9u]; + int const x_912 = (*(tint_symbol_84)).numbers.arr[8]; + (*(tint_symbol_84)).numbers.arr[8] = 0; + (*(tint_symbol_84)).numbers.arr[8] = x_912; + int const x_317 = (*(tint_symbol_84)).numbers.arr[9u]; float3 const x_514 = float3(x_474.y, x_474.y, x_474.y); float const x_913 = uv.y; uv.y = 0.0f; @@ -1509,16 +1509,16 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, float const x_923 = uv.x; uv.x = 0.0f; uv.x = x_923; - QuicksortObject const x_924 = *(tint_symbol_86); + QuicksortObject const x_924 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_74 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_75 = {.numbers=tint_symbol_74}; + *(tint_symbol_84) = tint_symbol_75; + *(tint_symbol_84) = x_924; + QuicksortObject const x_925 = *(tint_symbol_84); tint_array_wrapper const tint_symbol_76 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; QuicksortObject const tint_symbol_77 = {.numbers=tint_symbol_76}; - *(tint_symbol_86) = tint_symbol_77; - *(tint_symbol_86) = x_924; - QuicksortObject const x_925 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_78 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_79 = {.numbers=tint_symbol_78}; - *(tint_symbol_86) = tint_symbol_79; - *(tint_symbol_86) = x_925; + *(tint_symbol_84) = tint_symbol_77; + *(tint_symbol_84) = x_925; float const x_926 = color.y; color.y = 0.0f; color.y = x_926; @@ -1534,12 +1534,12 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, float const x_929 = uv.x; uv.x = 0.0f; uv.x = x_929; - *(tint_symbol_88) = x_330; - QuicksortObject const x_930 = *(tint_symbol_86); - tint_array_wrapper const tint_symbol_80 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - QuicksortObject const tint_symbol_81 = {.numbers=tint_symbol_80}; - *(tint_symbol_86) = tint_symbol_81; - *(tint_symbol_86) = x_930; + *(tint_symbol_86) = x_330; + QuicksortObject const x_930 = *(tint_symbol_84); + tint_array_wrapper const tint_symbol_78 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + QuicksortObject const tint_symbol_79 = {.numbers=tint_symbol_78}; + *(tint_symbol_84) = tint_symbol_79; + *(tint_symbol_84) = x_930; float3 const x_522 = float3(x_330.w, x_330.y, x_493.x); float const x_931 = color.x; color.x = 0.0f; @@ -1547,14 +1547,20 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_188 [[buffer(0)]]) { - thread float4 tint_symbol_89 = 0.0f; - thread QuicksortObject tint_symbol_90 = {}; - thread float4 tint_symbol_91 = 0.0f; - tint_symbol_89 = gl_FragCoord_param; - main_1(x_188, &(tint_symbol_90), &(tint_symbol_89), &(tint_symbol_91)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_91}; - tint_symbol_2 const tint_symbol_82 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_82; +main_out tint_symbol_inner(constant buf0& x_188, float4 gl_FragCoord_param, thread float4* const tint_symbol_87, thread QuicksortObject* const tint_symbol_88, thread float4* const tint_symbol_89) { + *(tint_symbol_87) = gl_FragCoord_param; + main_1(x_188, tint_symbol_88, tint_symbol_87, tint_symbol_89); + main_out const tint_symbol_80 = {.x_GLF_color_1=*(tint_symbol_89)}; + return tint_symbol_80; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_188 [[buffer(0)]]) { + thread float4 tint_symbol_90 = 0.0f; + thread QuicksortObject tint_symbol_91 = {}; + thread float4 tint_symbol_92 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_188, gl_FragCoord_param, &(tint_symbol_90), &(tint_symbol_91), &(tint_symbol_92)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/bug/tint/757.wgsl.expected.hlsl b/test/bug/tint/757.wgsl.expected.hlsl index 7c752468cd..8be66c6ede 100644 --- a/test/bug/tint/757.wgsl.expected.hlsl +++ b/test/bug/tint/757.wgsl.expected.hlsl @@ -9,9 +9,7 @@ struct tint_symbol_1 { uint3 GlobalInvocationID : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 GlobalInvocationID = tint_symbol.GlobalInvocationID; +void main_inner(uint3 GlobalInvocationID) { uint flatIndex = ((((2u * 2u) * GlobalInvocationID.z) + (2u * GlobalInvocationID.y)) + GlobalInvocationID.x); flatIndex = (flatIndex * 1u); float4 texel = myTexture.Load(int4(int3(int2(GlobalInvocationID.xy), 0), 0)); @@ -20,5 +18,10 @@ void main(tint_symbol_1 tint_symbol) { result.Store((4u * (flatIndex + i)), asuint(texel.r)); } } +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.GlobalInvocationID); return; } diff --git a/test/bug/tint/757.wgsl.expected.msl b/test/bug/tint/757.wgsl.expected.msl index 8699607258..fe24d96477 100644 --- a/test/bug/tint/757.wgsl.expected.msl +++ b/test/bug/tint/757.wgsl.expected.msl @@ -8,13 +8,17 @@ struct Result { /* 0x0000 */ float values[1]; }; -kernel void tint_symbol(texture2d_array tint_symbol_2 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], device Result& result [[buffer(3)]]) { +void tint_symbol_inner(device Result& result, uint3 GlobalInvocationID, texture2d_array tint_symbol_1) { uint flatIndex = ((((2u * 2u) * GlobalInvocationID.z) + (2u * GlobalInvocationID.y)) + GlobalInvocationID.x); flatIndex = (flatIndex * 1u); - float4 texel = tint_symbol_2.read(uint2(int2(GlobalInvocationID.xy)), 0, 0); + float4 texel = tint_symbol_1.read(uint2(int2(GlobalInvocationID.xy)), 0, 0); for(uint i = 0u; (i < 1u); i = (i + 1u)) { result.values[(flatIndex + i)] = texel.r; } +} + +kernel void tint_symbol(texture2d_array tint_symbol_2 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], device Result& result [[buffer(3)]]) { + tint_symbol_inner(result, GlobalInvocationID, tint_symbol_2); return; } diff --git a/test/bug/tint/824.wgsl.expected.hlsl b/test/bug/tint/824.wgsl.expected.hlsl index a1d0caba21..58c47072e5 100644 --- a/test/bug/tint/824.wgsl.expected.hlsl +++ b/test/bug/tint/824.wgsl.expected.hlsl @@ -11,15 +11,20 @@ struct tint_symbol_2 { float4 Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint VertexIndex = tint_symbol.VertexIndex; - const uint InstanceIndex = tint_symbol.InstanceIndex; +Output main_inner(uint VertexIndex, uint InstanceIndex) { float2 zv[4] = {float2(0.200000003f, 0.200000003f), float2(0.300000012f, 0.300000012f), float2(-0.100000001f, -0.100000001f), float2(1.100000024f, 1.100000024f)}; const float z = zv[InstanceIndex].x; Output output = (Output)0; output.Position = float4(0.5f, 0.5f, z, 1.0f); float4 colors[4] = {float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; output.color = colors[InstanceIndex]; - const tint_symbol_2 tint_symbol_3 = {output.color, output.Position}; - return tint_symbol_3; + return output; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const Output inner_result = main_inner(tint_symbol.VertexIndex, tint_symbol.InstanceIndex); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.Position = inner_result.Position; + wrapper_result.color = inner_result.color; + return wrapper_result; } diff --git a/test/bug/tint/824.wgsl.expected.msl b/test/bug/tint/824.wgsl.expected.msl index 8094607a65..3aa26e2dad 100644 --- a/test/bug/tint/824.wgsl.expected.msl +++ b/test/bug/tint/824.wgsl.expected.msl @@ -5,7 +5,7 @@ struct Output { float4 Position; float4 color; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 color [[user(locn0)]]; float4 Position [[position]]; }; @@ -16,14 +16,21 @@ struct tint_array_wrapper_1 { float4 arr[4]; }; -vertex tint_symbol_2 tint_symbol(uint VertexIndex [[vertex_id]], uint InstanceIndex [[instance_id]]) { +Output tint_symbol_inner(uint VertexIndex, uint InstanceIndex) { tint_array_wrapper zv = {.arr={float2(0.200000003f, 0.200000003f), float2(0.300000012f, 0.300000012f), float2(-0.100000001f, -0.100000001f), float2(1.100000024f, 1.100000024f)}}; float const z = zv.arr[InstanceIndex].x; Output output = {}; output.Position = float4(0.5f, 0.5f, z, 1.0f); tint_array_wrapper_1 colors = {.arr={float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; output.color = colors.arr[InstanceIndex]; - tint_symbol_2 const tint_symbol_3 = {.color=output.color, .Position=output.Position}; - return tint_symbol_3; + return output; +} + +vertex tint_symbol_1 tint_symbol(uint VertexIndex [[vertex_id]], uint InstanceIndex [[instance_id]]) { + Output const inner_result = tint_symbol_inner(VertexIndex, InstanceIndex); + tint_symbol_1 wrapper_result = {}; + wrapper_result.Position = inner_result.Position; + wrapper_result.color = inner_result.color; + return wrapper_result; } diff --git a/test/bug/tint/827.wgsl.expected.hlsl b/test/bug/tint/827.wgsl.expected.hlsl index 81a67c2cca..3ad514823a 100644 --- a/test/bug/tint/827.wgsl.expected.hlsl +++ b/test/bug/tint/827.wgsl.expected.hlsl @@ -6,9 +6,12 @@ struct tint_symbol_1 { uint3 GlobalInvocationId : SV_DispatchThreadID; }; +void main_inner(uint3 GlobalInvocationId) { + result.Store((4u * ((GlobalInvocationId.y * width) + GlobalInvocationId.x)), asuint(tex.Load(int3(int(GlobalInvocationId.x), int(GlobalInvocationId.y), 0)).x)); +} + [numthreads(1, 1, 1)] void main(tint_symbol_1 tint_symbol) { - const uint3 GlobalInvocationId = tint_symbol.GlobalInvocationId; - result.Store((4u * ((GlobalInvocationId.y * width) + GlobalInvocationId.x)), asuint(tex.Load(int3(int(GlobalInvocationId.x), int(GlobalInvocationId.y), 0)).x)); + main_inner(tint_symbol.GlobalInvocationId); return; } diff --git a/test/bug/tint/827.wgsl.expected.msl b/test/bug/tint/827.wgsl.expected.msl index 3570acda97..c6d933a607 100644 --- a/test/bug/tint/827.wgsl.expected.msl +++ b/test/bug/tint/827.wgsl.expected.msl @@ -6,8 +6,12 @@ struct Result { }; constant uint width = 128u; +void tint_symbol_inner(device Result& result, uint3 GlobalInvocationId, depth2d tint_symbol_1) { + result.values[((GlobalInvocationId.y * width) + GlobalInvocationId.x)] = tint_symbol_1.read(uint2(int2(int(GlobalInvocationId.x), int(GlobalInvocationId.y))), 0); +} + kernel void tint_symbol(depth2d tint_symbol_2 [[texture(0)]], uint3 GlobalInvocationId [[thread_position_in_grid]], device Result& result [[buffer(1)]]) { - result.values[((GlobalInvocationId.y * width) + GlobalInvocationId.x)] = tint_symbol_2.read(uint2(int2(int(GlobalInvocationId.x), int(GlobalInvocationId.y))), 0); + tint_symbol_inner(result, GlobalInvocationId, tint_symbol_2); return; } diff --git a/test/bug/tint/913.wgsl.expected.hlsl b/test/bug/tint/913.wgsl.expected.hlsl index 3a143968d3..5b4116c8ce 100644 --- a/test/bug/tint/913.wgsl.expected.hlsl +++ b/test/bug/tint/913.wgsl.expected.hlsl @@ -13,9 +13,7 @@ struct tint_symbol_2 { uint3 GlobalInvocationID : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_2 tint_symbol_1) { - const uint3 GlobalInvocationID = tint_symbol_1.GlobalInvocationID; +void main_inner(uint3 GlobalInvocationID) { int2 tint_tmp; src.GetDimensions(tint_tmp.x, tint_tmp.y); const int2 srcSize = tint_tmp; @@ -86,5 +84,10 @@ void main(tint_symbol_2 tint_symbol_1) { } else { output.Store((4u * outputIndex), asuint(0u)); } +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_2 tint_symbol_1) { + main_inner(tint_symbol_1.GlobalInvocationID); return; } diff --git a/test/bug/tint/913.wgsl.expected.msl b/test/bug/tint/913.wgsl.expected.msl index 87536c30f7..17237e0573 100644 --- a/test/bug/tint/913.wgsl.expected.msl +++ b/test/bug/tint/913.wgsl.expected.msl @@ -16,21 +16,21 @@ bool aboutEqual(float value, float expect) { return (fabs((value - expect)) < 0.001f); } -kernel void tint_symbol(texture2d tint_symbol_2 [[texture(0)]], texture2d tint_symbol_3 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(3)]], device OutputBuf& output [[buffer(2)]]) { - int2 const srcSize = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); - int2 const dstSize = int2(tint_symbol_3.get_width(), tint_symbol_3.get_height()); +void tint_symbol_inner(constant Uniforms& uniforms, device OutputBuf& output, uint3 GlobalInvocationID, texture2d tint_symbol_1, texture2d tint_symbol_2) { + int2 const srcSize = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); + int2 const dstSize = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); uint2 const dstTexCoord = uint2(GlobalInvocationID.xy); float4 const nonCoveredColor = float4(0.0f, 1.0f, 0.0f, 1.0f); bool success = true; if (((((dstTexCoord.x < uniforms.dstCopyOrigin.x) || (dstTexCoord.y < uniforms.dstCopyOrigin.y)) || (dstTexCoord.x >= (uniforms.dstCopyOrigin.x + uniforms.copySize.x))) || (dstTexCoord.y >= (uniforms.dstCopyOrigin.y + uniforms.copySize.y)))) { - success = (success && all((tint_symbol_3.read(uint2(int2(dstTexCoord)), 0) == nonCoveredColor))); + success = (success && all((tint_symbol_2.read(uint2(int2(dstTexCoord)), 0) == nonCoveredColor))); } else { uint2 srcTexCoord = ((dstTexCoord - uniforms.dstCopyOrigin) + uniforms.srcCopyOrigin); if ((uniforms.dstTextureFlipY == 1u)) { srcTexCoord.y = ((uint(srcSize.y) - srcTexCoord.y) - 1u); } - float4 const srcColor = tint_symbol_2.read(uint2(int2(srcTexCoord)), 0); - float4 const dstColor = tint_symbol_3.read(uint2(int2(dstTexCoord)), 0); + float4 const srcColor = tint_symbol_1.read(uint2(int2(srcTexCoord)), 0); + float4 const dstColor = tint_symbol_2.read(uint2(int2(dstTexCoord)), 0); if ((uniforms.channelCount == 2u)) { success = ((success && aboutEqual(dstColor.r, srcColor.r)) && aboutEqual(dstColor.g, srcColor.g)); } else { @@ -43,6 +43,10 @@ kernel void tint_symbol(texture2d tint_symbol_2 [[texture } else { output.result[outputIndex] = 0u; } +} + +kernel void tint_symbol(texture2d tint_symbol_3 [[texture(0)]], texture2d tint_symbol_4 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(3)]], device OutputBuf& output [[buffer(2)]]) { + tint_symbol_inner(uniforms, output, GlobalInvocationID, tint_symbol_3, tint_symbol_4); return; } diff --git a/test/bug/tint/914.wgsl.expected.hlsl b/test/bug/tint/914.wgsl.expected.hlsl index da7d9dbf0c..b4add28c64 100644 --- a/test/bug/tint/914.wgsl.expected.hlsl +++ b/test/bug/tint/914.wgsl.expected.hlsl @@ -54,11 +54,7 @@ struct tint_symbol_1 { uint3 global_id : SV_DispatchThreadID; }; -[numthreads(16, 16, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 local_id = tint_symbol.local_id; - const uint3 global_id = tint_symbol.global_id; - const uint local_invocation_index = tint_symbol.local_invocation_index; +void main_inner(uint3 local_id, uint3 global_id, uint local_invocation_index) { { for(uint idx = local_invocation_index; (idx < 4096u); idx = (idx + 256u)) { const uint i = (idx / 64u); @@ -143,5 +139,10 @@ void main(tint_symbol_1 tint_symbol) { } } } +} + +[numthreads(16, 16, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.local_id, tint_symbol.global_id, tint_symbol.local_invocation_index); return; } diff --git a/test/bug/tint/914.wgsl.expected.msl b/test/bug/tint/914.wgsl.expected.msl index 3d3ef578ae..eb146a20b0 100644 --- a/test/bug/tint/914.wgsl.expected.msl +++ b/test/bug/tint/914.wgsl.expected.msl @@ -50,14 +50,12 @@ void mm_write(constant Uniforms& uniforms, device Matrix& resultMatrix, uint row } } -kernel void tint_symbol(uint3 local_id [[thread_position_in_threadgroup]], uint3 global_id [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Uniforms& uniforms [[buffer(3)]], const device Matrix& firstMatrix [[buffer(0)]], const device Matrix& secondMatrix [[buffer(1)]], device Matrix& resultMatrix [[buffer(2)]]) { - threadgroup tint_array_wrapper tint_symbol_2; - threadgroup tint_array_wrapper tint_symbol_3; +void tint_symbol_inner(constant Uniforms& uniforms, const device Matrix& firstMatrix, const device Matrix& secondMatrix, device Matrix& resultMatrix, uint3 local_id, uint3 global_id, uint local_invocation_index, threadgroup tint_array_wrapper* const tint_symbol_1, threadgroup tint_array_wrapper* const tint_symbol_2) { for(uint idx = local_invocation_index; (idx < 4096u); idx = (idx + 256u)) { uint const i = (idx / 64u); uint const i_1 = (idx % 64u); - tint_symbol_2.arr[i].arr[i_1] = float(); - tint_symbol_3.arr[i].arr[i_1] = float(); + (*(tint_symbol_1)).arr[i].arr[i_1] = float(); + (*(tint_symbol_2)).arr[i].arr[i_1] = float(); } threadgroup_barrier(mem_flags::mem_threadgroup); uint const tileRow = (local_id.y * RowPerThread); @@ -80,23 +78,23 @@ kernel void tint_symbol(uint3 local_id [[thread_position_in_threadgroup]], uint3 for(uint innerCol = 0u; (innerCol < ColPerThreadA); innerCol = (innerCol + 1u)) { uint const inputRow = (tileRow + innerRow); uint const inputCol = (tileColA + innerCol); - tint_symbol_2.arr[inputRow].arr[inputCol] = mm_readA(uniforms, firstMatrix, (globalRow + innerRow), ((t * TileInner) + inputCol)); + (*(tint_symbol_1)).arr[inputRow].arr[inputCol] = mm_readA(uniforms, firstMatrix, (globalRow + innerRow), ((t * TileInner) + inputCol)); } } for(uint innerRow = 0u; (innerRow < RowPerThreadB); innerRow = (innerRow + 1u)) { for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) { uint const inputRow = (tileRowB + innerRow); uint const inputCol = (tileCol + innerCol); - tint_symbol_3.arr[innerCol].arr[inputCol] = mm_readB(uniforms, secondMatrix, ((t * TileInner) + inputRow), (globalCol + innerCol)); + (*(tint_symbol_2)).arr[innerCol].arr[inputCol] = mm_readB(uniforms, secondMatrix, ((t * TileInner) + inputRow), (globalCol + innerCol)); } } threadgroup_barrier(mem_flags::mem_threadgroup); for(uint k = 0u; (k < TileInner); k = (k + 1u)) { for(uint inner = 0u; (inner < ColPerThread); inner = (inner + 1u)) { - BCached.arr[inner] = tint_symbol_3.arr[k].arr[(tileCol + inner)]; + BCached.arr[inner] = (*(tint_symbol_2)).arr[k].arr[(tileCol + inner)]; } for(uint innerRow = 0u; (innerRow < RowPerThread); innerRow = (innerRow + 1u)) { - ACached = tint_symbol_2.arr[(tileRow + innerRow)].arr[k]; + ACached = (*(tint_symbol_1)).arr[(tileRow + innerRow)].arr[k]; for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) { uint const index = ((innerRow * ColPerThread) + innerCol); acc.arr[index] = (acc.arr[index] + (ACached * BCached.arr[innerCol])); @@ -111,6 +109,12 @@ kernel void tint_symbol(uint3 local_id [[thread_position_in_threadgroup]], uint3 mm_write(uniforms, resultMatrix, (globalRow + innerRow), (globalCol + innerCol), acc.arr[index]); } } +} + +kernel void tint_symbol(uint3 local_id [[thread_position_in_threadgroup]], uint3 global_id [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Uniforms& uniforms [[buffer(3)]], const device Matrix& firstMatrix [[buffer(0)]], const device Matrix& secondMatrix [[buffer(1)]], device Matrix& resultMatrix [[buffer(2)]]) { + threadgroup tint_array_wrapper tint_symbol_3; + threadgroup tint_array_wrapper tint_symbol_4; + tint_symbol_inner(uniforms, firstMatrix, secondMatrix, resultMatrix, local_id, global_id, local_invocation_index, &(tint_symbol_3), &(tint_symbol_4)); return; } diff --git a/test/bug/tint/922.wgsl.expected.hlsl b/test/bug/tint/922.wgsl.expected.hlsl index c3b7973e88..ebd6476937 100644 --- a/test/bug/tint/922.wgsl.expected.hlsl +++ b/test/bug/tint/922.wgsl.expected.hlsl @@ -154,40 +154,40 @@ Mat4x3_ _Mat4x3_1(Mat4x4_ m20) { return o4; } -Mat4x3_ tint_symbol_4(uint4 buffer[96], uint offset) { +Mat4x3_ tint_symbol_3(uint4 buffer[96], uint offset) { const uint scalar_offset = ((offset + 0u)) / 4; const uint scalar_offset_1 = ((offset + 16u)) / 4; const uint scalar_offset_2 = ((offset + 32u)) / 4; - const Mat4x3_ tint_symbol_10 = {asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4])}; - return tint_symbol_10; + const Mat4x3_ tint_symbol_9 = {asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4])}; + return tint_symbol_9; } -Mat4x4_ tint_symbol_6(uint4 buffer[4], uint offset) { +Mat4x4_ tint_symbol_5(uint4 buffer[4], uint offset) { const uint scalar_offset_3 = ((offset + 0u)) / 4; const uint scalar_offset_4 = ((offset + 16u)) / 4; const uint scalar_offset_5 = ((offset + 32u)) / 4; const uint scalar_offset_6 = ((offset + 48u)) / 4; - const Mat4x4_ tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4]), asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]), asfloat(buffer[scalar_offset_6 / 4])}; - return tint_symbol_11; + const Mat4x4_ tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4]), asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]), asfloat(buffer[scalar_offset_6 / 4])}; + return tint_symbol_10; } -Mat4x2_ tint_symbol_9(uint4 buffer[3], uint offset) { +Mat4x2_ tint_symbol_8(uint4 buffer[3], uint offset) { const uint scalar_offset_7 = ((offset + 0u)) / 4; const uint scalar_offset_8 = ((offset + 16u)) / 4; - const Mat4x2_ tint_symbol_12 = {asfloat(buffer[scalar_offset_7 / 4]), asfloat(buffer[scalar_offset_8 / 4])}; - return tint_symbol_12; + const Mat4x2_ tint_symbol_11 = {asfloat(buffer[scalar_offset_7 / 4]), asfloat(buffer[scalar_offset_8 / 4])}; + return tint_symbol_11; } void main1() { Mat4x3_ t_PosMtx = (Mat4x3_)0; float2 t_TexSpaceCoord = float2(0.0f, 0.0f); - const Mat4x3_ _e18 = tint_symbol_4(global2, (48u * uint(int(a_PosMtxIdx1)))); + const Mat4x3_ _e18 = tint_symbol_3(global2, (48u * uint(int(a_PosMtxIdx1)))); t_PosMtx = _e18; const Mat4x4_ _e24 = _Mat4x4_1(t_PosMtx); const float3 _e25 = a_Position1; const Mat4x4_ _e30 = _Mat4x4_1(t_PosMtx); const float4 _e34 = Mul(_e30, float4(a_Position1, 1.0f)); - const Mat4x4_ _e35 = tint_symbol_6(global, 0u); + const Mat4x4_ _e35 = tint_symbol_5(global, 0u); const Mat4x4_ _e38 = _Mat4x4_1(t_PosMtx); const float3 _e39 = a_Position1; const Mat4x4_ _e44 = _Mat4x4_1(t_PosMtx); @@ -199,7 +199,7 @@ void main1() { if ((_e52.x == 2.0f)) { { const float3 _e59 = a_Normal1; - const Mat4x2_ _e64 = tint_symbol_9(global1, (32u * uint(0))); + const Mat4x2_ _e64 = tint_symbol_8(global1, (32u * uint(0))); const float2 _e68 = Mul2(_e64, float4(a_Normal1, 1.0f)); v_TexCoord = _e68.xy; return; @@ -207,7 +207,7 @@ void main1() { } else { { const float2 _e73 = a_UV1; - const Mat4x2_ _e79 = tint_symbol_9(global1, (32u * uint(0))); + const Mat4x2_ _e79 = tint_symbol_8(global1, (32u * uint(0))); const float2 _e84 = Mul2(_e79, float4(a_UV1, 1.0f, 1.0f)); v_TexCoord = _e84.xy; return; @@ -228,19 +228,22 @@ struct tint_symbol_2 { float4 member : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float3 a_Position = tint_symbol.a_Position; - const float2 a_UV = tint_symbol.a_UV; - const float4 a_Color = tint_symbol.a_Color; - const float3 a_Normal = tint_symbol.a_Normal; - const float a_PosMtxIdx = tint_symbol.a_PosMtxIdx; +VertexOutput main_inner(float3 a_Position, float2 a_UV, float4 a_Color, float3 a_Normal, float a_PosMtxIdx) { a_Position1 = a_Position; a_UV1 = a_UV; a_Color1 = a_Color; a_Normal1 = a_Normal; a_PosMtxIdx1 = a_PosMtxIdx; main1(); - const VertexOutput tint_symbol_3 = {v_Color, v_TexCoord, gl_Position}; - const tint_symbol_2 tint_symbol_13 = {tint_symbol_3.v_Color, tint_symbol_3.v_TexCoord, tint_symbol_3.member}; - return tint_symbol_13; + const VertexOutput tint_symbol_12 = {v_Color, v_TexCoord, gl_Position}; + return tint_symbol_12; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const VertexOutput inner_result = main_inner(tint_symbol.a_Position, tint_symbol.a_UV, tint_symbol.a_Color, tint_symbol.a_Normal, tint_symbol.a_PosMtxIdx); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.v_Color = inner_result.v_Color; + wrapper_result.v_TexCoord = inner_result.v_TexCoord; + wrapper_result.member = inner_result.member; + return wrapper_result; } diff --git a/test/bug/tint/922.wgsl.expected.msl b/test/bug/tint/922.wgsl.expected.msl index 8479d65f02..dcb3e5bbad 100644 --- a/test/bug/tint/922.wgsl.expected.msl +++ b/test/bug/tint/922.wgsl.expected.msl @@ -222,78 +222,81 @@ Mat4x3_ _Mat4x3_1(Mat4x4_ m20) { return _e12; } -void main1(constant ub_PacketParams& global2, constant ub_SceneParams& global, constant ub_MaterialParams& global1, thread float* const tint_symbol_6, thread float3* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10, thread float3* const tint_symbol_11, thread float2* const tint_symbol_12, thread float2* const tint_symbol_13) { +void main1(constant ub_PacketParams& global2, constant ub_SceneParams& global, constant ub_MaterialParams& global1, thread float* const tint_symbol_5, thread float3* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread float3* const tint_symbol_10, thread float2* const tint_symbol_11, thread float2* const tint_symbol_12) { Mat4x3_ t_PosMtx = {}; float2 t_TexSpaceCoord = 0.0f; - float const _e15 = *(tint_symbol_6); + float const _e15 = *(tint_symbol_5); Mat4x3_ const _e18 = global2.u_PosMtx.arr[int(_e15)]; t_PosMtx = _e18; Mat4x3_ const _e23 = t_PosMtx; Mat4x4_ const _e24 = _Mat4x4_1(_e23); - float3 const _e25 = *(tint_symbol_7); + float3 const _e25 = *(tint_symbol_6); Mat4x3_ const _e29 = t_PosMtx; Mat4x4_ const _e30 = _Mat4x4_1(_e29); - float3 const _e31 = *(tint_symbol_7); + float3 const _e31 = *(tint_symbol_6); float4 const _e34 = Mul(_e30, float4(_e31, 1.0f)); Mat4x4_ const _e35 = global.u_Projection; Mat4x3_ const _e37 = t_PosMtx; Mat4x4_ const _e38 = _Mat4x4_1(_e37); - float3 const _e39 = *(tint_symbol_7); + float3 const _e39 = *(tint_symbol_6); Mat4x3_ const _e43 = t_PosMtx; Mat4x4_ const _e44 = _Mat4x4_1(_e43); - float3 const _e45 = *(tint_symbol_7); + float3 const _e45 = *(tint_symbol_6); float4 const _e48 = Mul(_e44, float4(_e45, 1.0f)); float4 const _e49 = Mul(_e35, _e48); - *(tint_symbol_8) = _e49; - float4 const _e50 = *(tint_symbol_9); - *(tint_symbol_10) = _e50; + *(tint_symbol_7) = _e49; + float4 const _e50 = *(tint_symbol_8); + *(tint_symbol_9) = _e50; float4 const _e52 = global1.u_Misc0_; if ((_e52.x == 2.0f)) { { - float3 const _e59 = *(tint_symbol_11); + float3 const _e59 = *(tint_symbol_10); Mat4x2_ const _e64 = global1.u_TexMtx.arr[0]; - float3 const _e65 = *(tint_symbol_11); + float3 const _e65 = *(tint_symbol_10); float2 const _e68 = Mul2(_e64, float4(_e65, 1.0f)); - *(tint_symbol_12) = _e68.xy; + *(tint_symbol_11) = _e68.xy; return; } } else { { - float2 const _e73 = *(tint_symbol_13); + float2 const _e73 = *(tint_symbol_12); Mat4x2_ const _e79 = global1.u_TexMtx.arr[0]; - float2 const _e80 = *(tint_symbol_13); + float2 const _e80 = *(tint_symbol_12); float2 const _e84 = Mul2(_e79, float4(_e80, 1.0f, 1.0f)); - *(tint_symbol_12) = _e84.xy; + *(tint_symbol_11) = _e84.xy; return; } } } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant ub_PacketParams& global2 [[buffer(2)]], constant ub_SceneParams& global [[buffer(0)]], constant ub_MaterialParams& global1 [[buffer(1)]]) { - thread float3 tint_symbol_14 = 0.0f; - thread float2 tint_symbol_15 = 0.0f; - thread float4 tint_symbol_16 = 0.0f; - thread float3 tint_symbol_17 = 0.0f; - thread float tint_symbol_18 = 0.0f; - thread float4 tint_symbol_19 = 0.0f; - thread float4 tint_symbol_20 = 0.0f; - thread float2 tint_symbol_21 = 0.0f; - float3 const a_Position = tint_symbol_1.a_Position; - float2 const a_UV = tint_symbol_1.a_UV; - float4 const a_Color = tint_symbol_1.a_Color; - float3 const a_Normal = tint_symbol_1.a_Normal; - float const a_PosMtxIdx = tint_symbol_1.a_PosMtxIdx; - tint_symbol_14 = a_Position; - tint_symbol_15 = a_UV; - tint_symbol_16 = a_Color; - tint_symbol_17 = a_Normal; - tint_symbol_18 = a_PosMtxIdx; - main1(global2, global, global1, &(tint_symbol_18), &(tint_symbol_14), &(tint_symbol_19), &(tint_symbol_16), &(tint_symbol_20), &(tint_symbol_17), &(tint_symbol_21), &(tint_symbol_15)); - float4 const _e11 = tint_symbol_20; - float2 const _e13 = tint_symbol_21; - float4 const _e15 = tint_symbol_19; +VertexOutput tint_symbol_inner(constant ub_PacketParams& global2, constant ub_SceneParams& global, constant ub_MaterialParams& global1, float3 a_Position, float2 a_UV, float4 a_Color, float3 a_Normal, float a_PosMtxIdx, thread float3* const tint_symbol_13, thread float2* const tint_symbol_14, thread float4* const tint_symbol_15, thread float3* const tint_symbol_16, thread float* const tint_symbol_17, thread float4* const tint_symbol_18, thread float4* const tint_symbol_19, thread float2* const tint_symbol_20) { + *(tint_symbol_13) = a_Position; + *(tint_symbol_14) = a_UV; + *(tint_symbol_15) = a_Color; + *(tint_symbol_16) = a_Normal; + *(tint_symbol_17) = a_PosMtxIdx; + main1(global2, global, global1, tint_symbol_17, tint_symbol_13, tint_symbol_18, tint_symbol_15, tint_symbol_19, tint_symbol_16, tint_symbol_20, tint_symbol_14); + float4 const _e11 = *(tint_symbol_19); + float2 const _e13 = *(tint_symbol_20); + float4 const _e15 = *(tint_symbol_18); VertexOutput const tint_symbol_4 = {.v_Color=_e11, .v_TexCoord=_e13, .member=_e15}; - tint_symbol_3 const tint_symbol_5 = {.v_Color=tint_symbol_4.v_Color, .v_TexCoord=tint_symbol_4.v_TexCoord, .member=tint_symbol_4.member}; - return tint_symbol_5; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant ub_PacketParams& global2 [[buffer(2)]], constant ub_SceneParams& global [[buffer(0)]], constant ub_MaterialParams& global1 [[buffer(1)]]) { + thread float3 tint_symbol_21 = 0.0f; + thread float2 tint_symbol_22 = 0.0f; + thread float4 tint_symbol_23 = 0.0f; + thread float3 tint_symbol_24 = 0.0f; + thread float tint_symbol_25 = 0.0f; + thread float4 tint_symbol_26 = 0.0f; + thread float4 tint_symbol_27 = 0.0f; + thread float2 tint_symbol_28 = 0.0f; + VertexOutput const inner_result = tint_symbol_inner(global2, global, global1, tint_symbol_1.a_Position, tint_symbol_1.a_UV, tint_symbol_1.a_Color, tint_symbol_1.a_Normal, tint_symbol_1.a_PosMtxIdx, &(tint_symbol_21), &(tint_symbol_22), &(tint_symbol_23), &(tint_symbol_24), &(tint_symbol_25), &(tint_symbol_26), &(tint_symbol_27), &(tint_symbol_28)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.v_Color = inner_result.v_Color; + wrapper_result.v_TexCoord = inner_result.v_TexCoord; + wrapper_result.member = inner_result.member; + return wrapper_result; } diff --git a/test/bug/tint/926.wgsl.expected.hlsl b/test/bug/tint/926.wgsl.expected.hlsl index 87ebecba73..9f7e997c6f 100644 --- a/test/bug/tint/926.wgsl.expected.hlsl +++ b/test/bug/tint/926.wgsl.expected.hlsl @@ -11,9 +11,12 @@ struct tint_symbol_1 { uint3 global_id : SV_DispatchThreadID; }; +void computeMain_inner(uint3 global_id) { + const uint firstVertex = atomicAdd_1(drawOut, 0u, cubeVerts); +} + [numthreads(1, 1, 1)] void computeMain(tint_symbol_1 tint_symbol) { - const uint3 global_id = tint_symbol.global_id; - const uint firstVertex = atomicAdd_1(drawOut, 0u, cubeVerts); + computeMain_inner(tint_symbol.global_id); return; } diff --git a/test/bug/tint/926.wgsl.expected.msl b/test/bug/tint/926.wgsl.expected.msl index c05ab22917..0c15829835 100644 --- a/test/bug/tint/926.wgsl.expected.msl +++ b/test/bug/tint/926.wgsl.expected.msl @@ -5,9 +5,13 @@ struct DrawIndirectArgs { /* 0x0000 */ atomic_uint vertexCount; }; +void computeMain_inner(device DrawIndirectArgs& drawOut, uint3 global_id, thread uint* const tint_symbol) { + uint const firstVertex = atomic_fetch_add_explicit(&(drawOut.vertexCount), *(tint_symbol), memory_order_relaxed); +} + kernel void computeMain(uint3 global_id [[thread_position_in_grid]], device DrawIndirectArgs& drawOut [[buffer(5)]]) { thread uint tint_symbol_1 = 0u; - uint const firstVertex = atomic_fetch_add_explicit(&(drawOut.vertexCount), tint_symbol_1, memory_order_relaxed); + computeMain_inner(drawOut, global_id, &(tint_symbol_1)); return; } diff --git a/test/bug/tint/942.wgsl.expected.hlsl b/test/bug/tint/942.wgsl.expected.hlsl index 9be851bcae..2325c62f5e 100644 --- a/test/bug/tint/942.wgsl.expected.hlsl +++ b/test/bug/tint/942.wgsl.expected.hlsl @@ -16,11 +16,7 @@ struct tint_symbol_1 { uint3 WorkGroupID : SV_GroupID; }; -[numthreads(64, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 WorkGroupID = tint_symbol.WorkGroupID; - const uint3 LocalInvocationID = tint_symbol.LocalInvocationID; - const uint local_invocation_index = tint_symbol.local_invocation_index; +void main_inner(uint3 WorkGroupID, uint3 LocalInvocationID, uint local_invocation_index) { { for(uint idx = local_invocation_index; (idx < 1024u); idx = (idx + 64u)) { const uint i_1 = (idx / 256u); @@ -79,5 +75,10 @@ void main(tint_symbol_1 tint_symbol) { } } } +} + +[numthreads(64, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.WorkGroupID, tint_symbol.LocalInvocationID, tint_symbol.local_invocation_index); return; } diff --git a/test/bug/tint/942.wgsl.expected.msl b/test/bug/tint/942.wgsl.expected.msl index 8ae5eb16e3..ad93bb522d 100644 --- a/test/bug/tint/942.wgsl.expected.msl +++ b/test/bug/tint/942.wgsl.expected.msl @@ -15,16 +15,15 @@ struct tint_array_wrapper { tint_array_wrapper_1 arr[4]; }; -kernel void tint_symbol(texture2d tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]], texture2d tint_symbol_5 [[texture(2)]], uint3 WorkGroupID [[threadgroup_position_in_grid]], uint3 LocalInvocationID [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Params& params [[buffer(1)]], constant Flip& flip [[buffer(3)]]) { - threadgroup tint_array_wrapper tint_symbol_2; +void tint_symbol_inner(constant Params& params, constant Flip& flip, uint3 WorkGroupID, uint3 LocalInvocationID, uint local_invocation_index, threadgroup tint_array_wrapper* const tint_symbol_1, texture2d tint_symbol_2, sampler tint_symbol_3, texture2d tint_symbol_4) { for(uint idx = local_invocation_index; (idx < 1024u); idx = (idx + 64u)) { uint const i_1 = (idx / 256u); uint const i_2 = (idx % 256u); - tint_symbol_2.arr[i_1].arr[i_2] = float3(); + (*(tint_symbol_1)).arr[i_1].arr[i_2] = float3(); } threadgroup_barrier(mem_flags::mem_threadgroup); uint const filterOffset = ((params.filterDim - 1u) / 2u); - int2 const dims = int2(tint_symbol_3.get_width(0), tint_symbol_3.get_height(0)); + int2 const dims = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); int2 const baseIndex = as_type((as_type(int2(((WorkGroupID.xy * uint2(params.blockDim, 4u)) + (LocalInvocationID.xy * uint2(4u, 1u))))) - as_type(int2(int(filterOffset), 0)))); for(uint r = 0u; (r < 4u); r = (r + 1u)) { for(uint c = 0u; (c < 4u); c = (c + 1u)) { @@ -32,7 +31,7 @@ kernel void tint_symbol(texture2d tint_symbol_3 [[texture if ((flip.value != 0u)) { loadIndex = loadIndex.yx; } - tint_symbol_2.arr[r].arr[((4u * LocalInvocationID.x) + c)] = tint_symbol_3.sample(tint_symbol_4, ((float2(loadIndex) + float2(0.25f, 0.25f)) / float2(dims)), level(0.0f)).rgb; + (*(tint_symbol_1)).arr[r].arr[((4u * LocalInvocationID.x) + c)] = tint_symbol_2.sample(tint_symbol_3, ((float2(loadIndex) + float2(0.25f, 0.25f)) / float2(dims)), level(0.0f)).rgb; } } threadgroup_barrier(mem_flags::mem_threadgroup); @@ -47,12 +46,17 @@ kernel void tint_symbol(texture2d tint_symbol_3 [[texture float3 acc = float3(0.0f, 0.0f, 0.0f); for(uint f = 0u; (f < params.filterDim); f = (f + 1u)) { uint i = ((center + f) - filterOffset); - acc = (acc + ((1.0f / float(params.filterDim)) * tint_symbol_2.arr[r].arr[i])); + acc = (acc + ((1.0f / float(params.filterDim)) * (*(tint_symbol_1)).arr[r].arr[i])); } - tint_symbol_5.write(float4(acc, 1.0f), uint2(writeIndex)); + tint_symbol_4.write(float4(acc, 1.0f), uint2(writeIndex)); } } } +} + +kernel void tint_symbol(texture2d tint_symbol_6 [[texture(1)]], sampler tint_symbol_7 [[sampler(0)]], texture2d tint_symbol_8 [[texture(2)]], uint3 WorkGroupID [[threadgroup_position_in_grid]], uint3 LocalInvocationID [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Params& params [[buffer(1)]], constant Flip& flip [[buffer(3)]]) { + threadgroup tint_array_wrapper tint_symbol_5; + tint_symbol_inner(params, flip, WorkGroupID, LocalInvocationID, local_invocation_index, &(tint_symbol_5), tint_symbol_6, tint_symbol_7, tint_symbol_8); return; } diff --git a/test/bug/tint/943.spvasm.expected.hlsl b/test/bug/tint/943.spvasm.expected.hlsl index 6fd1af26d9..38e87d39b8 100644 --- a/test/bug/tint/943.spvasm.expected.hlsl +++ b/test/bug/tint/943.spvasm.expected.hlsl @@ -345,11 +345,7 @@ struct tint_symbol_1 { uint3 gl_GlobalInvocationID_param : SV_DispatchThreadID; }; -[numthreads(1, 64, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 gl_LocalInvocationID_param = tint_symbol.gl_LocalInvocationID_param; - const uint3 gl_GlobalInvocationID_param = tint_symbol.gl_GlobalInvocationID_param; - const uint local_invocation_index = tint_symbol.local_invocation_index; +void main_inner(uint3 gl_LocalInvocationID_param, uint3 gl_GlobalInvocationID_param, uint local_invocation_index) { { const uint i_1 = local_invocation_index; const uint i_2 = (local_invocation_index % 1u); @@ -366,5 +362,10 @@ void main(tint_symbol_1 tint_symbol) { gl_LocalInvocationID = gl_LocalInvocationID_param; gl_GlobalInvocationID = gl_GlobalInvocationID_param; main_1(); +} + +[numthreads(1, 64, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.gl_LocalInvocationID_param, tint_symbol.gl_GlobalInvocationID_param, tint_symbol.local_invocation_index); return; } diff --git a/test/bug/tint/943.spvasm.expected.msl b/test/bug/tint/943.spvasm.expected.msl index ae7f081506..9ce264b9b2 100644 --- a/test/bug/tint/943.spvasm.expected.msl +++ b/test/bug/tint/943.spvasm.expected.msl @@ -53,7 +53,7 @@ bool coordsInBounds_vi2_vi2_(thread int2* const coord, thread int2* const shape) return x_88; } -float mm_readA_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, thread int* const row, thread int* const col, thread int* const tint_symbol_3, thread int* const tint_symbol_4, thread int* const tint_symbol_5) { +float mm_readA_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, thread int* const row, thread int* const col, thread int* const tint_symbol_2, thread int* const tint_symbol_3, thread int* const tint_symbol_4) { int batchASize = 0; int2 param_10 = 0; int2 param_11 = 0; @@ -63,16 +63,16 @@ float mm_readA_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, thread batchASize = as_type((as_type(x_417) * as_type(x_419))); int const x_421 = *(row); int const x_422 = *(col); - int const x_424 = *(tint_symbol_3); - int const x_425 = *(tint_symbol_4); + int const x_424 = *(tint_symbol_2); + int const x_425 = *(tint_symbol_3); param_10 = int2(x_421, x_422); param_11 = int2(x_424, x_425); bool const x_429 = coordsInBounds_vi2_vi2_(&(param_10), &(param_11)); if (x_429) { - int const x_438 = *(tint_symbol_5); + int const x_438 = *(tint_symbol_4); int const x_439 = batchASize; int const x_441 = *(row); - int const x_442 = *(tint_symbol_4); + int const x_442 = *(tint_symbol_3); int const x_445 = *(col); float const x_448 = x_165.A[as_type((as_type(as_type((as_type(as_type((as_type(x_438) * as_type(x_439)))) + as_type(as_type((as_type(x_441) * as_type(x_442))))))) + as_type(x_445)))]; x_430 = x_448; @@ -83,7 +83,7 @@ float mm_readA_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, thread return x_450; } -float mm_readB_i1_i1_(constant Uniforms& x_48, const device ssbB& x_185, thread int* const row_1, thread int* const col_1, thread int* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) { +float mm_readB_i1_i1_(constant Uniforms& x_48, const device ssbB& x_185, thread int* const row_1, thread int* const col_1, thread int* const tint_symbol_5, thread int* const tint_symbol_6, thread int* const tint_symbol_7) { int batchBSize = 0; int2 param_12 = 0; int2 param_13 = 0; @@ -93,16 +93,16 @@ float mm_readB_i1_i1_(constant Uniforms& x_48, const device ssbB& x_185, thread batchBSize = as_type((as_type(x_455) * as_type(x_457))); int const x_459 = *(row_1); int const x_460 = *(col_1); - int const x_462 = *(tint_symbol_6); - int const x_463 = *(tint_symbol_7); + int const x_462 = *(tint_symbol_5); + int const x_463 = *(tint_symbol_6); param_12 = int2(x_459, x_460); param_13 = int2(x_462, x_463); bool const x_467 = coordsInBounds_vi2_vi2_(&(param_12), &(param_13)); if (x_467) { - int const x_475 = *(tint_symbol_8); + int const x_475 = *(tint_symbol_7); int const x_476 = batchBSize; int const x_478 = *(row_1); - int const x_479 = *(tint_symbol_7); + int const x_479 = *(tint_symbol_6); int const x_482 = *(col_1); float const x_485 = x_185.B[as_type((as_type(as_type((as_type(as_type((as_type(x_475) * as_type(x_476)))) + as_type(as_type((as_type(x_478) * as_type(x_479))))))) + as_type(x_482)))]; x_468 = x_485; @@ -146,17 +146,17 @@ void setOutput_i1_i1_i1_f1_(constant Uniforms& x_48, device ssbOut& x_54, thread return; } -void mm_write_i1_i1_f1_(constant Uniforms& x_48, device ssbOut& x_54, thread int* const row_2, thread int* const col_2, thread float* const value_2, thread int* const tint_symbol_9) { +void mm_write_i1_i1_f1_(constant Uniforms& x_48, device ssbOut& x_54, thread int* const row_2, thread int* const col_2, thread float* const value_2, thread int* const tint_symbol_8) { int3 outCoord = 0; int param_14 = 0; int param_15 = 0; int param_16 = 0; float param_17 = 0.0f; - int const x_491 = *(tint_symbol_9); + int const x_491 = *(tint_symbol_8); int const x_492 = *(row_2); int const x_493 = *(col_2); outCoord = int3(x_491, x_492, x_493); - int const x_496 = *(tint_symbol_9); + int const x_496 = *(tint_symbol_8); param_14 = x_496; int const x_498 = *(row_2); param_15 = x_498; @@ -168,7 +168,7 @@ void mm_write_i1_i1_f1_(constant Uniforms& x_48, device ssbOut& x_54, thread int return; } -void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, const device ssbB& x_185, device ssbOut& x_54, thread int* const dimAOuter, thread int* const dimInner, thread int* const dimBOuter, thread uint3* const tint_symbol_10, thread uint3* const tint_symbol_11, thread int* const tint_symbol_12, thread int* const tint_symbol_13, thread int* const tint_symbol_14, threadgroup tint_array_wrapper* const tint_symbol_15, thread int* const tint_symbol_16, threadgroup tint_array_wrapper_2* const tint_symbol_17) { +void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, const device ssbB& x_185, device ssbOut& x_54, thread int* const dimAOuter, thread int* const dimInner, thread int* const dimBOuter, thread uint3* const tint_symbol_9, thread uint3* const tint_symbol_10, thread int* const tint_symbol_11, thread int* const tint_symbol_12, thread int* const tint_symbol_13, threadgroup tint_array_wrapper* const tint_symbol_14, thread int* const tint_symbol_15, threadgroup tint_array_wrapper_2* const tint_symbol_16) { int tileRow = 0; int tileCol = 0; int globalRow = 0; @@ -203,13 +203,13 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons int param_7 = 0; int param_8 = 0; float param_9 = 0.0f; - uint const x_132 = (*(tint_symbol_10)).y; + uint const x_132 = (*(tint_symbol_9)).y; tileRow = as_type((as_type(as_type(x_132)) * as_type(1))); - uint const x_137 = (*(tint_symbol_10)).x; + uint const x_137 = (*(tint_symbol_9)).x; tileCol = as_type((as_type(as_type(x_137)) * as_type(1))); - uint const x_143 = (*(tint_symbol_11)).y; + uint const x_143 = (*(tint_symbol_10)).y; globalRow = as_type((as_type(as_type(x_143)) * as_type(1))); - uint const x_148 = (*(tint_symbol_11)).x; + uint const x_148 = (*(tint_symbol_10)).x; globalCol = as_type((as_type(as_type(x_148)) * as_type(1))); int const x_152 = *(dimInner); numTiles = as_type((as_type((as_type((as_type(x_152) - as_type(1))) / 64)) + as_type(1))); @@ -240,9 +240,9 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons innerRow = as_type((as_type(x_183) + as_type(1))); } } - uint const x_187 = (*(tint_symbol_10)).x; + uint const x_187 = (*(tint_symbol_9)).x; tileColA = as_type((as_type(as_type(x_187)) * as_type(64))); - uint const x_192 = (*(tint_symbol_10)).y; + uint const x_192 = (*(tint_symbol_9)).y; tileRowB = as_type((as_type(as_type(x_192)) * as_type(1))); t = 0; while (true) { @@ -280,8 +280,8 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons int const x_240 = inputCol; param_3 = as_type((as_type(x_235) + as_type(x_236))); param_4 = as_type((as_type(as_type((as_type(x_238) * as_type(64)))) + as_type(x_240))); - float const x_244 = mm_readA_i1_i1_(x_48, x_165, &(param_3), &(param_4), tint_symbol_12, tint_symbol_13, tint_symbol_14); - (*(tint_symbol_15)).arr[x_233].arr[x_234] = x_244; + float const x_244 = mm_readA_i1_i1_(x_48, x_165, &(param_3), &(param_4), tint_symbol_11, tint_symbol_12, tint_symbol_13); + (*(tint_symbol_14)).arr[x_233].arr[x_234] = x_244; { int const x_247 = innerCol_1; innerCol_1 = as_type((as_type(x_247) + as_type(1))); @@ -320,8 +320,8 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons int const x_285 = innerCol_2; param_5 = as_type((as_type(as_type((as_type(x_280) * as_type(64)))) + as_type(x_282))); param_6 = as_type((as_type(x_284) + as_type(x_285))); - float const x_289 = mm_readB_i1_i1_(x_48, x_185, &(param_5), &(param_6), tint_symbol_13, tint_symbol_16, tint_symbol_14); - (*(tint_symbol_17)).arr[x_278].arr[x_279] = x_289; + float const x_289 = mm_readB_i1_i1_(x_48, x_185, &(param_5), &(param_6), tint_symbol_12, tint_symbol_15, tint_symbol_13); + (*(tint_symbol_16)).arr[x_278].arr[x_279] = x_289; { int const x_291 = innerCol_2; innerCol_2 = as_type((as_type(x_291) + as_type(1))); @@ -351,7 +351,7 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons int const x_315 = k; int const x_316 = tileCol; int const x_317 = inner; - float const x_320 = (*(tint_symbol_17)).arr[x_315].arr[as_type((as_type(x_316) + as_type(x_317)))]; + float const x_320 = (*(tint_symbol_16)).arr[x_315].arr[as_type((as_type(x_316) + as_type(x_317)))]; BCached.arr[x_314] = x_320; { int const x_322 = inner; @@ -368,7 +368,7 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons int const x_333 = tileRow; int const x_334 = innerRow_3; int const x_336 = k; - float const x_338 = (*(tint_symbol_15)).arr[as_type((as_type(x_333) + as_type(x_334)))].arr[x_336]; + float const x_338 = (*(tint_symbol_14)).arr[as_type((as_type(x_333) + as_type(x_334)))].arr[x_336]; ACached = x_338; innerCol_3 = 0; while (true) { @@ -445,7 +445,7 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons param_8 = as_type((as_type(x_400) + as_type(x_401))); float const x_409 = acc.arr[x_403].arr[x_404]; param_9 = x_409; - mm_write_i1_i1_f1_(x_48, x_54, &(param_7), &(param_8), &(param_9), tint_symbol_14); + mm_write_i1_i1_f1_(x_48, x_54, &(param_7), &(param_8), &(param_9), tint_symbol_13); } { int const x_411 = innerCol_4; @@ -460,51 +460,55 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons return; } -void main_1(constant Uniforms& x_48, const device ssbA& x_165, const device ssbB& x_185, device ssbOut& x_54, thread int* const tint_symbol_18, thread int* const tint_symbol_19, thread int* const tint_symbol_20, thread uint3* const tint_symbol_21, thread int* const tint_symbol_22, thread uint3* const tint_symbol_23, threadgroup tint_array_wrapper* const tint_symbol_24, threadgroup tint_array_wrapper_2* const tint_symbol_25) { +void main_1(constant Uniforms& x_48, const device ssbA& x_165, const device ssbB& x_185, device ssbOut& x_54, thread int* const tint_symbol_17, thread int* const tint_symbol_18, thread int* const tint_symbol_19, thread uint3* const tint_symbol_20, thread int* const tint_symbol_21, thread uint3* const tint_symbol_22, threadgroup tint_array_wrapper* const tint_symbol_23, threadgroup tint_array_wrapper_2* const tint_symbol_24) { int param_18 = 0; int param_19 = 0; int param_20 = 0; int const x_67 = x_48.aShape.y; - *(tint_symbol_18) = x_67; + *(tint_symbol_17) = x_67; int const x_71 = x_48.aShape.z; - *(tint_symbol_19) = x_71; + *(tint_symbol_18) = x_71; int const x_75 = x_48.bShape.z; - *(tint_symbol_20) = x_75; - uint const x_505 = (*(tint_symbol_21)).z; - *(tint_symbol_22) = as_type(x_505); - int const x_508 = *(tint_symbol_18); + *(tint_symbol_19) = x_75; + uint const x_505 = (*(tint_symbol_20)).z; + *(tint_symbol_21) = as_type(x_505); + int const x_508 = *(tint_symbol_17); param_18 = x_508; - int const x_510 = *(tint_symbol_19); + int const x_510 = *(tint_symbol_18); param_19 = x_510; - int const x_512 = *(tint_symbol_20); + int const x_512 = *(tint_symbol_19); param_20 = x_512; - mm_matMul_i1_i1_i1_(x_48, x_165, x_185, x_54, &(param_18), &(param_19), &(param_20), tint_symbol_23, tint_symbol_21, tint_symbol_18, tint_symbol_19, tint_symbol_22, tint_symbol_24, tint_symbol_20, tint_symbol_25); + mm_matMul_i1_i1_i1_(x_48, x_165, x_185, x_54, &(param_18), &(param_19), &(param_20), tint_symbol_22, tint_symbol_20, tint_symbol_17, tint_symbol_18, tint_symbol_21, tint_symbol_23, tint_symbol_19, tint_symbol_24); return; } -kernel void tint_symbol_1(uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Uniforms& x_48 [[buffer(3)]], const device ssbA& x_165 [[buffer(1)]], const device ssbB& x_185 [[buffer(2)]], device ssbOut& x_54 [[buffer(0)]]) { - threadgroup tint_array_wrapper_2 tint_symbol_26; - threadgroup tint_array_wrapper tint_symbol_27; - thread uint3 tint_symbol_28 = 0u; - thread uint3 tint_symbol_29 = 0u; - thread int tint_symbol_30 = 0; - thread int tint_symbol_31 = 0; - thread int tint_symbol_32 = 0; - thread int tint_symbol_33 = 0; +void tint_symbol_1_inner(constant Uniforms& x_48, const device ssbA& x_165, const device ssbB& x_185, device ssbOut& x_54, uint3 gl_LocalInvocationID_param, uint3 gl_GlobalInvocationID_param, uint local_invocation_index, threadgroup tint_array_wrapper_2* const tint_symbol_25, threadgroup tint_array_wrapper* const tint_symbol_26, thread uint3* const tint_symbol_27, thread uint3* const tint_symbol_28, thread int* const tint_symbol_29, thread int* const tint_symbol_30, thread int* const tint_symbol_31, thread int* const tint_symbol_32) { { uint const i_1 = local_invocation_index; uint const i_2 = (local_invocation_index % 1u); - tint_symbol_26.arr[i_1].arr[i_2] = float(); + (*(tint_symbol_25)).arr[i_1].arr[i_2] = float(); } for(uint idx = local_invocation_index; (idx < 4096u); idx = (idx + 64u)) { uint const i = (idx / 64u); uint const i_1 = (idx % 64u); - tint_symbol_27.arr[i].arr[i_1] = float(); + (*(tint_symbol_26)).arr[i].arr[i_1] = float(); } threadgroup_barrier(mem_flags::mem_threadgroup); - tint_symbol_28 = gl_LocalInvocationID_param; - tint_symbol_29 = gl_GlobalInvocationID_param; - main_1(x_48, x_165, x_185, x_54, &(tint_symbol_30), &(tint_symbol_31), &(tint_symbol_32), &(tint_symbol_29), &(tint_symbol_33), &(tint_symbol_28), &(tint_symbol_27), &(tint_symbol_26)); + *(tint_symbol_27) = gl_LocalInvocationID_param; + *(tint_symbol_28) = gl_GlobalInvocationID_param; + main_1(x_48, x_165, x_185, x_54, tint_symbol_29, tint_symbol_30, tint_symbol_31, tint_symbol_28, tint_symbol_32, tint_symbol_27, tint_symbol_26, tint_symbol_25); +} + +kernel void tint_symbol_1(uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Uniforms& x_48 [[buffer(3)]], const device ssbA& x_165 [[buffer(1)]], const device ssbB& x_185 [[buffer(2)]], device ssbOut& x_54 [[buffer(0)]]) { + threadgroup tint_array_wrapper_2 tint_symbol_33; + threadgroup tint_array_wrapper tint_symbol_34; + thread uint3 tint_symbol_35 = 0u; + thread uint3 tint_symbol_36 = 0u; + thread int tint_symbol_37 = 0; + thread int tint_symbol_38 = 0; + thread int tint_symbol_39 = 0; + thread int tint_symbol_40 = 0; + tint_symbol_1_inner(x_48, x_165, x_185, x_54, gl_LocalInvocationID_param, gl_GlobalInvocationID_param, local_invocation_index, &(tint_symbol_33), &(tint_symbol_34), &(tint_symbol_35), &(tint_symbol_36), &(tint_symbol_37), &(tint_symbol_38), &(tint_symbol_39), &(tint_symbol_40)); return; } diff --git a/test/bug/tint/948.wgsl.expected.hlsl b/test/bug/tint/948.wgsl.expected.hlsl index 694cd53da8..869f3e3ea6 100644 --- a/test/bug/tint/948.wgsl.expected.hlsl +++ b/test/bug/tint/948.wgsl.expected.hlsl @@ -164,13 +164,7 @@ struct tint_symbol_2 { float4 glFragColor_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float2 tUV_param = tint_symbol.tUV_param; - const float2 tileID_1_param = tint_symbol.tileID_1_param; - const float2 levelUnits_param = tint_symbol.levelUnits_param; - const float2 stageUnits_1_param = tint_symbol.stageUnits_1_param; - const float3 vPosition_param = tint_symbol.vPosition_param; - const float2 vUV_param = tint_symbol.vUV_param; +main_out main_inner(float2 tUV_param, float2 tileID_1_param, float2 levelUnits_param, float2 stageUnits_1_param, float3 vPosition_param, float2 vUV_param) { tUV = tUV_param; tileID_1 = tileID_1_param; levelUnits = levelUnits_param; @@ -178,7 +172,13 @@ tint_symbol_2 main(tint_symbol_1 tint_symbol) { vPosition = vPosition_param; vUV = vUV_param; main_1(); - const main_out tint_symbol_3 = {glFragColor}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.glFragColor_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {glFragColor}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.tUV_param, tint_symbol.tileID_1_param, tint_symbol.levelUnits_param, tint_symbol.stageUnits_1_param, tint_symbol.vPosition_param, tint_symbol.vUV_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.glFragColor_1 = inner_result.glFragColor_1; + return wrapper_result; } diff --git a/test/bug/tint/948.wgsl.expected.msl b/test/bug/tint/948.wgsl.expected.msl index 86ebd22797..a1007e061e 100644 --- a/test/bug/tint/948.wgsl.expected.msl +++ b/test/bug/tint/948.wgsl.expected.msl @@ -29,21 +29,21 @@ struct tint_symbol_3 { float4 glFragColor_1 [[color(0)]]; }; -float4x4 getFrameData_f1_(constant LeftOver& x_20, thread float* const frameID, texture2d tint_symbol_6, sampler tint_symbol_7) { +float4x4 getFrameData_f1_(constant LeftOver& x_20, thread float* const frameID, texture2d tint_symbol_5, sampler tint_symbol_6) { float fX = 0.0f; float const x_15 = *(frameID); float const x_25 = x_20.spriteCount; fX = (x_15 / x_25); float const x_37 = fX; - float4 const x_40 = tint_symbol_6.sample(tint_symbol_7, float2(x_37, 0.0f), bias(0.0f)); + float4 const x_40 = tint_symbol_5.sample(tint_symbol_6, float2(x_37, 0.0f), bias(0.0f)); float const x_44 = fX; - float4 const x_47 = tint_symbol_6.sample(tint_symbol_7, float2(x_44, 0.25f), bias(0.0f)); + float4 const x_47 = tint_symbol_5.sample(tint_symbol_6, float2(x_44, 0.25f), bias(0.0f)); float const x_51 = fX; - float4 const x_54 = tint_symbol_6.sample(tint_symbol_7, float2(x_51, 0.5f), bias(0.0f)); + float4 const x_54 = tint_symbol_5.sample(tint_symbol_6, float2(x_51, 0.5f), bias(0.0f)); return float4x4(float4(x_40.x, x_40.y, x_40.z, x_40.w), float4(x_47.x, x_47.y, x_47.z, x_47.w), float4(x_54.x, x_54.y, x_54.z, x_54.w), float4(float4(0.0f, 0.0f, 0.0f, 0.0f).x, float4(0.0f, 0.0f, 0.0f, 0.0f).y, float4(0.0f, 0.0f, 0.0f, 0.0f).z, float4(0.0f, 0.0f, 0.0f, 0.0f).w)); } -void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_8, texture2d tint_symbol_9, sampler tint_symbol_10, texture2d tint_symbol_11, texture2d tint_symbol_12, sampler tint_symbol_13, thread float* const tint_symbol_14, texture2d tint_symbol_15, sampler tint_symbol_16, texture2d tint_symbol_17, sampler tint_symbol_18, thread float4* const tint_symbol_19) { +void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_7, texture2d tint_symbol_8, sampler tint_symbol_9, texture2d tint_symbol_10, texture2d tint_symbol_11, sampler tint_symbol_12, thread float* const tint_symbol_13, texture2d tint_symbol_14, sampler tint_symbol_15, texture2d tint_symbol_16, sampler tint_symbol_17, thread float4* const tint_symbol_18) { float4 color = 0.0f; float2 tileUV = 0.0f; float2 tileID = 0.0f; @@ -63,11 +63,11 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_8, texture float alpha = 0.0f; float3 mixed = 0.0f; color = float4(0.0f, 0.0f, 0.0f, 0.0f); - float2 const x_86 = *(tint_symbol_8); + float2 const x_86 = *(tint_symbol_7); tileUV = fract(x_86); float const x_91 = tileUV.y; tileUV.y = (1.0f - x_91); - float2 const x_95 = *(tint_symbol_8); + float2 const x_95 = *(tint_symbol_7); tileID = floor(x_95); float2 const x_101 = x_20.spriteMapSize; sheetUnits = (float2(1.0f, 1.0f) / x_101); @@ -87,14 +87,14 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_8, texture case 1: { float2 const x_150 = tileID; float2 const x_154 = x_20.stageSize; - float4 const x_156 = tint_symbol_9.sample(tint_symbol_10, ((x_150 + float2(0.5f, 0.5f)) / x_154), bias(0.0f)); + float4 const x_156 = tint_symbol_8.sample(tint_symbol_9, ((x_150 + float2(0.5f, 0.5f)) / x_154), bias(0.0f)); frameID_1 = x_156.x; break; } case 0: { float2 const x_136 = tileID; float2 const x_140 = x_20.stageSize; - float4 const x_142 = tint_symbol_11.sample(tint_symbol_10, ((x_136 + float2(0.5f, 0.5f)) / x_140), bias(0.0f)); + float4 const x_142 = tint_symbol_10.sample(tint_symbol_9, ((x_136 + float2(0.5f, 0.5f)) / x_140), bias(0.0f)); frameID_1 = x_142.x; break; } @@ -104,13 +104,13 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_8, texture } float const x_166 = frameID_1; float const x_169 = x_20.spriteCount; - float4 const x_172 = tint_symbol_12.sample(tint_symbol_13, float2(((x_166 + 0.5f) / x_169), 0.0f), bias(0.0f)); + float4 const x_172 = tint_symbol_11.sample(tint_symbol_12, float2(((x_166 + 0.5f) / x_169), 0.0f), bias(0.0f)); animationData = x_172; float const x_174 = animationData.y; if ((x_174 > 0.0f)) { float const x_181 = x_20.time; float const x_184 = animationData.z; - *(tint_symbol_14) = fmod((x_181 * x_184), 1.0f); + *(tint_symbol_13) = fmod((x_181 * x_184), 1.0f); f = 0.0f; while (true) { float const x_193 = f; @@ -119,7 +119,7 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_8, texture break; } float const x_197 = animationData.y; - float const x_198 = *(tint_symbol_14); + float const x_198 = *(tint_symbol_13); if ((x_197 > x_198)) { float const x_203 = animationData.x; frameID_1 = x_203; @@ -128,7 +128,7 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_8, texture float const x_208 = frameID_1; float const x_211 = x_20.spriteCount; float const x_214 = f; - float4 const x_217 = tint_symbol_12.sample(tint_symbol_13, float2(((x_208 + 0.5f) / x_211), (0.125f * x_214)), bias(0.0f)); + float4 const x_217 = tint_symbol_11.sample(tint_symbol_12, float2(((x_208 + 0.5f) / x_211), (0.125f * x_214)), bias(0.0f)); animationData = x_217; { float const x_218 = f; @@ -138,7 +138,7 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_8, texture } float const x_222 = frameID_1; param = (x_222 + 0.5f); - float4x4 const x_225 = getFrameData_f1_(x_20, &(param), tint_symbol_15, tint_symbol_16); + float4x4 const x_225 = getFrameData_f1_(x_20, &(param), tint_symbol_14, tint_symbol_15); frameData = x_225; float4 const x_228 = frameData[0]; float2 const x_231 = x_20.spriteMapSize; @@ -159,13 +159,13 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_8, texture float2 const x_263 = tileUV; float2 const x_264 = frameSize; float2 const x_266 = offset_1; - float4 const x_268 = tint_symbol_17.sample(tint_symbol_18, ((x_263 * x_264) + x_266)); + float4 const x_268 = tint_symbol_16.sample(tint_symbol_17, ((x_263 * x_264) + x_266)); color = x_268; } else { float2 const x_274 = tileUV; float2 const x_275 = frameSize; float2 const x_277 = offset_1; - float4 const x_279 = tint_symbol_17.sample(tint_symbol_18, ((x_274 * x_275) + x_277)); + float4 const x_279 = tint_symbol_16.sample(tint_symbol_17, ((x_274 * x_275) + x_277)); nc = x_279; float const x_283 = color.w; float const x_285 = nc.w; @@ -189,34 +189,34 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_8, texture float4 const x_314 = color; color = float4(x_313.x, x_313.y, x_313.z, x_314.w); float4 const x_318 = color; - *(tint_symbol_19) = x_318; + *(tint_symbol_18) = x_318; return; } -fragment tint_symbol_3 tint_symbol(texture2d tint_symbol_26 [[texture(6)]], sampler tint_symbol_27 [[sampler(4)]], texture2d tint_symbol_28 [[texture(5)]], texture2d tint_symbol_29 [[texture(8)]], sampler tint_symbol_30 [[sampler(7)]], texture2d tint_symbol_32 [[texture(3)]], sampler tint_symbol_33 [[sampler(2)]], texture2d tint_symbol_34 [[texture(1)]], sampler tint_symbol_35 [[sampler(0)]], tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_20 [[buffer(9)]]) { - thread float2 tint_symbol_20 = 0.0f; - thread float2 tint_symbol_21 = 0.0f; - thread float2 tint_symbol_22 = 0.0f; - thread float2 tint_symbol_23 = 0.0f; - thread float3 tint_symbol_24 = 0.0f; - thread float2 tint_symbol_25 = 0.0f; - thread float tint_symbol_31 = 0.0f; - thread float4 tint_symbol_36 = 0.0f; - float2 const tUV_param = tint_symbol_1.tUV_param; - float2 const tileID_1_param = tint_symbol_1.tileID_1_param; - float2 const levelUnits_param = tint_symbol_1.levelUnits_param; - float2 const stageUnits_1_param = tint_symbol_1.stageUnits_1_param; - float3 const vPosition_param = tint_symbol_1.vPosition_param; - float2 const vUV_param = tint_symbol_1.vUV_param; - tint_symbol_20 = tUV_param; - tint_symbol_21 = tileID_1_param; - tint_symbol_22 = levelUnits_param; - tint_symbol_23 = stageUnits_1_param; - tint_symbol_24 = vPosition_param; - tint_symbol_25 = vUV_param; - main_1(x_20, &(tint_symbol_20), tint_symbol_26, tint_symbol_27, tint_symbol_28, tint_symbol_29, tint_symbol_30, &(tint_symbol_31), tint_symbol_32, tint_symbol_33, tint_symbol_34, tint_symbol_35, &(tint_symbol_36)); - main_out const tint_symbol_4 = {.glFragColor_1=tint_symbol_36}; - tint_symbol_3 const tint_symbol_5 = {.glFragColor_1=tint_symbol_4.glFragColor_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant LeftOver& x_20, 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_19, thread float2* const tint_symbol_20, thread float2* const tint_symbol_21, thread float2* const tint_symbol_22, thread float3* const tint_symbol_23, thread float2* const tint_symbol_24, texture2d tint_symbol_25, sampler tint_symbol_26, texture2d tint_symbol_27, texture2d tint_symbol_28, sampler tint_symbol_29, thread float* const tint_symbol_30, texture2d tint_symbol_31, sampler tint_symbol_32, texture2d tint_symbol_33, sampler tint_symbol_34, thread float4* const tint_symbol_35) { + *(tint_symbol_19) = tUV_param; + *(tint_symbol_20) = tileID_1_param; + *(tint_symbol_21) = levelUnits_param; + *(tint_symbol_22) = stageUnits_1_param; + *(tint_symbol_23) = vPosition_param; + *(tint_symbol_24) = vUV_param; + main_1(x_20, tint_symbol_19, tint_symbol_25, tint_symbol_26, tint_symbol_27, tint_symbol_28, tint_symbol_29, tint_symbol_30, tint_symbol_31, tint_symbol_32, tint_symbol_33, tint_symbol_34, tint_symbol_35); + main_out const tint_symbol_4 = {.glFragColor_1=*(tint_symbol_35)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(texture2d tint_symbol_42 [[texture(6)]], sampler tint_symbol_43 [[sampler(4)]], texture2d tint_symbol_44 [[texture(5)]], texture2d tint_symbol_45 [[texture(8)]], sampler tint_symbol_46 [[sampler(7)]], texture2d tint_symbol_48 [[texture(3)]], sampler tint_symbol_49 [[sampler(2)]], texture2d tint_symbol_50 [[texture(1)]], sampler tint_symbol_51 [[sampler(0)]], tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_20 [[buffer(9)]]) { + thread float2 tint_symbol_36 = 0.0f; + thread float2 tint_symbol_37 = 0.0f; + thread float2 tint_symbol_38 = 0.0f; + thread float2 tint_symbol_39 = 0.0f; + thread float3 tint_symbol_40 = 0.0f; + thread float2 tint_symbol_41 = 0.0f; + thread float tint_symbol_47 = 0.0f; + thread float4 tint_symbol_52 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_20, tint_symbol_1.tUV_param, tint_symbol_1.tileID_1_param, tint_symbol_1.levelUnits_param, tint_symbol_1.stageUnits_1_param, tint_symbol_1.vPosition_param, tint_symbol_1.vUV_param, &(tint_symbol_36), &(tint_symbol_37), &(tint_symbol_38), &(tint_symbol_39), &(tint_symbol_40), &(tint_symbol_41), tint_symbol_42, tint_symbol_43, tint_symbol_44, tint_symbol_45, tint_symbol_46, &(tint_symbol_47), tint_symbol_48, tint_symbol_49, tint_symbol_50, tint_symbol_51, &(tint_symbol_52)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.glFragColor_1 = inner_result.glFragColor_1; + return wrapper_result; } diff --git a/test/bug/tint/949.wgsl.expected.hlsl b/test/bug/tint/949.wgsl.expected.hlsl index 5aca5bfe15..e875c0dcd9 100644 --- a/test/bug/tint/949.wgsl.expected.hlsl +++ b/test/bug/tint/949.wgsl.expected.hlsl @@ -324,19 +324,20 @@ struct tint_symbol_2 { float4 glFragColor_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float2 vMainuv_param = tint_symbol.vMainuv_param; - const float4 v_output1_param = tint_symbol.v_output1_param; - const bool gl_FrontFacing_param = tint_symbol.gl_FrontFacing_param; - const float2 v_uv_param = tint_symbol.v_uv_param; - const float4 v_output2_param = tint_symbol.v_output2_param; +main_out main_inner(float2 vMainuv_param, float4 v_output1_param, bool gl_FrontFacing_param, float2 v_uv_param, float4 v_output2_param) { vMainuv = vMainuv_param; v_output1 = v_output1_param; gl_FrontFacing = gl_FrontFacing_param; v_uv = v_uv_param; v_output2 = v_output2_param; main_1(); - const main_out tint_symbol_3 = {glFragColor}; - const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.glFragColor_1}; - return tint_symbol_9; + const main_out tint_symbol_8 = {glFragColor}; + return tint_symbol_8; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.vMainuv_param, tint_symbol.v_output1_param, tint_symbol.gl_FrontFacing_param, tint_symbol.v_uv_param, tint_symbol.v_output2_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.glFragColor_1 = inner_result.glFragColor_1; + return wrapper_result; } diff --git a/test/bug/tint/949.wgsl.expected.msl b/test/bug/tint/949.wgsl.expected.msl index 3d195ff261..9f56606e20 100644 --- a/test/bug/tint/949.wgsl.expected.msl +++ b/test/bug/tint/949.wgsl.expected.msl @@ -171,7 +171,7 @@ lightingInfo computeHemisphericLighting_vf3_vf3_vf4_vf3_vf3_vf3_f1_(thread float return x_245; } -void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* const tint_symbol_6, thread float3* const tint_symbol_7, thread float2* const tint_symbol_8, texture2d tint_symbol_9, sampler tint_symbol_10, thread float4* const tint_symbol_11, thread bool* const tint_symbol_12, thread float2* const tint_symbol_13, thread float4* const tint_symbol_14, texture2d tint_symbol_15, sampler tint_symbol_16, thread float4* const tint_symbol_17) { +void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* const tint_symbol_5, thread float3* const tint_symbol_6, thread float2* const tint_symbol_7, texture2d tint_symbol_8, sampler tint_symbol_9, thread float4* const tint_symbol_10, thread bool* const tint_symbol_11, thread float2* const tint_symbol_12, thread float4* const tint_symbol_13, texture2d tint_symbol_14, sampler tint_symbol_15, thread float4* const tint_symbol_16) { float4 tempTextureRead = 0.0f; float3 rgb = 0.0f; float3 output5 = 0.0f; @@ -225,35 +225,35 @@ void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* con float3 diffuseOutput = 0.0f; float3 specularOutput = 0.0f; float3 output3 = 0.0f; - *(tint_symbol_6) = 100.0f; - *(tint_symbol_7) = float3(0.5f, 0.5f, 0.5f); - float2 const x_261 = *(tint_symbol_8); - float4 const x_262 = tint_symbol_9.sample(tint_symbol_10, x_261); + *(tint_symbol_5) = 100.0f; + *(tint_symbol_6) = float3(0.5f, 0.5f, 0.5f); + float2 const x_261 = *(tint_symbol_7); + float4 const x_262 = tint_symbol_8.sample(tint_symbol_9, x_261); tempTextureRead = x_262; float4 const x_264 = tempTextureRead; float const x_273 = x_269.textureInfoName; rgb = (float3(x_264.x, x_264.y, x_264.z) * x_273); float3 const x_279 = x_269.u_cameraPosition; - float4 const x_282 = *(tint_symbol_11); + float4 const x_282 = *(tint_symbol_10); output5 = normalize((x_279 - float3(x_282.x, x_282.y, x_282.z))); output4 = float4(0.0f, 0.0f, 0.0f, 0.0f); uvOffset = float2(0.0f, 0.0f); float const x_292 = x_269.u_bumpStrength; normalScale = (1.0f / x_292); - bool const x_298 = *(tint_symbol_12); + bool const x_298 = *(tint_symbol_11); if (x_298) { - float2 const x_303 = *(tint_symbol_13); + float2 const x_303 = *(tint_symbol_12); x_299 = x_303; } else { - float2 const x_305 = *(tint_symbol_13); + float2 const x_305 = *(tint_symbol_12); x_299 = -(x_305); } float2 const x_307 = x_299; TBNUV = x_307; - float4 const x_310 = *(tint_symbol_14); + float4 const x_310 = *(tint_symbol_13); float const x_312 = normalScale; param_3 = (float3(x_310.x, x_310.y, x_310.z) * x_312); - float4 const x_317 = *(tint_symbol_11); + float4 const x_317 = *(tint_symbol_10); param_4 = float3(x_317.x, x_317.y, x_317.z); float2 const x_320 = TBNUV; param_5 = x_320; @@ -284,7 +284,7 @@ void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* con float3x3 const x_361 = invTBN; float3 const x_362 = output5; float3x3 const x_365 = invTBN; - float4 const x_366 = *(tint_symbol_14); + float4 const x_366 = *(tint_symbol_13); numSamples = (15.0f + (dot((x_361 * -(x_362)), (x_365 * float3(x_366.x, x_366.y, x_366.z))) * -11.0f)); float const x_374 = numSamples; stepSize = (1.0f / x_374); @@ -300,9 +300,9 @@ void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* con } else { break; } - float2 const x_394 = *(tint_symbol_13); + float2 const x_394 = *(tint_symbol_12); float2 const x_395 = vCurrOffset; - float4 const x_397 = tint_symbol_9.sample(tint_symbol_10, (x_394 + x_395)); + float4 const x_397 = tint_symbol_8.sample(tint_symbol_9, (x_394 + x_395)); currSampledHeight = x_397.w; float const x_400 = currSampledHeight; float const x_401 = currRayHeight; @@ -346,9 +346,9 @@ void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* con parallaxOcclusion_0 = x_444; float2 const x_445 = parallaxOcclusion_0; uvOffset = x_445; - float2 const x_449 = *(tint_symbol_13); + float2 const x_449 = *(tint_symbol_12); float2 const x_450 = uvOffset; - float4 const x_452 = tint_symbol_9.sample(tint_symbol_10, (x_449 + x_450)); + float4 const x_452 = tint_symbol_8.sample(tint_symbol_9, (x_449 + x_450)); float const x_454 = x_269.u_bumpStrength; float3x3 const x_457 = TBN; param_8 = x_457; @@ -357,19 +357,19 @@ void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* con float3 const x_461 = perturbNormal_mf33_vf3_f1_(&(param_8), &(param_9), &(param_10)); float4 const x_462 = output4; output4 = float4(x_461.x, x_461.y, x_461.z, x_462.w); - float2 const x_465 = *(tint_symbol_13); + float2 const x_465 = *(tint_symbol_12); float2 const x_466 = uvOffset; output6 = (x_465 + x_466); float2 const x_474 = output6; - float4 const x_475 = tint_symbol_15.sample(tint_symbol_16, x_474); + float4 const x_475 = tint_symbol_14.sample(tint_symbol_15, x_474); tempTextureRead1 = x_475; float4 const x_477 = tempTextureRead1; rgb1 = float3(x_477.x, x_477.y, x_477.z); float3 const x_481 = x_269.u_cameraPosition; - float4 const x_482 = *(tint_symbol_11); + float4 const x_482 = *(tint_symbol_10); viewDirectionW_1 = normalize((x_481 - float3(x_482.x, x_482.y, x_482.z))); shadow = 1.0f; - float const x_488 = *(tint_symbol_6); + float const x_488 = *(tint_symbol_5); glossiness_1 = (1.0f * x_488); diffuseBase = float3(0.0f, 0.0f, 0.0f); specularBase = float3(0.0f, 0.0f, 0.0f); @@ -404,37 +404,39 @@ void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* con float3 const x_536 = rgb1; diffuseOutput = (x_535 * x_536); float3 const x_539 = specularBase; - float3 const x_540 = *(tint_symbol_7); + float3 const x_540 = *(tint_symbol_6); specularOutput = (x_539 * x_540); float3 const x_543 = diffuseOutput; float3 const x_544 = specularOutput; output3 = (x_543 + x_544); float3 const x_548 = output3; - *(tint_symbol_17) = float4(x_548.x, x_548.y, x_548.z, 1.0f); + *(tint_symbol_16) = float4(x_548.x, x_548.y, x_548.z, 1.0f); return; } -fragment tint_symbol_3 tint_symbol(texture2d tint_symbol_25 [[texture(1)]], sampler tint_symbol_26 [[sampler(0)]], texture2d tint_symbol_27 [[texture(3)]], sampler tint_symbol_28 [[sampler(2)]], bool gl_FrontFacing_param [[front_facing]], tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_269 [[buffer(6)]], constant Light0& light0 [[buffer(5)]]) { - thread float2 tint_symbol_18 = 0.0f; - thread float4 tint_symbol_19 = 0.0f; - thread bool tint_symbol_20 = false; - thread float2 tint_symbol_21 = 0.0f; - thread float4 tint_symbol_22 = 0.0f; - thread float tint_symbol_23 = 0.0f; - thread float3 tint_symbol_24 = 0.0f; - thread float4 tint_symbol_29 = 0.0f; - float2 const vMainuv_param = tint_symbol_1.vMainuv_param; - float4 const v_output1_param = tint_symbol_1.v_output1_param; - float2 const v_uv_param = tint_symbol_1.v_uv_param; - float4 const v_output2_param = tint_symbol_1.v_output2_param; - tint_symbol_18 = vMainuv_param; - tint_symbol_19 = v_output1_param; - tint_symbol_20 = gl_FrontFacing_param; - tint_symbol_21 = v_uv_param; - tint_symbol_22 = v_output2_param; - main_1(x_269, light0, &(tint_symbol_23), &(tint_symbol_24), &(tint_symbol_18), tint_symbol_25, tint_symbol_26, &(tint_symbol_19), &(tint_symbol_20), &(tint_symbol_21), &(tint_symbol_22), tint_symbol_27, tint_symbol_28, &(tint_symbol_29)); - main_out const tint_symbol_4 = {.glFragColor_1=tint_symbol_29}; - tint_symbol_3 const tint_symbol_5 = {.glFragColor_1=tint_symbol_4.glFragColor_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant LeftOver& x_269, constant Light0& light0, float2 vMainuv_param, float4 v_output1_param, bool gl_FrontFacing_param, float2 v_uv_param, float4 v_output2_param, thread float2* const tint_symbol_17, thread float4* const tint_symbol_18, thread bool* const tint_symbol_19, thread float2* const tint_symbol_20, thread float4* const tint_symbol_21, thread float* const tint_symbol_22, thread float3* const tint_symbol_23, texture2d tint_symbol_24, sampler tint_symbol_25, texture2d tint_symbol_26, sampler tint_symbol_27, thread float4* const tint_symbol_28) { + *(tint_symbol_17) = vMainuv_param; + *(tint_symbol_18) = v_output1_param; + *(tint_symbol_19) = gl_FrontFacing_param; + *(tint_symbol_20) = v_uv_param; + *(tint_symbol_21) = v_output2_param; + main_1(x_269, light0, tint_symbol_22, tint_symbol_23, tint_symbol_17, tint_symbol_24, tint_symbol_25, tint_symbol_18, tint_symbol_19, tint_symbol_20, tint_symbol_21, tint_symbol_26, tint_symbol_27, tint_symbol_28); + main_out const tint_symbol_4 = {.glFragColor_1=*(tint_symbol_28)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(texture2d tint_symbol_36 [[texture(1)]], sampler tint_symbol_37 [[sampler(0)]], texture2d tint_symbol_38 [[texture(3)]], sampler tint_symbol_39 [[sampler(2)]], bool gl_FrontFacing_param [[front_facing]], tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_269 [[buffer(6)]], constant Light0& light0 [[buffer(5)]]) { + thread float2 tint_symbol_29 = 0.0f; + thread float4 tint_symbol_30 = 0.0f; + thread bool tint_symbol_31 = false; + thread float2 tint_symbol_32 = 0.0f; + thread float4 tint_symbol_33 = 0.0f; + thread float tint_symbol_34 = 0.0f; + thread float3 tint_symbol_35 = 0.0f; + thread float4 tint_symbol_40 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_269, light0, tint_symbol_1.vMainuv_param, tint_symbol_1.v_output1_param, gl_FrontFacing_param, tint_symbol_1.v_uv_param, tint_symbol_1.v_output2_param, &(tint_symbol_29), &(tint_symbol_30), &(tint_symbol_31), &(tint_symbol_32), &(tint_symbol_33), &(tint_symbol_34), &(tint_symbol_35), tint_symbol_36, tint_symbol_37, tint_symbol_38, tint_symbol_39, &(tint_symbol_40)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.glFragColor_1 = inner_result.glFragColor_1; + return wrapper_result; } diff --git a/test/bug/tint/951.spvasm.expected.hlsl b/test/bug/tint/951.spvasm.expected.hlsl index 86a56b53ff..7f73b88595 100644 --- a/test/bug/tint/951.spvasm.expected.hlsl +++ b/test/bug/tint/951.spvasm.expected.hlsl @@ -53,10 +53,13 @@ struct tint_symbol_1 { uint3 gl_GlobalInvocationID_param : SV_DispatchThreadID; }; -[numthreads(128, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 gl_GlobalInvocationID_param = tint_symbol.gl_GlobalInvocationID_param; +void main_inner(uint3 gl_GlobalInvocationID_param) { gl_GlobalInvocationID = gl_GlobalInvocationID_param; main_1(); +} + +[numthreads(128, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.gl_GlobalInvocationID_param); return; } diff --git a/test/bug/tint/951.spvasm.expected.msl b/test/bug/tint/951.spvasm.expected.msl index ea5f0f86c9..3d877fafba 100644 --- a/test/bug/tint/951.spvasm.expected.msl +++ b/test/bug/tint/951.spvasm.expected.msl @@ -15,8 +15,8 @@ struct Uniforms { /* 0x0010 */ int size; }; -float getAAtOutCoords_(const device ssbA& x_20, thread uint3* const tint_symbol_3) { - uint const x_42 = (*(tint_symbol_3)).x; +float getAAtOutCoords_(const device ssbA& x_20, thread uint3* const tint_symbol_2) { + uint const x_42 = (*(tint_symbol_2)).x; float const x_44 = x_20.A[x_42]; return x_44; } @@ -37,18 +37,18 @@ void setOutput_i1_f1_(device ssbOut& x_16, thread int* const flatIndex, thread f return; } -void main_1(constant Uniforms& x_24, const device ssbA& x_20, device ssbOut& x_16, thread uint3* const tint_symbol_4) { +void main_1(constant Uniforms& x_24, const device ssbA& x_20, device ssbOut& x_16, thread uint3* const tint_symbol_3) { int index = 0; float a_1 = 0.0f; float param = 0.0f; int param_1 = 0; float param_2 = 0.0f; - uint const x_61 = (*(tint_symbol_4)).x; + uint const x_61 = (*(tint_symbol_3)).x; index = as_type(x_61); int const x_63 = index; int const x_70 = x_24.size; if ((x_63 < x_70)) { - float const x_75 = getAAtOutCoords_(x_20, tint_symbol_4); + float const x_75 = getAAtOutCoords_(x_20, tint_symbol_3); a_1 = x_75; float const x_77 = a_1; param = x_77; @@ -61,10 +61,14 @@ void main_1(constant Uniforms& x_24, const device ssbA& x_20, device ssbOut& x_1 return; } +void tint_symbol_1_inner(constant Uniforms& x_24, const device ssbA& x_20, device ssbOut& x_16, uint3 gl_GlobalInvocationID_param, thread uint3* const tint_symbol_4) { + *(tint_symbol_4) = gl_GlobalInvocationID_param; + main_1(x_24, x_20, x_16, tint_symbol_4); +} + kernel void tint_symbol_1(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], constant Uniforms& x_24 [[buffer(2)]], const device ssbA& x_20 [[buffer(1)]], device ssbOut& x_16 [[buffer(0)]]) { thread uint3 tint_symbol_5 = 0u; - tint_symbol_5 = gl_GlobalInvocationID_param; - main_1(x_24, x_20, x_16, &(tint_symbol_5)); + tint_symbol_1_inner(x_24, x_20, x_16, gl_GlobalInvocationID_param, &(tint_symbol_5)); return; } diff --git a/test/bug/tint/977.spvasm.expected.hlsl b/test/bug/tint/977.spvasm.expected.hlsl index 17dc1da169..a3d4ec9e36 100644 --- a/test/bug/tint/977.spvasm.expected.hlsl +++ b/test/bug/tint/977.spvasm.expected.hlsl @@ -46,10 +46,13 @@ struct tint_symbol_1 { uint3 gl_GlobalInvocationID_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 gl_GlobalInvocationID_param = tint_symbol.gl_GlobalInvocationID_param; +void main_inner(uint3 gl_GlobalInvocationID_param) { gl_GlobalInvocationID = gl_GlobalInvocationID_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.gl_GlobalInvocationID_param); return; } diff --git a/test/bug/tint/977.spvasm.expected.msl b/test/bug/tint/977.spvasm.expected.msl index ca78d1e134..6be13c62d7 100644 --- a/test/bug/tint/977.spvasm.expected.msl +++ b/test/bug/tint/977.spvasm.expected.msl @@ -37,12 +37,12 @@ float binaryOperation_f1_f1_(thread float* const a, thread float* const b) { return x_41; } -void main_1(device ResultMatrix& resultMatrix, thread uint3* const tint_symbol_3) { +void main_1(device ResultMatrix& resultMatrix, thread uint3* const tint_symbol_2) { int index = 0; int a_1 = 0; float param = 0.0f; float param_1 = 0.0f; - uint const x_54 = (*(tint_symbol_3)).x; + uint const x_54 = (*(tint_symbol_2)).x; index = as_type(x_54); a_1 = -10; int const x_63 = index; @@ -53,10 +53,14 @@ void main_1(device ResultMatrix& resultMatrix, thread uint3* const tint_symbol_3 return; } +void tint_symbol_1_inner(device ResultMatrix& resultMatrix, uint3 gl_GlobalInvocationID_param, thread uint3* const tint_symbol_3) { + *(tint_symbol_3) = gl_GlobalInvocationID_param; + main_1(resultMatrix, tint_symbol_3); +} + kernel void tint_symbol_1(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], device ResultMatrix& resultMatrix [[buffer(2)]]) { thread uint3 tint_symbol_4 = 0u; - tint_symbol_4 = gl_GlobalInvocationID_param; - main_1(resultMatrix, &(tint_symbol_4)); + tint_symbol_1_inner(resultMatrix, gl_GlobalInvocationID_param, &(tint_symbol_4)); return; } diff --git a/test/bug/tint/978.wgsl.expected.hlsl b/test/bug/tint/978.wgsl.expected.hlsl index 79a6b078fd..a869da4e74 100644 --- a/test/bug/tint/978.wgsl.expected.hlsl +++ b/test/bug/tint/978.wgsl.expected.hlsl @@ -15,12 +15,18 @@ struct tint_symbol_3 { float4 color : SV_Target0; }; -tint_symbol_3 main(tint_symbol_2 tint_symbol_1) { - const FragmentInput fIn = {tint_symbol_1.vUv}; +FragmentOutput main_inner(FragmentInput fIn) { const float tint_symbol = depthMap.Sample(texSampler, fIn.vUv).x; const float3 color = float3(tint_symbol, tint_symbol, tint_symbol); FragmentOutput fOut = (FragmentOutput)0; fOut.color = float4(color, 1.0f); - const tint_symbol_3 tint_symbol_4 = {fOut.color}; - return tint_symbol_4; + return fOut; +} + +tint_symbol_3 main(tint_symbol_2 tint_symbol_1) { + const FragmentInput tint_symbol_4 = {tint_symbol_1.vUv}; + const FragmentOutput inner_result = main_inner(tint_symbol_4); + tint_symbol_3 wrapper_result = (tint_symbol_3)0; + wrapper_result.color = inner_result.color; + return wrapper_result; } diff --git a/test/bug/tint/978.wgsl.expected.msl b/test/bug/tint/978.wgsl.expected.msl index bf1aaac1b2..8f62eda7bc 100644 --- a/test/bug/tint/978.wgsl.expected.msl +++ b/test/bug/tint/978.wgsl.expected.msl @@ -14,13 +14,19 @@ struct tint_symbol_3 { float4 color [[color(0)]]; }; -fragment tint_symbol_3 tint_symbol(depth2d tint_symbol_5 [[texture(5)]], sampler tint_symbol_6 [[sampler(3)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { - FragmentInput const fIn = {.vUv=tint_symbol_1.vUv}; +FragmentOutput tint_symbol_inner(FragmentInput fIn, depth2d tint_symbol_5, sampler tint_symbol_6) { float const sample = tint_symbol_5.sample(tint_symbol_6, fIn.vUv); float3 const color = float3(sample, sample, sample); FragmentOutput fOut = {}; fOut.color = float4(color, 1.0f); - tint_symbol_3 const tint_symbol_4 = {.color=fOut.color}; - return tint_symbol_4; + return fOut; +} + +fragment tint_symbol_3 tint_symbol(depth2d tint_symbol_7 [[texture(5)]], sampler tint_symbol_8 [[sampler(3)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + FragmentInput const tint_symbol_4 = {.vUv=tint_symbol_1.vUv}; + FragmentOutput const inner_result = tint_symbol_inner(tint_symbol_4, tint_symbol_7, tint_symbol_8); + tint_symbol_3 wrapper_result = {}; + wrapper_result.color = inner_result.color; + return wrapper_result; } diff --git a/test/bug/tint/980.wgsl.expected.hlsl b/test/bug/tint/980.wgsl.expected.hlsl index cbd622f1f3..73b63736d8 100644 --- a/test/bug/tint/980.wgsl.expected.hlsl +++ b/test/bug/tint/980.wgsl.expected.hlsl @@ -14,9 +14,12 @@ struct tint_symbol_1 { uint idx : SV_GroupIndex; }; +void main_inner(uint idx) { + io.Store3(0u, asuint(Bad(io.Load(12u), asfloat(io.Load3(0u))))); +} + [numthreads(1, 1, 1)] void main(tint_symbol_1 tint_symbol) { - const uint idx = tint_symbol.idx; - io.Store3(0u, asuint(Bad(io.Load(12u), asfloat(io.Load3(0u))))); + main_inner(tint_symbol.idx); return; } diff --git a/test/bug/tint/980.wgsl.expected.msl b/test/bug/tint/980.wgsl.expected.msl index 340d3eb9c5..27ccfef96a 100644 --- a/test/bug/tint/980.wgsl.expected.msl +++ b/test/bug/tint/980.wgsl.expected.msl @@ -12,8 +12,12 @@ float3 Bad(uint index, float3 rd) { return normalize(normal); } -kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], device S& io [[buffer(0)]]) { +void tint_symbol_inner(device S& io, uint idx) { io.v = Bad(io.i, io.v); +} + +kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], device S& io [[buffer(0)]]) { + tint_symbol_inner(io, idx); return; } diff --git a/test/bug/tint/992.wgsl.expected.hlsl b/test/bug/tint/992.wgsl.expected.hlsl index f532fdf034..7aace922e0 100644 --- a/test/bug/tint/992.wgsl.expected.hlsl +++ b/test/bug/tint/992.wgsl.expected.hlsl @@ -2,9 +2,15 @@ struct tint_symbol { float4 value : SV_Target0; }; -tint_symbol frag_main() { +float4 frag_main_inner() { float b = 0.0f; float3 v = float3((b).xxx); - const tint_symbol tint_symbol_1 = {float4(v, 1.0f)}; - return tint_symbol_1; + return float4(v, 1.0f); +} + +tint_symbol frag_main() { + const float4 inner_result = frag_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/bug/tint/992.wgsl.expected.msl b/test/bug/tint/992.wgsl.expected.msl index 5438783c93..6ecb855ed7 100644 --- a/test/bug/tint/992.wgsl.expected.msl +++ b/test/bug/tint/992.wgsl.expected.msl @@ -5,10 +5,16 @@ struct tint_symbol { float4 value [[color(0)]]; }; -fragment tint_symbol frag_main() { +float4 frag_main_inner() { float b = 0.0f; float3 v = float3(b); - tint_symbol const tint_symbol_1 = {.value=float4(v, 1.0f)}; - return tint_symbol_1; + return float4(v, 1.0f); +} + +fragment tint_symbol frag_main() { + float4 const inner_result = frag_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/expressions/literals/-inf.spvasm.expected.hlsl b/test/expressions/literals/-inf.spvasm.expected.hlsl index 3dc58545c4..d5108a6dbc 100644 --- a/test/expressions/literals/-inf.spvasm.expected.hlsl +++ b/test/expressions/literals/-inf.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { float4 out_var_SV_TARGET_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {out_var_SV_TARGET}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.out_var_SV_TARGET_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.out_var_SV_TARGET_1 = inner_result.out_var_SV_TARGET_1; + return wrapper_result; } diff --git a/test/expressions/literals/-inf.spvasm.expected.msl b/test/expressions/literals/-inf.spvasm.expected.msl index fbaa8899ec..e3b3640f23 100644 --- a/test/expressions/literals/-inf.spvasm.expected.msl +++ b/test/expressions/literals/-inf.spvasm.expected.msl @@ -8,16 +8,22 @@ struct tint_symbol_1 { float4 out_var_SV_TARGET_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { - *(tint_symbol_4) = float4(-INFINITY, -INFINITY, -INFINITY, -INFINITY); +void main_1(thread float4* const tint_symbol_3) { + *(tint_symbol_3) = float4(-INFINITY, -INFINITY, -INFINITY, -INFINITY); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.out_var_SV_TARGET_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.out_var_SV_TARGET_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.out_var_SV_TARGET_1=tint_symbol_2.out_var_SV_TARGET_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.out_var_SV_TARGET_1 = inner_result.out_var_SV_TARGET_1; + return wrapper_result; } diff --git a/test/expressions/literals/inf.spvasm.expected.hlsl b/test/expressions/literals/inf.spvasm.expected.hlsl index d973da7e72..04a77bd70c 100644 --- a/test/expressions/literals/inf.spvasm.expected.hlsl +++ b/test/expressions/literals/inf.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { float4 out_var_SV_TARGET_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {out_var_SV_TARGET}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.out_var_SV_TARGET_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.out_var_SV_TARGET_1 = inner_result.out_var_SV_TARGET_1; + return wrapper_result; } diff --git a/test/expressions/literals/inf.spvasm.expected.msl b/test/expressions/literals/inf.spvasm.expected.msl index 37e0e9c9d5..3135a4e61d 100644 --- a/test/expressions/literals/inf.spvasm.expected.msl +++ b/test/expressions/literals/inf.spvasm.expected.msl @@ -8,16 +8,22 @@ struct tint_symbol_1 { float4 out_var_SV_TARGET_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { - *(tint_symbol_4) = float4(INFINITY, INFINITY, INFINITY, INFINITY); +void main_1(thread float4* const tint_symbol_3) { + *(tint_symbol_3) = float4(INFINITY, INFINITY, INFINITY, INFINITY); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.out_var_SV_TARGET_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.out_var_SV_TARGET_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.out_var_SV_TARGET_1=tint_symbol_2.out_var_SV_TARGET_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.out_var_SV_TARGET_1 = inner_result.out_var_SV_TARGET_1; + return wrapper_result; } diff --git a/test/expressions/literals/nan.spvasm.expected.hlsl b/test/expressions/literals/nan.spvasm.expected.hlsl index f3c1e53441..110eb4066d 100644 --- a/test/expressions/literals/nan.spvasm.expected.hlsl +++ b/test/expressions/literals/nan.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { float4 out_var_SV_TARGET_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {out_var_SV_TARGET}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.out_var_SV_TARGET_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.out_var_SV_TARGET_1 = inner_result.out_var_SV_TARGET_1; + return wrapper_result; } diff --git a/test/expressions/literals/nan.spvasm.expected.msl b/test/expressions/literals/nan.spvasm.expected.msl index df5d951c5c..740613bd28 100644 --- a/test/expressions/literals/nan.spvasm.expected.msl +++ b/test/expressions/literals/nan.spvasm.expected.msl @@ -8,16 +8,22 @@ struct tint_symbol_1 { float4 out_var_SV_TARGET_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { - *(tint_symbol_4) = float4(NAN, NAN, NAN, NAN); +void main_1(thread float4* const tint_symbol_3) { + *(tint_symbol_3) = float4(NAN, NAN, NAN, NAN); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.out_var_SV_TARGET_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.out_var_SV_TARGET_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.out_var_SV_TARGET_1=tint_symbol_2.out_var_SV_TARGET_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.out_var_SV_TARGET_1 = inner_result.out_var_SV_TARGET_1; + return wrapper_result; } diff --git a/test/intrinsics/gen/abs/002533.wgsl.expected.hlsl b/test/intrinsics/gen/abs/002533.wgsl.expected.hlsl index 84bbcc3ca3..f145efd5e1 100644 --- a/test/intrinsics/gen/abs/002533.wgsl.expected.hlsl +++ b/test/intrinsics/gen/abs/002533.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_002533(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/abs/002533.wgsl.expected.msl b/test/intrinsics/gen/abs/002533.wgsl.expected.msl index 84bfd68ba1..bc614c33ae 100644 --- a/test/intrinsics/gen/abs/002533.wgsl.expected.msl +++ b/test/intrinsics/gen/abs/002533.wgsl.expected.msl @@ -9,10 +9,16 @@ void abs_002533() { float4 res = fabs(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_002533(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/abs/005174.wgsl.expected.hlsl b/test/intrinsics/gen/abs/005174.wgsl.expected.hlsl index 02e7240fea..9dc600cef7 100644 --- a/test/intrinsics/gen/abs/005174.wgsl.expected.hlsl +++ b/test/intrinsics/gen/abs/005174.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_005174(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/abs/005174.wgsl.expected.msl b/test/intrinsics/gen/abs/005174.wgsl.expected.msl index 05c04900f5..b37f02e829 100644 --- a/test/intrinsics/gen/abs/005174.wgsl.expected.msl +++ b/test/intrinsics/gen/abs/005174.wgsl.expected.msl @@ -9,10 +9,16 @@ void abs_005174() { float3 res = fabs(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_005174(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/abs/1ce782.wgsl.expected.hlsl b/test/intrinsics/gen/abs/1ce782.wgsl.expected.hlsl index d323c0c725..76857d7af1 100644 --- a/test/intrinsics/gen/abs/1ce782.wgsl.expected.hlsl +++ b/test/intrinsics/gen/abs/1ce782.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_1ce782(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/abs/1ce782.wgsl.expected.msl b/test/intrinsics/gen/abs/1ce782.wgsl.expected.msl index 0efe44222d..5d5f0d2a1a 100644 --- a/test/intrinsics/gen/abs/1ce782.wgsl.expected.msl +++ b/test/intrinsics/gen/abs/1ce782.wgsl.expected.msl @@ -9,10 +9,16 @@ void abs_1ce782() { uint4 res = abs(uint4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_1ce782(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/abs/1e9d53.wgsl.expected.hlsl b/test/intrinsics/gen/abs/1e9d53.wgsl.expected.hlsl index 2828fd7cdf..7668024349 100644 --- a/test/intrinsics/gen/abs/1e9d53.wgsl.expected.hlsl +++ b/test/intrinsics/gen/abs/1e9d53.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_1e9d53(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/abs/1e9d53.wgsl.expected.msl b/test/intrinsics/gen/abs/1e9d53.wgsl.expected.msl index 82d59b8303..f5c7392dba 100644 --- a/test/intrinsics/gen/abs/1e9d53.wgsl.expected.msl +++ b/test/intrinsics/gen/abs/1e9d53.wgsl.expected.msl @@ -9,10 +9,16 @@ void abs_1e9d53() { float2 res = fabs(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_1e9d53(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/abs/467cd1.wgsl.expected.hlsl b/test/intrinsics/gen/abs/467cd1.wgsl.expected.hlsl index 2e781e95cb..8e2a89111b 100644 --- a/test/intrinsics/gen/abs/467cd1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/abs/467cd1.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_467cd1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/abs/467cd1.wgsl.expected.msl b/test/intrinsics/gen/abs/467cd1.wgsl.expected.msl index 3764d7fa76..be63d7eaab 100644 --- a/test/intrinsics/gen/abs/467cd1.wgsl.expected.msl +++ b/test/intrinsics/gen/abs/467cd1.wgsl.expected.msl @@ -9,10 +9,16 @@ void abs_467cd1() { uint res = abs(1u); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_467cd1(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/abs/4ad288.wgsl.expected.hlsl b/test/intrinsics/gen/abs/4ad288.wgsl.expected.hlsl index 968877d7cf..686c82c0b0 100644 --- a/test/intrinsics/gen/abs/4ad288.wgsl.expected.hlsl +++ b/test/intrinsics/gen/abs/4ad288.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_4ad288(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/abs/4ad288.wgsl.expected.msl b/test/intrinsics/gen/abs/4ad288.wgsl.expected.msl index e9edc03acd..f9d5155be5 100644 --- a/test/intrinsics/gen/abs/4ad288.wgsl.expected.msl +++ b/test/intrinsics/gen/abs/4ad288.wgsl.expected.msl @@ -9,10 +9,16 @@ void abs_4ad288() { int res = abs(1); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_4ad288(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/abs/5ad50a.wgsl.expected.hlsl b/test/intrinsics/gen/abs/5ad50a.wgsl.expected.hlsl index c5b68f4826..0a43ef6026 100644 --- a/test/intrinsics/gen/abs/5ad50a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/abs/5ad50a.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_5ad50a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/abs/5ad50a.wgsl.expected.msl b/test/intrinsics/gen/abs/5ad50a.wgsl.expected.msl index dd6bdd7282..4cdc43b63b 100644 --- a/test/intrinsics/gen/abs/5ad50a.wgsl.expected.msl +++ b/test/intrinsics/gen/abs/5ad50a.wgsl.expected.msl @@ -9,10 +9,16 @@ void abs_5ad50a() { int3 res = abs(int3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_5ad50a(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/abs/7326de.wgsl.expected.hlsl b/test/intrinsics/gen/abs/7326de.wgsl.expected.hlsl index eac41c08a8..4be3799fcd 100644 --- a/test/intrinsics/gen/abs/7326de.wgsl.expected.hlsl +++ b/test/intrinsics/gen/abs/7326de.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_7326de(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/abs/7326de.wgsl.expected.msl b/test/intrinsics/gen/abs/7326de.wgsl.expected.msl index e17b21e931..a7f8a4b3bd 100644 --- a/test/intrinsics/gen/abs/7326de.wgsl.expected.msl +++ b/test/intrinsics/gen/abs/7326de.wgsl.expected.msl @@ -9,10 +9,16 @@ void abs_7326de() { uint3 res = abs(uint3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_7326de(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/abs/7f28e6.wgsl.expected.hlsl b/test/intrinsics/gen/abs/7f28e6.wgsl.expected.hlsl index 9432a61f43..a3c8098e9d 100644 --- a/test/intrinsics/gen/abs/7f28e6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/abs/7f28e6.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_7f28e6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/abs/7f28e6.wgsl.expected.msl b/test/intrinsics/gen/abs/7f28e6.wgsl.expected.msl index 471ff1525f..c4db275a96 100644 --- a/test/intrinsics/gen/abs/7f28e6.wgsl.expected.msl +++ b/test/intrinsics/gen/abs/7f28e6.wgsl.expected.msl @@ -9,10 +9,16 @@ void abs_7f28e6() { uint2 res = abs(uint2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_7f28e6(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/abs/7faa9e.wgsl.expected.hlsl b/test/intrinsics/gen/abs/7faa9e.wgsl.expected.hlsl index c26a54faf7..137d120fd5 100644 --- a/test/intrinsics/gen/abs/7faa9e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/abs/7faa9e.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_7faa9e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/abs/7faa9e.wgsl.expected.msl b/test/intrinsics/gen/abs/7faa9e.wgsl.expected.msl index 1738b04870..074c9c0734 100644 --- a/test/intrinsics/gen/abs/7faa9e.wgsl.expected.msl +++ b/test/intrinsics/gen/abs/7faa9e.wgsl.expected.msl @@ -9,10 +9,16 @@ void abs_7faa9e() { int2 res = abs(int2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_7faa9e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/abs/9c80a6.wgsl.expected.hlsl b/test/intrinsics/gen/abs/9c80a6.wgsl.expected.hlsl index 06dbec3fc3..d53818e600 100644 --- a/test/intrinsics/gen/abs/9c80a6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/abs/9c80a6.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_9c80a6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/abs/9c80a6.wgsl.expected.msl b/test/intrinsics/gen/abs/9c80a6.wgsl.expected.msl index 87ef75d202..0cc64f1e1c 100644 --- a/test/intrinsics/gen/abs/9c80a6.wgsl.expected.msl +++ b/test/intrinsics/gen/abs/9c80a6.wgsl.expected.msl @@ -9,10 +9,16 @@ void abs_9c80a6() { int4 res = abs(int4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_9c80a6(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/abs/b96037.wgsl.expected.hlsl b/test/intrinsics/gen/abs/b96037.wgsl.expected.hlsl index 4d5cfa68d0..4d302e4751 100644 --- a/test/intrinsics/gen/abs/b96037.wgsl.expected.hlsl +++ b/test/intrinsics/gen/abs/b96037.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_b96037(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/abs/b96037.wgsl.expected.msl b/test/intrinsics/gen/abs/b96037.wgsl.expected.msl index a8928f17b2..617a92f522 100644 --- a/test/intrinsics/gen/abs/b96037.wgsl.expected.msl +++ b/test/intrinsics/gen/abs/b96037.wgsl.expected.msl @@ -9,10 +9,16 @@ void abs_b96037() { float res = fabs(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { abs_b96037(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/acos/489247.wgsl.expected.hlsl b/test/intrinsics/gen/acos/489247.wgsl.expected.hlsl index 204b7390a6..c10f0ee457 100644 --- a/test/intrinsics/gen/acos/489247.wgsl.expected.hlsl +++ b/test/intrinsics/gen/acos/489247.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { acos_489247(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/acos/489247.wgsl.expected.msl b/test/intrinsics/gen/acos/489247.wgsl.expected.msl index f0b164fa72..1994fcbb03 100644 --- a/test/intrinsics/gen/acos/489247.wgsl.expected.msl +++ b/test/intrinsics/gen/acos/489247.wgsl.expected.msl @@ -9,10 +9,16 @@ void acos_489247() { float res = acos(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { acos_489247(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/acos/8e2acf.wgsl.expected.hlsl b/test/intrinsics/gen/acos/8e2acf.wgsl.expected.hlsl index b26a9af87b..eee957e4fb 100644 --- a/test/intrinsics/gen/acos/8e2acf.wgsl.expected.hlsl +++ b/test/intrinsics/gen/acos/8e2acf.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { acos_8e2acf(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/acos/8e2acf.wgsl.expected.msl b/test/intrinsics/gen/acos/8e2acf.wgsl.expected.msl index 99d4c08928..34390f020d 100644 --- a/test/intrinsics/gen/acos/8e2acf.wgsl.expected.msl +++ b/test/intrinsics/gen/acos/8e2acf.wgsl.expected.msl @@ -9,10 +9,16 @@ void acos_8e2acf() { float4 res = acos(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { acos_8e2acf(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/acos/a610c4.wgsl.expected.hlsl b/test/intrinsics/gen/acos/a610c4.wgsl.expected.hlsl index ff383eaa5c..13d02ef20e 100644 --- a/test/intrinsics/gen/acos/a610c4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/acos/a610c4.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { acos_a610c4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/acos/a610c4.wgsl.expected.msl b/test/intrinsics/gen/acos/a610c4.wgsl.expected.msl index e1d07a9c14..48340112be 100644 --- a/test/intrinsics/gen/acos/a610c4.wgsl.expected.msl +++ b/test/intrinsics/gen/acos/a610c4.wgsl.expected.msl @@ -9,10 +9,16 @@ void acos_a610c4() { float3 res = acos(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { acos_a610c4(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/acos/dfc915.wgsl.expected.hlsl b/test/intrinsics/gen/acos/dfc915.wgsl.expected.hlsl index 23b6145085..be3e380b16 100644 --- a/test/intrinsics/gen/acos/dfc915.wgsl.expected.hlsl +++ b/test/intrinsics/gen/acos/dfc915.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { acos_dfc915(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/acos/dfc915.wgsl.expected.msl b/test/intrinsics/gen/acos/dfc915.wgsl.expected.msl index 48e93aaec3..d6c52cf027 100644 --- a/test/intrinsics/gen/acos/dfc915.wgsl.expected.msl +++ b/test/intrinsics/gen/acos/dfc915.wgsl.expected.msl @@ -9,10 +9,16 @@ void acos_dfc915() { float2 res = acos(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { acos_dfc915(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/all/986c7b.wgsl.expected.hlsl b/test/intrinsics/gen/all/986c7b.wgsl.expected.hlsl index a486261c6b..9afde8c555 100644 --- a/test/intrinsics/gen/all/986c7b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/all/986c7b.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { all_986c7b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/all/986c7b.wgsl.expected.msl b/test/intrinsics/gen/all/986c7b.wgsl.expected.msl index 032da5325a..5adaeb6b3d 100644 --- a/test/intrinsics/gen/all/986c7b.wgsl.expected.msl +++ b/test/intrinsics/gen/all/986c7b.wgsl.expected.msl @@ -9,10 +9,16 @@ void all_986c7b() { bool res = all(bool4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { all_986c7b(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/all/bd2dba.wgsl.expected.hlsl b/test/intrinsics/gen/all/bd2dba.wgsl.expected.hlsl index ca205bd4ec..0650c248e3 100644 --- a/test/intrinsics/gen/all/bd2dba.wgsl.expected.hlsl +++ b/test/intrinsics/gen/all/bd2dba.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { all_bd2dba(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/all/bd2dba.wgsl.expected.msl b/test/intrinsics/gen/all/bd2dba.wgsl.expected.msl index 6c7a2fb4f1..938d92d1fa 100644 --- a/test/intrinsics/gen/all/bd2dba.wgsl.expected.msl +++ b/test/intrinsics/gen/all/bd2dba.wgsl.expected.msl @@ -9,10 +9,16 @@ void all_bd2dba() { bool res = all(bool3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { all_bd2dba(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/all/f46790.wgsl.expected.hlsl b/test/intrinsics/gen/all/f46790.wgsl.expected.hlsl index 814e292798..57120d6d7c 100644 --- a/test/intrinsics/gen/all/f46790.wgsl.expected.hlsl +++ b/test/intrinsics/gen/all/f46790.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { all_f46790(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/all/f46790.wgsl.expected.msl b/test/intrinsics/gen/all/f46790.wgsl.expected.msl index 9b337fb74d..ffe5e06f1f 100644 --- a/test/intrinsics/gen/all/f46790.wgsl.expected.msl +++ b/test/intrinsics/gen/all/f46790.wgsl.expected.msl @@ -9,10 +9,16 @@ void all_f46790() { bool res = all(bool2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { all_f46790(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/any/083428.wgsl.expected.hlsl b/test/intrinsics/gen/any/083428.wgsl.expected.hlsl index b51ed1b469..5a6ed63fee 100644 --- a/test/intrinsics/gen/any/083428.wgsl.expected.hlsl +++ b/test/intrinsics/gen/any/083428.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { any_083428(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/any/083428.wgsl.expected.msl b/test/intrinsics/gen/any/083428.wgsl.expected.msl index e76e344bf7..1b403a3b27 100644 --- a/test/intrinsics/gen/any/083428.wgsl.expected.msl +++ b/test/intrinsics/gen/any/083428.wgsl.expected.msl @@ -9,10 +9,16 @@ void any_083428() { bool res = any(bool4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { any_083428(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/any/0e3e58.wgsl.expected.hlsl b/test/intrinsics/gen/any/0e3e58.wgsl.expected.hlsl index f8fcf2e032..ba726f0e15 100644 --- a/test/intrinsics/gen/any/0e3e58.wgsl.expected.hlsl +++ b/test/intrinsics/gen/any/0e3e58.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { any_0e3e58(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/any/0e3e58.wgsl.expected.msl b/test/intrinsics/gen/any/0e3e58.wgsl.expected.msl index 9933be14c5..8f7da073d3 100644 --- a/test/intrinsics/gen/any/0e3e58.wgsl.expected.msl +++ b/test/intrinsics/gen/any/0e3e58.wgsl.expected.msl @@ -9,10 +9,16 @@ void any_0e3e58() { bool res = any(bool2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { any_0e3e58(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/any/e755c1.wgsl.expected.hlsl b/test/intrinsics/gen/any/e755c1.wgsl.expected.hlsl index 1b84630bcb..ab1a57aec6 100644 --- a/test/intrinsics/gen/any/e755c1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/any/e755c1.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { any_e755c1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/any/e755c1.wgsl.expected.msl b/test/intrinsics/gen/any/e755c1.wgsl.expected.msl index a789697749..2dbc5d4dda 100644 --- a/test/intrinsics/gen/any/e755c1.wgsl.expected.msl +++ b/test/intrinsics/gen/any/e755c1.wgsl.expected.msl @@ -9,10 +9,16 @@ void any_e755c1() { bool res = any(bool3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { any_e755c1(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.hlsl b/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.hlsl index ab910274a5..5eb91da8a0 100644 --- a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.hlsl +++ b/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { arrayLength_1588cd(); - const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_4; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.msl b/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.msl index 3553097e11..562d9e2db8 100644 --- a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.msl +++ b/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.msl @@ -1,7 +1,7 @@ #include using namespace metal; -struct tint_symbol_2 { +struct tint_symbol_1 { /* 0x0000 */ uint4 buffer_size[1]; }; struct SB_RO { @@ -11,23 +11,29 @@ struct tint_symbol { float4 value [[position]]; }; -void arrayLength_1588cd(constant tint_symbol_2& tint_symbol_3) { - uint res = ((tint_symbol_3.buffer_size[0u][1u] - 0u) / 4u); +void arrayLength_1588cd(constant tint_symbol_1& tint_symbol_2) { + uint res = ((tint_symbol_2.buffer_size[0u][1u] - 0u) / 4u); } -vertex tint_symbol vertex_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_1588cd(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) { + arrayLength_1588cd(tint_symbol_2); + return float4(); } -fragment void fragment_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_1588cd(tint_symbol_3); +vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_2); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + arrayLength_1588cd(tint_symbol_2); return; } -kernel void compute_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_1588cd(tint_symbol_3); +kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + arrayLength_1588cd(tint_symbol_2); return; } diff --git a/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.hlsl b/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.hlsl index 0870ebb3a6..77b4a1ea9a 100644 --- a/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { arrayLength_61b1c7(); - const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_4; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.msl b/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.msl index 97d28572b0..b5679b7815 100644 --- a/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.msl +++ b/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.msl @@ -1,7 +1,7 @@ #include using namespace metal; -struct tint_symbol_2 { +struct tint_symbol_1 { /* 0x0000 */ uint4 buffer_size[1]; }; struct SB_RW { @@ -11,23 +11,29 @@ struct tint_symbol { float4 value [[position]]; }; -void arrayLength_61b1c7(constant tint_symbol_2& tint_symbol_3) { - uint res = ((tint_symbol_3.buffer_size[0u][0u] - 0u) / 4u); +void arrayLength_61b1c7(constant tint_symbol_1& tint_symbol_2) { + uint res = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u); } -vertex tint_symbol vertex_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_61b1c7(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) { + arrayLength_61b1c7(tint_symbol_2); + return float4(); } -fragment void fragment_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_61b1c7(tint_symbol_3); +vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_2); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + arrayLength_61b1c7(tint_symbol_2); return; } -kernel void compute_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_61b1c7(tint_symbol_3); +kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + arrayLength_61b1c7(tint_symbol_2); return; } diff --git a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.hlsl b/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.hlsl index 65ba82d105..f5167fa5a7 100644 --- a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.hlsl +++ b/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { arrayLength_a0f5ca(); - const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_4; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.msl b/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.msl index ed949991fa..dc92420fd8 100644 --- a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.msl +++ b/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.msl @@ -1,7 +1,7 @@ #include using namespace metal; -struct tint_symbol_2 { +struct tint_symbol_1 { /* 0x0000 */ uint4 buffer_size[1]; }; struct SB_RO { @@ -11,23 +11,29 @@ struct tint_symbol { float4 value [[position]]; }; -void arrayLength_a0f5ca(constant tint_symbol_2& tint_symbol_3) { - uint res = ((tint_symbol_3.buffer_size[0u][1u] - 0u) / 4u); +void arrayLength_a0f5ca(constant tint_symbol_1& tint_symbol_2) { + uint res = ((tint_symbol_2.buffer_size[0u][1u] - 0u) / 4u); } -vertex tint_symbol vertex_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_a0f5ca(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) { + arrayLength_a0f5ca(tint_symbol_2); + return float4(); } -fragment void fragment_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_a0f5ca(tint_symbol_3); +vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_2); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + arrayLength_a0f5ca(tint_symbol_2); return; } -kernel void compute_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_a0f5ca(tint_symbol_3); +kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + arrayLength_a0f5ca(tint_symbol_2); return; } diff --git a/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.hlsl b/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.hlsl index 097ef2eb69..e20cd105e8 100644 --- a/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.hlsl +++ b/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { arrayLength_cdd123(); - const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_4; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.msl b/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.msl index 525920c8df..f35b0f4c71 100644 --- a/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.msl +++ b/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.msl @@ -1,7 +1,7 @@ #include using namespace metal; -struct tint_symbol_2 { +struct tint_symbol_1 { /* 0x0000 */ uint4 buffer_size[1]; }; struct SB_RW { @@ -11,23 +11,29 @@ struct tint_symbol { float4 value [[position]]; }; -void arrayLength_cdd123(constant tint_symbol_2& tint_symbol_3) { - uint res = ((tint_symbol_3.buffer_size[0u][0u] - 0u) / 4u); +void arrayLength_cdd123(constant tint_symbol_1& tint_symbol_2) { + uint res = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u); } -vertex tint_symbol vertex_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_cdd123(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) { + arrayLength_cdd123(tint_symbol_2); + return float4(); } -fragment void fragment_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_cdd123(tint_symbol_3); +vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_2); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + arrayLength_cdd123(tint_symbol_2); return; } -kernel void compute_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_cdd123(tint_symbol_3); +kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + arrayLength_cdd123(tint_symbol_2); return; } diff --git a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.hlsl b/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.hlsl index a0ae44ded8..78f5396ac1 100644 --- a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { arrayLength_cfca0a(); - const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_4; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.msl b/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.msl index 97cbb4f133..7d6d8efbb5 100644 --- a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.msl +++ b/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.msl @@ -1,7 +1,7 @@ #include using namespace metal; -struct tint_symbol_2 { +struct tint_symbol_1 { /* 0x0000 */ uint4 buffer_size[1]; }; struct SB_RO { @@ -11,23 +11,29 @@ struct tint_symbol { float4 value [[position]]; }; -void arrayLength_cfca0a(constant tint_symbol_2& tint_symbol_3) { - uint res = ((tint_symbol_3.buffer_size[0u][1u] - 0u) / 4u); +void arrayLength_cfca0a(constant tint_symbol_1& tint_symbol_2) { + uint res = ((tint_symbol_2.buffer_size[0u][1u] - 0u) / 4u); } -vertex tint_symbol vertex_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_cfca0a(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) { + arrayLength_cfca0a(tint_symbol_2); + return float4(); } -fragment void fragment_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_cfca0a(tint_symbol_3); +vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_2); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + arrayLength_cfca0a(tint_symbol_2); return; } -kernel void compute_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_cfca0a(tint_symbol_3); +kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + arrayLength_cfca0a(tint_symbol_2); return; } diff --git a/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.hlsl b/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.hlsl index 6421d317f5..1191d0cab7 100644 --- a/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { arrayLength_eb510f(); - const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_4; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.msl b/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.msl index d345929025..131e4bafcd 100644 --- a/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.msl +++ b/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.msl @@ -1,7 +1,7 @@ #include using namespace metal; -struct tint_symbol_2 { +struct tint_symbol_1 { /* 0x0000 */ uint4 buffer_size[1]; }; struct SB_RW { @@ -11,23 +11,29 @@ struct tint_symbol { float4 value [[position]]; }; -void arrayLength_eb510f(constant tint_symbol_2& tint_symbol_3) { - uint res = ((tint_symbol_3.buffer_size[0u][0u] - 0u) / 4u); +void arrayLength_eb510f(constant tint_symbol_1& tint_symbol_2) { + uint res = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u); } -vertex tint_symbol vertex_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_eb510f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) { + arrayLength_eb510f(tint_symbol_2); + return float4(); } -fragment void fragment_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_eb510f(tint_symbol_3); +vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_2); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + arrayLength_eb510f(tint_symbol_2); return; } -kernel void compute_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) { - arrayLength_eb510f(tint_symbol_3); +kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) { + arrayLength_eb510f(tint_symbol_2); return; } diff --git a/test/intrinsics/gen/asin/064953.wgsl.expected.hlsl b/test/intrinsics/gen/asin/064953.wgsl.expected.hlsl index 8d226a3ec1..41624bd112 100644 --- a/test/intrinsics/gen/asin/064953.wgsl.expected.hlsl +++ b/test/intrinsics/gen/asin/064953.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { asin_064953(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/asin/064953.wgsl.expected.msl b/test/intrinsics/gen/asin/064953.wgsl.expected.msl index e5ae5349de..da1729fb13 100644 --- a/test/intrinsics/gen/asin/064953.wgsl.expected.msl +++ b/test/intrinsics/gen/asin/064953.wgsl.expected.msl @@ -9,10 +9,16 @@ void asin_064953() { float4 res = asin(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { asin_064953(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/asin/7b6a44.wgsl.expected.hlsl b/test/intrinsics/gen/asin/7b6a44.wgsl.expected.hlsl index 8be514195f..c48dceaf48 100644 --- a/test/intrinsics/gen/asin/7b6a44.wgsl.expected.hlsl +++ b/test/intrinsics/gen/asin/7b6a44.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { asin_7b6a44(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/asin/7b6a44.wgsl.expected.msl b/test/intrinsics/gen/asin/7b6a44.wgsl.expected.msl index bccf8b968b..dae258d00f 100644 --- a/test/intrinsics/gen/asin/7b6a44.wgsl.expected.msl +++ b/test/intrinsics/gen/asin/7b6a44.wgsl.expected.msl @@ -9,10 +9,16 @@ void asin_7b6a44() { float2 res = asin(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { asin_7b6a44(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.hlsl b/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.hlsl index 1671e3d7b8..f99b94a01e 100644 --- a/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { asin_8cd9c9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.msl b/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.msl index 9fdb5c6927..5541c543bd 100644 --- a/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.msl +++ b/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.msl @@ -9,10 +9,16 @@ void asin_8cd9c9() { float3 res = asin(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { asin_8cd9c9(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/asin/c0c272.wgsl.expected.hlsl b/test/intrinsics/gen/asin/c0c272.wgsl.expected.hlsl index 8bfdcab608..94ae3b92e3 100644 --- a/test/intrinsics/gen/asin/c0c272.wgsl.expected.hlsl +++ b/test/intrinsics/gen/asin/c0c272.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { asin_c0c272(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/asin/c0c272.wgsl.expected.msl b/test/intrinsics/gen/asin/c0c272.wgsl.expected.msl index 9467bedca7..41db384e23 100644 --- a/test/intrinsics/gen/asin/c0c272.wgsl.expected.msl +++ b/test/intrinsics/gen/asin/c0c272.wgsl.expected.msl @@ -9,10 +9,16 @@ void asin_c0c272() { float res = asin(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { asin_c0c272(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/atan/02979a.wgsl.expected.hlsl b/test/intrinsics/gen/atan/02979a.wgsl.expected.hlsl index 5b056a9e78..4dce6ec284 100644 --- a/test/intrinsics/gen/atan/02979a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atan/02979a.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { atan_02979a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/atan/02979a.wgsl.expected.msl b/test/intrinsics/gen/atan/02979a.wgsl.expected.msl index d7f68f1f50..35ebc9f843 100644 --- a/test/intrinsics/gen/atan/02979a.wgsl.expected.msl +++ b/test/intrinsics/gen/atan/02979a.wgsl.expected.msl @@ -9,10 +9,16 @@ void atan_02979a() { float res = atan(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { atan_02979a(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/atan/331e6d.wgsl.expected.hlsl b/test/intrinsics/gen/atan/331e6d.wgsl.expected.hlsl index 8af96d52e3..3dd8341c13 100644 --- a/test/intrinsics/gen/atan/331e6d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atan/331e6d.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { atan_331e6d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/atan/331e6d.wgsl.expected.msl b/test/intrinsics/gen/atan/331e6d.wgsl.expected.msl index 2474bece5d..8bedb23cef 100644 --- a/test/intrinsics/gen/atan/331e6d.wgsl.expected.msl +++ b/test/intrinsics/gen/atan/331e6d.wgsl.expected.msl @@ -9,10 +9,16 @@ void atan_331e6d() { float3 res = atan(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { atan_331e6d(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/atan/a8b696.wgsl.expected.hlsl b/test/intrinsics/gen/atan/a8b696.wgsl.expected.hlsl index e8f2079b43..b014aec5df 100644 --- a/test/intrinsics/gen/atan/a8b696.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atan/a8b696.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { atan_a8b696(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/atan/a8b696.wgsl.expected.msl b/test/intrinsics/gen/atan/a8b696.wgsl.expected.msl index a985ca9815..141ad98193 100644 --- a/test/intrinsics/gen/atan/a8b696.wgsl.expected.msl +++ b/test/intrinsics/gen/atan/a8b696.wgsl.expected.msl @@ -9,10 +9,16 @@ void atan_a8b696() { float4 res = atan(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { atan_a8b696(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/atan/ad96e4.wgsl.expected.hlsl b/test/intrinsics/gen/atan/ad96e4.wgsl.expected.hlsl index fa420d229a..dd5218a341 100644 --- a/test/intrinsics/gen/atan/ad96e4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atan/ad96e4.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { atan_ad96e4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/atan/ad96e4.wgsl.expected.msl b/test/intrinsics/gen/atan/ad96e4.wgsl.expected.msl index 3301ece9cb..2f9c4bfeb4 100644 --- a/test/intrinsics/gen/atan/ad96e4.wgsl.expected.msl +++ b/test/intrinsics/gen/atan/ad96e4.wgsl.expected.msl @@ -9,10 +9,16 @@ void atan_ad96e4() { float2 res = atan(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { atan_ad96e4(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/atan2/57fb13.wgsl.expected.msl b/test/intrinsics/gen/atan2/57fb13.wgsl.expected.msl index 75f47599f5..828d5201a9 100644 --- a/test/intrinsics/gen/atan2/57fb13.wgsl.expected.msl +++ b/test/intrinsics/gen/atan2/57fb13.wgsl.expected.msl @@ -9,10 +9,16 @@ void atan2_57fb13() { float2 res = atan2(float2(), float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { atan2_57fb13(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/atan2/96057c.wgsl.expected.hlsl b/test/intrinsics/gen/atan2/96057c.wgsl.expected.hlsl index b916a19725..3794036205 100644 --- a/test/intrinsics/gen/atan2/96057c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atan2/96057c.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { atan2_96057c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/atan2/96057c.wgsl.expected.msl b/test/intrinsics/gen/atan2/96057c.wgsl.expected.msl index ca9d89e31d..8157ae8556 100644 --- a/test/intrinsics/gen/atan2/96057c.wgsl.expected.msl +++ b/test/intrinsics/gen/atan2/96057c.wgsl.expected.msl @@ -9,10 +9,16 @@ void atan2_96057c() { float res = atan2(1.0f, 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { atan2_96057c(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.msl b/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.msl index 041777f7fc..2e20b03cbd 100644 --- a/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.msl +++ b/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.msl @@ -9,10 +9,16 @@ void atan2_a70d0d() { float3 res = atan2(float3(), float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { atan2_a70d0d(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/atan2/ae713e.wgsl.expected.msl b/test/intrinsics/gen/atan2/ae713e.wgsl.expected.msl index 5823a5321f..05e4eae737 100644 --- a/test/intrinsics/gen/atan2/ae713e.wgsl.expected.msl +++ b/test/intrinsics/gen/atan2/ae713e.wgsl.expected.msl @@ -9,10 +9,16 @@ void atan2_ae713e() { float4 res = atan2(float4(), float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { atan2_ae713e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.hlsl b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.hlsl index d708e5d423..16632807ec 100644 --- a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { int atomic_result_1 = 0; InterlockedExchange(arg_0, 0, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicAdd_794055(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.msl b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.msl index 833e7a1cdd..5f8f64d87c 100644 --- a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicAdd_794055(threadgroup atomic_int* const tint_symbol_1) { - int res = atomic_fetch_add_explicit(tint_symbol_1, 1, memory_order_relaxed); +void atomicAdd_794055(threadgroup atomic_int* const tint_symbol) { + int res = atomic_fetch_add_explicit(tint_symbol, 1, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicAdd_794055(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_int tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicAdd_794055(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.hlsl b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.hlsl index 3c2521b28e..9429101fd4 100644 --- a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { uint atomic_result_1 = 0u; InterlockedExchange(arg_0, 0u, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicAdd_d5db1d(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.msl b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.msl index ed759ba035..5a9aaeee1a 100644 --- a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicAdd_d5db1d(threadgroup atomic_uint* const tint_symbol_1) { - uint res = atomic_fetch_add_explicit(tint_symbol_1, 1u, memory_order_relaxed); +void atomicAdd_d5db1d(threadgroup atomic_uint* const tint_symbol) { + uint res = atomic_fetch_add_explicit(tint_symbol, 1u, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicAdd_d5db1d(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_uint tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicAdd_d5db1d(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.hlsl b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.hlsl index e6df239b9f..1a459d0831 100644 --- a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { uint atomic_result_1 = 0u; InterlockedExchange(arg_0, 0u, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicAnd_34edd3(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.msl b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.msl index 4d0eeda371..c866b0ef0f 100644 --- a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicAnd_34edd3(threadgroup atomic_uint* const tint_symbol_1) { - uint res = atomic_fetch_and_explicit(tint_symbol_1, 1u, memory_order_relaxed); +void atomicAnd_34edd3(threadgroup atomic_uint* const tint_symbol) { + uint res = atomic_fetch_and_explicit(tint_symbol, 1u, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicAnd_34edd3(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_uint tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicAnd_34edd3(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.hlsl b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.hlsl index 8681e227ef..43929b85f4 100644 --- a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { int atomic_result_1 = 0; InterlockedExchange(arg_0, 0, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicAnd_45a819(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.msl b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.msl index d861eae2a1..b9f92024de 100644 --- a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicAnd_45a819(threadgroup atomic_int* const tint_symbol_1) { - int res = atomic_fetch_and_explicit(tint_symbol_1, 1, memory_order_relaxed); +void atomicAnd_45a819(threadgroup atomic_int* const tint_symbol) { + int res = atomic_fetch_and_explicit(tint_symbol, 1, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicAnd_45a819(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_int tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicAnd_45a819(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl index 8b303c7925..97cc6c4c1e 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl @@ -12,14 +12,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { int atomic_result_1 = 0; InterlockedExchange(arg_0, 0, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicCompareExchangeWeak_89ea3b(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.msl b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.msl index a9f790fa5f..b002e501d4 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.msl @@ -9,17 +9,21 @@ vec atomicCompareExchangeWeak_1(threadgroup A* atomic, T compare, T value) return {prev_value, matched}; } -void atomicCompareExchangeWeak_89ea3b(threadgroup atomic_int* const tint_symbol_1) { - int2 res = atomicCompareExchangeWeak_1(tint_symbol_1, 1, 1); +void atomicCompareExchangeWeak_89ea3b(threadgroup atomic_int* const tint_symbol) { + int2 res = atomicCompareExchangeWeak_1(tint_symbol, 1, 1); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicCompareExchangeWeak_89ea3b(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_int tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicCompareExchangeWeak_89ea3b(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl index e2b5cf3e89..05cfbc2e74 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl @@ -12,14 +12,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { uint atomic_result_1 = 0u; InterlockedExchange(arg_0, 0u, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicCompareExchangeWeak_b2ab2c(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.msl b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.msl index 1f38df8286..6a9485892d 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.msl @@ -9,17 +9,21 @@ vec atomicCompareExchangeWeak_1(threadgroup A* atomic, T compare, T value) return {prev_value, matched}; } -void atomicCompareExchangeWeak_b2ab2c(threadgroup atomic_uint* const tint_symbol_1) { - uint2 res = atomicCompareExchangeWeak_1(tint_symbol_1, 1u, 1u); +void atomicCompareExchangeWeak_b2ab2c(threadgroup atomic_uint* const tint_symbol) { + uint2 res = atomicCompareExchangeWeak_1(tint_symbol, 1u, 1u); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicCompareExchangeWeak_b2ab2c(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_uint tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicCompareExchangeWeak_b2ab2c(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.hlsl b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.hlsl index c3825c2cf4..86bcffa267 100644 --- a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { uint atomic_result_1 = 0u; InterlockedExchange(arg_0, 0u, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicExchange_0a5dca(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.msl b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.msl index 577ae12b82..23e312119c 100644 --- a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicExchange_0a5dca(threadgroup atomic_uint* const tint_symbol_1) { - uint res = atomic_exchange_explicit(tint_symbol_1, 1u, memory_order_relaxed); +void atomicExchange_0a5dca(threadgroup atomic_uint* const tint_symbol) { + uint res = atomic_exchange_explicit(tint_symbol, 1u, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicExchange_0a5dca(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_uint tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicExchange_0a5dca(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.hlsl b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.hlsl index ba4ae09b06..3efb49280e 100644 --- a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { int atomic_result_1 = 0; InterlockedExchange(arg_0, 0, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicExchange_e114ba(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.msl b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.msl index ed4cb6fb66..abcec161c3 100644 --- a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicExchange_e114ba(threadgroup atomic_int* const tint_symbol_1) { - int res = atomic_exchange_explicit(tint_symbol_1, 1, memory_order_relaxed); +void atomicExchange_e114ba(threadgroup atomic_int* const tint_symbol) { + int res = atomic_exchange_explicit(tint_symbol, 1, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicExchange_e114ba(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_int tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicExchange_e114ba(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.hlsl b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.hlsl index c5727881d2..f0f031f320 100644 --- a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { uint atomic_result_1 = 0u; InterlockedExchange(arg_0, 0u, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicLoad_361bf1(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.msl b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.msl index a3a6422c63..327dc2ad92 100644 --- a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicLoad_361bf1(threadgroup atomic_uint* const tint_symbol_1) { - uint res = atomic_load_explicit(tint_symbol_1, memory_order_relaxed); +void atomicLoad_361bf1(threadgroup atomic_uint* const tint_symbol) { + uint res = atomic_load_explicit(tint_symbol, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicLoad_361bf1(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_uint tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicLoad_361bf1(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.hlsl b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.hlsl index 42c75b6d3c..adf265f6aa 100644 --- a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { int atomic_result_1 = 0; InterlockedExchange(arg_0, 0, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicLoad_afcc03(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.msl b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.msl index 2bb6995748..b3948d3f40 100644 --- a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicLoad_afcc03(threadgroup atomic_int* const tint_symbol_1) { - int res = atomic_load_explicit(tint_symbol_1, memory_order_relaxed); +void atomicLoad_afcc03(threadgroup atomic_int* const tint_symbol) { + int res = atomic_load_explicit(tint_symbol, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicLoad_afcc03(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_int tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicLoad_afcc03(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.hlsl b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.hlsl index aa4bf6981a..c5602f1156 100644 --- a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { int atomic_result_1 = 0; InterlockedExchange(arg_0, 0, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicMax_a89cc3(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.msl b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.msl index 7e7430e5ce..fbe1f22096 100644 --- a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicMax_a89cc3(threadgroup atomic_int* const tint_symbol_1) { - int res = atomic_fetch_max_explicit(tint_symbol_1, 1, memory_order_relaxed); +void atomicMax_a89cc3(threadgroup atomic_int* const tint_symbol) { + int res = atomic_fetch_max_explicit(tint_symbol, 1, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicMax_a89cc3(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_int tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicMax_a89cc3(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.hlsl b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.hlsl index 653b3d78a2..0b3f279602 100644 --- a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { uint atomic_result_1 = 0u; InterlockedExchange(arg_0, 0u, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicMax_beccfc(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.msl b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.msl index 146b1efbb6..5edad1c6bf 100644 --- a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicMax_beccfc(threadgroup atomic_uint* const tint_symbol_1) { - uint res = atomic_fetch_max_explicit(tint_symbol_1, 1u, memory_order_relaxed); +void atomicMax_beccfc(threadgroup atomic_uint* const tint_symbol) { + uint res = atomic_fetch_max_explicit(tint_symbol, 1u, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicMax_beccfc(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_uint tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicMax_beccfc(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.hlsl b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.hlsl index fc9a71bd25..7c719099fb 100644 --- a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { int atomic_result_1 = 0; InterlockedExchange(arg_0, 0, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicMin_278235(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.msl b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.msl index 918868394c..3b359fca64 100644 --- a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicMin_278235(threadgroup atomic_int* const tint_symbol_1) { - int res = atomic_fetch_min_explicit(tint_symbol_1, 1, memory_order_relaxed); +void atomicMin_278235(threadgroup atomic_int* const tint_symbol) { + int res = atomic_fetch_min_explicit(tint_symbol, 1, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicMin_278235(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_int tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicMin_278235(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.hlsl b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.hlsl index 6c9d1556d1..61d7265882 100644 --- a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { uint atomic_result_1 = 0u; InterlockedExchange(arg_0, 0u, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicMin_69d383(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.msl b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.msl index 6261ee3056..9c1e70e877 100644 --- a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicMin_69d383(threadgroup atomic_uint* const tint_symbol_1) { - uint res = atomic_fetch_min_explicit(tint_symbol_1, 1u, memory_order_relaxed); +void atomicMin_69d383(threadgroup atomic_uint* const tint_symbol) { + uint res = atomic_fetch_min_explicit(tint_symbol, 1u, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicMin_69d383(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_uint tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicMin_69d383(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.hlsl b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.hlsl index 2cf1260fe3..da41f0c373 100644 --- a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { uint atomic_result_1 = 0u; InterlockedExchange(arg_0, 0u, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicOr_5e3d61(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.msl b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.msl index 7947b5709a..9aea6427bc 100644 --- a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicOr_5e3d61(threadgroup atomic_uint* const tint_symbol_1) { - uint res = atomic_fetch_or_explicit(tint_symbol_1, 1u, memory_order_relaxed); +void atomicOr_5e3d61(threadgroup atomic_uint* const tint_symbol) { + uint res = atomic_fetch_or_explicit(tint_symbol, 1u, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicOr_5e3d61(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_uint tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicOr_5e3d61(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.hlsl b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.hlsl index 330cf2176d..2831e1b12d 100644 --- a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { int atomic_result_1 = 0; InterlockedExchange(arg_0, 0, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicOr_d09248(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.msl b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.msl index 5669df106c..6a0d77dd80 100644 --- a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicOr_d09248(threadgroup atomic_int* const tint_symbol_1) { - int res = atomic_fetch_or_explicit(tint_symbol_1, 1, memory_order_relaxed); +void atomicOr_d09248(threadgroup atomic_int* const tint_symbol) { + int res = atomic_fetch_or_explicit(tint_symbol, 1, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicOr_d09248(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_int tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicOr_d09248(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.hlsl b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.hlsl index b4552c6023..45393224fb 100644 --- a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.hlsl @@ -9,14 +9,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { uint atomic_result_1 = 0u; InterlockedExchange(arg_0, 0u, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicStore_726882(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.msl b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.msl index 55d79c06e6..665c40cdde 100644 --- a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicStore_726882(threadgroup atomic_uint* const tint_symbol_1) { - atomic_store_explicit(tint_symbol_1, 1u, memory_order_relaxed); +void atomicStore_726882(threadgroup atomic_uint* const tint_symbol) { + atomic_store_explicit(tint_symbol, 1u, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicStore_726882(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_uint tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicStore_726882(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.hlsl b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.hlsl index 8f3172fb74..d6dbcdcbf1 100644 --- a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.hlsl @@ -9,14 +9,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { int atomic_result_1 = 0; InterlockedExchange(arg_0, 0, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicStore_8bea94(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.msl b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.msl index c8f7b5537d..c17b49ca48 100644 --- a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicStore_8bea94(threadgroup atomic_int* const tint_symbol_1) { - atomic_store_explicit(tint_symbol_1, 1, memory_order_relaxed); +void atomicStore_8bea94(threadgroup atomic_int* const tint_symbol) { + atomic_store_explicit(tint_symbol, 1, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicStore_8bea94(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_int tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicStore_8bea94(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.hlsl b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.hlsl index 8f44365a7c..f9cc3d2e9a 100644 --- a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { int atomic_result_1 = 0; InterlockedExchange(arg_0, 0, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicXor_75dc95(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.msl b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.msl index b87b3d2441..a89935b70a 100644 --- a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicXor_75dc95(threadgroup atomic_int* const tint_symbol_1) { - int res = atomic_fetch_xor_explicit(tint_symbol_1, 1, memory_order_relaxed); +void atomicXor_75dc95(threadgroup atomic_int* const tint_symbol) { + int res = atomic_fetch_xor_explicit(tint_symbol, 1, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicXor_75dc95(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_int tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicXor_75dc95(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.hlsl b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.hlsl index d000aa3468..404268dc92 100644 --- a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.hlsl @@ -10,14 +10,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { uint atomic_result_1 = 0u; InterlockedExchange(arg_0, 0u, atomic_result_1); } GroupMemoryBarrierWithGroupSync(); atomicXor_c8e6be(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.msl b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.msl index b7220c7020..097ce40f58 100644 --- a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.msl @@ -1,17 +1,21 @@ #include using namespace metal; -void atomicXor_c8e6be(threadgroup atomic_uint* const tint_symbol_1) { - uint res = atomic_fetch_xor_explicit(tint_symbol_1, 1u, memory_order_relaxed); +void atomicXor_c8e6be(threadgroup atomic_uint* const tint_symbol) { + uint res = atomic_fetch_xor_explicit(tint_symbol, 1u, memory_order_relaxed); +} + +void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { + { + atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + atomicXor_c8e6be(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup atomic_uint tint_symbol_2; - { - atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - atomicXor_c8e6be(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/ceil/34064b.wgsl.expected.hlsl b/test/intrinsics/gen/ceil/34064b.wgsl.expected.hlsl index c0ebdc2dca..9a253c5dc9 100644 --- a/test/intrinsics/gen/ceil/34064b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ceil/34064b.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ceil_34064b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ceil/34064b.wgsl.expected.msl b/test/intrinsics/gen/ceil/34064b.wgsl.expected.msl index 5593646cbf..b523ac6196 100644 --- a/test/intrinsics/gen/ceil/34064b.wgsl.expected.msl +++ b/test/intrinsics/gen/ceil/34064b.wgsl.expected.msl @@ -9,10 +9,16 @@ void ceil_34064b() { float3 res = ceil(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { ceil_34064b(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/ceil/678655.wgsl.expected.hlsl b/test/intrinsics/gen/ceil/678655.wgsl.expected.hlsl index d65855d474..8d93979520 100644 --- a/test/intrinsics/gen/ceil/678655.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ceil/678655.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ceil_678655(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ceil/678655.wgsl.expected.msl b/test/intrinsics/gen/ceil/678655.wgsl.expected.msl index fdc9079935..12da11cbb5 100644 --- a/test/intrinsics/gen/ceil/678655.wgsl.expected.msl +++ b/test/intrinsics/gen/ceil/678655.wgsl.expected.msl @@ -9,10 +9,16 @@ void ceil_678655() { float res = ceil(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { ceil_678655(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/ceil/96f597.wgsl.expected.hlsl b/test/intrinsics/gen/ceil/96f597.wgsl.expected.hlsl index 99800e2098..a95f5570fa 100644 --- a/test/intrinsics/gen/ceil/96f597.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ceil/96f597.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ceil_96f597(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ceil/96f597.wgsl.expected.msl b/test/intrinsics/gen/ceil/96f597.wgsl.expected.msl index 0e7d8d7795..3e28a93410 100644 --- a/test/intrinsics/gen/ceil/96f597.wgsl.expected.msl +++ b/test/intrinsics/gen/ceil/96f597.wgsl.expected.msl @@ -9,10 +9,16 @@ void ceil_96f597() { float2 res = ceil(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { ceil_96f597(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/ceil/b74c16.wgsl.expected.hlsl b/test/intrinsics/gen/ceil/b74c16.wgsl.expected.hlsl index 6a7294f369..b16ec0eff9 100644 --- a/test/intrinsics/gen/ceil/b74c16.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ceil/b74c16.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ceil_b74c16(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ceil/b74c16.wgsl.expected.msl b/test/intrinsics/gen/ceil/b74c16.wgsl.expected.msl index baef3dfe57..edcbb411b5 100644 --- a/test/intrinsics/gen/ceil/b74c16.wgsl.expected.msl +++ b/test/intrinsics/gen/ceil/b74c16.wgsl.expected.msl @@ -9,10 +9,16 @@ void ceil_b74c16() { float4 res = ceil(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { ceil_b74c16(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.hlsl index 05273bda80..03bdbec37b 100644 --- a/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_0acf8f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.msl b/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.msl index 601db260b9..a0f7e2adb0 100644 --- a/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.msl +++ b/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.msl @@ -9,10 +9,16 @@ void clamp_0acf8f() { float2 res = clamp(float2(), float2(), float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_0acf8f(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.hlsl index 23f31435b3..0d631481d9 100644 --- a/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_1a32e3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.msl b/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.msl index faac6ae53f..d1bc9c0b32 100644 --- a/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.msl +++ b/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.msl @@ -9,10 +9,16 @@ void clamp_1a32e3() { int4 res = clamp(int4(), int4(), int4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_1a32e3(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/clamp/2bd567.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/2bd567.wgsl.expected.hlsl index bbaf37b32f..3301ab9fc7 100644 --- a/test/intrinsics/gen/clamp/2bd567.wgsl.expected.hlsl +++ b/test/intrinsics/gen/clamp/2bd567.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_2bd567(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/clamp/2bd567.wgsl.expected.msl b/test/intrinsics/gen/clamp/2bd567.wgsl.expected.msl index 676b575173..fff5d22997 100644 --- a/test/intrinsics/gen/clamp/2bd567.wgsl.expected.msl +++ b/test/intrinsics/gen/clamp/2bd567.wgsl.expected.msl @@ -9,10 +9,16 @@ void clamp_2bd567() { float res = clamp(1.0f, 1.0f, 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_2bd567(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/clamp/2bde41.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/2bde41.wgsl.expected.hlsl index c242988599..b30c1b8605 100644 --- a/test/intrinsics/gen/clamp/2bde41.wgsl.expected.hlsl +++ b/test/intrinsics/gen/clamp/2bde41.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_2bde41(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/clamp/2bde41.wgsl.expected.msl b/test/intrinsics/gen/clamp/2bde41.wgsl.expected.msl index 1db29d64a9..a020143d20 100644 --- a/test/intrinsics/gen/clamp/2bde41.wgsl.expected.msl +++ b/test/intrinsics/gen/clamp/2bde41.wgsl.expected.msl @@ -9,10 +9,16 @@ void clamp_2bde41() { float4 res = clamp(float4(), float4(), float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_2bde41(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/clamp/548fc7.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/548fc7.wgsl.expected.hlsl index 34c5070bda..b5181d1717 100644 --- a/test/intrinsics/gen/clamp/548fc7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/clamp/548fc7.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_548fc7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/clamp/548fc7.wgsl.expected.msl b/test/intrinsics/gen/clamp/548fc7.wgsl.expected.msl index 633a63a28f..eb8e97add4 100644 --- a/test/intrinsics/gen/clamp/548fc7.wgsl.expected.msl +++ b/test/intrinsics/gen/clamp/548fc7.wgsl.expected.msl @@ -9,10 +9,16 @@ void clamp_548fc7() { uint3 res = clamp(uint3(), uint3(), uint3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_548fc7(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/clamp/5f0819.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/5f0819.wgsl.expected.hlsl index 4e38819aea..ec1b9e05db 100644 --- a/test/intrinsics/gen/clamp/5f0819.wgsl.expected.hlsl +++ b/test/intrinsics/gen/clamp/5f0819.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_5f0819(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/clamp/5f0819.wgsl.expected.msl b/test/intrinsics/gen/clamp/5f0819.wgsl.expected.msl index 22d535b28d..32d3883f8e 100644 --- a/test/intrinsics/gen/clamp/5f0819.wgsl.expected.msl +++ b/test/intrinsics/gen/clamp/5f0819.wgsl.expected.msl @@ -9,10 +9,16 @@ void clamp_5f0819() { int3 res = clamp(int3(), int3(), int3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_5f0819(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/clamp/6c1749.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/6c1749.wgsl.expected.hlsl index 99975090ff..f8c15941de 100644 --- a/test/intrinsics/gen/clamp/6c1749.wgsl.expected.hlsl +++ b/test/intrinsics/gen/clamp/6c1749.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_6c1749(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/clamp/6c1749.wgsl.expected.msl b/test/intrinsics/gen/clamp/6c1749.wgsl.expected.msl index 87c439cd49..79d1efd1a6 100644 --- a/test/intrinsics/gen/clamp/6c1749.wgsl.expected.msl +++ b/test/intrinsics/gen/clamp/6c1749.wgsl.expected.msl @@ -9,10 +9,16 @@ void clamp_6c1749() { int2 res = clamp(int2(), int2(), int2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_6c1749(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/clamp/7706d7.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/7706d7.wgsl.expected.hlsl index 2073f92551..a074f8da84 100644 --- a/test/intrinsics/gen/clamp/7706d7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/clamp/7706d7.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_7706d7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/clamp/7706d7.wgsl.expected.msl b/test/intrinsics/gen/clamp/7706d7.wgsl.expected.msl index f2bf5f6019..9b132062d2 100644 --- a/test/intrinsics/gen/clamp/7706d7.wgsl.expected.msl +++ b/test/intrinsics/gen/clamp/7706d7.wgsl.expected.msl @@ -9,10 +9,16 @@ void clamp_7706d7() { uint2 res = clamp(uint2(), uint2(), uint2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_7706d7(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/clamp/867397.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/867397.wgsl.expected.hlsl index 365ea976c1..867c1570a3 100644 --- a/test/intrinsics/gen/clamp/867397.wgsl.expected.hlsl +++ b/test/intrinsics/gen/clamp/867397.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_867397(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/clamp/867397.wgsl.expected.msl b/test/intrinsics/gen/clamp/867397.wgsl.expected.msl index a020584125..fc1a990e3a 100644 --- a/test/intrinsics/gen/clamp/867397.wgsl.expected.msl +++ b/test/intrinsics/gen/clamp/867397.wgsl.expected.msl @@ -9,10 +9,16 @@ void clamp_867397() { float3 res = clamp(float3(), float3(), float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_867397(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/clamp/a2de25.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/a2de25.wgsl.expected.hlsl index cb42fbf473..34672d3c98 100644 --- a/test/intrinsics/gen/clamp/a2de25.wgsl.expected.hlsl +++ b/test/intrinsics/gen/clamp/a2de25.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_a2de25(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/clamp/a2de25.wgsl.expected.msl b/test/intrinsics/gen/clamp/a2de25.wgsl.expected.msl index 1e92fe76ac..faf58bf638 100644 --- a/test/intrinsics/gen/clamp/a2de25.wgsl.expected.msl +++ b/test/intrinsics/gen/clamp/a2de25.wgsl.expected.msl @@ -9,10 +9,16 @@ void clamp_a2de25() { uint res = clamp(1u, 1u, 1u); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_a2de25(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/clamp/b07c65.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/b07c65.wgsl.expected.hlsl index eb9e17f0b9..b04222ab2d 100644 --- a/test/intrinsics/gen/clamp/b07c65.wgsl.expected.hlsl +++ b/test/intrinsics/gen/clamp/b07c65.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_b07c65(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/clamp/b07c65.wgsl.expected.msl b/test/intrinsics/gen/clamp/b07c65.wgsl.expected.msl index f702d9f55e..c8634036fd 100644 --- a/test/intrinsics/gen/clamp/b07c65.wgsl.expected.msl +++ b/test/intrinsics/gen/clamp/b07c65.wgsl.expected.msl @@ -9,10 +9,16 @@ void clamp_b07c65() { int res = clamp(1, 1, 1); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_b07c65(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.hlsl index 1ee7ca03e0..05addc7b23 100644 --- a/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.hlsl +++ b/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_bd43ce(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.msl b/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.msl index e77477084c..73773c7881 100644 --- a/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.msl +++ b/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.msl @@ -9,10 +9,16 @@ void clamp_bd43ce() { uint4 res = clamp(uint4(), uint4(), uint4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { clamp_bd43ce(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/cos/16dc15.wgsl.expected.hlsl b/test/intrinsics/gen/cos/16dc15.wgsl.expected.hlsl index d6155d14ac..e084a63752 100644 --- a/test/intrinsics/gen/cos/16dc15.wgsl.expected.hlsl +++ b/test/intrinsics/gen/cos/16dc15.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { cos_16dc15(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/cos/16dc15.wgsl.expected.msl b/test/intrinsics/gen/cos/16dc15.wgsl.expected.msl index 083cc8e010..e78ce75ce0 100644 --- a/test/intrinsics/gen/cos/16dc15.wgsl.expected.msl +++ b/test/intrinsics/gen/cos/16dc15.wgsl.expected.msl @@ -9,10 +9,16 @@ void cos_16dc15() { float3 res = cos(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { cos_16dc15(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/cos/29d66d.wgsl.expected.hlsl b/test/intrinsics/gen/cos/29d66d.wgsl.expected.hlsl index b58da1b0d4..533d022aa0 100644 --- a/test/intrinsics/gen/cos/29d66d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/cos/29d66d.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { cos_29d66d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/cos/29d66d.wgsl.expected.msl b/test/intrinsics/gen/cos/29d66d.wgsl.expected.msl index 432218b217..c760b40925 100644 --- a/test/intrinsics/gen/cos/29d66d.wgsl.expected.msl +++ b/test/intrinsics/gen/cos/29d66d.wgsl.expected.msl @@ -9,10 +9,16 @@ void cos_29d66d() { float4 res = cos(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { cos_29d66d(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/cos/c3b486.wgsl.expected.hlsl b/test/intrinsics/gen/cos/c3b486.wgsl.expected.hlsl index fa0b5b2850..9f1eb43a9b 100644 --- a/test/intrinsics/gen/cos/c3b486.wgsl.expected.hlsl +++ b/test/intrinsics/gen/cos/c3b486.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { cos_c3b486(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/cos/c3b486.wgsl.expected.msl b/test/intrinsics/gen/cos/c3b486.wgsl.expected.msl index c09cc0281e..9b68bf517f 100644 --- a/test/intrinsics/gen/cos/c3b486.wgsl.expected.msl +++ b/test/intrinsics/gen/cos/c3b486.wgsl.expected.msl @@ -9,10 +9,16 @@ void cos_c3b486() { float2 res = cos(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { cos_c3b486(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/cos/c5c28e.wgsl.expected.hlsl b/test/intrinsics/gen/cos/c5c28e.wgsl.expected.hlsl index f90c205768..71a6612cb3 100644 --- a/test/intrinsics/gen/cos/c5c28e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/cos/c5c28e.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { cos_c5c28e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/cos/c5c28e.wgsl.expected.msl b/test/intrinsics/gen/cos/c5c28e.wgsl.expected.msl index 547bb12240..85e85dff03 100644 --- a/test/intrinsics/gen/cos/c5c28e.wgsl.expected.msl +++ b/test/intrinsics/gen/cos/c5c28e.wgsl.expected.msl @@ -9,10 +9,16 @@ void cos_c5c28e() { float res = cos(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { cos_c5c28e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/cosh/377652.wgsl.expected.hlsl b/test/intrinsics/gen/cosh/377652.wgsl.expected.hlsl index 8175fae933..d9713757ba 100644 --- a/test/intrinsics/gen/cosh/377652.wgsl.expected.hlsl +++ b/test/intrinsics/gen/cosh/377652.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { cosh_377652(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/cosh/377652.wgsl.expected.msl b/test/intrinsics/gen/cosh/377652.wgsl.expected.msl index b9dd371ae1..cd51d354b6 100644 --- a/test/intrinsics/gen/cosh/377652.wgsl.expected.msl +++ b/test/intrinsics/gen/cosh/377652.wgsl.expected.msl @@ -9,10 +9,16 @@ void cosh_377652() { float3 res = cosh(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { cosh_377652(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/cosh/c13756.wgsl.expected.hlsl b/test/intrinsics/gen/cosh/c13756.wgsl.expected.hlsl index 91de6c108f..0274e95d9e 100644 --- a/test/intrinsics/gen/cosh/c13756.wgsl.expected.hlsl +++ b/test/intrinsics/gen/cosh/c13756.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { cosh_c13756(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/cosh/c13756.wgsl.expected.msl b/test/intrinsics/gen/cosh/c13756.wgsl.expected.msl index 1cb1cc9d36..f4cb6c9311 100644 --- a/test/intrinsics/gen/cosh/c13756.wgsl.expected.msl +++ b/test/intrinsics/gen/cosh/c13756.wgsl.expected.msl @@ -9,10 +9,16 @@ void cosh_c13756() { float2 res = cosh(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { cosh_c13756(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/cosh/da92dd.wgsl.expected.hlsl b/test/intrinsics/gen/cosh/da92dd.wgsl.expected.hlsl index fab9283c19..3e1ede3a75 100644 --- a/test/intrinsics/gen/cosh/da92dd.wgsl.expected.hlsl +++ b/test/intrinsics/gen/cosh/da92dd.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { cosh_da92dd(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/cosh/da92dd.wgsl.expected.msl b/test/intrinsics/gen/cosh/da92dd.wgsl.expected.msl index 9a53964819..a59cebb914 100644 --- a/test/intrinsics/gen/cosh/da92dd.wgsl.expected.msl +++ b/test/intrinsics/gen/cosh/da92dd.wgsl.expected.msl @@ -9,10 +9,16 @@ void cosh_da92dd() { float res = cosh(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { cosh_da92dd(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.hlsl b/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.hlsl index 7faf6ac073..6701aa04b3 100644 --- a/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.hlsl +++ b/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { cosh_e0c1de(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.msl b/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.msl index 30c334b185..d46471552b 100644 --- a/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.msl +++ b/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.msl @@ -9,10 +9,16 @@ void cosh_e0c1de() { float4 res = cosh(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { cosh_e0c1de(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.hlsl index 7a4be61066..f51aa8f7e9 100644 --- a/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.hlsl +++ b/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_0d0e46(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.msl index 010ad8217f..d4a4bbe98b 100644 --- a/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.msl +++ b/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.msl @@ -9,10 +9,16 @@ void countOneBits_0d0e46() { uint4 res = popcount(uint4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_0d0e46(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.hlsl index 8c79b6e935..1093720ed6 100644 --- a/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.hlsl +++ b/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_0f7980(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.msl index 78a9670f26..baa7886ddc 100644 --- a/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.msl +++ b/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.msl @@ -9,10 +9,16 @@ void countOneBits_0f7980() { int4 res = popcount(int4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_0f7980(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.hlsl index 44cad4a63d..cc8e8514b5 100644 --- a/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.hlsl +++ b/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_65d2ae(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.msl index 7bb8d1fafb..b8fec94ce2 100644 --- a/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.msl +++ b/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.msl @@ -9,10 +9,16 @@ void countOneBits_65d2ae() { int3 res = popcount(int3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_65d2ae(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.hlsl index 382a5ab03d..14904397a4 100644 --- a/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_690cfc(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.msl index 3790052c5e..abc54b77f9 100644 --- a/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.msl +++ b/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.msl @@ -9,10 +9,16 @@ void countOneBits_690cfc() { uint3 res = popcount(uint3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_690cfc(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.hlsl index 0983c0c5f2..9487612e2a 100644 --- a/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.hlsl +++ b/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_94fd81(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.msl index 6648c06925..3659c4ae17 100644 --- a/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.msl +++ b/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.msl @@ -9,10 +9,16 @@ void countOneBits_94fd81() { uint2 res = popcount(uint2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_94fd81(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.hlsl index daae5212cf..cbd96415e0 100644 --- a/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_ae44f9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.msl index 94e43c8fa7..3ad8bd0c3f 100644 --- a/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.msl +++ b/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.msl @@ -9,10 +9,16 @@ void countOneBits_ae44f9() { uint res = popcount(1u); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_ae44f9(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.hlsl index 8851c9ab3c..faf8c7c733 100644 --- a/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_af90e2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.msl index 5b4944e452..2d033090e7 100644 --- a/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.msl +++ b/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.msl @@ -9,10 +9,16 @@ void countOneBits_af90e2() { int2 res = popcount(int2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_af90e2(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.hlsl index 497252afb7..bc4e67655a 100644 --- a/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_fd88b2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.msl index 74a06216e8..765afb78fa 100644 --- a/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.msl +++ b/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.msl @@ -9,10 +9,16 @@ void countOneBits_fd88b2() { int res = popcount(1); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { countOneBits_fd88b2(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/cross/041cb0.wgsl.expected.hlsl b/test/intrinsics/gen/cross/041cb0.wgsl.expected.hlsl index a16d30c71f..a4c63fbc99 100644 --- a/test/intrinsics/gen/cross/041cb0.wgsl.expected.hlsl +++ b/test/intrinsics/gen/cross/041cb0.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { cross_041cb0(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/cross/041cb0.wgsl.expected.msl b/test/intrinsics/gen/cross/041cb0.wgsl.expected.msl index 0b0432b5e8..67ab3df911 100644 --- a/test/intrinsics/gen/cross/041cb0.wgsl.expected.msl +++ b/test/intrinsics/gen/cross/041cb0.wgsl.expected.msl @@ -9,10 +9,16 @@ void cross_041cb0() { float3 res = cross(float3(), float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { cross_041cb0(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.hlsl b/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.hlsl index dbbacfbd93..5f7441e152 100644 --- a/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.hlsl +++ b/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { determinant_2b62ba(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.msl b/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.msl index aa4fabf128..291d9164b2 100644 --- a/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.msl +++ b/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.msl @@ -9,10 +9,16 @@ void determinant_2b62ba() { float res = determinant(float3x3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { determinant_2b62ba(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.hlsl b/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.hlsl index 8cd79f9136..a1c3513f07 100644 --- a/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { determinant_a0a87c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.msl b/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.msl index 188a9d3775..e3ef160e94 100644 --- a/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.msl +++ b/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.msl @@ -9,10 +9,16 @@ void determinant_a0a87c() { float res = determinant(float4x4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { determinant_a0a87c(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/determinant/e19305.wgsl.expected.hlsl b/test/intrinsics/gen/determinant/e19305.wgsl.expected.hlsl index a9077f0a7c..ea91292cd1 100644 --- a/test/intrinsics/gen/determinant/e19305.wgsl.expected.hlsl +++ b/test/intrinsics/gen/determinant/e19305.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { determinant_e19305(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/determinant/e19305.wgsl.expected.msl b/test/intrinsics/gen/determinant/e19305.wgsl.expected.msl index c902c3841b..48c7ad011b 100644 --- a/test/intrinsics/gen/determinant/e19305.wgsl.expected.msl +++ b/test/intrinsics/gen/determinant/e19305.wgsl.expected.msl @@ -9,10 +9,16 @@ void determinant_e19305() { float res = determinant(float2x2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { determinant_e19305(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/distance/0657d4.wgsl.expected.hlsl b/test/intrinsics/gen/distance/0657d4.wgsl.expected.hlsl index 2a24c7128d..42d05491dd 100644 --- a/test/intrinsics/gen/distance/0657d4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/distance/0657d4.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { distance_0657d4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/distance/0657d4.wgsl.expected.msl b/test/intrinsics/gen/distance/0657d4.wgsl.expected.msl index 3c80f040a4..1880b735ca 100644 --- a/test/intrinsics/gen/distance/0657d4.wgsl.expected.msl +++ b/test/intrinsics/gen/distance/0657d4.wgsl.expected.msl @@ -9,10 +9,16 @@ void distance_0657d4() { float res = distance(float3(), float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { distance_0657d4(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/distance/9646ea.wgsl.expected.hlsl b/test/intrinsics/gen/distance/9646ea.wgsl.expected.hlsl index 4ca0c1f0c7..7ed7793758 100644 --- a/test/intrinsics/gen/distance/9646ea.wgsl.expected.hlsl +++ b/test/intrinsics/gen/distance/9646ea.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { distance_9646ea(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/distance/9646ea.wgsl.expected.msl b/test/intrinsics/gen/distance/9646ea.wgsl.expected.msl index b9690c3b42..649f037843 100644 --- a/test/intrinsics/gen/distance/9646ea.wgsl.expected.msl +++ b/test/intrinsics/gen/distance/9646ea.wgsl.expected.msl @@ -9,10 +9,16 @@ void distance_9646ea() { float res = distance(float4(), float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { distance_9646ea(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/distance/aa4055.wgsl.expected.hlsl b/test/intrinsics/gen/distance/aa4055.wgsl.expected.hlsl index 4a24941bec..2c2b43a8a7 100644 --- a/test/intrinsics/gen/distance/aa4055.wgsl.expected.hlsl +++ b/test/intrinsics/gen/distance/aa4055.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { distance_aa4055(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/distance/aa4055.wgsl.expected.msl b/test/intrinsics/gen/distance/aa4055.wgsl.expected.msl index ae20aaa1f3..6a449ac20f 100644 --- a/test/intrinsics/gen/distance/aa4055.wgsl.expected.msl +++ b/test/intrinsics/gen/distance/aa4055.wgsl.expected.msl @@ -9,10 +9,16 @@ void distance_aa4055() { float res = distance(float2(), float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { distance_aa4055(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/distance/cfed73.wgsl.expected.hlsl b/test/intrinsics/gen/distance/cfed73.wgsl.expected.hlsl index 4d26388c38..1d0c208408 100644 --- a/test/intrinsics/gen/distance/cfed73.wgsl.expected.hlsl +++ b/test/intrinsics/gen/distance/cfed73.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { distance_cfed73(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/distance/cfed73.wgsl.expected.msl b/test/intrinsics/gen/distance/cfed73.wgsl.expected.msl index d06dfb28c8..26491703d6 100644 --- a/test/intrinsics/gen/distance/cfed73.wgsl.expected.msl +++ b/test/intrinsics/gen/distance/cfed73.wgsl.expected.msl @@ -9,10 +9,16 @@ void distance_cfed73() { float res = fabs(1.0f - 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { distance_cfed73(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/dot/0c577b.wgsl.expected.hlsl b/test/intrinsics/gen/dot/0c577b.wgsl.expected.hlsl index eb3ac361cf..a563beec04 100644 --- a/test/intrinsics/gen/dot/0c577b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/dot/0c577b.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { dot_0c577b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/dot/0c577b.wgsl.expected.msl b/test/intrinsics/gen/dot/0c577b.wgsl.expected.msl index c354cf70da..e1f5adb382 100644 --- a/test/intrinsics/gen/dot/0c577b.wgsl.expected.msl +++ b/test/intrinsics/gen/dot/0c577b.wgsl.expected.msl @@ -9,10 +9,16 @@ void dot_0c577b() { float res = dot(float4(), float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { dot_0c577b(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/dot/883f0e.wgsl.expected.hlsl b/test/intrinsics/gen/dot/883f0e.wgsl.expected.hlsl index a3d0f45d21..23f4b8092e 100644 --- a/test/intrinsics/gen/dot/883f0e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/dot/883f0e.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { dot_883f0e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/dot/883f0e.wgsl.expected.msl b/test/intrinsics/gen/dot/883f0e.wgsl.expected.msl index f099d39348..1dfda906f7 100644 --- a/test/intrinsics/gen/dot/883f0e.wgsl.expected.msl +++ b/test/intrinsics/gen/dot/883f0e.wgsl.expected.msl @@ -9,10 +9,16 @@ void dot_883f0e() { float res = dot(float2(), float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { dot_883f0e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/dot/ba4246.wgsl.expected.hlsl b/test/intrinsics/gen/dot/ba4246.wgsl.expected.hlsl index d208e9961a..d34ad4d4fe 100644 --- a/test/intrinsics/gen/dot/ba4246.wgsl.expected.hlsl +++ b/test/intrinsics/gen/dot/ba4246.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { dot_ba4246(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/dot/ba4246.wgsl.expected.msl b/test/intrinsics/gen/dot/ba4246.wgsl.expected.msl index b67deb54b5..517643ec47 100644 --- a/test/intrinsics/gen/dot/ba4246.wgsl.expected.msl +++ b/test/intrinsics/gen/dot/ba4246.wgsl.expected.msl @@ -9,10 +9,16 @@ void dot_ba4246() { float res = dot(float3(), float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { dot_ba4246(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/exp/0f70eb.wgsl.expected.hlsl b/test/intrinsics/gen/exp/0f70eb.wgsl.expected.hlsl index c71e07a4c0..34e1937114 100644 --- a/test/intrinsics/gen/exp/0f70eb.wgsl.expected.hlsl +++ b/test/intrinsics/gen/exp/0f70eb.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { exp_0f70eb(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/exp/0f70eb.wgsl.expected.msl b/test/intrinsics/gen/exp/0f70eb.wgsl.expected.msl index 022ea5d9fb..83ba5fa484 100644 --- a/test/intrinsics/gen/exp/0f70eb.wgsl.expected.msl +++ b/test/intrinsics/gen/exp/0f70eb.wgsl.expected.msl @@ -9,10 +9,16 @@ void exp_0f70eb() { float4 res = exp(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { exp_0f70eb(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/exp/1951e7.wgsl.expected.hlsl b/test/intrinsics/gen/exp/1951e7.wgsl.expected.hlsl index d015d9b5b9..ec350a7e5e 100644 --- a/test/intrinsics/gen/exp/1951e7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/exp/1951e7.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { exp_1951e7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/exp/1951e7.wgsl.expected.msl b/test/intrinsics/gen/exp/1951e7.wgsl.expected.msl index 2123f97cf0..0f03e9f2f8 100644 --- a/test/intrinsics/gen/exp/1951e7.wgsl.expected.msl +++ b/test/intrinsics/gen/exp/1951e7.wgsl.expected.msl @@ -9,10 +9,16 @@ void exp_1951e7() { float2 res = exp(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { exp_1951e7(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/exp/771fd2.wgsl.expected.hlsl b/test/intrinsics/gen/exp/771fd2.wgsl.expected.hlsl index d3d32340b2..f8298b4069 100644 --- a/test/intrinsics/gen/exp/771fd2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/exp/771fd2.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { exp_771fd2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/exp/771fd2.wgsl.expected.msl b/test/intrinsics/gen/exp/771fd2.wgsl.expected.msl index 345a5f89f3..8464078de3 100644 --- a/test/intrinsics/gen/exp/771fd2.wgsl.expected.msl +++ b/test/intrinsics/gen/exp/771fd2.wgsl.expected.msl @@ -9,10 +9,16 @@ void exp_771fd2() { float res = exp(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { exp_771fd2(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/exp/d98450.wgsl.expected.hlsl b/test/intrinsics/gen/exp/d98450.wgsl.expected.hlsl index 59c8f2c992..0da884942e 100644 --- a/test/intrinsics/gen/exp/d98450.wgsl.expected.hlsl +++ b/test/intrinsics/gen/exp/d98450.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { exp_d98450(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/exp/d98450.wgsl.expected.msl b/test/intrinsics/gen/exp/d98450.wgsl.expected.msl index 073deec29b..32c830b35e 100644 --- a/test/intrinsics/gen/exp/d98450.wgsl.expected.msl +++ b/test/intrinsics/gen/exp/d98450.wgsl.expected.msl @@ -9,10 +9,16 @@ void exp_d98450() { float3 res = exp(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { exp_d98450(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/exp2/1f8680.wgsl.expected.hlsl b/test/intrinsics/gen/exp2/1f8680.wgsl.expected.hlsl index 93dbbe477b..4277495dac 100644 --- a/test/intrinsics/gen/exp2/1f8680.wgsl.expected.hlsl +++ b/test/intrinsics/gen/exp2/1f8680.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { exp2_1f8680(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/exp2/1f8680.wgsl.expected.msl b/test/intrinsics/gen/exp2/1f8680.wgsl.expected.msl index 4929bd0701..cde78da606 100644 --- a/test/intrinsics/gen/exp2/1f8680.wgsl.expected.msl +++ b/test/intrinsics/gen/exp2/1f8680.wgsl.expected.msl @@ -9,10 +9,16 @@ void exp2_1f8680() { float3 res = exp2(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { exp2_1f8680(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.hlsl b/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.hlsl index 458a3e1550..f1964dea16 100644 --- a/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { exp2_a9d0a7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.msl b/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.msl index d727ef8e4c..6202c97a5b 100644 --- a/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.msl +++ b/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.msl @@ -9,10 +9,16 @@ void exp2_a9d0a7() { float4 res = exp2(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { exp2_a9d0a7(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/exp2/d6777c.wgsl.expected.hlsl b/test/intrinsics/gen/exp2/d6777c.wgsl.expected.hlsl index 37ea6abded..77ec076618 100644 --- a/test/intrinsics/gen/exp2/d6777c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/exp2/d6777c.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { exp2_d6777c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/exp2/d6777c.wgsl.expected.msl b/test/intrinsics/gen/exp2/d6777c.wgsl.expected.msl index 71e01861a3..62f0d939b0 100644 --- a/test/intrinsics/gen/exp2/d6777c.wgsl.expected.msl +++ b/test/intrinsics/gen/exp2/d6777c.wgsl.expected.msl @@ -9,10 +9,16 @@ void exp2_d6777c() { float2 res = exp2(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { exp2_d6777c(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/exp2/dea523.wgsl.expected.hlsl b/test/intrinsics/gen/exp2/dea523.wgsl.expected.hlsl index 46a56fca4f..4c0dd533e1 100644 --- a/test/intrinsics/gen/exp2/dea523.wgsl.expected.hlsl +++ b/test/intrinsics/gen/exp2/dea523.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { exp2_dea523(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/exp2/dea523.wgsl.expected.msl b/test/intrinsics/gen/exp2/dea523.wgsl.expected.msl index 7eba951e91..cb5f8b79be 100644 --- a/test/intrinsics/gen/exp2/dea523.wgsl.expected.msl +++ b/test/intrinsics/gen/exp2/dea523.wgsl.expected.msl @@ -9,10 +9,16 @@ void exp2_dea523() { float res = exp2(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { exp2_dea523(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.hlsl b/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.hlsl index 44000ac5d5..219cd7e1e7 100644 --- a/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { faceForward_5afbd5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.msl b/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.msl index 8e29e8927d..00496ffde5 100644 --- a/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.msl +++ b/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.msl @@ -9,10 +9,16 @@ void faceForward_5afbd5() { float3 res = faceforward(float3(), float3(), float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { faceForward_5afbd5(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.hlsl b/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.hlsl index 7791bd085d..4ffbf8f704 100644 --- a/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { faceForward_b316e5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.msl b/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.msl index 1ca663acdf..fc6ee22622 100644 --- a/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.msl +++ b/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.msl @@ -9,10 +9,16 @@ void faceForward_b316e5() { float4 res = faceforward(float4(), float4(), float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { faceForward_b316e5(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.hlsl b/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.hlsl index bee1a6a5b3..079aebec26 100644 --- a/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { faceForward_e6908b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.msl b/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.msl index 0136e3ae15..d5a67820e1 100644 --- a/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.msl +++ b/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.msl @@ -9,10 +9,16 @@ void faceForward_e6908b() { float2 res = faceforward(float2(), float2(), float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { faceForward_e6908b(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/floor/3bccc4.wgsl.expected.hlsl b/test/intrinsics/gen/floor/3bccc4.wgsl.expected.hlsl index 99e4150839..b3646e4385 100644 --- a/test/intrinsics/gen/floor/3bccc4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/floor/3bccc4.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { floor_3bccc4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/floor/3bccc4.wgsl.expected.msl b/test/intrinsics/gen/floor/3bccc4.wgsl.expected.msl index 50ec31e178..e75d603741 100644 --- a/test/intrinsics/gen/floor/3bccc4.wgsl.expected.msl +++ b/test/intrinsics/gen/floor/3bccc4.wgsl.expected.msl @@ -9,10 +9,16 @@ void floor_3bccc4() { float4 res = floor(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { floor_3bccc4(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.hlsl b/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.hlsl index 7bce1c3ec4..8a10c2dbeb 100644 --- a/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.hlsl +++ b/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { floor_5fc9ac(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.msl b/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.msl index f50587a43e..8cdbf02388 100644 --- a/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.msl +++ b/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.msl @@ -9,10 +9,16 @@ void floor_5fc9ac() { float2 res = floor(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { floor_5fc9ac(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/floor/60d7ea.wgsl.expected.hlsl b/test/intrinsics/gen/floor/60d7ea.wgsl.expected.hlsl index d1657b3d34..fd7578a820 100644 --- a/test/intrinsics/gen/floor/60d7ea.wgsl.expected.hlsl +++ b/test/intrinsics/gen/floor/60d7ea.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { floor_60d7ea(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/floor/60d7ea.wgsl.expected.msl b/test/intrinsics/gen/floor/60d7ea.wgsl.expected.msl index 8ed07d4106..c03feae395 100644 --- a/test/intrinsics/gen/floor/60d7ea.wgsl.expected.msl +++ b/test/intrinsics/gen/floor/60d7ea.wgsl.expected.msl @@ -9,10 +9,16 @@ void floor_60d7ea() { float3 res = floor(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { floor_60d7ea(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/floor/66f154.wgsl.expected.hlsl b/test/intrinsics/gen/floor/66f154.wgsl.expected.hlsl index 95dd96eede..2809aff397 100644 --- a/test/intrinsics/gen/floor/66f154.wgsl.expected.hlsl +++ b/test/intrinsics/gen/floor/66f154.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { floor_66f154(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/floor/66f154.wgsl.expected.msl b/test/intrinsics/gen/floor/66f154.wgsl.expected.msl index a5b9f9d1e9..943538f73a 100644 --- a/test/intrinsics/gen/floor/66f154.wgsl.expected.msl +++ b/test/intrinsics/gen/floor/66f154.wgsl.expected.msl @@ -9,10 +9,16 @@ void floor_66f154() { float res = floor(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { floor_66f154(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/fma/26a7a9.wgsl.expected.hlsl b/test/intrinsics/gen/fma/26a7a9.wgsl.expected.hlsl index c9733c7d03..534f1fbd77 100644 --- a/test/intrinsics/gen/fma/26a7a9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/fma/26a7a9.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { fma_26a7a9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/fma/26a7a9.wgsl.expected.msl b/test/intrinsics/gen/fma/26a7a9.wgsl.expected.msl index f9349e962e..6d9c885ff7 100644 --- a/test/intrinsics/gen/fma/26a7a9.wgsl.expected.msl +++ b/test/intrinsics/gen/fma/26a7a9.wgsl.expected.msl @@ -9,10 +9,16 @@ void fma_26a7a9() { float2 res = fma(float2(), float2(), float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { fma_26a7a9(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/fma/6a3283.wgsl.expected.hlsl b/test/intrinsics/gen/fma/6a3283.wgsl.expected.hlsl index d6d98d3dcd..c550df4f22 100644 --- a/test/intrinsics/gen/fma/6a3283.wgsl.expected.hlsl +++ b/test/intrinsics/gen/fma/6a3283.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { fma_6a3283(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/fma/6a3283.wgsl.expected.msl b/test/intrinsics/gen/fma/6a3283.wgsl.expected.msl index f964054f23..070e615b27 100644 --- a/test/intrinsics/gen/fma/6a3283.wgsl.expected.msl +++ b/test/intrinsics/gen/fma/6a3283.wgsl.expected.msl @@ -9,10 +9,16 @@ void fma_6a3283() { float4 res = fma(float4(), float4(), float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { fma_6a3283(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/fma/c10ba3.wgsl.expected.hlsl b/test/intrinsics/gen/fma/c10ba3.wgsl.expected.hlsl index eead041818..d4eb7cf6f3 100644 --- a/test/intrinsics/gen/fma/c10ba3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/fma/c10ba3.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { fma_c10ba3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/fma/c10ba3.wgsl.expected.msl b/test/intrinsics/gen/fma/c10ba3.wgsl.expected.msl index 0f9a195f23..4a296c66ca 100644 --- a/test/intrinsics/gen/fma/c10ba3.wgsl.expected.msl +++ b/test/intrinsics/gen/fma/c10ba3.wgsl.expected.msl @@ -9,10 +9,16 @@ void fma_c10ba3() { float res = fma(1.0f, 1.0f, 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { fma_c10ba3(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/fma/e17c5c.wgsl.expected.hlsl b/test/intrinsics/gen/fma/e17c5c.wgsl.expected.hlsl index 958567bb86..486a595f5b 100644 --- a/test/intrinsics/gen/fma/e17c5c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/fma/e17c5c.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { fma_e17c5c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/fma/e17c5c.wgsl.expected.msl b/test/intrinsics/gen/fma/e17c5c.wgsl.expected.msl index e606075d32..61d7cd46da 100644 --- a/test/intrinsics/gen/fma/e17c5c.wgsl.expected.msl +++ b/test/intrinsics/gen/fma/e17c5c.wgsl.expected.msl @@ -9,10 +9,16 @@ void fma_e17c5c() { float3 res = fma(float3(), float3(), float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { fma_e17c5c(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.hlsl b/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.hlsl index 09bd4ec92b..f77b849473 100644 --- a/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { fract_8bc1e9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.msl b/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.msl index b78669667f..c82b9ed021 100644 --- a/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.msl +++ b/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.msl @@ -9,10 +9,16 @@ void fract_8bc1e9() { float4 res = fract(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { fract_8bc1e9(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/fract/943cb1.wgsl.expected.hlsl b/test/intrinsics/gen/fract/943cb1.wgsl.expected.hlsl index 9354ed95b8..a5c4e2a6c3 100644 --- a/test/intrinsics/gen/fract/943cb1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/fract/943cb1.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { fract_943cb1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/fract/943cb1.wgsl.expected.msl b/test/intrinsics/gen/fract/943cb1.wgsl.expected.msl index c8596ab584..ec6e76ae61 100644 --- a/test/intrinsics/gen/fract/943cb1.wgsl.expected.msl +++ b/test/intrinsics/gen/fract/943cb1.wgsl.expected.msl @@ -9,10 +9,16 @@ void fract_943cb1() { float2 res = fract(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { fract_943cb1(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/fract/a49758.wgsl.expected.hlsl b/test/intrinsics/gen/fract/a49758.wgsl.expected.hlsl index 9b658fcf7d..37f641a3b3 100644 --- a/test/intrinsics/gen/fract/a49758.wgsl.expected.hlsl +++ b/test/intrinsics/gen/fract/a49758.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { fract_a49758(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/fract/a49758.wgsl.expected.msl b/test/intrinsics/gen/fract/a49758.wgsl.expected.msl index 1dbebec91a..a57d717241 100644 --- a/test/intrinsics/gen/fract/a49758.wgsl.expected.msl +++ b/test/intrinsics/gen/fract/a49758.wgsl.expected.msl @@ -9,10 +9,16 @@ void fract_a49758() { float3 res = fract(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { fract_a49758(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/fract/fa5c71.wgsl.expected.hlsl b/test/intrinsics/gen/fract/fa5c71.wgsl.expected.hlsl index c8839c4cfd..f8d423da9d 100644 --- a/test/intrinsics/gen/fract/fa5c71.wgsl.expected.hlsl +++ b/test/intrinsics/gen/fract/fa5c71.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { fract_fa5c71(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/fract/fa5c71.wgsl.expected.msl b/test/intrinsics/gen/fract/fa5c71.wgsl.expected.msl index 03f3ed285c..4997b0a1e5 100644 --- a/test/intrinsics/gen/fract/fa5c71.wgsl.expected.msl +++ b/test/intrinsics/gen/fract/fa5c71.wgsl.expected.msl @@ -9,10 +9,16 @@ void fract_fa5c71() { float res = fract(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { fract_fa5c71(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/013caa.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/013caa.wgsl.expected.hlsl index 8a964eda0c..fe14b500c0 100644 --- a/test/intrinsics/gen/frexp/013caa.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/013caa.wgsl.expected.hlsl @@ -18,10 +18,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_013caa(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/013caa.wgsl.expected.msl b/test/intrinsics/gen/frexp/013caa.wgsl.expected.msl index bd2fdbd4d0..7548afcf5e 100644 --- a/test/intrinsics/gen/frexp/013caa.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/013caa.wgsl.expected.msl @@ -22,10 +22,16 @@ void frexp_013caa() { float4 res = tint_frexp(float4(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_013caa(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/0da285.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/0da285.wgsl.expected.hlsl index a5b01999d8..db4e43a211 100644 --- a/test/intrinsics/gen/frexp/0da285.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/0da285.wgsl.expected.hlsl @@ -19,13 +19,16 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { arg_1 = 0; } GroupMemoryBarrierWithGroupSync(); frexp_0da285(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/frexp/0da285.wgsl.expected.msl b/test/intrinsics/gen/frexp/0da285.wgsl.expected.msl index db21f10586..a87b780291 100644 --- a/test/intrinsics/gen/frexp/0da285.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/0da285.wgsl.expected.msl @@ -13,17 +13,21 @@ float tint_frexp(float param_0, threadgroup int* param_1) { return sig; } -void frexp_0da285(threadgroup int* const tint_symbol_1) { - float res = tint_frexp(1.0f, tint_symbol_1); +void frexp_0da285(threadgroup int* const tint_symbol) { + float res = tint_frexp(1.0f, tint_symbol); +} + +void compute_main_inner(uint local_invocation_index, threadgroup int* const tint_symbol_1) { + { + *(tint_symbol_1) = int(); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + frexp_0da285(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup int tint_symbol_2; - { - tint_symbol_2 = int(); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - frexp_0da285(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/frexp/12f1da.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/12f1da.wgsl.expected.hlsl index caf7961c78..64b8dfb568 100644 --- a/test/intrinsics/gen/frexp/12f1da.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/12f1da.wgsl.expected.hlsl @@ -17,10 +17,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_12f1da(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/12f1da.wgsl.expected.msl b/test/intrinsics/gen/frexp/12f1da.wgsl.expected.msl index cf7b0cb6be..735940da77 100644 --- a/test/intrinsics/gen/frexp/12f1da.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/12f1da.wgsl.expected.msl @@ -20,10 +20,16 @@ void frexp_12f1da() { frexp_result res = tint_frexp(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_12f1da(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/15edf3.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/15edf3.wgsl.expected.hlsl index 446b4b9ea6..1addf38d7b 100644 --- a/test/intrinsics/gen/frexp/15edf3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/15edf3.wgsl.expected.hlsl @@ -18,10 +18,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_15edf3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/15edf3.wgsl.expected.msl b/test/intrinsics/gen/frexp/15edf3.wgsl.expected.msl index 0a3ab3e745..930f7c67f8 100644 --- a/test/intrinsics/gen/frexp/15edf3.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/15edf3.wgsl.expected.msl @@ -22,10 +22,16 @@ void frexp_15edf3() { float2 res = tint_frexp(float2(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_15edf3(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/19ab15.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/19ab15.wgsl.expected.hlsl index 40eef60aef..10ee0c9560 100644 --- a/test/intrinsics/gen/frexp/19ab15.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/19ab15.wgsl.expected.hlsl @@ -18,10 +18,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_19ab15(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/19ab15.wgsl.expected.msl b/test/intrinsics/gen/frexp/19ab15.wgsl.expected.msl index b2c38fe0ac..31ca96b78a 100644 --- a/test/intrinsics/gen/frexp/19ab15.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/19ab15.wgsl.expected.msl @@ -22,10 +22,16 @@ void frexp_19ab15() { float4 res = tint_frexp(float4(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_19ab15(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/2052e9.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/2052e9.wgsl.expected.hlsl index 32b755064a..27a65a0ab8 100644 --- a/test/intrinsics/gen/frexp/2052e9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/2052e9.wgsl.expected.hlsl @@ -18,10 +18,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_2052e9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/2052e9.wgsl.expected.msl b/test/intrinsics/gen/frexp/2052e9.wgsl.expected.msl index c3c1293db8..169c0483e9 100644 --- a/test/intrinsics/gen/frexp/2052e9.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/2052e9.wgsl.expected.msl @@ -22,10 +22,16 @@ void frexp_2052e9() { float4 res = tint_frexp(float4(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_2052e9(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.hlsl index 4a9c15d217..e07da578bb 100644 --- a/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.hlsl @@ -19,13 +19,16 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { arg_1 = int3(0, 0, 0); } GroupMemoryBarrierWithGroupSync(); frexp_40fc9b(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.msl b/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.msl index ded1f19616..a62b3dcbcf 100644 --- a/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.msl @@ -13,17 +13,21 @@ float3 tint_frexp(float3 param_0, threadgroup int3* param_1) { return sig; } -void frexp_40fc9b(threadgroup int3* const tint_symbol_1) { - float3 res = tint_frexp(float3(), tint_symbol_1); +void frexp_40fc9b(threadgroup int3* const tint_symbol) { + float3 res = tint_frexp(float3(), tint_symbol); +} + +void compute_main_inner(uint local_invocation_index, threadgroup int3* const tint_symbol_1) { + { + *(tint_symbol_1) = int3(); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + frexp_40fc9b(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup int3 tint_symbol_2; - { - tint_symbol_2 = int3(); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - frexp_40fc9b(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/frexp/41e931.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/41e931.wgsl.expected.hlsl index da408a3a71..8227fdd5df 100644 --- a/test/intrinsics/gen/frexp/41e931.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/41e931.wgsl.expected.hlsl @@ -18,10 +18,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_41e931(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/41e931.wgsl.expected.msl b/test/intrinsics/gen/frexp/41e931.wgsl.expected.msl index 9e60f17946..c0b63f46b8 100644 --- a/test/intrinsics/gen/frexp/41e931.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/41e931.wgsl.expected.msl @@ -22,10 +22,16 @@ void frexp_41e931() { float res = tint_frexp(1.0f, &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_41e931(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/481e59.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/481e59.wgsl.expected.hlsl index ef6c94e73c..d58a5cb606 100644 --- a/test/intrinsics/gen/frexp/481e59.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/481e59.wgsl.expected.hlsl @@ -18,10 +18,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_481e59(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/481e59.wgsl.expected.msl b/test/intrinsics/gen/frexp/481e59.wgsl.expected.msl index cb21d9b580..73cf6da2ed 100644 --- a/test/intrinsics/gen/frexp/481e59.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/481e59.wgsl.expected.msl @@ -22,10 +22,16 @@ void frexp_481e59() { float res = tint_frexp(1.0f, &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_481e59(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/5a141e.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/5a141e.wgsl.expected.hlsl index 84a57f9af0..c22fce9280 100644 --- a/test/intrinsics/gen/frexp/5a141e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/5a141e.wgsl.expected.hlsl @@ -18,10 +18,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_5a141e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/5a141e.wgsl.expected.msl b/test/intrinsics/gen/frexp/5a141e.wgsl.expected.msl index fc06cdb13d..fdf9ae0424 100644 --- a/test/intrinsics/gen/frexp/5a141e.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/5a141e.wgsl.expected.msl @@ -22,10 +22,16 @@ void frexp_5a141e() { float3 res = tint_frexp(float3(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_5a141e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/6d0058.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/6d0058.wgsl.expected.hlsl index eddcbc5cb0..043f9b4648 100644 --- a/test/intrinsics/gen/frexp/6d0058.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/6d0058.wgsl.expected.hlsl @@ -18,10 +18,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_6d0058(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/6d0058.wgsl.expected.msl b/test/intrinsics/gen/frexp/6d0058.wgsl.expected.msl index 0c303483a4..79b03463f9 100644 --- a/test/intrinsics/gen/frexp/6d0058.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/6d0058.wgsl.expected.msl @@ -22,10 +22,16 @@ void frexp_6d0058() { float3 res = tint_frexp(float3(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_6d0058(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/6efa09.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/6efa09.wgsl.expected.hlsl index d967d1cadc..58f3af8f71 100644 --- a/test/intrinsics/gen/frexp/6efa09.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/6efa09.wgsl.expected.hlsl @@ -19,10 +19,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_6efa09(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/6efa09.wgsl.expected.msl b/test/intrinsics/gen/frexp/6efa09.wgsl.expected.msl index 047a0eed61..083b4b1cb3 100644 --- a/test/intrinsics/gen/frexp/6efa09.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/6efa09.wgsl.expected.msl @@ -17,15 +17,21 @@ struct tint_symbol { float4 value [[position]]; }; -void frexp_6efa09(thread int3* const tint_symbol_2) { - float3 res = tint_frexp(float3(), tint_symbol_2); +void frexp_6efa09(thread int3* const tint_symbol_1) { + float3 res = tint_frexp(float3(), tint_symbol_1); +} + +float4 vertex_main_inner(thread int3* const tint_symbol_2) { + frexp_6efa09(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main() { thread int3 tint_symbol_3 = 0; - frexp_6efa09(&(tint_symbol_3)); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(&(tint_symbol_3)); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.hlsl index 2ca0a682dc..7ecb49f0d1 100644 --- a/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.hlsl @@ -17,10 +17,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_a0eb3b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.msl b/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.msl index 6ca1b90c21..b162f29153 100644 --- a/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.msl @@ -20,10 +20,16 @@ void frexp_a0eb3b() { frexp_result_vec3 res = tint_frexp(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_a0eb3b(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/a2a617.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/a2a617.wgsl.expected.hlsl index df13399b75..530aa26fef 100644 --- a/test/intrinsics/gen/frexp/a2a617.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/a2a617.wgsl.expected.hlsl @@ -19,10 +19,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_a2a617(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/a2a617.wgsl.expected.msl b/test/intrinsics/gen/frexp/a2a617.wgsl.expected.msl index 8ec28448e7..2c2d8dde57 100644 --- a/test/intrinsics/gen/frexp/a2a617.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/a2a617.wgsl.expected.msl @@ -17,15 +17,21 @@ struct tint_symbol { float4 value [[position]]; }; -void frexp_a2a617(thread int* const tint_symbol_2) { - float res = tint_frexp(1.0f, tint_symbol_2); +void frexp_a2a617(thread int* const tint_symbol_1) { + float res = tint_frexp(1.0f, tint_symbol_1); +} + +float4 vertex_main_inner(thread int* const tint_symbol_2) { + frexp_a2a617(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main() { thread int tint_symbol_3 = 0; - frexp_a2a617(&(tint_symbol_3)); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(&(tint_symbol_3)); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/a3f940.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/a3f940.wgsl.expected.hlsl index 0ab2dd235f..80b8ce4e76 100644 --- a/test/intrinsics/gen/frexp/a3f940.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/a3f940.wgsl.expected.hlsl @@ -19,13 +19,16 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { arg_1 = int2(0, 0); } GroupMemoryBarrierWithGroupSync(); frexp_a3f940(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/frexp/a3f940.wgsl.expected.msl b/test/intrinsics/gen/frexp/a3f940.wgsl.expected.msl index fb24d37e7b..556bbbfdd5 100644 --- a/test/intrinsics/gen/frexp/a3f940.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/a3f940.wgsl.expected.msl @@ -13,17 +13,21 @@ float2 tint_frexp(float2 param_0, threadgroup int2* param_1) { return sig; } -void frexp_a3f940(threadgroup int2* const tint_symbol_1) { - float2 res = tint_frexp(float2(), tint_symbol_1); +void frexp_a3f940(threadgroup int2* const tint_symbol) { + float2 res = tint_frexp(float2(), tint_symbol); +} + +void compute_main_inner(uint local_invocation_index, threadgroup int2* const tint_symbol_1) { + { + *(tint_symbol_1) = int2(); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + frexp_a3f940(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup int2 tint_symbol_2; - { - tint_symbol_2 = int2(); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - frexp_a3f940(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/frexp/a951b5.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/a951b5.wgsl.expected.hlsl index 88c956530a..62c21750e7 100644 --- a/test/intrinsics/gen/frexp/a951b5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/a951b5.wgsl.expected.hlsl @@ -18,10 +18,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_a951b5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/a951b5.wgsl.expected.msl b/test/intrinsics/gen/frexp/a951b5.wgsl.expected.msl index 56dd076470..a995704628 100644 --- a/test/intrinsics/gen/frexp/a951b5.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/a951b5.wgsl.expected.msl @@ -22,10 +22,16 @@ void frexp_a951b5() { float2 res = tint_frexp(float2(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_a951b5(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/b45525.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/b45525.wgsl.expected.hlsl index 28ee0ea6b6..5959903747 100644 --- a/test/intrinsics/gen/frexp/b45525.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/b45525.wgsl.expected.hlsl @@ -19,10 +19,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_b45525(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/b45525.wgsl.expected.msl b/test/intrinsics/gen/frexp/b45525.wgsl.expected.msl index 44aca0897c..6a0ccc9315 100644 --- a/test/intrinsics/gen/frexp/b45525.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/b45525.wgsl.expected.msl @@ -17,15 +17,21 @@ struct tint_symbol { float4 value [[position]]; }; -void frexp_b45525(thread int4* const tint_symbol_2) { - float4 res = tint_frexp(float4(), tint_symbol_2); +void frexp_b45525(thread int4* const tint_symbol_1) { + float4 res = tint_frexp(float4(), tint_symbol_1); +} + +float4 vertex_main_inner(thread int4* const tint_symbol_2) { + frexp_b45525(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main() { thread int4 tint_symbol_3 = 0; - frexp_b45525(&(tint_symbol_3)); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(&(tint_symbol_3)); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.hlsl index 1941d2bb3e..e0efe14d2d 100644 --- a/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.hlsl @@ -19,13 +19,16 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { arg_1 = int4(0, 0, 0, 0); } GroupMemoryBarrierWithGroupSync(); frexp_b87f4e(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.msl b/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.msl index 1edfa88cc1..bea791d387 100644 --- a/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.msl @@ -13,17 +13,21 @@ float4 tint_frexp(float4 param_0, threadgroup int4* param_1) { return sig; } -void frexp_b87f4e(threadgroup int4* const tint_symbol_1) { - float4 res = tint_frexp(float4(), tint_symbol_1); +void frexp_b87f4e(threadgroup int4* const tint_symbol) { + float4 res = tint_frexp(float4(), tint_symbol); +} + +void compute_main_inner(uint local_invocation_index, threadgroup int4* const tint_symbol_1) { + { + *(tint_symbol_1) = int4(); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + frexp_b87f4e(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup int4 tint_symbol_2; - { - tint_symbol_2 = int4(); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - frexp_b87f4e(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.hlsl index 527404bab6..60df4fc797 100644 --- a/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.hlsl @@ -18,10 +18,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_b9e4de(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.msl b/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.msl index 937b87f09d..d850e12930 100644 --- a/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.msl @@ -22,10 +22,16 @@ void frexp_b9e4de() { float3 res = tint_frexp(float3(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_b9e4de(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/c084e3.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/c084e3.wgsl.expected.hlsl index b264ed9d31..7e7f79c397 100644 --- a/test/intrinsics/gen/frexp/c084e3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/c084e3.wgsl.expected.hlsl @@ -19,10 +19,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_c084e3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/c084e3.wgsl.expected.msl b/test/intrinsics/gen/frexp/c084e3.wgsl.expected.msl index 407ee4545e..bfe4559248 100644 --- a/test/intrinsics/gen/frexp/c084e3.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/c084e3.wgsl.expected.msl @@ -17,15 +17,21 @@ struct tint_symbol { float4 value [[position]]; }; -void frexp_c084e3(thread int2* const tint_symbol_2) { - float2 res = tint_frexp(float2(), tint_symbol_2); +void frexp_c084e3(thread int2* const tint_symbol_1) { + float2 res = tint_frexp(float2(), tint_symbol_1); +} + +float4 vertex_main_inner(thread int2* const tint_symbol_2) { + frexp_c084e3(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main() { thread int2 tint_symbol_3 = 0; - frexp_c084e3(&(tint_symbol_3)); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(&(tint_symbol_3)); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.hlsl index 1efdb62603..d03a5b1125 100644 --- a/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.hlsl @@ -18,10 +18,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_d06c2c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.msl b/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.msl index 8f580e1506..cafa8c9f77 100644 --- a/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.msl @@ -22,10 +22,16 @@ void frexp_d06c2c() { float2 res = tint_frexp(float2(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_d06c2c(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/d80367.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/d80367.wgsl.expected.hlsl index 18b14d42d0..33c34634cd 100644 --- a/test/intrinsics/gen/frexp/d80367.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/d80367.wgsl.expected.hlsl @@ -17,10 +17,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_d80367(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/d80367.wgsl.expected.msl b/test/intrinsics/gen/frexp/d80367.wgsl.expected.msl index 036089b214..95ae2e8f6d 100644 --- a/test/intrinsics/gen/frexp/d80367.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/d80367.wgsl.expected.msl @@ -20,10 +20,16 @@ void frexp_d80367() { frexp_result_vec4 res = tint_frexp(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_d80367(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/db0637.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/db0637.wgsl.expected.hlsl index 8ae0b21cc8..cc2cde6d1b 100644 --- a/test/intrinsics/gen/frexp/db0637.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/db0637.wgsl.expected.hlsl @@ -17,10 +17,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_db0637(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/db0637.wgsl.expected.msl b/test/intrinsics/gen/frexp/db0637.wgsl.expected.msl index 26b3332038..e40d13d0f2 100644 --- a/test/intrinsics/gen/frexp/db0637.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/db0637.wgsl.expected.msl @@ -20,10 +20,16 @@ void frexp_db0637() { frexp_result_vec2 res = tint_frexp(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_db0637(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/frexp/e061dd.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/e061dd.wgsl.expected.hlsl index 3fd7e82c22..636e19a7bd 100644 --- a/test/intrinsics/gen/frexp/e061dd.wgsl.expected.hlsl +++ b/test/intrinsics/gen/frexp/e061dd.wgsl.expected.hlsl @@ -18,10 +18,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_e061dd(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/frexp/e061dd.wgsl.expected.msl b/test/intrinsics/gen/frexp/e061dd.wgsl.expected.msl index a77330610c..7ef100034f 100644 --- a/test/intrinsics/gen/frexp/e061dd.wgsl.expected.msl +++ b/test/intrinsics/gen/frexp/e061dd.wgsl.expected.msl @@ -22,10 +22,16 @@ void frexp_e061dd() { float res = tint_frexp(1.0f, &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { frexp_e061dd(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.hlsl index 3b6a45c59f..37fb93e0b8 100644 --- a/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_2a6ac2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.msl b/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.msl index 5b89993159..0f71f07beb 100644 --- a/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.msl +++ b/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void ignore_2a6ac2(depth2d_ms tint_symbol_2) { - (void) tint_symbol_2; +void ignore_2a6ac2(depth2d_ms tint_symbol_1) { + (void) tint_symbol_1; +} + +float4 vertex_main_inner(depth2d_ms tint_symbol_2) { + ignore_2a6ac2(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depth2d_ms tint_symbol_3 [[texture(0)]]) { - ignore_2a6ac2(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depth2d_ms tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/ignore/5016e5.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/5016e5.wgsl.expected.hlsl index 283d9bd75c..ce36295ddc 100644 --- a/test/intrinsics/gen/ignore/5016e5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ignore/5016e5.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_5016e5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ignore/5016e5.wgsl.expected.msl b/test/intrinsics/gen/ignore/5016e5.wgsl.expected.msl index 5580f867d4..c7bf190e1a 100644 --- a/test/intrinsics/gen/ignore/5016e5.wgsl.expected.msl +++ b/test/intrinsics/gen/ignore/5016e5.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void ignore_5016e5(sampler tint_symbol_2) { - (void) tint_symbol_2; +void ignore_5016e5(sampler tint_symbol_1) { + (void) tint_symbol_1; +} + +float4 vertex_main_inner(sampler tint_symbol_2) { + ignore_5016e5(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(sampler tint_symbol_3 [[sampler(0)]]) { - ignore_5016e5(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(sampler tint_symbol_4 [[sampler(0)]]) { diff --git a/test/intrinsics/gen/ignore/509355.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/509355.wgsl.expected.hlsl index 5df586a79c..4ea37728c6 100644 --- a/test/intrinsics/gen/ignore/509355.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ignore/509355.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_509355(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ignore/509355.wgsl.expected.msl b/test/intrinsics/gen/ignore/509355.wgsl.expected.msl index e99a3cc074..3c291f850c 100644 --- a/test/intrinsics/gen/ignore/509355.wgsl.expected.msl +++ b/test/intrinsics/gen/ignore/509355.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void ignore_509355(depthcube tint_symbol_2) { - (void) tint_symbol_2; +void ignore_509355(depthcube tint_symbol_1) { + (void) tint_symbol_1; +} + +float4 vertex_main_inner(depthcube tint_symbol_2) { + ignore_509355(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depthcube tint_symbol_3 [[texture(0)]]) { - ignore_509355(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depthcube tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.hlsl index 2a28f20a00..a9112fa944 100644 --- a/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_51aeb7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.msl b/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.msl index 81c39a82f1..d5924e3a8e 100644 --- a/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.msl +++ b/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.msl @@ -9,10 +9,16 @@ void ignore_51aeb7() { (void) 1; } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_51aeb7(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.hlsl index c8f96cf555..fd9bab270b 100644 --- a/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_5c9edf(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.msl b/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.msl index 046928efce..6ee9b3b4eb 100644 --- a/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.msl +++ b/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void ignore_5c9edf(texture2d tint_symbol_2) { - (void) tint_symbol_2; +void ignore_5c9edf(texture2d tint_symbol_1) { + (void) tint_symbol_1; +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + ignore_5c9edf(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - ignore_5c9edf(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/ignore/6698df.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/6698df.wgsl.expected.hlsl index 5bb770d831..00a4aca2f1 100644 --- a/test/intrinsics/gen/ignore/6698df.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ignore/6698df.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_6698df(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ignore/6698df.wgsl.expected.msl b/test/intrinsics/gen/ignore/6698df.wgsl.expected.msl index bd000b2a0a..7e1f379154 100644 --- a/test/intrinsics/gen/ignore/6698df.wgsl.expected.msl +++ b/test/intrinsics/gen/ignore/6698df.wgsl.expected.msl @@ -9,10 +9,16 @@ void ignore_6698df() { (void) 1u; } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_6698df(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/ignore/ad88be.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/ad88be.wgsl.expected.hlsl index bef69a0c06..c2b9e678a9 100644 --- a/test/intrinsics/gen/ignore/ad88be.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ignore/ad88be.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_ad88be(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ignore/ad88be.wgsl.expected.msl b/test/intrinsics/gen/ignore/ad88be.wgsl.expected.msl index c29ad22116..c609818836 100644 --- a/test/intrinsics/gen/ignore/ad88be.wgsl.expected.msl +++ b/test/intrinsics/gen/ignore/ad88be.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void ignore_ad88be(depthcube_array tint_symbol_2) { - (void) tint_symbol_2; +void ignore_ad88be(depthcube_array tint_symbol_1) { + (void) tint_symbol_1; +} + +float4 vertex_main_inner(depthcube_array tint_symbol_2) { + ignore_ad88be(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depthcube_array tint_symbol_3 [[texture(0)]]) { - ignore_ad88be(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depthcube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/ignore/b469af.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/b469af.wgsl.expected.hlsl index 9a6d9ee5c3..f2d39350ea 100644 --- a/test/intrinsics/gen/ignore/b469af.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ignore/b469af.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_b469af(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ignore/b469af.wgsl.expected.msl b/test/intrinsics/gen/ignore/b469af.wgsl.expected.msl index 1bd4303fc3..fd56b58c89 100644 --- a/test/intrinsics/gen/ignore/b469af.wgsl.expected.msl +++ b/test/intrinsics/gen/ignore/b469af.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void ignore_b469af(sampler tint_symbol_2) { - (void) tint_symbol_2; +void ignore_b469af(sampler tint_symbol_1) { + (void) tint_symbol_1; +} + +float4 vertex_main_inner(sampler tint_symbol_2) { + ignore_b469af(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(sampler tint_symbol_3 [[sampler(0)]]) { - ignore_b469af(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(sampler tint_symbol_4 [[sampler(0)]]) { diff --git a/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.hlsl index 3df1f83ee7..123a8a0a75 100644 --- a/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_c8a0ee(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.msl b/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.msl index cdc9af32fa..bf3ca69dbe 100644 --- a/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.msl +++ b/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void ignore_c8a0ee(depth2d_array tint_symbol_2) { - (void) tint_symbol_2; +void ignore_c8a0ee(depth2d_array tint_symbol_1) { + (void) tint_symbol_1; +} + +float4 vertex_main_inner(depth2d_array tint_symbol_2) { + ignore_c8a0ee(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depth2d_array tint_symbol_3 [[texture(0)]]) { - ignore_c8a0ee(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depth2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.hlsl index 55c4fe942c..467fe189e0 100644 --- a/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_d91a2f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.msl b/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.msl index b34d6f572a..fefc1de119 100644 --- a/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.msl +++ b/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.msl @@ -9,10 +9,16 @@ void ignore_d91a2f() { (void) 1.0f; } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_d91a2f(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/ignore/e0187b.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/e0187b.wgsl.expected.hlsl index 955a25e3ac..08e8da673b 100644 --- a/test/intrinsics/gen/ignore/e0187b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ignore/e0187b.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_e0187b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ignore/e0187b.wgsl.expected.msl b/test/intrinsics/gen/ignore/e0187b.wgsl.expected.msl index 86180d9d89..1af6d522f6 100644 --- a/test/intrinsics/gen/ignore/e0187b.wgsl.expected.msl +++ b/test/intrinsics/gen/ignore/e0187b.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void ignore_e0187b(depth2d tint_symbol_2) { - (void) tint_symbol_2; +void ignore_e0187b(depth2d tint_symbol_1) { + (void) tint_symbol_1; +} + +float4 vertex_main_inner(depth2d tint_symbol_2) { + ignore_e0187b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depth2d tint_symbol_3 [[texture(0)]]) { - ignore_e0187b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depth2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/ignore/f414a6.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/f414a6.wgsl.expected.hlsl index 17d7a9b3ac..0023d0cccb 100644 --- a/test/intrinsics/gen/ignore/f414a6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ignore/f414a6.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_f414a6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ignore/f414a6.wgsl.expected.msl b/test/intrinsics/gen/ignore/f414a6.wgsl.expected.msl index fb990ebfca..149e8aab2f 100644 --- a/test/intrinsics/gen/ignore/f414a6.wgsl.expected.msl +++ b/test/intrinsics/gen/ignore/f414a6.wgsl.expected.msl @@ -9,10 +9,16 @@ void ignore_f414a6() { (void) bool(); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { ignore_f414a6(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.hlsl b/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.hlsl index 0650ed05c0..7f8b61e339 100644 --- a/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { inverseSqrt_84407e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.msl b/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.msl index 07861bce3b..a164dc909b 100644 --- a/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.msl +++ b/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.msl @@ -9,10 +9,16 @@ void inverseSqrt_84407e() { float res = rsqrt(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { inverseSqrt_84407e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.hlsl b/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.hlsl index f2a9c1fb4a..35554d4c18 100644 --- a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { inverseSqrt_8f2bd2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.msl b/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.msl index fdc64f91d4..c214ab5972 100644 --- a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.msl +++ b/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.msl @@ -9,10 +9,16 @@ void inverseSqrt_8f2bd2() { float2 res = rsqrt(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { inverseSqrt_8f2bd2(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.hlsl b/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.hlsl index 793a23e708..67c0a2f229 100644 --- a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { inverseSqrt_b197b1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.msl b/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.msl index 65ebe3acb1..2c10c65aa4 100644 --- a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.msl +++ b/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.msl @@ -9,10 +9,16 @@ void inverseSqrt_b197b1() { float3 res = rsqrt(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { inverseSqrt_b197b1(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.hlsl b/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.hlsl index b9be140ca5..ee22cf1a5b 100644 --- a/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.hlsl +++ b/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { inverseSqrt_c22347(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.msl b/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.msl index 891de7ec09..e2ce89e4c8 100644 --- a/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.msl +++ b/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.msl @@ -9,10 +9,16 @@ void inverseSqrt_c22347() { float4 res = rsqrt(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { inverseSqrt_c22347(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.hlsl b/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.hlsl index b84841641e..6e714e9176 100644 --- a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { isFinite_34d32b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.msl b/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.msl index d6adc3b103..e1ab4d118b 100644 --- a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.msl +++ b/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.msl @@ -9,10 +9,16 @@ void isFinite_34d32b() { bool2 res = isfinite(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isFinite_34d32b(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.hlsl b/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.hlsl index b50f91f76d..21726783dc 100644 --- a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { isFinite_426f9f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.msl b/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.msl index 7b88dba956..86bfad4e46 100644 --- a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.msl +++ b/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.msl @@ -9,10 +9,16 @@ void isFinite_426f9f() { bool res = isfinite(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isFinite_426f9f(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.hlsl b/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.hlsl index 7dee6d6156..cf8469fc2b 100644 --- a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.hlsl +++ b/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { isFinite_8a23ad(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.msl b/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.msl index c0f197bbc3..aea5696468 100644 --- a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.msl +++ b/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.msl @@ -9,10 +9,16 @@ void isFinite_8a23ad() { bool3 res = isfinite(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isFinite_8a23ad(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.hlsl b/test/intrinsics/gen/isFinite/f31987.wgsl.expected.hlsl index 23dd93dbac..98228ec8f8 100644 --- a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.hlsl +++ b/test/intrinsics/gen/isFinite/f31987.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { isFinite_f31987(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.msl b/test/intrinsics/gen/isFinite/f31987.wgsl.expected.msl index 775a79926e..f1710418d9 100644 --- a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.msl +++ b/test/intrinsics/gen/isFinite/f31987.wgsl.expected.msl @@ -9,10 +9,16 @@ void isFinite_f31987() { bool4 res = isfinite(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isFinite_f31987(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.hlsl b/test/intrinsics/gen/isInf/666f2a.wgsl.expected.hlsl index 96f0a8d77e..a3f366955a 100644 --- a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/isInf/666f2a.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { isInf_666f2a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.msl b/test/intrinsics/gen/isInf/666f2a.wgsl.expected.msl index 61fdda685b..18a8dc138b 100644 --- a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.msl +++ b/test/intrinsics/gen/isInf/666f2a.wgsl.expected.msl @@ -9,10 +9,16 @@ void isInf_666f2a() { bool3 res = isinf(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isInf_666f2a(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.hlsl b/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.hlsl index 450f57eb97..59f1127a81 100644 --- a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { isInf_7bd98f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.msl b/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.msl index 0850ae5886..a253ae21d9 100644 --- a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.msl +++ b/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.msl @@ -9,10 +9,16 @@ void isInf_7bd98f() { bool res = isinf(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isInf_7bd98f(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.hlsl b/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.hlsl index c7cb98b5ae..44c99178ca 100644 --- a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { isInf_7e81b5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.msl b/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.msl index 0362bce8f1..197b078ad6 100644 --- a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.msl +++ b/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.msl @@ -9,10 +9,16 @@ void isInf_7e81b5() { bool4 res = isinf(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isInf_7e81b5(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.hlsl b/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.hlsl index 27b98497c9..156d4707e6 100644 --- a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { isInf_a46d6f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.msl b/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.msl index e5ed9f2bb7..47772df6b4 100644 --- a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.msl +++ b/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.msl @@ -9,10 +9,16 @@ void isInf_a46d6f() { bool2 res = isinf(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isInf_a46d6f(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.msl b/test/intrinsics/gen/isNan/1280ab.wgsl.expected.msl index 64b9ace655..84ad032610 100644 --- a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.msl +++ b/test/intrinsics/gen/isNan/1280ab.wgsl.expected.msl @@ -9,10 +9,16 @@ void isNan_1280ab() { bool3 res = isnan(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isNan_1280ab(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.msl b/test/intrinsics/gen/isNan/4d280d.wgsl.expected.msl index b8a2e22fe5..47e387bd78 100644 --- a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.msl +++ b/test/intrinsics/gen/isNan/4d280d.wgsl.expected.msl @@ -9,10 +9,16 @@ void isNan_4d280d() { bool4 res = isnan(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isNan_4d280d(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.msl b/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.msl index 932d0cc2ee..03f0a4e33d 100644 --- a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.msl +++ b/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.msl @@ -9,10 +9,16 @@ void isNan_67ecd3() { bool2 res = isnan(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isNan_67ecd3(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.hlsl b/test/intrinsics/gen/isNan/e4978e.wgsl.expected.hlsl index 728c6fddfe..e4b762ee39 100644 --- a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/isNan/e4978e.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { isNan_e4978e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.msl b/test/intrinsics/gen/isNan/e4978e.wgsl.expected.msl index c94a9afc01..ddbe121632 100644 --- a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.msl +++ b/test/intrinsics/gen/isNan/e4978e.wgsl.expected.msl @@ -9,10 +9,16 @@ void isNan_e4978e() { bool res = isnan(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isNan_e4978e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.hlsl b/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.hlsl index cd32654218..c88fb51e89 100644 --- a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.hlsl +++ b/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { isNormal_863dcd(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.msl b/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.msl index b086c06a73..309085f4d6 100644 --- a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.msl +++ b/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.msl @@ -9,10 +9,16 @@ void isNormal_863dcd() { bool4 res = isnormal(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isNormal_863dcd(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.hlsl b/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.hlsl index dbf1580bea..3faca74fca 100644 --- a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { isNormal_b00ab1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.msl b/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.msl index 6bcb39256f..f2a2931761 100644 --- a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.msl +++ b/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.msl @@ -9,10 +9,16 @@ void isNormal_b00ab1() { bool2 res = isnormal(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isNormal_b00ab1(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.hlsl b/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.hlsl index 8f3ddd5192..94681fafc2 100644 --- a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { isNormal_c286b7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.msl b/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.msl index f3e7527344..a2c3952005 100644 --- a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.msl +++ b/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.msl @@ -9,10 +9,16 @@ void isNormal_c286b7() { bool3 res = isnormal(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isNormal_c286b7(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.hlsl b/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.hlsl index 475e9183d1..e4dffbc964 100644 --- a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.hlsl +++ b/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { isNormal_c6e880(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.msl b/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.msl index e5b54cb1ef..529b23a58b 100644 --- a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.msl +++ b/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.msl @@ -9,10 +9,16 @@ void isNormal_c6e880() { bool res = isnormal(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { isNormal_c6e880(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.hlsl b/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.hlsl index 5ba1ac5c65..6d596f830c 100644 --- a/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ldexp_a31cdc(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.msl b/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.msl index ad04640ea4..35112640b7 100644 --- a/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.msl +++ b/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.msl @@ -9,10 +9,16 @@ void ldexp_a31cdc() { float3 res = ldexp(float3(), int3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { ldexp_a31cdc(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/ldexp/abd718.wgsl.expected.hlsl b/test/intrinsics/gen/ldexp/abd718.wgsl.expected.hlsl index 73f68e0fd9..57d331e9fc 100644 --- a/test/intrinsics/gen/ldexp/abd718.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ldexp/abd718.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ldexp_abd718(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ldexp/abd718.wgsl.expected.msl b/test/intrinsics/gen/ldexp/abd718.wgsl.expected.msl index ca0e3a5d2a..965657d6f4 100644 --- a/test/intrinsics/gen/ldexp/abd718.wgsl.expected.msl +++ b/test/intrinsics/gen/ldexp/abd718.wgsl.expected.msl @@ -9,10 +9,16 @@ void ldexp_abd718() { float2 res = ldexp(float2(), int2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { ldexp_abd718(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.hlsl b/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.hlsl index 28e5c7686d..6e44999c4a 100644 --- a/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ldexp_cc9cde(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.msl b/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.msl index 5a3b8110bb..d36b5b4ee2 100644 --- a/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.msl +++ b/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.msl @@ -9,10 +9,16 @@ void ldexp_cc9cde() { float4 res = ldexp(float4(), int4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { ldexp_cc9cde(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.hlsl b/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.hlsl index 91105e72bb..7592faa503 100644 --- a/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.hlsl +++ b/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { ldexp_db8b49(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.msl b/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.msl index 650cce2849..0449b75aa3 100644 --- a/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.msl +++ b/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.msl @@ -9,10 +9,16 @@ void ldexp_db8b49() { float res = ldexp(1.0f, 1); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { ldexp_db8b49(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/length/056071.wgsl.expected.hlsl b/test/intrinsics/gen/length/056071.wgsl.expected.hlsl index 5ea50c00c7..a3309a9a7d 100644 --- a/test/intrinsics/gen/length/056071.wgsl.expected.hlsl +++ b/test/intrinsics/gen/length/056071.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { length_056071(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/length/056071.wgsl.expected.msl b/test/intrinsics/gen/length/056071.wgsl.expected.msl index fb40a90ad7..963de37da1 100644 --- a/test/intrinsics/gen/length/056071.wgsl.expected.msl +++ b/test/intrinsics/gen/length/056071.wgsl.expected.msl @@ -9,10 +9,16 @@ void length_056071() { float res = length(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { length_056071(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/length/602a17.wgsl.expected.hlsl b/test/intrinsics/gen/length/602a17.wgsl.expected.hlsl index cdc5661bba..bee0d8849f 100644 --- a/test/intrinsics/gen/length/602a17.wgsl.expected.hlsl +++ b/test/intrinsics/gen/length/602a17.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { length_602a17(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/length/602a17.wgsl.expected.msl b/test/intrinsics/gen/length/602a17.wgsl.expected.msl index 4116991443..4555bbce4f 100644 --- a/test/intrinsics/gen/length/602a17.wgsl.expected.msl +++ b/test/intrinsics/gen/length/602a17.wgsl.expected.msl @@ -9,10 +9,16 @@ void length_602a17() { float res = fabs(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { length_602a17(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/length/afde8b.wgsl.expected.hlsl b/test/intrinsics/gen/length/afde8b.wgsl.expected.hlsl index a875f421b8..21ac4edfe1 100644 --- a/test/intrinsics/gen/length/afde8b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/length/afde8b.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { length_afde8b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/length/afde8b.wgsl.expected.msl b/test/intrinsics/gen/length/afde8b.wgsl.expected.msl index 6587bc0067..46a073cf0e 100644 --- a/test/intrinsics/gen/length/afde8b.wgsl.expected.msl +++ b/test/intrinsics/gen/length/afde8b.wgsl.expected.msl @@ -9,10 +9,16 @@ void length_afde8b() { float res = length(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { length_afde8b(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/length/becebf.wgsl.expected.hlsl b/test/intrinsics/gen/length/becebf.wgsl.expected.hlsl index 9e9b6e7005..825e99cc66 100644 --- a/test/intrinsics/gen/length/becebf.wgsl.expected.hlsl +++ b/test/intrinsics/gen/length/becebf.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { length_becebf(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/length/becebf.wgsl.expected.msl b/test/intrinsics/gen/length/becebf.wgsl.expected.msl index 4fa8cd2036..1ffc1d27fe 100644 --- a/test/intrinsics/gen/length/becebf.wgsl.expected.msl +++ b/test/intrinsics/gen/length/becebf.wgsl.expected.msl @@ -9,10 +9,16 @@ void length_becebf() { float res = length(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { length_becebf(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/log/3da25a.wgsl.expected.hlsl b/test/intrinsics/gen/log/3da25a.wgsl.expected.hlsl index 357157abcf..d406a40f65 100644 --- a/test/intrinsics/gen/log/3da25a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/log/3da25a.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { log_3da25a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/log/3da25a.wgsl.expected.msl b/test/intrinsics/gen/log/3da25a.wgsl.expected.msl index c5e7404f30..fcb512d68e 100644 --- a/test/intrinsics/gen/log/3da25a.wgsl.expected.msl +++ b/test/intrinsics/gen/log/3da25a.wgsl.expected.msl @@ -9,10 +9,16 @@ void log_3da25a() { float4 res = log(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { log_3da25a(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/log/7114a6.wgsl.expected.hlsl b/test/intrinsics/gen/log/7114a6.wgsl.expected.hlsl index 41fcb79b3a..3b786d27d2 100644 --- a/test/intrinsics/gen/log/7114a6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/log/7114a6.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { log_7114a6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/log/7114a6.wgsl.expected.msl b/test/intrinsics/gen/log/7114a6.wgsl.expected.msl index 72b940ac35..82dd4d7e53 100644 --- a/test/intrinsics/gen/log/7114a6.wgsl.expected.msl +++ b/test/intrinsics/gen/log/7114a6.wgsl.expected.msl @@ -9,10 +9,16 @@ void log_7114a6() { float res = log(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { log_7114a6(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/log/b2ce28.wgsl.expected.hlsl b/test/intrinsics/gen/log/b2ce28.wgsl.expected.hlsl index 02b6dd72e0..dc14337e5d 100644 --- a/test/intrinsics/gen/log/b2ce28.wgsl.expected.hlsl +++ b/test/intrinsics/gen/log/b2ce28.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { log_b2ce28(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/log/b2ce28.wgsl.expected.msl b/test/intrinsics/gen/log/b2ce28.wgsl.expected.msl index 576f8af392..63978b8bef 100644 --- a/test/intrinsics/gen/log/b2ce28.wgsl.expected.msl +++ b/test/intrinsics/gen/log/b2ce28.wgsl.expected.msl @@ -9,10 +9,16 @@ void log_b2ce28() { float2 res = log(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { log_b2ce28(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/log/f4c570.wgsl.expected.hlsl b/test/intrinsics/gen/log/f4c570.wgsl.expected.hlsl index ef0069fabc..5e8332f96f 100644 --- a/test/intrinsics/gen/log/f4c570.wgsl.expected.hlsl +++ b/test/intrinsics/gen/log/f4c570.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { log_f4c570(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/log/f4c570.wgsl.expected.msl b/test/intrinsics/gen/log/f4c570.wgsl.expected.msl index a89a44ba34..c54fe04b07 100644 --- a/test/intrinsics/gen/log/f4c570.wgsl.expected.msl +++ b/test/intrinsics/gen/log/f4c570.wgsl.expected.msl @@ -9,10 +9,16 @@ void log_f4c570() { float3 res = log(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { log_f4c570(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/log2/4036ed.wgsl.expected.hlsl b/test/intrinsics/gen/log2/4036ed.wgsl.expected.hlsl index 6fce734078..2428a28406 100644 --- a/test/intrinsics/gen/log2/4036ed.wgsl.expected.hlsl +++ b/test/intrinsics/gen/log2/4036ed.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { log2_4036ed(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/log2/4036ed.wgsl.expected.msl b/test/intrinsics/gen/log2/4036ed.wgsl.expected.msl index a5303ebbb9..4cafdcaeca 100644 --- a/test/intrinsics/gen/log2/4036ed.wgsl.expected.msl +++ b/test/intrinsics/gen/log2/4036ed.wgsl.expected.msl @@ -9,10 +9,16 @@ void log2_4036ed() { float res = log2(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { log2_4036ed(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/log2/902988.wgsl.expected.hlsl b/test/intrinsics/gen/log2/902988.wgsl.expected.hlsl index 9d6012695e..ad66bdb1ae 100644 --- a/test/intrinsics/gen/log2/902988.wgsl.expected.hlsl +++ b/test/intrinsics/gen/log2/902988.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { log2_902988(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/log2/902988.wgsl.expected.msl b/test/intrinsics/gen/log2/902988.wgsl.expected.msl index 292fbeec2f..a45104b2e9 100644 --- a/test/intrinsics/gen/log2/902988.wgsl.expected.msl +++ b/test/intrinsics/gen/log2/902988.wgsl.expected.msl @@ -9,10 +9,16 @@ void log2_902988() { float4 res = log2(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { log2_902988(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/log2/adb233.wgsl.expected.hlsl b/test/intrinsics/gen/log2/adb233.wgsl.expected.hlsl index 9dc101f04e..4d6cbf2da7 100644 --- a/test/intrinsics/gen/log2/adb233.wgsl.expected.hlsl +++ b/test/intrinsics/gen/log2/adb233.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { log2_adb233(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/log2/adb233.wgsl.expected.msl b/test/intrinsics/gen/log2/adb233.wgsl.expected.msl index 7ccc7f4b96..f591c83e52 100644 --- a/test/intrinsics/gen/log2/adb233.wgsl.expected.msl +++ b/test/intrinsics/gen/log2/adb233.wgsl.expected.msl @@ -9,10 +9,16 @@ void log2_adb233() { float3 res = log2(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { log2_adb233(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/log2/aea659.wgsl.expected.hlsl b/test/intrinsics/gen/log2/aea659.wgsl.expected.hlsl index 448f1341aa..ebc6208870 100644 --- a/test/intrinsics/gen/log2/aea659.wgsl.expected.hlsl +++ b/test/intrinsics/gen/log2/aea659.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { log2_aea659(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/log2/aea659.wgsl.expected.msl b/test/intrinsics/gen/log2/aea659.wgsl.expected.msl index f603d99d38..8cc3dda71b 100644 --- a/test/intrinsics/gen/log2/aea659.wgsl.expected.msl +++ b/test/intrinsics/gen/log2/aea659.wgsl.expected.msl @@ -9,10 +9,16 @@ void log2_aea659() { float2 res = log2(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { log2_aea659(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/max/0c0aae.wgsl.expected.hlsl b/test/intrinsics/gen/max/0c0aae.wgsl.expected.hlsl index b812b28aa6..4e9b6d2bca 100644 --- a/test/intrinsics/gen/max/0c0aae.wgsl.expected.hlsl +++ b/test/intrinsics/gen/max/0c0aae.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { max_0c0aae(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/max/0c0aae.wgsl.expected.msl b/test/intrinsics/gen/max/0c0aae.wgsl.expected.msl index 2c07924fe9..400ec277c9 100644 --- a/test/intrinsics/gen/max/0c0aae.wgsl.expected.msl +++ b/test/intrinsics/gen/max/0c0aae.wgsl.expected.msl @@ -9,10 +9,16 @@ void max_0c0aae() { uint res = max(1u, 1u); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { max_0c0aae(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/max/25eafe.wgsl.expected.hlsl b/test/intrinsics/gen/max/25eafe.wgsl.expected.hlsl index 5ae78c818a..69cb46623b 100644 --- a/test/intrinsics/gen/max/25eafe.wgsl.expected.hlsl +++ b/test/intrinsics/gen/max/25eafe.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { max_25eafe(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/max/25eafe.wgsl.expected.msl b/test/intrinsics/gen/max/25eafe.wgsl.expected.msl index ff0ddf54cf..170590711a 100644 --- a/test/intrinsics/gen/max/25eafe.wgsl.expected.msl +++ b/test/intrinsics/gen/max/25eafe.wgsl.expected.msl @@ -9,10 +9,16 @@ void max_25eafe() { int3 res = max(int3(), int3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { max_25eafe(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/max/320815.wgsl.expected.hlsl b/test/intrinsics/gen/max/320815.wgsl.expected.hlsl index 8108f196ce..5c38cdf1ea 100644 --- a/test/intrinsics/gen/max/320815.wgsl.expected.hlsl +++ b/test/intrinsics/gen/max/320815.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { max_320815(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/max/320815.wgsl.expected.msl b/test/intrinsics/gen/max/320815.wgsl.expected.msl index 4a75eeac30..0f5ffdd1c3 100644 --- a/test/intrinsics/gen/max/320815.wgsl.expected.msl +++ b/test/intrinsics/gen/max/320815.wgsl.expected.msl @@ -9,10 +9,16 @@ void max_320815() { uint2 res = max(uint2(), uint2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { max_320815(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/max/44a39d.wgsl.expected.hlsl b/test/intrinsics/gen/max/44a39d.wgsl.expected.hlsl index 474e38116b..4dd34671a4 100644 --- a/test/intrinsics/gen/max/44a39d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/max/44a39d.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { max_44a39d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/max/44a39d.wgsl.expected.msl b/test/intrinsics/gen/max/44a39d.wgsl.expected.msl index 1ed60735fa..8d18edf461 100644 --- a/test/intrinsics/gen/max/44a39d.wgsl.expected.msl +++ b/test/intrinsics/gen/max/44a39d.wgsl.expected.msl @@ -9,10 +9,16 @@ void max_44a39d() { float res = fmax(1.0f, 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { max_44a39d(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/max/453e04.wgsl.expected.hlsl b/test/intrinsics/gen/max/453e04.wgsl.expected.hlsl index 496be90ef8..6e0f3544c0 100644 --- a/test/intrinsics/gen/max/453e04.wgsl.expected.hlsl +++ b/test/intrinsics/gen/max/453e04.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { max_453e04(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/max/453e04.wgsl.expected.msl b/test/intrinsics/gen/max/453e04.wgsl.expected.msl index 8d03301ab6..6891927b40 100644 --- a/test/intrinsics/gen/max/453e04.wgsl.expected.msl +++ b/test/intrinsics/gen/max/453e04.wgsl.expected.msl @@ -9,10 +9,16 @@ void max_453e04() { uint4 res = max(uint4(), uint4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { max_453e04(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/max/462050.wgsl.expected.hlsl b/test/intrinsics/gen/max/462050.wgsl.expected.hlsl index 0ba3a04449..4aa4f131ce 100644 --- a/test/intrinsics/gen/max/462050.wgsl.expected.hlsl +++ b/test/intrinsics/gen/max/462050.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { max_462050(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/max/462050.wgsl.expected.msl b/test/intrinsics/gen/max/462050.wgsl.expected.msl index be9f1c6ab6..71ab5707f6 100644 --- a/test/intrinsics/gen/max/462050.wgsl.expected.msl +++ b/test/intrinsics/gen/max/462050.wgsl.expected.msl @@ -9,10 +9,16 @@ void max_462050() { float2 res = fmax(float2(), float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { max_462050(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/max/4883ac.wgsl.expected.hlsl b/test/intrinsics/gen/max/4883ac.wgsl.expected.hlsl index ecc4c1e39b..1d7ec78b44 100644 --- a/test/intrinsics/gen/max/4883ac.wgsl.expected.hlsl +++ b/test/intrinsics/gen/max/4883ac.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { max_4883ac(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/max/4883ac.wgsl.expected.msl b/test/intrinsics/gen/max/4883ac.wgsl.expected.msl index 42a266f87f..802c27b1e2 100644 --- a/test/intrinsics/gen/max/4883ac.wgsl.expected.msl +++ b/test/intrinsics/gen/max/4883ac.wgsl.expected.msl @@ -9,10 +9,16 @@ void max_4883ac() { float3 res = fmax(float3(), float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { max_4883ac(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/max/85e6bc.wgsl.expected.hlsl b/test/intrinsics/gen/max/85e6bc.wgsl.expected.hlsl index d64e608d89..e2189eb4d8 100644 --- a/test/intrinsics/gen/max/85e6bc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/max/85e6bc.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { max_85e6bc(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/max/85e6bc.wgsl.expected.msl b/test/intrinsics/gen/max/85e6bc.wgsl.expected.msl index 07283595ac..85b4a754b8 100644 --- a/test/intrinsics/gen/max/85e6bc.wgsl.expected.msl +++ b/test/intrinsics/gen/max/85e6bc.wgsl.expected.msl @@ -9,10 +9,16 @@ void max_85e6bc() { int4 res = max(int4(), int4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { max_85e6bc(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/max/a93419.wgsl.expected.hlsl b/test/intrinsics/gen/max/a93419.wgsl.expected.hlsl index 98599e9d6d..8d9526520d 100644 --- a/test/intrinsics/gen/max/a93419.wgsl.expected.hlsl +++ b/test/intrinsics/gen/max/a93419.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { max_a93419(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/max/a93419.wgsl.expected.msl b/test/intrinsics/gen/max/a93419.wgsl.expected.msl index edf5f8497d..ba628fd40a 100644 --- a/test/intrinsics/gen/max/a93419.wgsl.expected.msl +++ b/test/intrinsics/gen/max/a93419.wgsl.expected.msl @@ -9,10 +9,16 @@ void max_a93419() { float4 res = fmax(float4(), float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { max_a93419(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/max/b1b73a.wgsl.expected.hlsl b/test/intrinsics/gen/max/b1b73a.wgsl.expected.hlsl index 531e496e2c..5cc620a7fd 100644 --- a/test/intrinsics/gen/max/b1b73a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/max/b1b73a.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { max_b1b73a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/max/b1b73a.wgsl.expected.msl b/test/intrinsics/gen/max/b1b73a.wgsl.expected.msl index 401b97fe59..c721edb3d6 100644 --- a/test/intrinsics/gen/max/b1b73a.wgsl.expected.msl +++ b/test/intrinsics/gen/max/b1b73a.wgsl.expected.msl @@ -9,10 +9,16 @@ void max_b1b73a() { uint3 res = max(uint3(), uint3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { max_b1b73a(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/max/ce7c30.wgsl.expected.hlsl b/test/intrinsics/gen/max/ce7c30.wgsl.expected.hlsl index ada95a0a00..f348871aac 100644 --- a/test/intrinsics/gen/max/ce7c30.wgsl.expected.hlsl +++ b/test/intrinsics/gen/max/ce7c30.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { max_ce7c30(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/max/ce7c30.wgsl.expected.msl b/test/intrinsics/gen/max/ce7c30.wgsl.expected.msl index 041e1370e1..76113dc40c 100644 --- a/test/intrinsics/gen/max/ce7c30.wgsl.expected.msl +++ b/test/intrinsics/gen/max/ce7c30.wgsl.expected.msl @@ -9,10 +9,16 @@ void max_ce7c30() { int res = max(1, 1); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { max_ce7c30(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/max/e8192f.wgsl.expected.hlsl b/test/intrinsics/gen/max/e8192f.wgsl.expected.hlsl index 1f4b38e736..9dd5a2215e 100644 --- a/test/intrinsics/gen/max/e8192f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/max/e8192f.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { max_e8192f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/max/e8192f.wgsl.expected.msl b/test/intrinsics/gen/max/e8192f.wgsl.expected.msl index 5c158fa4e6..8c22faea2e 100644 --- a/test/intrinsics/gen/max/e8192f.wgsl.expected.msl +++ b/test/intrinsics/gen/max/e8192f.wgsl.expected.msl @@ -9,10 +9,16 @@ void max_e8192f() { int2 res = max(int2(), int2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { max_e8192f(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/min/03c7e3.wgsl.expected.hlsl b/test/intrinsics/gen/min/03c7e3.wgsl.expected.hlsl index d12d90804f..94f9c4be10 100644 --- a/test/intrinsics/gen/min/03c7e3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/min/03c7e3.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { min_03c7e3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/min/03c7e3.wgsl.expected.msl b/test/intrinsics/gen/min/03c7e3.wgsl.expected.msl index 0d570266fe..8c76659aaf 100644 --- a/test/intrinsics/gen/min/03c7e3.wgsl.expected.msl +++ b/test/intrinsics/gen/min/03c7e3.wgsl.expected.msl @@ -9,10 +9,16 @@ void min_03c7e3() { int2 res = min(int2(), int2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { min_03c7e3(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/min/0dc614.wgsl.expected.hlsl b/test/intrinsics/gen/min/0dc614.wgsl.expected.hlsl index 989a8547a1..3515079a79 100644 --- a/test/intrinsics/gen/min/0dc614.wgsl.expected.hlsl +++ b/test/intrinsics/gen/min/0dc614.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { min_0dc614(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/min/0dc614.wgsl.expected.msl b/test/intrinsics/gen/min/0dc614.wgsl.expected.msl index f179d772ea..a38f38640d 100644 --- a/test/intrinsics/gen/min/0dc614.wgsl.expected.msl +++ b/test/intrinsics/gen/min/0dc614.wgsl.expected.msl @@ -9,10 +9,16 @@ void min_0dc614() { uint4 res = min(uint4(), uint4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { min_0dc614(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/min/3941e1.wgsl.expected.hlsl b/test/intrinsics/gen/min/3941e1.wgsl.expected.hlsl index be28f09ab6..a629597084 100644 --- a/test/intrinsics/gen/min/3941e1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/min/3941e1.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { min_3941e1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/min/3941e1.wgsl.expected.msl b/test/intrinsics/gen/min/3941e1.wgsl.expected.msl index cc0012f262..07dbf3c8a6 100644 --- a/test/intrinsics/gen/min/3941e1.wgsl.expected.msl +++ b/test/intrinsics/gen/min/3941e1.wgsl.expected.msl @@ -9,10 +9,16 @@ void min_3941e1() { int4 res = min(int4(), int4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { min_3941e1(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/min/46c5d3.wgsl.expected.hlsl b/test/intrinsics/gen/min/46c5d3.wgsl.expected.hlsl index 182b371024..53ca8c0200 100644 --- a/test/intrinsics/gen/min/46c5d3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/min/46c5d3.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { min_46c5d3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/min/46c5d3.wgsl.expected.msl b/test/intrinsics/gen/min/46c5d3.wgsl.expected.msl index 5ab20e37f1..736c305495 100644 --- a/test/intrinsics/gen/min/46c5d3.wgsl.expected.msl +++ b/test/intrinsics/gen/min/46c5d3.wgsl.expected.msl @@ -9,10 +9,16 @@ void min_46c5d3() { uint res = min(1u, 1u); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { min_46c5d3(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/min/82b28f.wgsl.expected.hlsl b/test/intrinsics/gen/min/82b28f.wgsl.expected.hlsl index f47332221f..70d28cbe54 100644 --- a/test/intrinsics/gen/min/82b28f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/min/82b28f.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { min_82b28f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/min/82b28f.wgsl.expected.msl b/test/intrinsics/gen/min/82b28f.wgsl.expected.msl index 5b2913c90b..b0aac8c84f 100644 --- a/test/intrinsics/gen/min/82b28f.wgsl.expected.msl +++ b/test/intrinsics/gen/min/82b28f.wgsl.expected.msl @@ -9,10 +9,16 @@ void min_82b28f() { uint2 res = min(uint2(), uint2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { min_82b28f(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/min/93cfc4.wgsl.expected.hlsl b/test/intrinsics/gen/min/93cfc4.wgsl.expected.hlsl index b3a98f5bae..b6200c154e 100644 --- a/test/intrinsics/gen/min/93cfc4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/min/93cfc4.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { min_93cfc4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/min/93cfc4.wgsl.expected.msl b/test/intrinsics/gen/min/93cfc4.wgsl.expected.msl index f102283ee0..e6bf1c4ba9 100644 --- a/test/intrinsics/gen/min/93cfc4.wgsl.expected.msl +++ b/test/intrinsics/gen/min/93cfc4.wgsl.expected.msl @@ -9,10 +9,16 @@ void min_93cfc4() { float3 res = fmin(float3(), float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { min_93cfc4(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/min/a45171.wgsl.expected.hlsl b/test/intrinsics/gen/min/a45171.wgsl.expected.hlsl index 25e54bc9a8..7e5e1592c3 100644 --- a/test/intrinsics/gen/min/a45171.wgsl.expected.hlsl +++ b/test/intrinsics/gen/min/a45171.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { min_a45171(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/min/a45171.wgsl.expected.msl b/test/intrinsics/gen/min/a45171.wgsl.expected.msl index 3f9bfb1154..b6a8f9edfe 100644 --- a/test/intrinsics/gen/min/a45171.wgsl.expected.msl +++ b/test/intrinsics/gen/min/a45171.wgsl.expected.msl @@ -9,10 +9,16 @@ void min_a45171() { int3 res = min(int3(), int3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { min_a45171(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/min/aa28ad.wgsl.expected.hlsl b/test/intrinsics/gen/min/aa28ad.wgsl.expected.hlsl index 225d67156f..cb437e2f20 100644 --- a/test/intrinsics/gen/min/aa28ad.wgsl.expected.hlsl +++ b/test/intrinsics/gen/min/aa28ad.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { min_aa28ad(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/min/aa28ad.wgsl.expected.msl b/test/intrinsics/gen/min/aa28ad.wgsl.expected.msl index 64cfee3050..c393a5163d 100644 --- a/test/intrinsics/gen/min/aa28ad.wgsl.expected.msl +++ b/test/intrinsics/gen/min/aa28ad.wgsl.expected.msl @@ -9,10 +9,16 @@ void min_aa28ad() { float2 res = fmin(float2(), float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { min_aa28ad(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/min/af326d.wgsl.expected.hlsl b/test/intrinsics/gen/min/af326d.wgsl.expected.hlsl index 20a61cbc82..2ec6e9f821 100644 --- a/test/intrinsics/gen/min/af326d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/min/af326d.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { min_af326d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/min/af326d.wgsl.expected.msl b/test/intrinsics/gen/min/af326d.wgsl.expected.msl index c8d4c23bc1..60010dada2 100644 --- a/test/intrinsics/gen/min/af326d.wgsl.expected.msl +++ b/test/intrinsics/gen/min/af326d.wgsl.expected.msl @@ -9,10 +9,16 @@ void min_af326d() { float res = fmin(1.0f, 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { min_af326d(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/min/c70bb7.wgsl.expected.hlsl b/test/intrinsics/gen/min/c70bb7.wgsl.expected.hlsl index c3e5fed905..5dbaff7575 100644 --- a/test/intrinsics/gen/min/c70bb7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/min/c70bb7.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { min_c70bb7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/min/c70bb7.wgsl.expected.msl b/test/intrinsics/gen/min/c70bb7.wgsl.expected.msl index c1968a2adf..6fb97f0d94 100644 --- a/test/intrinsics/gen/min/c70bb7.wgsl.expected.msl +++ b/test/intrinsics/gen/min/c70bb7.wgsl.expected.msl @@ -9,10 +9,16 @@ void min_c70bb7() { uint3 res = min(uint3(), uint3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { min_c70bb7(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/min/c73147.wgsl.expected.hlsl b/test/intrinsics/gen/min/c73147.wgsl.expected.hlsl index 7c6d8a9127..f58afc812c 100644 --- a/test/intrinsics/gen/min/c73147.wgsl.expected.hlsl +++ b/test/intrinsics/gen/min/c73147.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { min_c73147(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/min/c73147.wgsl.expected.msl b/test/intrinsics/gen/min/c73147.wgsl.expected.msl index 45fd9b0275..9873e62159 100644 --- a/test/intrinsics/gen/min/c73147.wgsl.expected.msl +++ b/test/intrinsics/gen/min/c73147.wgsl.expected.msl @@ -9,10 +9,16 @@ void min_c73147() { int res = min(1, 1); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { min_c73147(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/min/c76fa6.wgsl.expected.hlsl b/test/intrinsics/gen/min/c76fa6.wgsl.expected.hlsl index 49d053bf4f..de0b7ca6ac 100644 --- a/test/intrinsics/gen/min/c76fa6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/min/c76fa6.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { min_c76fa6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/min/c76fa6.wgsl.expected.msl b/test/intrinsics/gen/min/c76fa6.wgsl.expected.msl index bed1dc61c1..a1dedfac82 100644 --- a/test/intrinsics/gen/min/c76fa6.wgsl.expected.msl +++ b/test/intrinsics/gen/min/c76fa6.wgsl.expected.msl @@ -9,10 +9,16 @@ void min_c76fa6() { float4 res = fmin(float4(), float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { min_c76fa6(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/mix/0c8c33.wgsl.expected.hlsl b/test/intrinsics/gen/mix/0c8c33.wgsl.expected.hlsl index ddf487e578..941e165416 100644 --- a/test/intrinsics/gen/mix/0c8c33.wgsl.expected.hlsl +++ b/test/intrinsics/gen/mix/0c8c33.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { mix_0c8c33(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/mix/0c8c33.wgsl.expected.msl b/test/intrinsics/gen/mix/0c8c33.wgsl.expected.msl index 2e50a7053d..dbeda2b1cf 100644 --- a/test/intrinsics/gen/mix/0c8c33.wgsl.expected.msl +++ b/test/intrinsics/gen/mix/0c8c33.wgsl.expected.msl @@ -9,10 +9,16 @@ void mix_0c8c33() { float3 res = mix(float3(), float3(), float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { mix_0c8c33(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/mix/1faeb1.wgsl.expected.hlsl b/test/intrinsics/gen/mix/1faeb1.wgsl.expected.hlsl index 6853b3ee3e..b3c35364ba 100644 --- a/test/intrinsics/gen/mix/1faeb1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/mix/1faeb1.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { mix_1faeb1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/mix/1faeb1.wgsl.expected.msl b/test/intrinsics/gen/mix/1faeb1.wgsl.expected.msl index 981c9e4ba9..b42db51976 100644 --- a/test/intrinsics/gen/mix/1faeb1.wgsl.expected.msl +++ b/test/intrinsics/gen/mix/1faeb1.wgsl.expected.msl @@ -9,10 +9,16 @@ void mix_1faeb1() { float4 res = mix(float4(), float4(), 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { mix_1faeb1(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/mix/2fadab.wgsl.expected.hlsl b/test/intrinsics/gen/mix/2fadab.wgsl.expected.hlsl index cb6d6e3362..2aa89fb18d 100644 --- a/test/intrinsics/gen/mix/2fadab.wgsl.expected.hlsl +++ b/test/intrinsics/gen/mix/2fadab.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { mix_2fadab(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/mix/2fadab.wgsl.expected.msl b/test/intrinsics/gen/mix/2fadab.wgsl.expected.msl index 2d88484852..8ad84f4797 100644 --- a/test/intrinsics/gen/mix/2fadab.wgsl.expected.msl +++ b/test/intrinsics/gen/mix/2fadab.wgsl.expected.msl @@ -9,10 +9,16 @@ void mix_2fadab() { float2 res = mix(float2(), float2(), 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { mix_2fadab(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/mix/315264.wgsl.expected.hlsl b/test/intrinsics/gen/mix/315264.wgsl.expected.hlsl index ac16431f8c..a389a34951 100644 --- a/test/intrinsics/gen/mix/315264.wgsl.expected.hlsl +++ b/test/intrinsics/gen/mix/315264.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { mix_315264(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/mix/315264.wgsl.expected.msl b/test/intrinsics/gen/mix/315264.wgsl.expected.msl index 9f8f2d2c1b..65c7fa3d3f 100644 --- a/test/intrinsics/gen/mix/315264.wgsl.expected.msl +++ b/test/intrinsics/gen/mix/315264.wgsl.expected.msl @@ -9,10 +9,16 @@ void mix_315264() { float3 res = mix(float3(), float3(), 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { mix_315264(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.hlsl b/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.hlsl index 98fba76e68..f30ed99270 100644 --- a/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { mix_4f0b5e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.msl b/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.msl index 98d71211d7..b2a1c58021 100644 --- a/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.msl +++ b/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.msl @@ -9,10 +9,16 @@ void mix_4f0b5e() { float res = mix(1.0f, 1.0f, 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { mix_4f0b5e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/mix/6f8adc.wgsl.expected.hlsl b/test/intrinsics/gen/mix/6f8adc.wgsl.expected.hlsl index 8509f0e077..811687075a 100644 --- a/test/intrinsics/gen/mix/6f8adc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/mix/6f8adc.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { mix_6f8adc(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/mix/6f8adc.wgsl.expected.msl b/test/intrinsics/gen/mix/6f8adc.wgsl.expected.msl index d205533932..fcd8a42ed0 100644 --- a/test/intrinsics/gen/mix/6f8adc.wgsl.expected.msl +++ b/test/intrinsics/gen/mix/6f8adc.wgsl.expected.msl @@ -9,10 +9,16 @@ void mix_6f8adc() { float2 res = mix(float2(), float2(), float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { mix_6f8adc(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/mix/c37ede.wgsl.expected.hlsl b/test/intrinsics/gen/mix/c37ede.wgsl.expected.hlsl index c90ce31c39..622c3da3df 100644 --- a/test/intrinsics/gen/mix/c37ede.wgsl.expected.hlsl +++ b/test/intrinsics/gen/mix/c37ede.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { mix_c37ede(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/mix/c37ede.wgsl.expected.msl b/test/intrinsics/gen/mix/c37ede.wgsl.expected.msl index c4434f9db0..837f4f7937 100644 --- a/test/intrinsics/gen/mix/c37ede.wgsl.expected.msl +++ b/test/intrinsics/gen/mix/c37ede.wgsl.expected.msl @@ -9,10 +9,16 @@ void mix_c37ede() { float4 res = mix(float4(), float4(), float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { mix_c37ede(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/1d59e5.wgsl.expected.hlsl b/test/intrinsics/gen/modf/1d59e5.wgsl.expected.hlsl index e8f8a176be..8099d2e316 100644 --- a/test/intrinsics/gen/modf/1d59e5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/1d59e5.wgsl.expected.hlsl @@ -12,13 +12,16 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { arg_1 = float4(0.0f, 0.0f, 0.0f, 0.0f); } GroupMemoryBarrierWithGroupSync(); modf_1d59e5(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/modf/1d59e5.wgsl.expected.msl b/test/intrinsics/gen/modf/1d59e5.wgsl.expected.msl index 9d2ffc90a4..1db9b27859 100644 --- a/test/intrinsics/gen/modf/1d59e5.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/1d59e5.wgsl.expected.msl @@ -13,17 +13,21 @@ float4 tint_modf(float4 param_0, threadgroup float4* param_1) { return fract; } -void modf_1d59e5(threadgroup float4* const tint_symbol_1) { - float4 res = tint_modf(float4(), tint_symbol_1); +void modf_1d59e5(threadgroup float4* const tint_symbol) { + float4 res = tint_modf(float4(), tint_symbol); +} + +void compute_main_inner(uint local_invocation_index, threadgroup float4* const tint_symbol_1) { + { + *(tint_symbol_1) = float4(); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + modf_1d59e5(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup float4 tint_symbol_2; - { - tint_symbol_2 = float4(); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - modf_1d59e5(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/modf/2199f1.wgsl.expected.hlsl b/test/intrinsics/gen/modf/2199f1.wgsl.expected.hlsl index 9b4570e848..d1f518f582 100644 --- a/test/intrinsics/gen/modf/2199f1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/2199f1.wgsl.expected.hlsl @@ -17,10 +17,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_2199f1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/2199f1.wgsl.expected.msl b/test/intrinsics/gen/modf/2199f1.wgsl.expected.msl index 233b91cbd9..4acf18d916 100644 --- a/test/intrinsics/gen/modf/2199f1.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/2199f1.wgsl.expected.msl @@ -20,10 +20,16 @@ void modf_2199f1() { modf_result_vec3 res = tint_modf(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_2199f1(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/353f7d.wgsl.expected.hlsl b/test/intrinsics/gen/modf/353f7d.wgsl.expected.hlsl index 7661a49f40..99e0a30c2a 100644 --- a/test/intrinsics/gen/modf/353f7d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/353f7d.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_353f7d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/353f7d.wgsl.expected.msl b/test/intrinsics/gen/modf/353f7d.wgsl.expected.msl index 67dafcfdf4..652a15ad98 100644 --- a/test/intrinsics/gen/modf/353f7d.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/353f7d.wgsl.expected.msl @@ -22,10 +22,16 @@ void modf_353f7d() { float res = tint_modf(1.0f, &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_353f7d(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/3b79d5.wgsl.expected.hlsl b/test/intrinsics/gen/modf/3b79d5.wgsl.expected.hlsl index 7d4c70807a..925974b9db 100644 --- a/test/intrinsics/gen/modf/3b79d5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/3b79d5.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_3b79d5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/3b79d5.wgsl.expected.msl b/test/intrinsics/gen/modf/3b79d5.wgsl.expected.msl index 2881b41cbe..dfeb8e20ae 100644 --- a/test/intrinsics/gen/modf/3b79d5.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/3b79d5.wgsl.expected.msl @@ -22,10 +22,16 @@ void modf_3b79d5() { float3 res = tint_modf(float3(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_3b79d5(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/3d00e2.wgsl.expected.hlsl b/test/intrinsics/gen/modf/3d00e2.wgsl.expected.hlsl index 5f97ee428c..4791733707 100644 --- a/test/intrinsics/gen/modf/3d00e2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/3d00e2.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_3d00e2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/3d00e2.wgsl.expected.msl b/test/intrinsics/gen/modf/3d00e2.wgsl.expected.msl index 6b31676236..273d98b03c 100644 --- a/test/intrinsics/gen/modf/3d00e2.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/3d00e2.wgsl.expected.msl @@ -17,15 +17,21 @@ struct tint_symbol { float4 value [[position]]; }; -void modf_3d00e2(thread float4* const tint_symbol_2) { - float4 res = tint_modf(float4(), tint_symbol_2); +void modf_3d00e2(thread float4* const tint_symbol_1) { + float4 res = tint_modf(float4(), tint_symbol_1); +} + +float4 vertex_main_inner(thread float4* const tint_symbol_2) { + modf_3d00e2(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main() { thread float4 tint_symbol_3 = 0.0f; - modf_3d00e2(&(tint_symbol_3)); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(&(tint_symbol_3)); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/4bb324.wgsl.expected.hlsl b/test/intrinsics/gen/modf/4bb324.wgsl.expected.hlsl index caf030cad1..73afb4f1e6 100644 --- a/test/intrinsics/gen/modf/4bb324.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/4bb324.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_4bb324(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/4bb324.wgsl.expected.msl b/test/intrinsics/gen/modf/4bb324.wgsl.expected.msl index e87e26c644..f808dfb9bb 100644 --- a/test/intrinsics/gen/modf/4bb324.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/4bb324.wgsl.expected.msl @@ -22,10 +22,16 @@ void modf_4bb324() { float4 res = tint_modf(float4(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_4bb324(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.hlsl b/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.hlsl index 2731d810b5..7428221f62 100644 --- a/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_4fe3d9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.msl b/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.msl index 66c8950135..decfe81283 100644 --- a/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.msl @@ -22,10 +22,16 @@ void modf_4fe3d9() { float3 res = tint_modf(float3(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_4fe3d9(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/51e4c6.wgsl.expected.hlsl b/test/intrinsics/gen/modf/51e4c6.wgsl.expected.hlsl index 0d22edf303..530ecd0d70 100644 --- a/test/intrinsics/gen/modf/51e4c6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/51e4c6.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_51e4c6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/51e4c6.wgsl.expected.msl b/test/intrinsics/gen/modf/51e4c6.wgsl.expected.msl index ad760d538a..10b36f8b9a 100644 --- a/test/intrinsics/gen/modf/51e4c6.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/51e4c6.wgsl.expected.msl @@ -22,10 +22,16 @@ void modf_51e4c6() { float2 res = tint_modf(float2(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_51e4c6(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/546e09.wgsl.expected.hlsl b/test/intrinsics/gen/modf/546e09.wgsl.expected.hlsl index 1fcd41cf8a..4a7a1ee9b6 100644 --- a/test/intrinsics/gen/modf/546e09.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/546e09.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_546e09(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/546e09.wgsl.expected.msl b/test/intrinsics/gen/modf/546e09.wgsl.expected.msl index a00cf02d74..eb30dcd99a 100644 --- a/test/intrinsics/gen/modf/546e09.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/546e09.wgsl.expected.msl @@ -22,10 +22,16 @@ void modf_546e09() { float res = tint_modf(1.0f, &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_546e09(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/5e8476.wgsl.expected.hlsl b/test/intrinsics/gen/modf/5e8476.wgsl.expected.hlsl index dbe27e643b..5797b913ce 100644 --- a/test/intrinsics/gen/modf/5e8476.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/5e8476.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_5e8476(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/5e8476.wgsl.expected.msl b/test/intrinsics/gen/modf/5e8476.wgsl.expected.msl index b8f60537b5..3928eb166d 100644 --- a/test/intrinsics/gen/modf/5e8476.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/5e8476.wgsl.expected.msl @@ -17,15 +17,21 @@ struct tint_symbol { float4 value [[position]]; }; -void modf_5e8476(thread float* const tint_symbol_2) { - float res = tint_modf(1.0f, tint_symbol_2); +void modf_5e8476(thread float* const tint_symbol_1) { + float res = tint_modf(1.0f, tint_symbol_1); +} + +float4 vertex_main_inner(thread float* const tint_symbol_2) { + modf_5e8476(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main() { thread float tint_symbol_3 = 0.0f; - modf_5e8476(&(tint_symbol_3)); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(&(tint_symbol_3)); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/684d46.wgsl.expected.hlsl b/test/intrinsics/gen/modf/684d46.wgsl.expected.hlsl index 77b05b7af2..9dbff2801e 100644 --- a/test/intrinsics/gen/modf/684d46.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/684d46.wgsl.expected.hlsl @@ -17,10 +17,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_684d46(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/684d46.wgsl.expected.msl b/test/intrinsics/gen/modf/684d46.wgsl.expected.msl index 9944617c8a..ff5576c80a 100644 --- a/test/intrinsics/gen/modf/684d46.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/684d46.wgsl.expected.msl @@ -20,10 +20,16 @@ void modf_684d46() { modf_result res = tint_modf(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_684d46(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/86441c.wgsl.expected.hlsl b/test/intrinsics/gen/modf/86441c.wgsl.expected.hlsl index 81063726b5..e90b73b9cd 100644 --- a/test/intrinsics/gen/modf/86441c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/86441c.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_86441c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/86441c.wgsl.expected.msl b/test/intrinsics/gen/modf/86441c.wgsl.expected.msl index bd5a59559f..1a77dc90e8 100644 --- a/test/intrinsics/gen/modf/86441c.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/86441c.wgsl.expected.msl @@ -22,10 +22,16 @@ void modf_86441c() { float2 res = tint_modf(float2(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_86441c(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/955651.wgsl.expected.hlsl b/test/intrinsics/gen/modf/955651.wgsl.expected.hlsl index de9a0a0a3b..284d8370e0 100644 --- a/test/intrinsics/gen/modf/955651.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/955651.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_955651(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/955651.wgsl.expected.msl b/test/intrinsics/gen/modf/955651.wgsl.expected.msl index 937fbe1773..dd3121df60 100644 --- a/test/intrinsics/gen/modf/955651.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/955651.wgsl.expected.msl @@ -22,10 +22,16 @@ void modf_955651() { float3 res = tint_modf(float3(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_955651(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/9b44a9.wgsl.expected.hlsl b/test/intrinsics/gen/modf/9b44a9.wgsl.expected.hlsl index 56faa2040c..e255b6741e 100644 --- a/test/intrinsics/gen/modf/9b44a9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/9b44a9.wgsl.expected.hlsl @@ -17,10 +17,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_9b44a9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/9b44a9.wgsl.expected.msl b/test/intrinsics/gen/modf/9b44a9.wgsl.expected.msl index 86541b3713..8154ee6f97 100644 --- a/test/intrinsics/gen/modf/9b44a9.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/9b44a9.wgsl.expected.msl @@ -20,10 +20,16 @@ void modf_9b44a9() { modf_result_vec4 res = tint_modf(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_9b44a9(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/9c6a91.wgsl.expected.hlsl b/test/intrinsics/gen/modf/9c6a91.wgsl.expected.hlsl index 112167d05e..afb6b72ebc 100644 --- a/test/intrinsics/gen/modf/9c6a91.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/9c6a91.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_9c6a91(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/9c6a91.wgsl.expected.msl b/test/intrinsics/gen/modf/9c6a91.wgsl.expected.msl index d3c48577c2..5bd8a4102e 100644 --- a/test/intrinsics/gen/modf/9c6a91.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/9c6a91.wgsl.expected.msl @@ -17,15 +17,21 @@ struct tint_symbol { float4 value [[position]]; }; -void modf_9c6a91(thread float2* const tint_symbol_2) { - float2 res = tint_modf(float2(), tint_symbol_2); +void modf_9c6a91(thread float2* const tint_symbol_1) { + float2 res = tint_modf(float2(), tint_symbol_1); +} + +float4 vertex_main_inner(thread float2* const tint_symbol_2) { + modf_9c6a91(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main() { thread float2 tint_symbol_3 = 0.0f; - modf_9c6a91(&(tint_symbol_3)); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(&(tint_symbol_3)); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/9cecfc.wgsl.expected.hlsl b/test/intrinsics/gen/modf/9cecfc.wgsl.expected.hlsl index 11978856b8..249112829f 100644 --- a/test/intrinsics/gen/modf/9cecfc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/9cecfc.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_9cecfc(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/9cecfc.wgsl.expected.msl b/test/intrinsics/gen/modf/9cecfc.wgsl.expected.msl index f3325225ef..caca99609f 100644 --- a/test/intrinsics/gen/modf/9cecfc.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/9cecfc.wgsl.expected.msl @@ -17,15 +17,21 @@ struct tint_symbol { float4 value [[position]]; }; -void modf_9cecfc(thread float3* const tint_symbol_2) { - float3 res = tint_modf(float3(), tint_symbol_2); +void modf_9cecfc(thread float3* const tint_symbol_1) { + float3 res = tint_modf(float3(), tint_symbol_1); +} + +float4 vertex_main_inner(thread float3* const tint_symbol_2) { + modf_9cecfc(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main() { thread float3 tint_symbol_3 = 0.0f; - modf_9cecfc(&(tint_symbol_3)); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(&(tint_symbol_3)); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/a128ab.wgsl.expected.hlsl b/test/intrinsics/gen/modf/a128ab.wgsl.expected.hlsl index 814962f186..7f3ef8fd3d 100644 --- a/test/intrinsics/gen/modf/a128ab.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/a128ab.wgsl.expected.hlsl @@ -12,13 +12,16 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { arg_1 = float2(0.0f, 0.0f); } GroupMemoryBarrierWithGroupSync(); modf_a128ab(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/modf/a128ab.wgsl.expected.msl b/test/intrinsics/gen/modf/a128ab.wgsl.expected.msl index c475584172..b83625b3c8 100644 --- a/test/intrinsics/gen/modf/a128ab.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/a128ab.wgsl.expected.msl @@ -13,17 +13,21 @@ float2 tint_modf(float2 param_0, threadgroup float2* param_1) { return fract; } -void modf_a128ab(threadgroup float2* const tint_symbol_1) { - float2 res = tint_modf(float2(), tint_symbol_1); +void modf_a128ab(threadgroup float2* const tint_symbol) { + float2 res = tint_modf(float2(), tint_symbol); +} + +void compute_main_inner(uint local_invocation_index, threadgroup float2* const tint_symbol_1) { + { + *(tint_symbol_1) = float2(); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + modf_a128ab(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup float2 tint_symbol_2; - { - tint_symbol_2 = float2(); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - modf_a128ab(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/modf/a54eca.wgsl.expected.hlsl b/test/intrinsics/gen/modf/a54eca.wgsl.expected.hlsl index d3ed29adb6..be7e072a7b 100644 --- a/test/intrinsics/gen/modf/a54eca.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/a54eca.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_a54eca(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/a54eca.wgsl.expected.msl b/test/intrinsics/gen/modf/a54eca.wgsl.expected.msl index 94ea876078..4ae68e599c 100644 --- a/test/intrinsics/gen/modf/a54eca.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/a54eca.wgsl.expected.msl @@ -22,10 +22,16 @@ void modf_a54eca() { float2 res = tint_modf(float2(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_a54eca(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/bb9088.wgsl.expected.hlsl b/test/intrinsics/gen/modf/bb9088.wgsl.expected.hlsl index 66b00147d1..80a527f2a2 100644 --- a/test/intrinsics/gen/modf/bb9088.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/bb9088.wgsl.expected.hlsl @@ -12,13 +12,16 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { arg_1 = float3(0.0f, 0.0f, 0.0f); } GroupMemoryBarrierWithGroupSync(); modf_bb9088(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/modf/bb9088.wgsl.expected.msl b/test/intrinsics/gen/modf/bb9088.wgsl.expected.msl index 10b3ff51f6..b5eda27e31 100644 --- a/test/intrinsics/gen/modf/bb9088.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/bb9088.wgsl.expected.msl @@ -13,17 +13,21 @@ float3 tint_modf(float3 param_0, threadgroup float3* param_1) { return fract; } -void modf_bb9088(threadgroup float3* const tint_symbol_1) { - float3 res = tint_modf(float3(), tint_symbol_1); +void modf_bb9088(threadgroup float3* const tint_symbol) { + float3 res = tint_modf(float3(), tint_symbol); +} + +void compute_main_inner(uint local_invocation_index, threadgroup float3* const tint_symbol_1) { + { + *(tint_symbol_1) = float3(); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + modf_bb9088(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup float3 tint_symbol_2; - { - tint_symbol_2 = float3(); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - modf_bb9088(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/modf/c87851.wgsl.expected.hlsl b/test/intrinsics/gen/modf/c87851.wgsl.expected.hlsl index bffd646688..cb302c32e9 100644 --- a/test/intrinsics/gen/modf/c87851.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/c87851.wgsl.expected.hlsl @@ -17,10 +17,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_c87851(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/c87851.wgsl.expected.msl b/test/intrinsics/gen/modf/c87851.wgsl.expected.msl index 4bcc46048a..aed9fd7ef1 100644 --- a/test/intrinsics/gen/modf/c87851.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/c87851.wgsl.expected.msl @@ -20,10 +20,16 @@ void modf_c87851() { modf_result_vec2 res = tint_modf(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_c87851(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.hlsl b/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.hlsl index f017b20bb8..3878a2fec2 100644 --- a/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_d1d6f6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.msl b/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.msl index 549d90ed7a..b62640b58e 100644 --- a/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.msl @@ -22,10 +22,16 @@ void modf_d1d6f6() { float4 res = tint_modf(float4(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_d1d6f6(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/e38ae6.wgsl.expected.hlsl b/test/intrinsics/gen/modf/e38ae6.wgsl.expected.hlsl index b140605587..535f842101 100644 --- a/test/intrinsics/gen/modf/e38ae6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/e38ae6.wgsl.expected.hlsl @@ -12,13 +12,16 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void compute_main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void compute_main_inner(uint local_invocation_index) { { arg_1 = 0.0f; } GroupMemoryBarrierWithGroupSync(); modf_e38ae6(); +} + +[numthreads(1, 1, 1)] +void compute_main(tint_symbol_1 tint_symbol) { + compute_main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/intrinsics/gen/modf/e38ae6.wgsl.expected.msl b/test/intrinsics/gen/modf/e38ae6.wgsl.expected.msl index bb6ccdf9dc..0cd2c456a4 100644 --- a/test/intrinsics/gen/modf/e38ae6.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/e38ae6.wgsl.expected.msl @@ -13,17 +13,21 @@ float tint_modf(float param_0, threadgroup float* param_1) { return fract; } -void modf_e38ae6(threadgroup float* const tint_symbol_1) { - float res = tint_modf(1.0f, tint_symbol_1); +void modf_e38ae6(threadgroup float* const tint_symbol) { + float res = tint_modf(1.0f, tint_symbol); +} + +void compute_main_inner(uint local_invocation_index, threadgroup float* const tint_symbol_1) { + { + *(tint_symbol_1) = float(); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + modf_e38ae6(tint_symbol_1); } kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) { threadgroup float tint_symbol_2; - { - tint_symbol_2 = float(); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - modf_e38ae6(&(tint_symbol_2)); + compute_main_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/intrinsics/gen/modf/e83560.wgsl.expected.hlsl b/test/intrinsics/gen/modf/e83560.wgsl.expected.hlsl index dbc6c6e9ba..d47801bd54 100644 --- a/test/intrinsics/gen/modf/e83560.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/e83560.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_e83560(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/e83560.wgsl.expected.msl b/test/intrinsics/gen/modf/e83560.wgsl.expected.msl index 28bee9f9fc..d99b55fc92 100644 --- a/test/intrinsics/gen/modf/e83560.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/e83560.wgsl.expected.msl @@ -22,10 +22,16 @@ void modf_e83560() { float4 res = tint_modf(float4(), &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_e83560(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/modf/f90945.wgsl.expected.hlsl b/test/intrinsics/gen/modf/f90945.wgsl.expected.hlsl index 7255685c1d..3150e29506 100644 --- a/test/intrinsics/gen/modf/f90945.wgsl.expected.hlsl +++ b/test/intrinsics/gen/modf/f90945.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_f90945(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/modf/f90945.wgsl.expected.msl b/test/intrinsics/gen/modf/f90945.wgsl.expected.msl index 795e7efb86..28b66fb225 100644 --- a/test/intrinsics/gen/modf/f90945.wgsl.expected.msl +++ b/test/intrinsics/gen/modf/f90945.wgsl.expected.msl @@ -22,10 +22,16 @@ void modf_f90945() { float res = tint_modf(1.0f, &(arg_1)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { modf_f90945(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.hlsl b/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.hlsl index f04a581587..b639e63460 100644 --- a/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.hlsl +++ b/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { normalize_64d8c0(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.msl b/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.msl index 3886bbd2ec..5b15b59a1d 100644 --- a/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.msl +++ b/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.msl @@ -9,10 +9,16 @@ void normalize_64d8c0() { float3 res = normalize(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { normalize_64d8c0(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.hlsl b/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.hlsl index 273f93f06a..ae9ef5fa07 100644 --- a/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.hlsl +++ b/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { normalize_9a0aab(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.msl b/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.msl index 85b933951c..a8d81cb12d 100644 --- a/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.msl +++ b/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.msl @@ -9,10 +9,16 @@ void normalize_9a0aab() { float4 res = normalize(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { normalize_9a0aab(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.hlsl b/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.hlsl index d024e8f544..8657268a8e 100644 --- a/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { normalize_fc2ef1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.msl b/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.msl index 09c836c903..7d98555bee 100644 --- a/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.msl +++ b/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.msl @@ -9,10 +9,16 @@ void normalize_fc2ef1() { float2 res = normalize(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { normalize_fc2ef1(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.hlsl b/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.hlsl index f18593b5db..7ab94b6a04 100644 --- a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { pack2x16float_0e97b3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.msl b/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.msl index eaf483e8cd..62fedd23f0 100644 --- a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.msl +++ b/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.msl @@ -9,10 +9,16 @@ void pack2x16float_0e97b3() { uint res = as_type(half2(float2())); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { pack2x16float_0e97b3(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.hlsl b/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.hlsl index 8a50c57471..9a8348f251 100644 --- a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { pack2x16snorm_6c169b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.msl b/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.msl index 8acd8d921e..02f839bee6 100644 --- a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.msl +++ b/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.msl @@ -9,10 +9,16 @@ void pack2x16snorm_6c169b() { uint res = pack_float_to_snorm2x16(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { pack2x16snorm_6c169b(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.hlsl b/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.hlsl index 3426817745..51432db04e 100644 --- a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { pack2x16unorm_0f08e4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.msl b/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.msl index 0c21bdc9aa..d1928ccf58 100644 --- a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.msl +++ b/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.msl @@ -9,10 +9,16 @@ void pack2x16unorm_0f08e4() { uint res = pack_float_to_unorm2x16(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { pack2x16unorm_0f08e4(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.hlsl b/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.hlsl index 8d96abfd75..b543993dbc 100644 --- a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { pack4x8snorm_4d22e7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.msl b/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.msl index e07cd5d09d..97b19e0b7c 100644 --- a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.msl +++ b/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.msl @@ -9,10 +9,16 @@ void pack4x8snorm_4d22e7() { uint res = pack_float_to_snorm4x8(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { pack4x8snorm_4d22e7(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.hlsl b/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.hlsl index 3ed399c533..f36575744a 100644 --- a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.hlsl +++ b/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { pack4x8unorm_95c456(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.msl b/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.msl index 91aabb48ba..88ccdaf8cc 100644 --- a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.msl +++ b/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.msl @@ -9,10 +9,16 @@ void pack4x8unorm_95c456() { uint res = pack_float_to_unorm4x8(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { pack4x8unorm_95c456(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/pow/04a908.wgsl.expected.hlsl b/test/intrinsics/gen/pow/04a908.wgsl.expected.hlsl index 6bc18710ff..bd4e176bbf 100644 --- a/test/intrinsics/gen/pow/04a908.wgsl.expected.hlsl +++ b/test/intrinsics/gen/pow/04a908.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { pow_04a908(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/pow/04a908.wgsl.expected.msl b/test/intrinsics/gen/pow/04a908.wgsl.expected.msl index 90e90cdd4f..2f9b2a7da2 100644 --- a/test/intrinsics/gen/pow/04a908.wgsl.expected.msl +++ b/test/intrinsics/gen/pow/04a908.wgsl.expected.msl @@ -9,10 +9,16 @@ void pow_04a908() { float4 res = pow(float4(), float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { pow_04a908(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/pow/46e029.wgsl.expected.hlsl b/test/intrinsics/gen/pow/46e029.wgsl.expected.hlsl index 73d302d499..85b5ee06af 100644 --- a/test/intrinsics/gen/pow/46e029.wgsl.expected.hlsl +++ b/test/intrinsics/gen/pow/46e029.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { pow_46e029(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/pow/46e029.wgsl.expected.msl b/test/intrinsics/gen/pow/46e029.wgsl.expected.msl index 84e867b9e6..5192fec6e7 100644 --- a/test/intrinsics/gen/pow/46e029.wgsl.expected.msl +++ b/test/intrinsics/gen/pow/46e029.wgsl.expected.msl @@ -9,10 +9,16 @@ void pow_46e029() { float res = pow(1.0f, 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { pow_46e029(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/pow/4a46c9.wgsl.expected.hlsl b/test/intrinsics/gen/pow/4a46c9.wgsl.expected.hlsl index d0d9ca9b22..2136c74395 100644 --- a/test/intrinsics/gen/pow/4a46c9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/pow/4a46c9.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { pow_4a46c9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/pow/4a46c9.wgsl.expected.msl b/test/intrinsics/gen/pow/4a46c9.wgsl.expected.msl index caebacf9b9..5e68719762 100644 --- a/test/intrinsics/gen/pow/4a46c9.wgsl.expected.msl +++ b/test/intrinsics/gen/pow/4a46c9.wgsl.expected.msl @@ -9,10 +9,16 @@ void pow_4a46c9() { float3 res = pow(float3(), float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { pow_4a46c9(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/pow/e60ea5.wgsl.expected.hlsl b/test/intrinsics/gen/pow/e60ea5.wgsl.expected.hlsl index d4a24939ef..467efc393f 100644 --- a/test/intrinsics/gen/pow/e60ea5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/pow/e60ea5.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { pow_e60ea5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/pow/e60ea5.wgsl.expected.msl b/test/intrinsics/gen/pow/e60ea5.wgsl.expected.msl index 7bb9fc402f..bc4e9a248b 100644 --- a/test/intrinsics/gen/pow/e60ea5.wgsl.expected.msl +++ b/test/intrinsics/gen/pow/e60ea5.wgsl.expected.msl @@ -9,10 +9,16 @@ void pow_e60ea5() { float2 res = pow(float2(), float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { pow_e60ea5(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/reflect/05357e.wgsl.expected.hlsl b/test/intrinsics/gen/reflect/05357e.wgsl.expected.hlsl index 49f9b2dbea..ffa296cacf 100644 --- a/test/intrinsics/gen/reflect/05357e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/reflect/05357e.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { reflect_05357e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/reflect/05357e.wgsl.expected.msl b/test/intrinsics/gen/reflect/05357e.wgsl.expected.msl index b61d634fc7..0b22eec61d 100644 --- a/test/intrinsics/gen/reflect/05357e.wgsl.expected.msl +++ b/test/intrinsics/gen/reflect/05357e.wgsl.expected.msl @@ -9,10 +9,16 @@ void reflect_05357e() { float4 res = reflect(float4(), float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { reflect_05357e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/reflect/b61e10.wgsl.expected.hlsl b/test/intrinsics/gen/reflect/b61e10.wgsl.expected.hlsl index 7fddf4c927..0fae655845 100644 --- a/test/intrinsics/gen/reflect/b61e10.wgsl.expected.hlsl +++ b/test/intrinsics/gen/reflect/b61e10.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { reflect_b61e10(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/reflect/b61e10.wgsl.expected.msl b/test/intrinsics/gen/reflect/b61e10.wgsl.expected.msl index c10208ddaf..5d92438cf7 100644 --- a/test/intrinsics/gen/reflect/b61e10.wgsl.expected.msl +++ b/test/intrinsics/gen/reflect/b61e10.wgsl.expected.msl @@ -9,10 +9,16 @@ void reflect_b61e10() { float2 res = reflect(float2(), float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { reflect_b61e10(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.hlsl b/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.hlsl index 82dc220688..6cb1cea08a 100644 --- a/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.hlsl +++ b/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { reflect_f47fdb(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.msl b/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.msl index 9032ecabf7..93d48de30f 100644 --- a/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.msl +++ b/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.msl @@ -9,10 +9,16 @@ void reflect_f47fdb() { float3 res = reflect(float3(), float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { reflect_f47fdb(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/refract/7e02e6.wgsl.expected.hlsl b/test/intrinsics/gen/refract/7e02e6.wgsl.expected.hlsl index 2824c00fa1..98105d423e 100644 --- a/test/intrinsics/gen/refract/7e02e6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/refract/7e02e6.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { refract_7e02e6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/refract/7e02e6.wgsl.expected.msl b/test/intrinsics/gen/refract/7e02e6.wgsl.expected.msl index e8167b9420..9a66026e1c 100644 --- a/test/intrinsics/gen/refract/7e02e6.wgsl.expected.msl +++ b/test/intrinsics/gen/refract/7e02e6.wgsl.expected.msl @@ -9,10 +9,16 @@ void refract_7e02e6() { float4 res = refract(float4(), float4(), 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { refract_7e02e6(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.hlsl b/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.hlsl index f1f9c46f58..a3ef1642fb 100644 --- a/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { refract_cbc1d2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.msl b/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.msl index ca4697f198..3ee38ac311 100644 --- a/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.msl +++ b/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.msl @@ -9,10 +9,16 @@ void refract_cbc1d2() { float3 res = refract(float3(), float3(), 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { refract_cbc1d2(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/refract/cd905f.wgsl.expected.hlsl b/test/intrinsics/gen/refract/cd905f.wgsl.expected.hlsl index 36cd1917a9..075d4c6dc4 100644 --- a/test/intrinsics/gen/refract/cd905f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/refract/cd905f.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { refract_cd905f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/refract/cd905f.wgsl.expected.msl b/test/intrinsics/gen/refract/cd905f.wgsl.expected.msl index e3aab5fe9c..2a3e898873 100644 --- a/test/intrinsics/gen/refract/cd905f.wgsl.expected.msl +++ b/test/intrinsics/gen/refract/cd905f.wgsl.expected.msl @@ -9,10 +9,16 @@ void refract_cd905f() { float2 res = refract(float2(), float2(), 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { refract_cd905f(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/222177.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/222177.wgsl.expected.hlsl index b8761ac4ff..6ee1cc4cb4 100644 --- a/test/intrinsics/gen/reverseBits/222177.wgsl.expected.hlsl +++ b/test/intrinsics/gen/reverseBits/222177.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_222177(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/222177.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/222177.wgsl.expected.msl index 525e9d17f0..a5df325c4e 100644 --- a/test/intrinsics/gen/reverseBits/222177.wgsl.expected.msl +++ b/test/intrinsics/gen/reverseBits/222177.wgsl.expected.msl @@ -9,10 +9,16 @@ void reverseBits_222177() { int2 res = reverse_bits(int2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_222177(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.hlsl index b76eaa4e6b..4923fa2480 100644 --- a/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_35fea9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.msl index 8aee00a970..ae0cd42199 100644 --- a/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.msl +++ b/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.msl @@ -9,10 +9,16 @@ void reverseBits_35fea9() { uint4 res = reverse_bits(uint4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_35fea9(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.hlsl index ecc8655288..b3c0a73195 100644 --- a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_4dbd6f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.msl index 966cfe29f9..6025abd758 100644 --- a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.msl +++ b/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.msl @@ -9,10 +9,16 @@ void reverseBits_4dbd6f() { int4 res = reverse_bits(int4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_4dbd6f(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.hlsl index 87d8b372d1..03edd621ad 100644 --- a/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.hlsl +++ b/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_7c4269(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.msl index ed2c1db19b..2fc2f847bb 100644 --- a/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.msl +++ b/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.msl @@ -9,10 +9,16 @@ void reverseBits_7c4269() { int res = reverse_bits(1); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_7c4269(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.hlsl index 3e7f0e8d39..c2c6fca5aa 100644 --- a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_a6ccd4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.msl index 72fbdb07e9..dd61298267 100644 --- a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.msl +++ b/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.msl @@ -9,10 +9,16 @@ void reverseBits_a6ccd4() { uint3 res = reverse_bits(uint3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_a6ccd4(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.hlsl index 0758ae9e32..c7f6c4897c 100644 --- a/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_c21bc1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.msl index 442fcaecaa..dd74edb907 100644 --- a/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.msl +++ b/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.msl @@ -9,10 +9,16 @@ void reverseBits_c21bc1() { int3 res = reverse_bits(int3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_c21bc1(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.hlsl index 423812ba8c..b8948c55c6 100644 --- a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_e1f4c1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.msl index 069f1d2b81..caf2e6571f 100644 --- a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.msl +++ b/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.msl @@ -9,10 +9,16 @@ void reverseBits_e1f4c1() { uint2 res = reverse_bits(uint2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_e1f4c1(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.hlsl index 75c1d48592..cb3c52b9ef 100644 --- a/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.hlsl +++ b/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_e31adf(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.msl index 14abcb8698..e80be35d02 100644 --- a/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.msl +++ b/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.msl @@ -9,10 +9,16 @@ void reverseBits_e31adf() { uint res = reverse_bits(1u); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { reverseBits_e31adf(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/round/106c0b.wgsl.expected.hlsl b/test/intrinsics/gen/round/106c0b.wgsl.expected.hlsl index 604e3a3050..5645e986f6 100644 --- a/test/intrinsics/gen/round/106c0b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/round/106c0b.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { round_106c0b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/round/106c0b.wgsl.expected.msl b/test/intrinsics/gen/round/106c0b.wgsl.expected.msl index 280de5dedf..7acb365f96 100644 --- a/test/intrinsics/gen/round/106c0b.wgsl.expected.msl +++ b/test/intrinsics/gen/round/106c0b.wgsl.expected.msl @@ -9,10 +9,16 @@ void round_106c0b() { float4 res = rint(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { round_106c0b(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/round/1c7897.wgsl.expected.hlsl b/test/intrinsics/gen/round/1c7897.wgsl.expected.hlsl index 29369ed756..d03c4a43a5 100644 --- a/test/intrinsics/gen/round/1c7897.wgsl.expected.hlsl +++ b/test/intrinsics/gen/round/1c7897.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { round_1c7897(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/round/1c7897.wgsl.expected.msl b/test/intrinsics/gen/round/1c7897.wgsl.expected.msl index d9c7757885..305f9fef4f 100644 --- a/test/intrinsics/gen/round/1c7897.wgsl.expected.msl +++ b/test/intrinsics/gen/round/1c7897.wgsl.expected.msl @@ -9,10 +9,16 @@ void round_1c7897() { float3 res = rint(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { round_1c7897(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/round/52c84d.wgsl.expected.hlsl b/test/intrinsics/gen/round/52c84d.wgsl.expected.hlsl index 0f0c0d1045..684c4c7165 100644 --- a/test/intrinsics/gen/round/52c84d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/round/52c84d.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { round_52c84d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/round/52c84d.wgsl.expected.msl b/test/intrinsics/gen/round/52c84d.wgsl.expected.msl index 06d2683233..3f932059be 100644 --- a/test/intrinsics/gen/round/52c84d.wgsl.expected.msl +++ b/test/intrinsics/gen/round/52c84d.wgsl.expected.msl @@ -9,10 +9,16 @@ void round_52c84d() { float2 res = rint(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { round_52c84d(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/round/9edc38.wgsl.expected.hlsl b/test/intrinsics/gen/round/9edc38.wgsl.expected.hlsl index 2012d8fc4a..451fc1c2a9 100644 --- a/test/intrinsics/gen/round/9edc38.wgsl.expected.hlsl +++ b/test/intrinsics/gen/round/9edc38.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { round_9edc38(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/round/9edc38.wgsl.expected.msl b/test/intrinsics/gen/round/9edc38.wgsl.expected.msl index f970449e5d..229b70827d 100644 --- a/test/intrinsics/gen/round/9edc38.wgsl.expected.msl +++ b/test/intrinsics/gen/round/9edc38.wgsl.expected.msl @@ -9,10 +9,16 @@ void round_9edc38() { float res = rint(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { round_9edc38(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/00b848.wgsl.expected.hlsl b/test/intrinsics/gen/select/00b848.wgsl.expected.hlsl index f15e35e8f4..b410bbf949 100644 --- a/test/intrinsics/gen/select/00b848.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/00b848.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_00b848(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/00b848.wgsl.expected.msl b/test/intrinsics/gen/select/00b848.wgsl.expected.msl index 4541cbd679..03f191d4be 100644 --- a/test/intrinsics/gen/select/00b848.wgsl.expected.msl +++ b/test/intrinsics/gen/select/00b848.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_00b848() { int2 res = select(int2(), int2(), bool2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_00b848(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/01e2cd.wgsl.expected.hlsl b/test/intrinsics/gen/select/01e2cd.wgsl.expected.hlsl index d3d831605b..5708773084 100644 --- a/test/intrinsics/gen/select/01e2cd.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/01e2cd.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_01e2cd(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/01e2cd.wgsl.expected.msl b/test/intrinsics/gen/select/01e2cd.wgsl.expected.msl index 57e3844b10..2cef21af43 100644 --- a/test/intrinsics/gen/select/01e2cd.wgsl.expected.msl +++ b/test/intrinsics/gen/select/01e2cd.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_01e2cd() { int3 res = select(int3(), int3(), bool3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_01e2cd(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/087ea4.wgsl.expected.hlsl b/test/intrinsics/gen/select/087ea4.wgsl.expected.hlsl index 61f6ecfeb8..b7aa28406c 100644 --- a/test/intrinsics/gen/select/087ea4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/087ea4.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_087ea4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/087ea4.wgsl.expected.msl b/test/intrinsics/gen/select/087ea4.wgsl.expected.msl index 4dc4600773..05ab4d258d 100644 --- a/test/intrinsics/gen/select/087ea4.wgsl.expected.msl +++ b/test/intrinsics/gen/select/087ea4.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_087ea4() { uint4 res = select(uint4(), uint4(), bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_087ea4(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/1e960b.wgsl.expected.hlsl b/test/intrinsics/gen/select/1e960b.wgsl.expected.hlsl index ff79547510..89f728db65 100644 --- a/test/intrinsics/gen/select/1e960b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/1e960b.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_1e960b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/1e960b.wgsl.expected.msl b/test/intrinsics/gen/select/1e960b.wgsl.expected.msl index ed4c2d6ab3..08587c9cb8 100644 --- a/test/intrinsics/gen/select/1e960b.wgsl.expected.msl +++ b/test/intrinsics/gen/select/1e960b.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_1e960b() { uint2 res = select(uint2(), uint2(), bool2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_1e960b(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/266aff.wgsl.expected.hlsl b/test/intrinsics/gen/select/266aff.wgsl.expected.hlsl index b03ee5a4a2..2c945706ba 100644 --- a/test/intrinsics/gen/select/266aff.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/266aff.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_266aff(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/266aff.wgsl.expected.msl b/test/intrinsics/gen/select/266aff.wgsl.expected.msl index 167dca32f1..b822f689d1 100644 --- a/test/intrinsics/gen/select/266aff.wgsl.expected.msl +++ b/test/intrinsics/gen/select/266aff.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_266aff() { float2 res = select(float2(), float2(), bool2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_266aff(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/28a27e.wgsl.expected.hlsl b/test/intrinsics/gen/select/28a27e.wgsl.expected.hlsl index cf433956e5..16a5d8c2ce 100644 --- a/test/intrinsics/gen/select/28a27e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/28a27e.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_28a27e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/28a27e.wgsl.expected.msl b/test/intrinsics/gen/select/28a27e.wgsl.expected.msl index 813376f0e2..6571af47eb 100644 --- a/test/intrinsics/gen/select/28a27e.wgsl.expected.msl +++ b/test/intrinsics/gen/select/28a27e.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_28a27e() { uint3 res = select(uint3(), uint3(), bool3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_28a27e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/3c25ce.wgsl.expected.hlsl b/test/intrinsics/gen/select/3c25ce.wgsl.expected.hlsl index 7708a73a67..913c1b9403 100644 --- a/test/intrinsics/gen/select/3c25ce.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/3c25ce.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_3c25ce(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/3c25ce.wgsl.expected.msl b/test/intrinsics/gen/select/3c25ce.wgsl.expected.msl index bea0da06b9..a0aea42fa3 100644 --- a/test/intrinsics/gen/select/3c25ce.wgsl.expected.msl +++ b/test/intrinsics/gen/select/3c25ce.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_3c25ce() { bool3 res = select(bool3(), bool3(), bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_3c25ce(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/416e14.wgsl.expected.hlsl b/test/intrinsics/gen/select/416e14.wgsl.expected.hlsl index 61ca13039c..1f21685004 100644 --- a/test/intrinsics/gen/select/416e14.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/416e14.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_416e14(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/416e14.wgsl.expected.msl b/test/intrinsics/gen/select/416e14.wgsl.expected.msl index 728f9e1f1c..798efaa4a6 100644 --- a/test/intrinsics/gen/select/416e14.wgsl.expected.msl +++ b/test/intrinsics/gen/select/416e14.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_416e14() { float res = select(1.0f, 1.0f, bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_416e14(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/51b047.wgsl.expected.hlsl b/test/intrinsics/gen/select/51b047.wgsl.expected.hlsl index 1ce5cf3b3d..716ee85dcf 100644 --- a/test/intrinsics/gen/select/51b047.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/51b047.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_51b047(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/51b047.wgsl.expected.msl b/test/intrinsics/gen/select/51b047.wgsl.expected.msl index 5cbeb2e914..e6309d0d66 100644 --- a/test/intrinsics/gen/select/51b047.wgsl.expected.msl +++ b/test/intrinsics/gen/select/51b047.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_51b047() { uint2 res = select(uint2(), uint2(), bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_51b047(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/713567.wgsl.expected.hlsl b/test/intrinsics/gen/select/713567.wgsl.expected.hlsl index 354a836b6e..ee5426d729 100644 --- a/test/intrinsics/gen/select/713567.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/713567.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_713567(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/713567.wgsl.expected.msl b/test/intrinsics/gen/select/713567.wgsl.expected.msl index b3c19d4d93..3130a7e34f 100644 --- a/test/intrinsics/gen/select/713567.wgsl.expected.msl +++ b/test/intrinsics/gen/select/713567.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_713567() { float4 res = select(float4(), float4(), bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_713567(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/78be5f.wgsl.expected.hlsl b/test/intrinsics/gen/select/78be5f.wgsl.expected.hlsl index b7c86bef9e..bc48941f01 100644 --- a/test/intrinsics/gen/select/78be5f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/78be5f.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_78be5f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/78be5f.wgsl.expected.msl b/test/intrinsics/gen/select/78be5f.wgsl.expected.msl index 3565145d81..1cce498c8f 100644 --- a/test/intrinsics/gen/select/78be5f.wgsl.expected.msl +++ b/test/intrinsics/gen/select/78be5f.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_78be5f() { float3 res = select(float3(), float3(), bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_78be5f(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/80a9a9.wgsl.expected.hlsl b/test/intrinsics/gen/select/80a9a9.wgsl.expected.hlsl index 662d56bcdf..c3071bb69c 100644 --- a/test/intrinsics/gen/select/80a9a9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/80a9a9.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_80a9a9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/80a9a9.wgsl.expected.msl b/test/intrinsics/gen/select/80a9a9.wgsl.expected.msl index 0e8e4b90ab..dcc8d5d455 100644 --- a/test/intrinsics/gen/select/80a9a9.wgsl.expected.msl +++ b/test/intrinsics/gen/select/80a9a9.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_80a9a9() { bool3 res = select(bool3(), bool3(), bool3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_80a9a9(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/8fa62c.wgsl.expected.hlsl b/test/intrinsics/gen/select/8fa62c.wgsl.expected.hlsl index 84eb1a1231..2ec6462fd6 100644 --- a/test/intrinsics/gen/select/8fa62c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/8fa62c.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_8fa62c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/8fa62c.wgsl.expected.msl b/test/intrinsics/gen/select/8fa62c.wgsl.expected.msl index 4e3abd8044..f9d0f6facd 100644 --- a/test/intrinsics/gen/select/8fa62c.wgsl.expected.msl +++ b/test/intrinsics/gen/select/8fa62c.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_8fa62c() { int3 res = select(int3(), int3(), bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_8fa62c(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/99f883.wgsl.expected.hlsl b/test/intrinsics/gen/select/99f883.wgsl.expected.hlsl index 04477fabcf..603d18a30e 100644 --- a/test/intrinsics/gen/select/99f883.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/99f883.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_99f883(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/99f883.wgsl.expected.msl b/test/intrinsics/gen/select/99f883.wgsl.expected.msl index fde3d24f41..5e9591aa19 100644 --- a/test/intrinsics/gen/select/99f883.wgsl.expected.msl +++ b/test/intrinsics/gen/select/99f883.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_99f883() { uint res = select(1u, 1u, bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_99f883(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/a2860e.wgsl.expected.hlsl b/test/intrinsics/gen/select/a2860e.wgsl.expected.hlsl index 9ffc729e5f..be8b47a10a 100644 --- a/test/intrinsics/gen/select/a2860e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/a2860e.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_a2860e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/a2860e.wgsl.expected.msl b/test/intrinsics/gen/select/a2860e.wgsl.expected.msl index 992519dc32..2d2e3225e1 100644 --- a/test/intrinsics/gen/select/a2860e.wgsl.expected.msl +++ b/test/intrinsics/gen/select/a2860e.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_a2860e() { int4 res = select(int4(), int4(), bool4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_a2860e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/ab069f.wgsl.expected.hlsl b/test/intrinsics/gen/select/ab069f.wgsl.expected.hlsl index 3f413fc173..800300cd04 100644 --- a/test/intrinsics/gen/select/ab069f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/ab069f.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_ab069f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/ab069f.wgsl.expected.msl b/test/intrinsics/gen/select/ab069f.wgsl.expected.msl index 89948161bb..c94793795b 100644 --- a/test/intrinsics/gen/select/ab069f.wgsl.expected.msl +++ b/test/intrinsics/gen/select/ab069f.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_ab069f() { int4 res = select(int4(), int4(), bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_ab069f(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/b04721.wgsl.expected.hlsl b/test/intrinsics/gen/select/b04721.wgsl.expected.hlsl index 010d8fbc43..030d20546c 100644 --- a/test/intrinsics/gen/select/b04721.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/b04721.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_b04721(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/b04721.wgsl.expected.msl b/test/intrinsics/gen/select/b04721.wgsl.expected.msl index 9be5c2c967..7a21e91aa5 100644 --- a/test/intrinsics/gen/select/b04721.wgsl.expected.msl +++ b/test/intrinsics/gen/select/b04721.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_b04721() { uint3 res = select(uint3(), uint3(), bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_b04721(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/bb447f.wgsl.expected.hlsl b/test/intrinsics/gen/select/bb447f.wgsl.expected.hlsl index ad6bd7a97a..079cec6b21 100644 --- a/test/intrinsics/gen/select/bb447f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/bb447f.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_bb447f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/bb447f.wgsl.expected.msl b/test/intrinsics/gen/select/bb447f.wgsl.expected.msl index c3ab11010c..d242cd57d0 100644 --- a/test/intrinsics/gen/select/bb447f.wgsl.expected.msl +++ b/test/intrinsics/gen/select/bb447f.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_bb447f() { int2 res = select(int2(), int2(), bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_bb447f(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/bb8aae.wgsl.expected.hlsl b/test/intrinsics/gen/select/bb8aae.wgsl.expected.hlsl index 4ab9d4eb69..3c84b8fee7 100644 --- a/test/intrinsics/gen/select/bb8aae.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/bb8aae.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_bb8aae(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/bb8aae.wgsl.expected.msl b/test/intrinsics/gen/select/bb8aae.wgsl.expected.msl index 23ef980de5..41a021b060 100644 --- a/test/intrinsics/gen/select/bb8aae.wgsl.expected.msl +++ b/test/intrinsics/gen/select/bb8aae.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_bb8aae() { float4 res = select(float4(), float4(), bool4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_bb8aae(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/bf3d29.wgsl.expected.hlsl b/test/intrinsics/gen/select/bf3d29.wgsl.expected.hlsl index ff86e24c35..fcfca7deaf 100644 --- a/test/intrinsics/gen/select/bf3d29.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/bf3d29.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_bf3d29(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/bf3d29.wgsl.expected.msl b/test/intrinsics/gen/select/bf3d29.wgsl.expected.msl index 81b1d17c06..ba58d5b301 100644 --- a/test/intrinsics/gen/select/bf3d29.wgsl.expected.msl +++ b/test/intrinsics/gen/select/bf3d29.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_bf3d29() { float2 res = select(float2(), float2(), bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_bf3d29(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/c31f9e.wgsl.expected.hlsl b/test/intrinsics/gen/select/c31f9e.wgsl.expected.hlsl index 10235c0a85..9cf520f914 100644 --- a/test/intrinsics/gen/select/c31f9e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/c31f9e.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_c31f9e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/c31f9e.wgsl.expected.msl b/test/intrinsics/gen/select/c31f9e.wgsl.expected.msl index f348bbb5e5..bd1d3b9f1b 100644 --- a/test/intrinsics/gen/select/c31f9e.wgsl.expected.msl +++ b/test/intrinsics/gen/select/c31f9e.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_c31f9e() { bool res = select(bool(), bool(), bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_c31f9e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/c41bd1.wgsl.expected.hlsl b/test/intrinsics/gen/select/c41bd1.wgsl.expected.hlsl index 553018f7fe..d5e8edc350 100644 --- a/test/intrinsics/gen/select/c41bd1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/c41bd1.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_c41bd1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/c41bd1.wgsl.expected.msl b/test/intrinsics/gen/select/c41bd1.wgsl.expected.msl index 4d9b08d7bb..0f8e67b877 100644 --- a/test/intrinsics/gen/select/c41bd1.wgsl.expected.msl +++ b/test/intrinsics/gen/select/c41bd1.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_c41bd1() { bool4 res = select(bool4(), bool4(), bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_c41bd1(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/c4a4ef.wgsl.expected.hlsl b/test/intrinsics/gen/select/c4a4ef.wgsl.expected.hlsl index d85b83cbf7..ef96f44463 100644 --- a/test/intrinsics/gen/select/c4a4ef.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/c4a4ef.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_c4a4ef(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/c4a4ef.wgsl.expected.msl b/test/intrinsics/gen/select/c4a4ef.wgsl.expected.msl index 5de96a5217..a963df9dbf 100644 --- a/test/intrinsics/gen/select/c4a4ef.wgsl.expected.msl +++ b/test/intrinsics/gen/select/c4a4ef.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_c4a4ef() { uint4 res = select(uint4(), uint4(), bool4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_c4a4ef(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/cb9301.wgsl.expected.hlsl b/test/intrinsics/gen/select/cb9301.wgsl.expected.hlsl index cc33bff2b8..27eeed4527 100644 --- a/test/intrinsics/gen/select/cb9301.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/cb9301.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_cb9301(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/cb9301.wgsl.expected.msl b/test/intrinsics/gen/select/cb9301.wgsl.expected.msl index 975962fa67..4e4d9bd847 100644 --- a/test/intrinsics/gen/select/cb9301.wgsl.expected.msl +++ b/test/intrinsics/gen/select/cb9301.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_cb9301() { bool2 res = select(bool2(), bool2(), bool2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_cb9301(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/e3e028.wgsl.expected.hlsl b/test/intrinsics/gen/select/e3e028.wgsl.expected.hlsl index 58f8a7ce79..20e3edf10f 100644 --- a/test/intrinsics/gen/select/e3e028.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/e3e028.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_e3e028(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/e3e028.wgsl.expected.msl b/test/intrinsics/gen/select/e3e028.wgsl.expected.msl index 659778ea88..56f88a6f08 100644 --- a/test/intrinsics/gen/select/e3e028.wgsl.expected.msl +++ b/test/intrinsics/gen/select/e3e028.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_e3e028() { bool4 res = select(bool4(), bool4(), bool4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_e3e028(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/ebfea2.wgsl.expected.hlsl b/test/intrinsics/gen/select/ebfea2.wgsl.expected.hlsl index 8fe538cda4..8dd54f2bab 100644 --- a/test/intrinsics/gen/select/ebfea2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/ebfea2.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_ebfea2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/ebfea2.wgsl.expected.msl b/test/intrinsics/gen/select/ebfea2.wgsl.expected.msl index a4c6a1386e..df91f64029 100644 --- a/test/intrinsics/gen/select/ebfea2.wgsl.expected.msl +++ b/test/intrinsics/gen/select/ebfea2.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_ebfea2() { float3 res = select(float3(), float3(), bool3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_ebfea2(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/ed8a15.wgsl.expected.hlsl b/test/intrinsics/gen/select/ed8a15.wgsl.expected.hlsl index 8f134271b8..e550b588c6 100644 --- a/test/intrinsics/gen/select/ed8a15.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/ed8a15.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_ed8a15(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/ed8a15.wgsl.expected.msl b/test/intrinsics/gen/select/ed8a15.wgsl.expected.msl index e2ec08eacc..75aa87d0b8 100644 --- a/test/intrinsics/gen/select/ed8a15.wgsl.expected.msl +++ b/test/intrinsics/gen/select/ed8a15.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_ed8a15() { int res = select(1, 1, bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_ed8a15(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/select/fb7e53.wgsl.expected.hlsl b/test/intrinsics/gen/select/fb7e53.wgsl.expected.hlsl index 7d8ae9dcff..05fa3bc1ac 100644 --- a/test/intrinsics/gen/select/fb7e53.wgsl.expected.hlsl +++ b/test/intrinsics/gen/select/fb7e53.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { select_fb7e53(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/select/fb7e53.wgsl.expected.msl b/test/intrinsics/gen/select/fb7e53.wgsl.expected.msl index 7d321fb29a..ced4250158 100644 --- a/test/intrinsics/gen/select/fb7e53.wgsl.expected.msl +++ b/test/intrinsics/gen/select/fb7e53.wgsl.expected.msl @@ -9,10 +9,16 @@ void select_fb7e53() { bool2 res = select(bool2(), bool2(), bool()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { select_fb7e53(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sign/159665.wgsl.expected.hlsl b/test/intrinsics/gen/sign/159665.wgsl.expected.hlsl index fd8a732ea0..64d4d764bb 100644 --- a/test/intrinsics/gen/sign/159665.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sign/159665.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sign_159665(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sign/159665.wgsl.expected.msl b/test/intrinsics/gen/sign/159665.wgsl.expected.msl index 63ef07d823..4c75814e0c 100644 --- a/test/intrinsics/gen/sign/159665.wgsl.expected.msl +++ b/test/intrinsics/gen/sign/159665.wgsl.expected.msl @@ -9,10 +9,16 @@ void sign_159665() { float3 res = sign(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sign_159665(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sign/b8f634.wgsl.expected.hlsl b/test/intrinsics/gen/sign/b8f634.wgsl.expected.hlsl index 7564ac1d79..129de07c56 100644 --- a/test/intrinsics/gen/sign/b8f634.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sign/b8f634.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sign_b8f634(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sign/b8f634.wgsl.expected.msl b/test/intrinsics/gen/sign/b8f634.wgsl.expected.msl index ede912796a..b5b2a47f00 100644 --- a/test/intrinsics/gen/sign/b8f634.wgsl.expected.msl +++ b/test/intrinsics/gen/sign/b8f634.wgsl.expected.msl @@ -9,10 +9,16 @@ void sign_b8f634() { float4 res = sign(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sign_b8f634(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sign/d065d8.wgsl.expected.hlsl b/test/intrinsics/gen/sign/d065d8.wgsl.expected.hlsl index 0a1b0055ff..e6a06fab3c 100644 --- a/test/intrinsics/gen/sign/d065d8.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sign/d065d8.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sign_d065d8(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sign/d065d8.wgsl.expected.msl b/test/intrinsics/gen/sign/d065d8.wgsl.expected.msl index dfe0aa945d..f445351da8 100644 --- a/test/intrinsics/gen/sign/d065d8.wgsl.expected.msl +++ b/test/intrinsics/gen/sign/d065d8.wgsl.expected.msl @@ -9,10 +9,16 @@ void sign_d065d8() { float2 res = sign(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sign_d065d8(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sign/dd790e.wgsl.expected.hlsl b/test/intrinsics/gen/sign/dd790e.wgsl.expected.hlsl index e01d548c19..e55a8ac516 100644 --- a/test/intrinsics/gen/sign/dd790e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sign/dd790e.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sign_dd790e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sign/dd790e.wgsl.expected.msl b/test/intrinsics/gen/sign/dd790e.wgsl.expected.msl index 756a81278a..a3bb007860 100644 --- a/test/intrinsics/gen/sign/dd790e.wgsl.expected.msl +++ b/test/intrinsics/gen/sign/dd790e.wgsl.expected.msl @@ -9,10 +9,16 @@ void sign_dd790e() { float res = sign(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sign_dd790e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sin/01f241.wgsl.expected.hlsl b/test/intrinsics/gen/sin/01f241.wgsl.expected.hlsl index f84590988b..5fc47fa8a5 100644 --- a/test/intrinsics/gen/sin/01f241.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sin/01f241.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sin_01f241(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sin/01f241.wgsl.expected.msl b/test/intrinsics/gen/sin/01f241.wgsl.expected.msl index 656086c6d4..7f4629a5cd 100644 --- a/test/intrinsics/gen/sin/01f241.wgsl.expected.msl +++ b/test/intrinsics/gen/sin/01f241.wgsl.expected.msl @@ -9,10 +9,16 @@ void sin_01f241() { float3 res = sin(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sin_01f241(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sin/4e3979.wgsl.expected.hlsl b/test/intrinsics/gen/sin/4e3979.wgsl.expected.hlsl index 17a525d3f6..d9ccc2ef1f 100644 --- a/test/intrinsics/gen/sin/4e3979.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sin/4e3979.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sin_4e3979(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sin/4e3979.wgsl.expected.msl b/test/intrinsics/gen/sin/4e3979.wgsl.expected.msl index fbce7644da..5677bfe7db 100644 --- a/test/intrinsics/gen/sin/4e3979.wgsl.expected.msl +++ b/test/intrinsics/gen/sin/4e3979.wgsl.expected.msl @@ -9,10 +9,16 @@ void sin_4e3979() { float4 res = sin(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sin_4e3979(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sin/b78c91.wgsl.expected.hlsl b/test/intrinsics/gen/sin/b78c91.wgsl.expected.hlsl index c83dc4eee8..05a839bd40 100644 --- a/test/intrinsics/gen/sin/b78c91.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sin/b78c91.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sin_b78c91(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sin/b78c91.wgsl.expected.msl b/test/intrinsics/gen/sin/b78c91.wgsl.expected.msl index 2b5020fa5a..2a253a781f 100644 --- a/test/intrinsics/gen/sin/b78c91.wgsl.expected.msl +++ b/test/intrinsics/gen/sin/b78c91.wgsl.expected.msl @@ -9,10 +9,16 @@ void sin_b78c91() { float res = sin(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sin_b78c91(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.hlsl b/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.hlsl index 6c295aa66e..934d5c62ce 100644 --- a/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sin_fc8bc4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.msl b/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.msl index 63129b82cd..d0767a654e 100644 --- a/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.msl +++ b/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.msl @@ -9,10 +9,16 @@ void sin_fc8bc4() { float2 res = sin(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sin_fc8bc4(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sinh/445e33.wgsl.expected.hlsl b/test/intrinsics/gen/sinh/445e33.wgsl.expected.hlsl index 1d1fab6722..de0568102c 100644 --- a/test/intrinsics/gen/sinh/445e33.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sinh/445e33.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sinh_445e33(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sinh/445e33.wgsl.expected.msl b/test/intrinsics/gen/sinh/445e33.wgsl.expected.msl index 78d2be043b..ee93c86d6a 100644 --- a/test/intrinsics/gen/sinh/445e33.wgsl.expected.msl +++ b/test/intrinsics/gen/sinh/445e33.wgsl.expected.msl @@ -9,10 +9,16 @@ void sinh_445e33() { float4 res = sinh(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sinh_445e33(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sinh/7bb598.wgsl.expected.hlsl b/test/intrinsics/gen/sinh/7bb598.wgsl.expected.hlsl index fbb79e5907..4fadd51af0 100644 --- a/test/intrinsics/gen/sinh/7bb598.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sinh/7bb598.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sinh_7bb598(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sinh/7bb598.wgsl.expected.msl b/test/intrinsics/gen/sinh/7bb598.wgsl.expected.msl index 79ca78da5a..5fa463b147 100644 --- a/test/intrinsics/gen/sinh/7bb598.wgsl.expected.msl +++ b/test/intrinsics/gen/sinh/7bb598.wgsl.expected.msl @@ -9,10 +9,16 @@ void sinh_7bb598() { float res = sinh(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sinh_7bb598(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sinh/b9860e.wgsl.expected.hlsl b/test/intrinsics/gen/sinh/b9860e.wgsl.expected.hlsl index 5a04423af6..9bb27317be 100644 --- a/test/intrinsics/gen/sinh/b9860e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sinh/b9860e.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sinh_b9860e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sinh/b9860e.wgsl.expected.msl b/test/intrinsics/gen/sinh/b9860e.wgsl.expected.msl index 2122b1801d..5a9085d9a0 100644 --- a/test/intrinsics/gen/sinh/b9860e.wgsl.expected.msl +++ b/test/intrinsics/gen/sinh/b9860e.wgsl.expected.msl @@ -9,10 +9,16 @@ void sinh_b9860e() { float2 res = sinh(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sinh_b9860e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.hlsl b/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.hlsl index 33d8036ef4..7aeaa6540e 100644 --- a/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sinh_c9a5eb(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.msl b/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.msl index 27475f4207..9526f425f5 100644 --- a/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.msl +++ b/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.msl @@ -9,10 +9,16 @@ void sinh_c9a5eb() { float3 res = sinh(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sinh_c9a5eb(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.hlsl b/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.hlsl index f714d05709..224772d218 100644 --- a/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { smoothStep_5f615b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.msl b/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.msl index 8ab52a30b5..cad5dfe417 100644 --- a/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.msl +++ b/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.msl @@ -9,10 +9,16 @@ void smoothStep_5f615b() { float4 res = smoothstep(float4(), float4(), float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { smoothStep_5f615b(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.hlsl b/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.hlsl index bd611c7c9d..443e4a766d 100644 --- a/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { smoothStep_658be3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.msl b/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.msl index 097061cfbf..7401ef0875 100644 --- a/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.msl +++ b/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.msl @@ -9,10 +9,16 @@ void smoothStep_658be3() { float3 res = smoothstep(float3(), float3(), float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { smoothStep_658be3(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.hlsl b/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.hlsl index 236ec149ce..f438264689 100644 --- a/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.hlsl +++ b/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { smoothStep_c11eef(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.msl b/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.msl index 2d1f4a400d..314e298d5d 100644 --- a/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.msl +++ b/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.msl @@ -9,10 +9,16 @@ void smoothStep_c11eef() { float2 res = smoothstep(float2(), float2(), float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { smoothStep_c11eef(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.hlsl b/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.hlsl index c8b54f7a5e..28e5a81c32 100644 --- a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.hlsl +++ b/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { smoothStep_cb0bfb(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.msl b/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.msl index dda677caa3..12a37fbd66 100644 --- a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.msl +++ b/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.msl @@ -9,10 +9,16 @@ void smoothStep_cb0bfb() { float res = smoothstep(1.0f, 1.0f, 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { smoothStep_cb0bfb(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.hlsl b/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.hlsl index 99eda3ed66..ff521bb3f4 100644 --- a/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sqrt_20c74e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.msl b/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.msl index c8dff4ad9f..81184ee340 100644 --- a/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.msl +++ b/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.msl @@ -9,10 +9,16 @@ void sqrt_20c74e() { float res = sqrt(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sqrt_20c74e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.hlsl b/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.hlsl index d82984038c..077c121002 100644 --- a/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sqrt_8c7024(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.msl b/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.msl index f36c0bca4e..3636dcc072 100644 --- a/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.msl +++ b/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.msl @@ -9,10 +9,16 @@ void sqrt_8c7024() { float2 res = sqrt(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sqrt_8c7024(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.hlsl b/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.hlsl index 72054cf319..58f339ee1a 100644 --- a/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sqrt_aa0d7a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.msl b/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.msl index d0b0a614dc..44625967d0 100644 --- a/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.msl +++ b/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.msl @@ -9,10 +9,16 @@ void sqrt_aa0d7a() { float4 res = sqrt(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sqrt_aa0d7a(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.hlsl b/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.hlsl index adf5402743..5bbd79731b 100644 --- a/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { sqrt_f8c59a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.msl b/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.msl index b39cb0ce53..b61342ce9d 100644 --- a/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.msl +++ b/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.msl @@ -9,10 +9,16 @@ void sqrt_f8c59a() { float3 res = sqrt(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { sqrt_f8c59a(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/step/0b073b.wgsl.expected.hlsl b/test/intrinsics/gen/step/0b073b.wgsl.expected.hlsl index be42d839cd..baff28171d 100644 --- a/test/intrinsics/gen/step/0b073b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/step/0b073b.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { step_0b073b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/step/0b073b.wgsl.expected.msl b/test/intrinsics/gen/step/0b073b.wgsl.expected.msl index b5d5d028c5..83bba3bee0 100644 --- a/test/intrinsics/gen/step/0b073b.wgsl.expected.msl +++ b/test/intrinsics/gen/step/0b073b.wgsl.expected.msl @@ -9,10 +9,16 @@ void step_0b073b() { float res = step(1.0f, 1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { step_0b073b(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/step/19accd.wgsl.expected.hlsl b/test/intrinsics/gen/step/19accd.wgsl.expected.hlsl index cffd53c81a..d9d8c6c1a3 100644 --- a/test/intrinsics/gen/step/19accd.wgsl.expected.hlsl +++ b/test/intrinsics/gen/step/19accd.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { step_19accd(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/step/19accd.wgsl.expected.msl b/test/intrinsics/gen/step/19accd.wgsl.expected.msl index 51c0088565..fac1cc2329 100644 --- a/test/intrinsics/gen/step/19accd.wgsl.expected.msl +++ b/test/intrinsics/gen/step/19accd.wgsl.expected.msl @@ -9,10 +9,16 @@ void step_19accd() { float2 res = step(float2(), float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { step_19accd(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/step/334303.wgsl.expected.hlsl b/test/intrinsics/gen/step/334303.wgsl.expected.hlsl index 3020166e36..e407c78c80 100644 --- a/test/intrinsics/gen/step/334303.wgsl.expected.hlsl +++ b/test/intrinsics/gen/step/334303.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { step_334303(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/step/334303.wgsl.expected.msl b/test/intrinsics/gen/step/334303.wgsl.expected.msl index 82916a6c7a..e6d7c41ea9 100644 --- a/test/intrinsics/gen/step/334303.wgsl.expected.msl +++ b/test/intrinsics/gen/step/334303.wgsl.expected.msl @@ -9,10 +9,16 @@ void step_334303() { float3 res = step(float3(), float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { step_334303(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/step/e2b337.wgsl.expected.hlsl b/test/intrinsics/gen/step/e2b337.wgsl.expected.hlsl index ee8706ab18..17e2f9dea7 100644 --- a/test/intrinsics/gen/step/e2b337.wgsl.expected.hlsl +++ b/test/intrinsics/gen/step/e2b337.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { step_e2b337(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/step/e2b337.wgsl.expected.msl b/test/intrinsics/gen/step/e2b337.wgsl.expected.msl index cb536dbbfe..84639338a7 100644 --- a/test/intrinsics/gen/step/e2b337.wgsl.expected.msl +++ b/test/intrinsics/gen/step/e2b337.wgsl.expected.msl @@ -9,10 +9,16 @@ void step_e2b337() { float4 res = step(float4(), float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { step_e2b337(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/tan/244e2a.wgsl.expected.hlsl b/test/intrinsics/gen/tan/244e2a.wgsl.expected.hlsl index 2d1c99dc85..11e40a2c60 100644 --- a/test/intrinsics/gen/tan/244e2a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/tan/244e2a.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { tan_244e2a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/tan/244e2a.wgsl.expected.msl b/test/intrinsics/gen/tan/244e2a.wgsl.expected.msl index d1b34a4a84..962c601d93 100644 --- a/test/intrinsics/gen/tan/244e2a.wgsl.expected.msl +++ b/test/intrinsics/gen/tan/244e2a.wgsl.expected.msl @@ -9,10 +9,16 @@ void tan_244e2a() { float4 res = tan(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { tan_244e2a(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/tan/2f030e.wgsl.expected.hlsl b/test/intrinsics/gen/tan/2f030e.wgsl.expected.hlsl index eb6676d68c..b7cf9e171a 100644 --- a/test/intrinsics/gen/tan/2f030e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/tan/2f030e.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { tan_2f030e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/tan/2f030e.wgsl.expected.msl b/test/intrinsics/gen/tan/2f030e.wgsl.expected.msl index 81c0766561..7a69f2c9e9 100644 --- a/test/intrinsics/gen/tan/2f030e.wgsl.expected.msl +++ b/test/intrinsics/gen/tan/2f030e.wgsl.expected.msl @@ -9,10 +9,16 @@ void tan_2f030e() { float res = tan(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { tan_2f030e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/tan/7ea104.wgsl.expected.hlsl b/test/intrinsics/gen/tan/7ea104.wgsl.expected.hlsl index 8c0c8607fc..20c8c76b46 100644 --- a/test/intrinsics/gen/tan/7ea104.wgsl.expected.hlsl +++ b/test/intrinsics/gen/tan/7ea104.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { tan_7ea104(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/tan/7ea104.wgsl.expected.msl b/test/intrinsics/gen/tan/7ea104.wgsl.expected.msl index 89db1ac6fd..45a9ab3351 100644 --- a/test/intrinsics/gen/tan/7ea104.wgsl.expected.msl +++ b/test/intrinsics/gen/tan/7ea104.wgsl.expected.msl @@ -9,10 +9,16 @@ void tan_7ea104() { float3 res = tan(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { tan_7ea104(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.hlsl b/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.hlsl index e916d83bf4..2fce0cdf40 100644 --- a/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { tan_8ce3e9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.msl b/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.msl index e460fae70d..bdb9257c3d 100644 --- a/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.msl +++ b/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.msl @@ -9,10 +9,16 @@ void tan_8ce3e9() { float2 res = tan(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { tan_8ce3e9(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/tanh/5663c5.wgsl.expected.hlsl b/test/intrinsics/gen/tanh/5663c5.wgsl.expected.hlsl index 1a2fc3fccd..f74f2ad3e7 100644 --- a/test/intrinsics/gen/tanh/5663c5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/tanh/5663c5.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { tanh_5663c5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/tanh/5663c5.wgsl.expected.msl b/test/intrinsics/gen/tanh/5663c5.wgsl.expected.msl index 5a82feb162..664ac5b801 100644 --- a/test/intrinsics/gen/tanh/5663c5.wgsl.expected.msl +++ b/test/intrinsics/gen/tanh/5663c5.wgsl.expected.msl @@ -9,10 +9,16 @@ void tanh_5663c5() { float4 res = tanh(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { tanh_5663c5(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/tanh/5724b3.wgsl.expected.hlsl b/test/intrinsics/gen/tanh/5724b3.wgsl.expected.hlsl index ad42edb6f9..be84750211 100644 --- a/test/intrinsics/gen/tanh/5724b3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/tanh/5724b3.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { tanh_5724b3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/tanh/5724b3.wgsl.expected.msl b/test/intrinsics/gen/tanh/5724b3.wgsl.expected.msl index 878775fc02..9c87d676db 100644 --- a/test/intrinsics/gen/tanh/5724b3.wgsl.expected.msl +++ b/test/intrinsics/gen/tanh/5724b3.wgsl.expected.msl @@ -9,10 +9,16 @@ void tanh_5724b3() { float2 res = tanh(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { tanh_5724b3(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.hlsl b/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.hlsl index 8f371b3087..7470a05d5f 100644 --- a/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { tanh_9f9fb9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.msl b/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.msl index b93aca0bfd..7a3fb852b4 100644 --- a/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.msl +++ b/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.msl @@ -9,10 +9,16 @@ void tanh_9f9fb9() { float3 res = tanh(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { tanh_9f9fb9(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.hlsl b/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.hlsl index bbf0e4ab0d..27b68c0ff8 100644 --- a/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.hlsl +++ b/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { tanh_c15fdb(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.msl b/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.msl index be4a4b65e0..9b20d17b32 100644 --- a/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.msl +++ b/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.msl @@ -9,10 +9,16 @@ void tanh_c15fdb() { float res = tanh(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { tanh_c15fdb(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.hlsl index 73b274cadb..bf45f40955 100644 --- a/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_002b2a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.msl index f0a2f46609..73f998f0e7 100644 --- a/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_002b2a(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_002b2a(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_002b2a(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_002b2a(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.hlsl index 1c7d1f752f..60766e2871 100644 --- a/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_012b82(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.msl index 4f64e04513..5a6992cf98 100644 --- a/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_012b82(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_012b82(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_012b82(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_012b82(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.hlsl index 45a46bb82d..7bfb2760d4 100644 --- a/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_08753d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.msl index 07590788c4..881c7e2b38 100644 --- a/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_08753d(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_08753d(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_08753d(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_08753d(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.hlsl index bcecfaa513..6a88619353 100644 --- a/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_08a62e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.msl index f0f7937465..07783303fc 100644 --- a/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_08a62e(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_08a62e(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_08a62e(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_08a62e(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.hlsl index e5c665fa85..42b13d05f0 100644 --- a/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_0a5fcf(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.msl index c832aaa7df..cbcbad08b0 100644 --- a/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_0a5fcf(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_0a5fcf(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_0a5fcf(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_0a5fcf(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.hlsl index b45ebd35e2..b6704d7470 100644 --- a/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_0bab57(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.msl index a67843f5bf..96bd0b82bc 100644 --- a/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_0bab57(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_0bab57(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_0bab57(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_0bab57(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.hlsl index e006c2bda5..573849ad14 100644 --- a/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_0c4772(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.msl index c939d4ceb0..640ff5110c 100644 --- a/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_0c4772(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_0c4772(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_0c4772(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_0c4772(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.hlsl index beb2252a84..8c733a250c 100644 --- a/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_0cce40(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.msl index 7fb64de818..58d7d3e835 100644 --- a/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_0cce40(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_0cce40(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_0cce40(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_0cce40(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.hlsl index b992d4a02b..301fb17eea 100644 --- a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_0cf2ff(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.msl index 699cdc3f5a..676d1ed45a 100644 --- a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_0cf2ff(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_0cf2ff(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_0cf2ff(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_0cf2ff(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.hlsl index dc8a03d04c..787e81ad3f 100644 --- a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_0d8b7e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.msl index 9c78642232..365e34ef86 100644 --- a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_0d8b7e(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_0d8b7e(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_0d8b7e(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_0d8b7e(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.hlsl index 2c67f2a1bf..ab26ea3779 100644 --- a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_0e32ee(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.msl index 72b3ab6819..ab2c649bd5 100644 --- a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_0e32ee(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_0e32ee(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_0e32ee(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_0e32ee(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.hlsl index 95257b8c20..6a15db4f21 100644 --- a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_0f3c50(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.msl index 88a1190c7d..20a7f399a5 100644 --- a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_0f3c50(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_0f3c50(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_0f3c50(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_0f3c50(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.hlsl index 9fe6d63476..3257271dfc 100644 --- a/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_1147d6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.msl index 649e4f44c3..bb3dcd0147 100644 --- a/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_1147d6(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_1147d6(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_1147d6(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_1147d6(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.hlsl index facdaf8295..0700fb09b1 100644 --- a/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_1191a5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.msl index fbcd00abaa..f6268f210c 100644 --- a/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_1191a5(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_1191a5(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_1191a5(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_1191a5(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.hlsl index c5b8ecca77..2076c844af 100644 --- a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_12c9bb(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.msl index b57d4e7c16..b3f3f59a32 100644 --- a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_12c9bb(depth2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_12c9bb(depth2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(depth2d tint_symbol_2) { + textureDimensions_12c9bb(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depth2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_12c9bb(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depth2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.hlsl index f474a6874a..bbda25c536 100644 --- a/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_147998(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.msl index 24a7d9ba88..c350f80137 100644 --- a/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_147998(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_147998(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_147998(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_147998(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.hlsl index 262a1f4790..8478f6a1be 100644 --- a/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_16036c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.msl index 7d8a4259ff..ed7ed8d1bd 100644 --- a/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_16036c(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_16036c(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_16036c(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_16036c(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.hlsl index c7695ccd45..9575a8ac6b 100644 --- a/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_168fcc(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.msl index 52b4c262ce..cc414b3665 100644 --- a/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_168fcc(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_168fcc(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_168fcc(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_168fcc(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.hlsl index 4aad0e39d3..8eba869341 100644 --- a/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_18bd57(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.msl index 7db854a024..a2bf62b4c3 100644 --- a/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_18bd57(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_18bd57(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_18bd57(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_18bd57(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.hlsl index b1283679b0..9ffde0f43e 100644 --- a/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_19bffc(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.msl index b24ac12aa0..3899fc1ce0 100644 --- a/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_19bffc(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_19bffc(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_19bffc(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_19bffc(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.hlsl index c3d3c07ed2..c76087ace9 100644 --- a/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_1a58e7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.msl index 9592acfed0..88d6843b35 100644 --- a/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_1a58e7(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_1a58e7(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_1a58e7(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_1a58e7(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.hlsl index 2d7bddf37f..ae83ade991 100644 --- a/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_1aa199(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.msl index 85b5ae6b31..db7f7961e9 100644 --- a/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_1aa199(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_1aa199(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_1aa199(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_1aa199(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.hlsl index 81010d577e..3807015dfb 100644 --- a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_1b71f0(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.msl index 673514dc8a..3a0980decd 100644 --- a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_1b71f0(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_1b71f0(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_1b71f0(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_1b71f0(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.hlsl index 5b30fd0b90..f6a80bf7ad 100644 --- a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_1d6c26(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.msl index f0a48afd01..6336706b32 100644 --- a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_1d6c26(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_1d6c26(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_1d6c26(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_1d6c26(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.hlsl index 55e5f43aca..bbc773967e 100644 --- a/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_1e189c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.msl index 6c0bd84a0f..a79d9af646 100644 --- a/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_1e189c(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_1e189c(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_1e189c(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_1e189c(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.hlsl index 5c5a6f82d4..4fc4886e7a 100644 --- a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_1e9e39(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.msl index 137e221ebf..f7ea514120 100644 --- a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_1e9e39(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_1e9e39(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_1e9e39(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_1e9e39(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.hlsl index 6ce76cc6ef..482f78b636 100644 --- a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_1f20c5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.msl index 1bf676677e..c3196ad60f 100644 --- a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_1f20c5(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_1f20c5(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_1f20c5(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_1f20c5(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.hlsl index b4a5c477f9..f8b508533e 100644 --- a/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_214b7b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.msl index 17de1cb06f..1bdb2b49be 100644 --- a/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_214b7b(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_214b7b(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_214b7b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_214b7b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.hlsl index 33fdaffcf0..3266f6fa3a 100644 --- a/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_214dd4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.msl index 1775391502..36ddac323b 100644 --- a/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_214dd4(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_214dd4(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_214dd4(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_214dd4(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.hlsl index 6905b160ec..3d9c9f5948 100644 --- a/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_221f22(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.msl index ca08eadc07..4007f21d32 100644 --- a/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_221f22(texturecube_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_221f22(texturecube_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(texturecube_array tint_symbol_2) { + textureDimensions_221f22(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_221f22(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.hlsl index c405f3398f..e17bbeb753 100644 --- a/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_267788(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.msl index e51eced4f4..0f21f84189 100644 --- a/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_267788(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_267788(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_267788(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_267788(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.hlsl index 2789974486..f7b5e00803 100644 --- a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_26bdfa(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.msl index 9f8544b1fa..d65df2399f 100644 --- a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_26bdfa(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0), tint_symbol_2.get_depth(0)); +void textureDimensions_26bdfa(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0), tint_symbol_1.get_depth(0)); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_26bdfa(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_26bdfa(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.hlsl index 6b67d88fa6..4044c0efc0 100644 --- a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_26ef6c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.msl index 4d31ec0db5..692a2be410 100644 --- a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_26ef6c(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_26ef6c(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_26ef6c(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_26ef6c(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.hlsl index 27d99d4b8e..fed6aa30df 100644 --- a/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_2ad087(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.msl index dcae9dfdad..48b104f77d 100644 --- a/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_2ad087(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_2ad087(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_2ad087(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_2ad087(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.hlsl index a4f6198a4a..8ea6d4f751 100644 --- a/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_2d32ae(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.msl index 8690ddc8eb..c0a162b282 100644 --- a/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_2d32ae(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_2d32ae(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_2d32ae(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_2d32ae(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.hlsl index 02bbad5b71..6c1466a01f 100644 --- a/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_2e0662(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.msl index cad0288e3c..4bb2eda756 100644 --- a/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_2e0662(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_2e0662(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_2e0662(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_2e0662(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.hlsl index 60d38be5c6..5ea5c3e367 100644 --- a/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_2efa05(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.msl index e2c96aa5a9..370a66e853 100644 --- a/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_2efa05(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0), tint_symbol_2.get_depth(0)); +void textureDimensions_2efa05(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0), tint_symbol_1.get_depth(0)); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_2efa05(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_2efa05(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.hlsl index 4e736ec276..4adc44e099 100644 --- a/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_2f289f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.msl index 619e2cc4a8..b1daa7edfa 100644 --- a/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_2f289f(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_2f289f(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_2f289f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_2f289f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.hlsl index 7a2011d890..83bb4588a8 100644 --- a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_2fe1cc(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.msl index 1c439037dc..72a77bc4c4 100644 --- a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_2fe1cc(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_2fe1cc(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_2fe1cc(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_2fe1cc(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.hlsl index b9fc8854aa..75080a7adc 100644 --- a/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_318ecc(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.msl index d3fac46090..c373afd237 100644 --- a/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_318ecc(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_318ecc(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_318ecc(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_318ecc(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.hlsl index 6643e907d0..93b038d447 100644 --- a/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_340d06(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.msl index 330cf6a50e..605424a339 100644 --- a/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_340d06(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_340d06(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_340d06(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_340d06(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.hlsl index 44e97e59e0..fe14ce7623 100644 --- a/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_398e30(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.msl index 2dd70beb06..65ea6c2e6b 100644 --- a/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_398e30(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_398e30(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_398e30(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_398e30(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.hlsl index 2f4c809847..43050a021a 100644 --- a/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_39a600(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.msl index 75d2a3ac78..a9d077c375 100644 --- a/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_39a600(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_39a600(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_39a600(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_39a600(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.hlsl index 43c1adcd76..f3fb0f0360 100644 --- a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_3a94ea(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.msl index 3936b9e41f..964cf0660e 100644 --- a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_3a94ea(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_3a94ea(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_3a94ea(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_3a94ea(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.hlsl index 0c27bc4959..210915d16f 100644 --- a/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_3aca08(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.msl index 8d1dc1fe21..d8bf7b44c8 100644 --- a/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_3aca08(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_3aca08(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_3aca08(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_3aca08(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.hlsl index 9cce3f43cc..2523598c6c 100644 --- a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_3c5ad8(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.msl index 48d369aab1..55bc9551bd 100644 --- a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_3c5ad8(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_3c5ad8(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_3c5ad8(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_3c5ad8(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.hlsl index 6b0146ca5a..a398c9ab67 100644 --- a/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_3d5817(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.msl index 5b42cbdd5c..c959d2e210 100644 --- a/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_3d5817(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_3d5817(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_3d5817(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_3d5817(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.hlsl index 629907a0a1..9155192f1b 100644 --- a/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_40bc10(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.msl index 6868c2ea4d..df410a48e8 100644 --- a/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_40bc10(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_40bc10(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_40bc10(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_40bc10(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.hlsl index bb071aa1b6..f83e35d933 100644 --- a/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_4152a6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.msl index cc33fd3bf9..21c7da3243 100644 --- a/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_4152a6(texturecube_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_4152a6(texturecube_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texturecube_array tint_symbol_2) { + textureDimensions_4152a6(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_4152a6(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.hlsl index a806234192..48d6c9ac66 100644 --- a/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_423f99(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.msl index 0ff7dea290..168004b06b 100644 --- a/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_423f99(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_423f99(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_423f99(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_423f99(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.hlsl index 3946e1a844..3e1886f43d 100644 --- a/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_4267ee(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.msl index 22b7a7702d..a172cf5fcf 100644 --- a/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_4267ee(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_4267ee(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_4267ee(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_4267ee(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.hlsl index 973565bed0..23b4adcbf7 100644 --- a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_42d4e6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.msl index b398ce3b5d..e377d8d69a 100644 --- a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_42d4e6(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_42d4e6(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_42d4e6(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_42d4e6(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.hlsl index 3c39a187fe..9f48f454ad 100644 --- a/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_441392(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.msl index 6c90ca2cba..61be803bfd 100644 --- a/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_441392(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_441392(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_441392(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_441392(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.hlsl index 04effaf678..c6168e4a1a 100644 --- a/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_48cb89(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.msl index d119c1e0b2..dc35032b9d 100644 --- a/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_48cb89(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_48cb89(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_48cb89(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_48cb89(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.hlsl index ae064b8960..75271e8986 100644 --- a/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_48cbb2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.msl index de78f98791..2fda9266cd 100644 --- a/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_48cbb2(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_48cbb2(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_48cbb2(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_48cbb2(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.hlsl index ebacb24c40..38cb78eb40 100644 --- a/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_48f360(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.msl index 754c094cbc..0ac8dfff91 100644 --- a/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_48f360(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_48f360(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_48f360(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_48f360(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.hlsl index 52f3fb5540..a87072ee97 100644 --- a/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_49d274(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.msl index 0df06b26f0..096c898082 100644 --- a/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_49d274(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_49d274(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_49d274(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_49d274(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.hlsl index 288e0caec8..cbc70876da 100644 --- a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_4df9a8(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.msl index ae35a49382..00beb11a7e 100644 --- a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_4df9a8(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_4df9a8(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_4df9a8(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_4df9a8(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.hlsl index 20ac9bb75c..73140c6b34 100644 --- a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_50a9ee(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.msl index 7752e9787e..6d921d1ca5 100644 --- a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_50a9ee(texturecube_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_50a9ee(texturecube_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(texturecube_array tint_symbol_2) { + textureDimensions_50a9ee(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_50a9ee(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.hlsl index 044faad8da..00174241ec 100644 --- a/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_52045c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.msl index 22f09ad556..0d3cb416a3 100644 --- a/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_52045c(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width(0)); +void textureDimensions_52045c(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width(0)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_52045c(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_52045c(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.hlsl index cdf6e231fc..43d1ca2762 100644 --- a/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_55b23e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.msl index ca7a221ae0..c3532a3565 100644 --- a/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_55b23e(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_55b23e(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_55b23e(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_55b23e(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.hlsl index f13cc2c0f1..8af7f0b78f 100644 --- a/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_56ccfa(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.msl index ccecc8b5ed..54de7f6637 100644 --- a/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_56ccfa(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_56ccfa(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_56ccfa(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_56ccfa(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.hlsl index 0bff944b07..111f8dc6ac 100644 --- a/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_579629(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.msl index 0aac0b68bd..2cfb158896 100644 --- a/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_579629(texture2d_ms tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_579629(texture2d_ms tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_ms tint_symbol_2) { + textureDimensions_579629(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_ms tint_symbol_3 [[texture(0)]]) { - textureDimensions_579629(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_ms tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.hlsl index cf0919e8e5..fca05c462d 100644 --- a/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_57da0b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.msl index c5ece87f49..010a701c73 100644 --- a/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_57da0b(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_57da0b(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_57da0b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_57da0b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.hlsl index 0e3f59c7dc..8c0a56f7d5 100644 --- a/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_57e28f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.msl index 15dec6dc2d..b8f10eadc7 100644 --- a/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_57e28f(depthcube tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_57e28f(depthcube tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(depthcube tint_symbol_2) { + textureDimensions_57e28f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depthcube tint_symbol_3 [[texture(0)]]) { - textureDimensions_57e28f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depthcube tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.hlsl index a28cfb9055..c57772589e 100644 --- a/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_57e7b3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.msl index 44c924c10b..77a73bae63 100644 --- a/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_57e7b3(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_57e7b3(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_57e7b3(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_57e7b3(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.hlsl index de43df15b8..878a448910 100644 --- a/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_58a515(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.msl index 4e189b6d79..a1985a9130 100644 --- a/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_58a515(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_58a515(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_58a515(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_58a515(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.hlsl index c04ecb4778..bedc7637df 100644 --- a/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_5985f3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.msl index d1e91f8903..d02b064fc2 100644 --- a/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_5985f3(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_5985f3(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_5985f3(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_5985f3(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.hlsl index 1818f10ac9..229e558943 100644 --- a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_5caa5e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.msl index 0ca4064271..1d7db804d8 100644 --- a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_5caa5e(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_5caa5e(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_5caa5e(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_5caa5e(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.hlsl index 6130200e5c..417d81794e 100644 --- a/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_5e295d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.msl index 2dabc247ec..d87109678c 100644 --- a/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_5e295d(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_5e295d(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_5e295d(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_5e295d(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.hlsl index c6cccc96f7..32730fd87e 100644 --- a/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_60bf54(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.msl index ff91e5c3df..3adf17cd22 100644 --- a/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_60bf54(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_60bf54(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_60bf54(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_60bf54(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.hlsl index 16e4e0b688..68da62d6af 100644 --- a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_63f3cf(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.msl index 953f336b52..7beb7d2eb8 100644 --- a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_63f3cf(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_63f3cf(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_63f3cf(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_63f3cf(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.hlsl index f5a65dda62..9640966f55 100644 --- a/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_66dc4e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.msl index 413dadf648..c63df45902 100644 --- a/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_66dc4e(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_66dc4e(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_66dc4e(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_66dc4e(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.hlsl index 72494c9181..ae9acd9d68 100644 --- a/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_670d90(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.msl index 2efae3c751..ced98dca22 100644 --- a/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_670d90(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_670d90(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_670d90(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_670d90(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.hlsl index 4e4d61ebe6..362af75be5 100644 --- a/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_68105c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.msl index fe75ae9995..5790d25e06 100644 --- a/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_68105c(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_68105c(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_68105c(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_68105c(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.hlsl index 751dbd9e36..f96c776077 100644 --- a/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_686ef2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.msl index d6e55a9458..21d82609a1 100644 --- a/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_686ef2(texturecube tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_686ef2(texturecube tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(texturecube tint_symbol_2) { + textureDimensions_686ef2(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube tint_symbol_3 [[texture(0)]]) { - textureDimensions_686ef2(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.hlsl index 4319d8299c..b000f3eed7 100644 --- a/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_6adac6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.msl index 0f1b763cde..03a4f5beec 100644 --- a/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_6adac6(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_6adac6(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_6adac6(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_6adac6(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.hlsl index ab27c7bac5..a147dd21af 100644 --- a/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_6c08ab(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.msl index 1ae9906518..0a73d8b405 100644 --- a/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_6c08ab(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_6c08ab(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_6c08ab(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_6c08ab(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.hlsl index 16756e5660..3a3b22724d 100644 --- a/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_6e2d12(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.msl index 5e8a1ed0a0..75f81e5cff 100644 --- a/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_6e2d12(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_6e2d12(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_6e2d12(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_6e2d12(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.hlsl index b72ef5b737..148ca9a471 100644 --- a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_6ec1b4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.msl index ef90a6d354..d1f686ea70 100644 --- a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_6ec1b4(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_6ec1b4(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_6ec1b4(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_6ec1b4(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.hlsl index 4ae56234aa..eef51f44ea 100644 --- a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_6f0d79(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.msl index 0919062e0d..d7847890f5 100644 --- a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_6f0d79(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_6f0d79(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_6f0d79(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_6f0d79(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.hlsl index fa6c8d41a2..8ce443ae8f 100644 --- a/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_702c53(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.msl index 01f28c58dc..9a0bb540c8 100644 --- a/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_702c53(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_702c53(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_702c53(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_702c53(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.hlsl index 5d7361521e..d75545d53a 100644 --- a/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_70e26a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.msl index 640f076d7c..25b04cda19 100644 --- a/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_70e26a(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_70e26a(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_70e26a(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_70e26a(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.hlsl index 1768d0d071..7a0e27a785 100644 --- a/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_71e8f7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.msl index 55e3b38efc..7f0020ea09 100644 --- a/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_71e8f7(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_71e8f7(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_71e8f7(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_71e8f7(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.hlsl index 66a07ad320..62bf752864 100644 --- a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_72e5d6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.msl index 0dac5b21dc..cab3ad711c 100644 --- a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_72e5d6(depth2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_72e5d6(depth2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(depth2d_array tint_symbol_2) { + textureDimensions_72e5d6(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depth2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_72e5d6(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depth2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.hlsl index 3df768f8ac..a1a791a559 100644 --- a/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_770103(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.msl index 1586977322..6403d1e93c 100644 --- a/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_770103(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_770103(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_770103(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_770103(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.hlsl index f5c0aa51bd..604dffae73 100644 --- a/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_79df87(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.msl index fbb7d73372..d021683631 100644 --- a/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_79df87(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width(0)); +void textureDimensions_79df87(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width(0)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_79df87(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_79df87(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.hlsl index ee84547087..729140ba82 100644 --- a/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_7bf826(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.msl index 9d42595ca7..fdd620141e 100644 --- a/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_7bf826(depth2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_7bf826(depth2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(depth2d_array tint_symbol_2) { + textureDimensions_7bf826(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depth2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_7bf826(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depth2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.hlsl index 0318e50cfe..7b7c994bb4 100644 --- a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_7f5c2e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.msl index ebcf1dc833..ec78cea11f 100644 --- a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_7f5c2e(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_7f5c2e(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_7f5c2e(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_7f5c2e(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.hlsl index 0701af92b9..0db3091914 100644 --- a/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_8028f3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.msl index 8ddef21ea4..ee91a57e33 100644 --- a/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_8028f3(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_8028f3(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_8028f3(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_8028f3(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.hlsl index c1ccc4f76d..25f021715d 100644 --- a/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_811679(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.msl index 432b5a9d96..3f92b25988 100644 --- a/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_811679(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_811679(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_811679(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_811679(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.hlsl index 6175f41023..2c7c64635a 100644 --- a/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_820596(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.msl index d93f23dbfd..bcea7427f8 100644 --- a/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_820596(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_820596(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_820596(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_820596(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.hlsl index 0dbe9128a3..1f2d1e5f14 100644 --- a/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_82138e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.msl index 6f661c8f10..139a274deb 100644 --- a/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_82138e(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_82138e(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_82138e(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_82138e(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.hlsl index c5d090139b..84d60acff2 100644 --- a/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_8347ab(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.msl index 580ac20f43..c4cb7a8dfb 100644 --- a/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_8347ab(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_8347ab(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_8347ab(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_8347ab(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.hlsl index b1d9086450..c705d5c894 100644 --- a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_83ee5a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.msl index 22390e1181..ae657f3afb 100644 --- a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_83ee5a(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_83ee5a(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_83ee5a(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_83ee5a(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.hlsl index f85cb734a0..2b030c6890 100644 --- a/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_85d556(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.msl index 14a71d5369..6db70942a6 100644 --- a/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_85d556(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_85d556(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_85d556(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_85d556(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.hlsl index 86b3b898fb..70a83d1710 100644 --- a/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_8799ee(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.msl index e1a8e80d5e..1c265e25f0 100644 --- a/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_8799ee(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_8799ee(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_8799ee(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_8799ee(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.hlsl index f8369876e3..9d37232ea1 100644 --- a/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_88ad17(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.msl index 4c22410477..3a51779221 100644 --- a/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_88ad17(texturecube tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_88ad17(texturecube tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(texturecube tint_symbol_2) { + textureDimensions_88ad17(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube tint_symbol_3 [[texture(0)]]) { - textureDimensions_88ad17(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.hlsl index 64aa384251..e6bb59d81f 100644 --- a/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_89a864(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.msl index 484cd8e7b8..fd69f0f58c 100644 --- a/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_89a864(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_89a864(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_89a864(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_89a864(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.hlsl index 06cb0504d5..da113508c5 100644 --- a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_8aa4c4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.msl index 53d6576ce0..1fc97aadc2 100644 --- a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_8aa4c4(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_8aa4c4(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_8aa4c4(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_8aa4c4(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.hlsl index beaf14bc68..8cdfa61acd 100644 --- a/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_8b4fff(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.msl index b92c382c8f..d5e68d59fa 100644 --- a/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_8b4fff(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_8b4fff(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_8b4fff(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_8b4fff(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.hlsl index 087075dbef..fed7b1dea0 100644 --- a/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_8d89f8(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.msl index ac9eae7524..4895ab3520 100644 --- a/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_8d89f8(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_8d89f8(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_8d89f8(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_8d89f8(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.hlsl index b93b2fff69..4655fdc4ed 100644 --- a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_8deb5e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.msl index cd45aa5fc1..863eb1386e 100644 --- a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_8deb5e(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_8deb5e(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_8deb5e(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_8deb5e(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.hlsl index 6c6fa65a5c..ae67075223 100644 --- a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_8f20bf(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.msl index 5246f3fdd9..edc42afe03 100644 --- a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_8f20bf(texturecube_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_8f20bf(texturecube_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texturecube_array tint_symbol_2) { + textureDimensions_8f20bf(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_8f20bf(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.hlsl index 2b26ad0f56..61af3df2c7 100644 --- a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_8fca0f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.msl index 26ef2cfe70..8ba811dbaa 100644 --- a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_8fca0f(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_8fca0f(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_8fca0f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_8fca0f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.hlsl index e6c4a4ecaf..29df48b0d4 100644 --- a/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_90340b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.msl index 27ab85e7c5..958aad9524 100644 --- a/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_90340b(depthcube_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_90340b(depthcube_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(depthcube_array tint_symbol_2) { + textureDimensions_90340b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depthcube_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_90340b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depthcube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.hlsl index 42922ef6a8..50741eaa47 100644 --- a/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_9042ab(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.msl index 7b0908d296..4674efe987 100644 --- a/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_9042ab(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_9042ab(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_9042ab(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_9042ab(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.hlsl index b7678f608e..8e2e6a471d 100644 --- a/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_924742(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.msl index 01cfc36c83..2d3075da0f 100644 --- a/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_924742(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_924742(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_924742(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_924742(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.hlsl index 6c4dc928f7..d0d1d50b34 100644 --- a/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_92ad20(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.msl index 4a6f7becbe..b9dda62f9a 100644 --- a/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_92ad20(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_92ad20(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_92ad20(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_92ad20(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.hlsl index 15f57cfd3a..1a2117b536 100644 --- a/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_9393b0(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.msl index 8da4697970..c6a5a898b1 100644 --- a/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_9393b0(depthcube tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_9393b0(depthcube tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(depthcube tint_symbol_2) { + textureDimensions_9393b0(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depthcube tint_symbol_3 [[texture(0)]]) { - textureDimensions_9393b0(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depthcube tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.hlsl index 51a58d5eb2..aeee2724b4 100644 --- a/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_939fdb(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.msl index 05b52790be..75a8192120 100644 --- a/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_939fdb(depth2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_939fdb(depth2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(depth2d tint_symbol_2) { + textureDimensions_939fdb(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depth2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_939fdb(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depth2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.hlsl index 5cffe3f8c7..517c9ba345 100644 --- a/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_9572e5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.msl index 4fcfc032f9..daf5cc1c37 100644 --- a/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_9572e5(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_9572e5(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_9572e5(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_9572e5(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.hlsl index a227731739..520382039b 100644 --- a/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_962dcd(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.msl index a329b9cd39..8ff752cc2b 100644 --- a/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_962dcd(texturecube tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_962dcd(texturecube tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texturecube tint_symbol_2) { + textureDimensions_962dcd(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube tint_symbol_3 [[texture(0)]]) { - textureDimensions_962dcd(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.hlsl index db80a85171..d0ef4957c1 100644 --- a/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_998f6b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.msl index 02f4e38005..a3191ae84d 100644 --- a/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_998f6b(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_998f6b(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_998f6b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_998f6b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.hlsl index 59d549b2d4..eadba40c3d 100644 --- a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_9abfe5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.msl index 11d7780122..1d9e4afad8 100644 --- a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_9abfe5(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_9abfe5(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_9abfe5(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_9abfe5(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.hlsl index d4045dacb8..91fe9a1ee7 100644 --- a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_9c9c57(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.msl index c82553cfbd..6b6c20bcce 100644 --- a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_9c9c57(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_9c9c57(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_9c9c57(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_9c9c57(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.hlsl index 516614a940..2c467927af 100644 --- a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_9da9e2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.msl index f89d05070b..f94dbe07e0 100644 --- a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_9da9e2(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_9da9e2(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_9da9e2(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_9da9e2(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.hlsl index 20c1bd7f47..7416438e30 100644 --- a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_9eb8d8(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.msl index 9f4cb270a5..ef8e102ee7 100644 --- a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_9eb8d8(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_9eb8d8(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_9eb8d8(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_9eb8d8(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.hlsl index 376e017130..eef30d0bcc 100644 --- a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_9f8e46(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.msl index 16f228f01d..a823aa4ce2 100644 --- a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_9f8e46(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_9f8e46(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_9f8e46(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_9f8e46(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.hlsl index 6d07accb54..b4253db6c4 100644 --- a/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_a01845(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.msl index 8b354aeb65..6fe18da979 100644 --- a/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_a01845(depthcube_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_a01845(depthcube_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(depthcube_array tint_symbol_2) { + textureDimensions_a01845(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depthcube_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_a01845(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depthcube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.hlsl index 2823ef6369..ddef3c0724 100644 --- a/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_a0aad1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.msl index 19d1ccab67..c3151b2cad 100644 --- a/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_a0aad1(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_a0aad1(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_a0aad1(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_a0aad1(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.hlsl index 17f92cc605..e1f4e62d91 100644 --- a/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_a0e4ec(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.msl index b8473fe7f3..8cd2e7cfb2 100644 --- a/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_a0e4ec(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_a0e4ec(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_a0e4ec(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_a0e4ec(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.hlsl index d07cc4d4c3..fa1f8f0033 100644 --- a/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_a7d565(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.msl index 99881f0fdf..d317de8450 100644 --- a/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_a7d565(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_a7d565(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_a7d565(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_a7d565(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.hlsl index 1966fdfc93..5827d94180 100644 --- a/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_a863f2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.msl index 3cc15027fc..989df4d725 100644 --- a/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_a863f2(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_a863f2(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_a863f2(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_a863f2(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.hlsl index 4ce2382c3e..cfe96f1bc1 100644 --- a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_a9c9c1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.msl index 9bc22b2592..5d5c01c00f 100644 --- a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_a9c9c1(texturecube tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_a9c9c1(texturecube tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(texturecube tint_symbol_2) { + textureDimensions_a9c9c1(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube tint_symbol_3 [[texture(0)]]) { - textureDimensions_a9c9c1(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.hlsl index 134eea530d..a5f1b3b817 100644 --- a/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_ae457f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.msl index fcdd22c3a3..1d6600bd7b 100644 --- a/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_ae457f(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_ae457f(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_ae457f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_ae457f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.hlsl index 04aeb4d0fb..70279dbdc4 100644 --- a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_b0e16d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.msl index 45768ed5cc..01795172c0 100644 --- a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_b0e16d(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_b0e16d(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_b0e16d(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_b0e16d(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.hlsl index ef817552f0..db28c37d81 100644 --- a/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_b3c954(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.msl index 8fb7df1468..38d91604d6 100644 --- a/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_b3c954(texturecube tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_b3c954(texturecube tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texturecube tint_symbol_2) { + textureDimensions_b3c954(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube tint_symbol_3 [[texture(0)]]) { - textureDimensions_b3c954(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.hlsl index 43682c8082..0407213603 100644 --- a/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_b3e407(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.msl index f14e2cb1f7..124c951246 100644 --- a/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_b3e407(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width(0)); +void textureDimensions_b3e407(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width(0)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_b3e407(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_b3e407(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.hlsl index df91bd89aa..228c0455e5 100644 --- a/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_b91240(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.msl index d5e95cfb18..f45b6a6350 100644 --- a/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_b91240(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_b91240(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_b91240(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_b91240(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.hlsl index 6f1312dce6..ef89299177 100644 --- a/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_ba1481(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.msl index d17c84e278..a4061f5898 100644 --- a/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_ba1481(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_ba1481(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_ba1481(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_ba1481(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.hlsl index 8ddceca178..753e15a5d9 100644 --- a/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_ba6e15(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.msl index e4a32a9e02..443894fcf3 100644 --- a/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_ba6e15(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_ba6e15(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_ba6e15(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_ba6e15(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.hlsl index 32e4fa04e3..51eb32f25a 100644 --- a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_bb3dde(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.msl index df43e6a900..6b79d76f0e 100644 --- a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_bb3dde(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_bb3dde(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_bb3dde(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_bb3dde(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.hlsl index 46aecf6585..d4ab15be5d 100644 --- a/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_c2215f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.msl index 0ccf456dfc..8f93f48035 100644 --- a/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_c2215f(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_c2215f(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_c2215f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_c2215f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.hlsl index 2c572f867d..4e7575480f 100644 --- a/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_c30e75(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.msl index 80ec0fdb47..7c7f94aee2 100644 --- a/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_c30e75(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_c30e75(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_c30e75(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_c30e75(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.hlsl index 1a27212bbe..63586a643b 100644 --- a/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_c60b66(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.msl index 8b823d095b..18ed4f3fb0 100644 --- a/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_c60b66(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_c60b66(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_c60b66(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_c60b66(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.hlsl index 7fe1132f2a..01fbf35021 100644 --- a/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_c74533(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.msl index 3a74224451..006d2001cf 100644 --- a/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_c74533(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_c74533(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_c74533(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_c74533(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.hlsl index 0dca855e34..cf6de5aa03 100644 --- a/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_c7943d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.msl index 0800954658..38ba8829aa 100644 --- a/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_c7943d(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_c7943d(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_c7943d(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_c7943d(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.hlsl index b1571d19b6..b29004e817 100644 --- a/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_caaabb(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.msl index 44e18efa72..fb9f63e1cb 100644 --- a/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_caaabb(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_caaabb(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_caaabb(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_caaabb(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.hlsl index 3dd6c4a219..da22ba1bab 100644 --- a/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_cc5478(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.msl index bd3ff234e6..8fed3812b9 100644 --- a/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_cc5478(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_cc5478(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_cc5478(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_cc5478(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.hlsl index 6f5cbe50f9..b123be2e3e 100644 --- a/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_cc968c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.msl index 437f99c791..849aa301c4 100644 --- a/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_cc968c(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_cc968c(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_cc968c(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_cc968c(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.hlsl index 3f7daadeea..d33b7c7b2f 100644 --- a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_cccc8f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.msl index f039b30c86..e4d021833d 100644 --- a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_cccc8f(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_cccc8f(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_cccc8f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_cccc8f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.hlsl index f0e67fa7c1..910792e30a 100644 --- a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_cd76a7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.msl index 20daf709b7..3cf1c7877c 100644 --- a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_cd76a7(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_cd76a7(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_cd76a7(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_cd76a7(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.hlsl index e07a03ce97..430b96817f 100644 --- a/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_cdaff9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.msl index b2f453dbf2..818ca1af74 100644 --- a/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_cdaff9(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_cdaff9(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_cdaff9(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_cdaff9(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.hlsl index 1118928ff8..5b02297338 100644 --- a/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_cdf473(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.msl index 5745017aa4..62699bb3ed 100644 --- a/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_cdf473(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_cdf473(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_cdf473(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_cdf473(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.hlsl index 35e10bb101..f46ffb6337 100644 --- a/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_cec841(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.msl index b3688fa0cd..e6644985ca 100644 --- a/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_cec841(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_cec841(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_cec841(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_cec841(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.hlsl index f5333dc48c..00a4e6c9a3 100644 --- a/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_cf1d42(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.msl index 20bd51d172..6b70bc0c76 100644 --- a/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_cf1d42(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_cf1d42(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_cf1d42(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_cf1d42(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.hlsl index 666d3c0b8c..0d72ab74bf 100644 --- a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_cf7e43(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.msl index a4d7f3439c..9850e71522 100644 --- a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_cf7e43(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_cf7e43(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_cf7e43(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_cf7e43(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.hlsl index 66a5b436c8..9ce515f73e 100644 --- a/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_d125bc(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.msl index 70d522a710..93527ecac4 100644 --- a/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_d125bc(texturecube tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_d125bc(texturecube tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texturecube tint_symbol_2) { + textureDimensions_d125bc(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube tint_symbol_3 [[texture(0)]]) { - textureDimensions_d125bc(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.hlsl index 66ac1b7829..82496df7b0 100644 --- a/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_d40b9e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.msl index eb9ac14eef..e2a0a81df1 100644 --- a/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_d40b9e(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_d40b9e(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_d40b9e(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_d40b9e(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.hlsl index d79aff597a..5d2fdc9a9e 100644 --- a/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_d4106f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.msl index d5dca92327..dfc81051b7 100644 --- a/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_d4106f(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_d4106f(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_d4106f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_d4106f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.hlsl index c79bd7a563..fe401bcdea 100644 --- a/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_d83c45(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.msl index 92c3471a53..1e419146f6 100644 --- a/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_d83c45(texturecube_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_d83c45(texturecube_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(texturecube_array tint_symbol_2) { + textureDimensions_d83c45(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_d83c45(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.hlsl index b30e569c33..7443f2f738 100644 --- a/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_d8f951(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.msl index 9de7a83e18..aebf66dabc 100644 --- a/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_d8f951(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_d8f951(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_d8f951(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_d8f951(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.hlsl index 016d1e2b38..5e9100225b 100644 --- a/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_da3099(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.msl index 10643e9923..5d79ee6730 100644 --- a/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_da3099(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_da3099(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_da3099(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_da3099(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.hlsl index d6ff20a9ad..a99beb7df6 100644 --- a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_daf7c0(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.msl index ff1d7f8882..4518537251 100644 --- a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_daf7c0(texture2d_ms tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_daf7c0(texture2d_ms tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_ms tint_symbol_2) { + textureDimensions_daf7c0(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_ms tint_symbol_3 [[texture(0)]]) { - textureDimensions_daf7c0(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_ms tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.hlsl index 355217c952..8bc76819eb 100644 --- a/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_dba47c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.msl index f3b4139398..ee47c9832c 100644 --- a/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_dba47c(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_dba47c(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_dba47c(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_dba47c(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.hlsl index 91f067a2e5..ab404314b2 100644 --- a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_dc2dd0(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.msl index 4c9cd2cd10..f8e141ab85 100644 --- a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_dc2dd0(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_dc2dd0(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_dc2dd0(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_dc2dd0(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.hlsl index be41536583..c8edf590ce 100644 --- a/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_e10157(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.msl index 87b491ab36..1c43655ec3 100644 --- a/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_e10157(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_e10157(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_e10157(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_e10157(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.hlsl index 5d1e082d16..9dea807a40 100644 --- a/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_e927be(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.msl index 03c8f7279b..738c21029f 100644 --- a/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_e927be(texturecube_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_e927be(texturecube_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texturecube_array tint_symbol_2) { + textureDimensions_e927be(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_e927be(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.hlsl index 24c42c2cdd..de06d738ef 100644 --- a/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_e93464(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.msl index 39312ace7a..29bd4d8e87 100644 --- a/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_e93464(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_width()); +void textureDimensions_e93464(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_width()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureDimensions_e93464(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureDimensions_e93464(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.hlsl index c34ecd5aa5..779750b759 100644 --- a/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_e9628c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.msl index 8b37edf690..f3c4ae69c5 100644 --- a/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_e9628c(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_e9628c(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_e9628c(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_e9628c(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.hlsl index 596da6d79c..14a43e0d20 100644 --- a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_e9e96c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.msl index a7d7c297d3..8adc475ab3 100644 --- a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_e9e96c(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_e9e96c(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_e9e96c(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_e9e96c(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.hlsl index dedba84263..a989d5e03e 100644 --- a/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_e9fe54(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.msl index c3db723b0e..3fed85eb0e 100644 --- a/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_e9fe54(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_e9fe54(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_e9fe54(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_e9fe54(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.hlsl index 6d7b1fadca..f725de73aa 100644 --- a/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_e9fe58(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.msl index d36a085cda..6ce7ae31c5 100644 --- a/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_e9fe58(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_e9fe58(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_e9fe58(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_e9fe58(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.hlsl index c02956cba2..754db5b90e 100644 --- a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_ef5b89(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.msl index 0b8bea33c8..a1573f0fd8 100644 --- a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_ef5b89(texture2d_ms tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_ef5b89(texture2d_ms tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_ms tint_symbol_2) { + textureDimensions_ef5b89(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_ms tint_symbol_3 [[texture(0)]]) { - textureDimensions_ef5b89(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_ms tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.hlsl index 68dee584aa..4b98a0ae10 100644 --- a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_efc8a4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.msl index b137191104..26c0bc554c 100644 --- a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_efc8a4(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0), tint_symbol_2.get_depth(0)); +void textureDimensions_efc8a4(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0), tint_symbol_1.get_depth(0)); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_efc8a4(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_efc8a4(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.hlsl index 5063af5f4c..5fe058b299 100644 --- a/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_f1b72b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.msl index 03d14107db..2ad9f9738e 100644 --- a/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_f1b72b(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_f1b72b(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_f1b72b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_f1b72b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.hlsl index b1c72730cc..4af1093668 100644 --- a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_f60bdb(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.msl index 5cf3b7a173..2a4fdce24f 100644 --- a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_f60bdb(depth2d_ms tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_f60bdb(depth2d_ms tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(depth2d_ms tint_symbol_2) { + textureDimensions_f60bdb(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depth2d_ms tint_symbol_3 [[texture(0)]]) { - textureDimensions_f60bdb(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depth2d_ms tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.hlsl index 02cd89fdd7..6b1164024b 100644 --- a/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_f7145b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.msl index f1cff27d2d..71be199dd7 100644 --- a/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_f7145b(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0)); +void textureDimensions_f7145b(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0)); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_f7145b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_f7145b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.hlsl index de9eff7d63..e29bca5e87 100644 --- a/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_f7aa9e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.msl index 52112bc0d9..787e04dd12 100644 --- a/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_f7aa9e(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_f7aa9e(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_f7aa9e(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_f7aa9e(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.hlsl index 302332710e..33b543887f 100644 --- a/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_f7e436(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.msl index bb7d49e27b..74a83238d6 100644 --- a/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_f7e436(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_f7e436(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_f7e436(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_f7e436(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.hlsl index 3bcdf4c1d9..6237cac672 100644 --- a/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_f931c7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.msl index 495657b77f..0523c760ac 100644 --- a/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_f931c7(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_f931c7(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_f931c7(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_f931c7(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.hlsl index 43199e2271..aa72d3401b 100644 --- a/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_fa90e1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.msl index 4275f66a29..91ab262bc0 100644 --- a/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_fa90e1(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_fa90e1(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_fa90e1(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_fa90e1(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.hlsl index f78ea0d465..20ec180b0d 100644 --- a/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_fa9859(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.msl index 38e0620490..89b8eff818 100644 --- a/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_fa9859(texture2d tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_fa9859(texture2d tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureDimensions_fa9859(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureDimensions_fa9859(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.hlsl index bcd3defb11..858a187f53 100644 --- a/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_fb5670(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.msl index ac2553fac1..0640b97c75 100644 --- a/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_fb5670(texture2d_array tint_symbol_2) { - int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height()); +void textureDimensions_fb5670(texture2d_array tint_symbol_1) { + int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureDimensions_fb5670(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureDimensions_fb5670(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.hlsl index 809ff2a5fa..8613777bfc 100644 --- a/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_fbbe4d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.msl index 3353e4ca92..aab3224bf0 100644 --- a/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_fbbe4d(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_fbbe4d(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_fbbe4d(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_fbbe4d(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.hlsl index a10f0018fc..e1bacc9188 100644 --- a/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureDimensions_fcac78(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.msl index 36e420b4ec..3b3c4639c9 100644 --- a/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.msl +++ b/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureDimensions_fcac78(texture3d tint_symbol_2) { - int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth()); +void textureDimensions_fcac78(texture3d tint_symbol_1) { + int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureDimensions_fcac78(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureDimensions_fcac78(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.hlsl index 670770f26a..4a48d6dee2 100644 --- a/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_050c33(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.msl index d665e710b4..1708a46ef4 100644 --- a/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_050c33(texture2d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_050c33(texture2d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_050c33(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_050c33(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.hlsl index ccf2ee60f9..b68a7f57b4 100644 --- a/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_072e26(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.msl index d150b51227..b3ad18fcde 100644 --- a/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_072e26(texture2d_array tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_072e26(texture2d_array tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_072e26(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_072e26(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.hlsl index 7104fda47c..8e30c790fa 100644 --- a/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_078bc4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.msl index c6fa255b74..634a459dfb 100644 --- a/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_078bc4(texture2d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_078bc4(texture2d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_078bc4(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_078bc4(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.hlsl index 7f23d9b5c1..4bf4489362 100644 --- a/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_127e12(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.msl index b3ab0f6f8f..f0514c1353 100644 --- a/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_127e12(texture2d_array tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_127e12(texture2d_array tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_127e12(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_127e12(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.hlsl index 42da3f359f..9cbe429b29 100644 --- a/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_1561a7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.msl index ab1ae8086d..84e22457e5 100644 --- a/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_1561a7(texture1d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint(1)); +void textureLoad_1561a7(texture1d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_1561a7(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_1561a7(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.hlsl index 554c2db7da..745c99c5b1 100644 --- a/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_19cf87(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.msl index ba5d335115..e06a86260c 100644 --- a/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_19cf87(depth2d tint_symbol_2) { - float res = tint_symbol_2.read(uint2(int2()), 0); +void textureLoad_19cf87(depth2d tint_symbol_1) { + float res = tint_symbol_1.read(uint2(int2()), 0); +} + +float4 vertex_main_inner(depth2d tint_symbol_2) { + textureLoad_19cf87(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depth2d tint_symbol_3 [[texture(0)]]) { - textureLoad_19cf87(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depth2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.hlsl index d080ae2791..fc10480877 100644 --- a/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_1a062f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.msl index e01eca3fab..20bcf883d2 100644 --- a/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_1a062f(texture2d_array tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_1a062f(texture2d_array tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_1a062f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_1a062f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.hlsl index e8fc35b933..16a4b1cc58 100644 --- a/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_1a8452(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.msl index 57653a0f3f..49f79b67b7 100644 --- a/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_1a8452(texture1d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint(1)); +void textureLoad_1a8452(texture1d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_1a8452(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_1a8452(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.hlsl index c2ee2f7d0d..9e928acc7a 100644 --- a/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_1b8588(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.msl index 6a87c632a0..f5f44e83dc 100644 --- a/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_1b8588(texture1d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint(1), 0); +void textureLoad_1b8588(texture1d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint(1), 0); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_1b8588(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_1b8588(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.hlsl index 0830c117ed..d4daa46044 100644 --- a/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_1f2016(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.msl index 59c6ae9e2a..4186f510ca 100644 --- a/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_1f2016(texture3d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint3(int3()), 0); +void textureLoad_1f2016(texture3d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint3(int3()), 0); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_1f2016(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_1f2016(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.hlsl index 5abaeaf8cb..8943506de7 100644 --- a/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_20fa2f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.msl index e589139633..3b66ea4299 100644 --- a/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_20fa2f(texture2d_array tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_20fa2f(texture2d_array tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_20fa2f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_20fa2f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.hlsl index 25336dfc3c..cef1b28dc4 100644 --- a/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_276a2c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.msl index ec2a90c913..16bddfa9d8 100644 --- a/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_276a2c(texture1d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint(1)); +void textureLoad_276a2c(texture1d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_276a2c(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_276a2c(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.hlsl index f3a215ae4f..490111559b 100644 --- a/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_2887d7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.msl index a4079906ab..c012feb5d5 100644 --- a/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_2887d7(texture1d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint(1)); +void textureLoad_2887d7(texture1d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_2887d7(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_2887d7(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.hlsl index 9a44528c92..33a5d4da5a 100644 --- a/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_2ae485(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.msl index d120f6137a..183e7a9c56 100644 --- a/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_2ae485(texture2d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_2ae485(texture2d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_2ae485(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_2ae485(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.hlsl index 1566ea9c89..5205c0134d 100644 --- a/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_2d6cf7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.msl index 2e5cc150e7..e721286fb7 100644 --- a/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_2d6cf7(texture1d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint(1)); +void textureLoad_2d6cf7(texture1d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_2d6cf7(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_2d6cf7(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.hlsl index 84c44d5047..f374510704 100644 --- a/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_3c0d9e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.msl index 4c2e887633..62514f8059 100644 --- a/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_3c0d9e(texture2d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_3c0d9e(texture2d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_3c0d9e(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_3c0d9e(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.hlsl index 9329a11dfa..b4c57c56e7 100644 --- a/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_3c9587(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.msl index 95fb5dcaba..6ed1a44d63 100644 --- a/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_3c9587(texture2d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_3c9587(texture2d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_3c9587(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_3c9587(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.hlsl index ed6d580af3..b096fa0795 100644 --- a/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_3d001b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.msl index 08555027c9..dba9fa6e22 100644 --- a/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_3d001b(texture3d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_3d001b(texture3d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_3d001b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_3d001b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.hlsl index 279da99a82..0ab66c2071 100644 --- a/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_3d9c90(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.msl index e87e7cebb9..efb0420671 100644 --- a/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_3d9c90(texture3d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_3d9c90(texture3d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_3d9c90(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_3d9c90(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/484344.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/484344.wgsl.expected.hlsl index 1822b019e1..58e8d61403 100644 --- a/test/intrinsics/gen/textureLoad/484344.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/484344.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_484344(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/484344.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/484344.wgsl.expected.msl index fd34daa020..4fb7b021e6 100644 --- a/test/intrinsics/gen/textureLoad/484344.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/484344.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_484344(texture2d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2()), 0); +void textureLoad_484344(texture2d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2()), 0); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_484344(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_484344(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.hlsl index 0f08b5130e..02e3104efb 100644 --- a/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_4fd803(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.msl index 1d265dd110..a83494a41a 100644 --- a/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_4fd803(texture3d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint3(int3()), 0); +void textureLoad_4fd803(texture3d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint3(int3()), 0); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_4fd803(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_4fd803(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.hlsl index 7c268a6ea7..897582bd88 100644 --- a/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_505aa2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.msl index 76bee29218..c62f8e4907 100644 --- a/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_505aa2(texture3d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_505aa2(texture3d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_505aa2(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_505aa2(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.hlsl index c32c387021..01f1d4d3fe 100644 --- a/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_519ab5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.msl index 63bb7a7a73..549ef6e63e 100644 --- a/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_519ab5(texture1d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint(1)); +void textureLoad_519ab5(texture1d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_519ab5(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_519ab5(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.hlsl index 96ede184b9..c79ca0fe45 100644 --- a/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_53378a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.msl index d0de61a12e..05499809e2 100644 --- a/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_53378a(texture2d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_53378a(texture2d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_53378a(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_53378a(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/560573.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/560573.wgsl.expected.hlsl index e3cb0622c4..54b726d83b 100644 --- a/test/intrinsics/gen/textureLoad/560573.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/560573.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_560573(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/560573.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/560573.wgsl.expected.msl index 9360c34afa..fa40b9f176 100644 --- a/test/intrinsics/gen/textureLoad/560573.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/560573.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_560573(texture2d_array tint_symbol_2) { - int4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_560573(texture2d_array tint_symbol_1) { + int4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_560573(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_560573(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/582015.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/582015.wgsl.expected.hlsl index 4e06912253..7060970b02 100644 --- a/test/intrinsics/gen/textureLoad/582015.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/582015.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_582015(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/582015.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/582015.wgsl.expected.msl index abde51230b..a2bb31ac63 100644 --- a/test/intrinsics/gen/textureLoad/582015.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/582015.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_582015(texture2d_array tint_symbol_2) { - int4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_582015(texture2d_array tint_symbol_1) { + int4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_582015(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_582015(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.hlsl index cbcacca7ca..a35e83e86c 100644 --- a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_5a2f9d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.msl index 321459db0f..10d913309d 100644 --- a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_5a2f9d(texture1d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint(1), 0); +void textureLoad_5a2f9d(texture1d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint(1), 0); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_5a2f9d(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_5a2f9d(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.hlsl index 4ce01dd8d2..e3c6baabc5 100644 --- a/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_5bb7fb(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.msl index 0bd8944311..3a2bae4014 100644 --- a/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_5bb7fb(texture1d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint(1)); +void textureLoad_5bb7fb(texture1d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_5bb7fb(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_5bb7fb(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.hlsl index c69ba3370f..bb38fd74d7 100644 --- a/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_5d0a2f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.msl index 0e284c2193..c2ea011e18 100644 --- a/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_5d0a2f(texture2d_array tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_5d0a2f(texture2d_array tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_5d0a2f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_5d0a2f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.hlsl index 6ab4c19df5..1230e783ee 100644 --- a/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_6154d4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.msl index 1e09e7637d..9fdd4a4de1 100644 --- a/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_6154d4(texture2d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint2(int2()), 0); +void textureLoad_6154d4(texture2d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint2(int2()), 0); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_6154d4(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_6154d4(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.hlsl index 71cfaf34b0..61d263e8c1 100644 --- a/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_6273b1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.msl index c389b388ba..69c6257142 100644 --- a/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_6273b1(depth2d_ms tint_symbol_2) { - float res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_6273b1(depth2d_ms tint_symbol_1) { + float res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(depth2d_ms tint_symbol_2) { + textureLoad_6273b1(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depth2d_ms tint_symbol_3 [[texture(0)]]) { - textureLoad_6273b1(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depth2d_ms tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.hlsl index 93d472221a..d48cc5bc96 100644 --- a/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_62d125(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.msl index 24c7ff5ef8..5c858885e4 100644 --- a/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_62d125(texture3d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_62d125(texture3d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_62d125(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_62d125(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.hlsl index eaae8b22ac..233219685d 100644 --- a/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_6678b6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.msl index ae62df11f0..e2644f36ed 100644 --- a/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_6678b6(texture1d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint(1)); +void textureLoad_6678b6(texture1d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_6678b6(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_6678b6(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.hlsl index 232a0e0290..4571e927fa 100644 --- a/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_67edca(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.msl index db2355e06e..97fdf44624 100644 --- a/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_67edca(texture3d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_67edca(texture3d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_67edca(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_67edca(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/749704.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/749704.wgsl.expected.hlsl index dd4a52d027..046682ef72 100644 --- a/test/intrinsics/gen/textureLoad/749704.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/749704.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_749704(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/749704.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/749704.wgsl.expected.msl index 37d5288a48..5321c14ac6 100644 --- a/test/intrinsics/gen/textureLoad/749704.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/749704.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_749704(texture2d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_749704(texture2d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_749704(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_749704(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.hlsl index c6c87228b1..9995b1e727 100644 --- a/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_79e697(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.msl index de7808911a..1a92b23123 100644 --- a/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_79e697(texture2d_array tint_symbol_2) { - int4 res = tint_symbol_2.read(uint2(int2()), 1, 0); +void textureLoad_79e697(texture2d_array tint_symbol_1) { + int4 res = tint_symbol_1.read(uint2(int2()), 1, 0); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_79e697(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_79e697(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.hlsl index be53320cf8..eeb32ec9ec 100644 --- a/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_7c90e5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.msl index 044fd5290a..463f1a951a 100644 --- a/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_7c90e5(texture2d_array tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint2(int2()), 1, 0); +void textureLoad_7c90e5(texture2d_array tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint2(int2()), 1, 0); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_7c90e5(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_7c90e5(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.hlsl index 20e1742963..7d692a0821 100644 --- a/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_81c381(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.msl index 1ca1a43e10..d3d567d3bd 100644 --- a/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_81c381(texture1d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint(1), 0); +void textureLoad_81c381(texture1d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint(1), 0); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_81c381(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_81c381(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.hlsl index 627cc92716..683de66fa3 100644 --- a/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_83cea4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.msl index 53aedff1ab..5002e23376 100644 --- a/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_83cea4(texture1d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint(1)); +void textureLoad_83cea4(texture1d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_83cea4(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_83cea4(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.hlsl index d0546f7d4c..51b24d44e4 100644 --- a/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_87be85(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.msl index 39590834e5..7746c5bf57 100644 --- a/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_87be85(texture2d_array tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2()), 1, 0); +void textureLoad_87be85(texture2d_array tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2()), 1, 0); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_87be85(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_87be85(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.hlsl index 3e21a826bc..4bfd217758 100644 --- a/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_8acf41(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.msl index a98d05ec20..3a747df496 100644 --- a/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_8acf41(texture2d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2()), 0); +void textureLoad_8acf41(texture2d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2()), 0); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_8acf41(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_8acf41(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.hlsl index 55c0a6db23..547df77bfd 100644 --- a/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_8e5032(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.msl index b44229c2ba..3eec472bde 100644 --- a/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_8e5032(texture2d_array tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_8e5032(texture2d_array tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_8e5032(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_8e5032(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/936952.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/936952.wgsl.expected.hlsl index 97cfacb64e..fa31b4c6cb 100644 --- a/test/intrinsics/gen/textureLoad/936952.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/936952.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_936952(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/936952.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/936952.wgsl.expected.msl index 2ca0fe6a3c..930e783660 100644 --- a/test/intrinsics/gen/textureLoad/936952.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/936952.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_936952(texture2d_array tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_936952(texture2d_array tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_936952(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_936952(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.hlsl index d6508849d8..cccfb5a022 100644 --- a/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_9a7c90(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.msl index 6e8037b0d3..d78849d383 100644 --- a/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_9a7c90(texture3d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_9a7c90(texture3d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_9a7c90(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_9a7c90(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.hlsl index 5d721077e0..ad15913b27 100644 --- a/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_9b2667(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.msl index cb7023eaf7..59d52acc77 100644 --- a/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_9b2667(depth2d_array tint_symbol_2) { - float res = tint_symbol_2.read(uint2(int2()), 1, 0); +void textureLoad_9b2667(depth2d_array tint_symbol_1) { + float res = tint_symbol_1.read(uint2(int2()), 1, 0); +} + +float4 vertex_main_inner(depth2d_array tint_symbol_2) { + textureLoad_9b2667(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depth2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_9b2667(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depth2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.hlsl index d54dc54a24..0af29cf394 100644 --- a/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_9c2a14(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.msl index ed1817e214..fc8bfb699c 100644 --- a/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_9c2a14(texture2d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_9c2a14(texture2d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_9c2a14(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_9c2a14(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.hlsl index cfeed505de..41f3f98054 100644 --- a/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_a583c9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.msl index 3d286b598a..0d0a47f459 100644 --- a/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_a583c9(texture2d_ms tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_a583c9(texture2d_ms tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_ms tint_symbol_2) { + textureLoad_a583c9(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_ms tint_symbol_3 [[texture(0)]]) { - textureLoad_a583c9(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_ms tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.hlsl index 82fbda9ad1..86f30d8c31 100644 --- a/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_a6a85a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.msl index 3da69a818c..368b3713b5 100644 --- a/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_a6a85a(texture3d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_a6a85a(texture3d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_a6a85a(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_a6a85a(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.hlsl index bf0d87d917..5e5263af5a 100644 --- a/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_a6b61d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.msl index dc5f66ddbe..f1125ccade 100644 --- a/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_a6b61d(texture2d_array tint_symbol_2) { - int4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_a6b61d(texture2d_array tint_symbol_1) { + int4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_a6b61d(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_a6b61d(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.hlsl index d9acf615be..5999e43f7a 100644 --- a/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_a7a3c3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.msl index 83a639b816..57a5f5aff6 100644 --- a/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_a7a3c3(texture3d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_a7a3c3(texture3d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_a7a3c3(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_a7a3c3(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.hlsl index edbeec8f1f..d5eb2c8d17 100644 --- a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_a9a9f5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.msl index 9967f2b540..35cd32ad53 100644 --- a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_a9a9f5(texture3d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint3(int3()), 0); +void textureLoad_a9a9f5(texture3d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint3(int3()), 0); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_a9a9f5(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_a9a9f5(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.hlsl index a926a006d5..166cf3e6d1 100644 --- a/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_b1bf79(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.msl index b3e18afdfa..49cde1da51 100644 --- a/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_b1bf79(texture3d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_b1bf79(texture3d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_b1bf79(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_b1bf79(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.hlsl index c8575cb2c3..3741b1ce93 100644 --- a/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_b58c6d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.msl index 34357c8cb8..40301b78ea 100644 --- a/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_b58c6d(texture2d_array tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_b58c6d(texture2d_array tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_b58c6d(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_b58c6d(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.hlsl index 58734f97cd..962ed40be9 100644 --- a/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_b6c458(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.msl index 4d8c55ea7c..b11df76bac 100644 --- a/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_b6c458(texture2d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_b6c458(texture2d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_b6c458(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_b6c458(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.hlsl index 4f2abbe808..aef20ba753 100644 --- a/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_bfd154(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.msl index 3aa2522dae..3d002d8c13 100644 --- a/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_bfd154(texture3d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_bfd154(texture3d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_bfd154(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_bfd154(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.hlsl index bb03d7432f..0b67c3d6bf 100644 --- a/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_c02b74(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.msl index de110b59ef..9646722482 100644 --- a/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_c02b74(texture1d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint(1)); +void textureLoad_c02b74(texture1d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_c02b74(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_c02b74(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.hlsl index 37721e1b41..fb9f4cd25c 100644 --- a/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_c07013(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.msl index b4648f9673..31c42bc089 100644 --- a/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_c07013(texture2d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_c07013(texture2d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_c07013(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_c07013(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.hlsl index bc623153a9..7144884c7d 100644 --- a/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_c2a480(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.msl index 438fce1ad8..645ed0f2c7 100644 --- a/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_c2a480(texture2d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint2(int2()), 0); +void textureLoad_c2a480(texture2d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint2(int2()), 0); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_c2a480(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_c2a480(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.hlsl index d1da070779..f8a1b424fe 100644 --- a/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_c378ee(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.msl index 83a8003e4d..282257c283 100644 --- a/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_c378ee(texture2d_ms tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_c378ee(texture2d_ms tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_ms tint_symbol_2) { + textureLoad_c378ee(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_ms tint_symbol_3 [[texture(0)]]) { - textureLoad_c378ee(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_ms tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.hlsl index 4406d38457..a64e8d0c33 100644 --- a/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_c40dcb(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.msl index c0878ea560..978e62e24e 100644 --- a/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_c40dcb(texture2d_array tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_c40dcb(texture2d_array tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_c40dcb(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_c40dcb(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.hlsl index 66517809d0..a8e51a1a78 100644 --- a/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_c456bc(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.msl index 57f7f80964..3d6648f9fe 100644 --- a/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_c456bc(texture3d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_c456bc(texture3d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_c456bc(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_c456bc(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.hlsl index fdf3e7ed31..696a14a74c 100644 --- a/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_c7cbed(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.msl index bb8ca4c2d1..398e55c26c 100644 --- a/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_c7cbed(texture1d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint(1)); +void textureLoad_c7cbed(texture1d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_c7cbed(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_c7cbed(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.hlsl index a4e221a779..b3d52e74bc 100644 --- a/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_c9cc40(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.msl index 688f152350..9956489aba 100644 --- a/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_c9cc40(texture1d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint(1)); +void textureLoad_c9cc40(texture1d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_c9cc40(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_c9cc40(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.hlsl index 623b5ec338..d1fc3168ca 100644 --- a/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_d5c48d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.msl index 779df84405..7ce7b01d96 100644 --- a/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_d5c48d(texture2d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_d5c48d(texture2d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_d5c48d(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_d5c48d(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.hlsl index e8e4c29549..0816747323 100644 --- a/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_d81c57(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.msl index b5c8a96f07..cb89b9cccf 100644 --- a/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_d81c57(texture1d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint(1)); +void textureLoad_d81c57(texture1d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_d81c57(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_d81c57(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.hlsl index 6d00258127..8f1f44368e 100644 --- a/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_d8617f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.msl index bec271ae96..e936681fbc 100644 --- a/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_d8617f(texture2d_array tint_symbol_2) { - int4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_d8617f(texture2d_array tint_symbol_1) { + int4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_d8617f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_d8617f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.hlsl index 5d1f27a702..46091ee67f 100644 --- a/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_dbd554(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.msl index 944ead25e1..f7441193c5 100644 --- a/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_dbd554(texture2d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_dbd554(texture2d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_dbd554(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_dbd554(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.hlsl index 240d9942d0..8149e79fc2 100644 --- a/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_ddeed3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.msl index c00941abaa..e9ca3a4301 100644 --- a/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_ddeed3(texture1d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint(1)); +void textureLoad_ddeed3(texture1d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_ddeed3(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_ddeed3(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.hlsl index 4a93c04eab..75d4d95cce 100644 --- a/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_dee8e7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.msl index c672c843f7..dd88b08320 100644 --- a/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_dee8e7(texture2d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_dee8e7(texture2d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_dee8e7(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_dee8e7(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.hlsl index 977c75fd4f..eb0cd78a73 100644 --- a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_e3d2cc(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.msl index 6a8bdb707e..ff180462d9 100644 --- a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_e3d2cc(texture2d_ms tint_symbol_2) { - int4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_e3d2cc(texture2d_ms tint_symbol_1) { + int4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_ms tint_symbol_2) { + textureLoad_e3d2cc(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_ms tint_symbol_3 [[texture(0)]]) { - textureLoad_e3d2cc(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_ms tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.hlsl index 382385b39a..b61dd42312 100644 --- a/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_e65916(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.msl index 3f4e425ef0..25bb247783 100644 --- a/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_e65916(texture3d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_e65916(texture3d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_e65916(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_e65916(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.hlsl index 7689f7ce37..3bee800c9a 100644 --- a/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_e893d7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.msl index 9abb212804..a9c1f6df76 100644 --- a/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_e893d7(texture2d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_e893d7(texture2d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_e893d7(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_e893d7(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.hlsl index 54223d8706..2ac4a4c4fe 100644 --- a/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_eb573b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.msl index 5e563a8d2b..1fb47234af 100644 --- a/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_eb573b(texture2d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_eb573b(texture2d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_eb573b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_eb573b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.hlsl index be6835e2c2..7de5289fef 100644 --- a/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_ecc823(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.msl index bfe59d6297..aa4566049f 100644 --- a/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_ecc823(texture2d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint2(int2())); +void textureLoad_ecc823(texture2d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureLoad_ecc823(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureLoad_ecc823(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.hlsl index 35e9445b88..6d34276b0f 100644 --- a/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_ef5405(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.msl index fee857e0b7..b7daadb0d3 100644 --- a/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_ef5405(texture3d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_ef5405(texture3d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_ef5405(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_ef5405(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.hlsl index 035c43a798..2cd781d47a 100644 --- a/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_f06b69(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.msl index e511056dd0..b78e551c27 100644 --- a/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_f06b69(texture1d tint_symbol_2) { - int4 res = tint_symbol_2.read(uint(1)); +void textureLoad_f06b69(texture1d tint_symbol_1) { + int4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_f06b69(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_f06b69(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.hlsl index a57544bcc3..d627536715 100644 --- a/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_f379e2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.msl index bb3742a565..49dd335fa1 100644 --- a/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_f379e2(texture2d_array tint_symbol_2) { - float4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_f379e2(texture2d_array tint_symbol_1) { + float4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_f379e2(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_f379e2(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.hlsl index a71a08a959..ad6c64a3c3 100644 --- a/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_f56e6f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.msl index 29638ff37a..65ec0aaa96 100644 --- a/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_f56e6f(texture3d tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_f56e6f(texture3d tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_f56e6f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_f56e6f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.hlsl index df40f2ae28..c947f5099f 100644 --- a/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_f74bd8(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.msl index 10535f9b8c..f43f9b5652 100644 --- a/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_f74bd8(texture3d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_f74bd8(texture3d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_f74bd8(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_f74bd8(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.hlsl index 429e62d8b4..f1ebea1033 100644 --- a/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_fc6d36(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.msl index cda4b3404b..26b5c46308 100644 --- a/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_fc6d36(texture2d_array tint_symbol_2) { - int4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_fc6d36(texture2d_array tint_symbol_1) { + int4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_fc6d36(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_fc6d36(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.hlsl index a0a5f9d6e7..03f5160fd9 100644 --- a/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_fdebd0(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.msl index 1e635df2f5..22b0fb9ba7 100644 --- a/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_fdebd0(texture2d_array tint_symbol_2) { - uint4 res = tint_symbol_2.read(uint2(int2()), 1); +void textureLoad_fdebd0(texture2d_array tint_symbol_1) { + uint4 res = tint_symbol_1.read(uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureLoad_fdebd0(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureLoad_fdebd0(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.hlsl index 76e9582d19..7ce653e2fa 100644 --- a/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_fe222a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.msl index 09924188b0..c8f043e377 100644 --- a/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_fe222a(texture1d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint(1)); +void textureLoad_fe222a(texture1d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureLoad_fe222a(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureLoad_fe222a(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.hlsl index 1fe6703b1d..c5f126d9ab 100644 --- a/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureLoad_feab99(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.msl index 072e02707e..187869ce4d 100644 --- a/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.msl +++ b/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.msl @@ -9,14 +9,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureLoad_feab99(texture3d tint_symbol_2) { - float4 res = tint_symbol_2.read(uint3(int3())); +void textureLoad_feab99(texture3d tint_symbol_1) { + float4 res = tint_symbol_1.read(uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureLoad_feab99(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureLoad_feab99(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.hlsl index 5408012837..7ccc1894af 100644 --- a/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_024820(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.msl index b08d98a230..4c7d325410 100644 --- a/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_024820(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_024820(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_024820(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_024820(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.hlsl index 121eedc60e..97689f6f57 100644 --- a/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_053df7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.msl index 09eef92101..46a1852ce6 100644 --- a/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_053df7(texturecube_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_053df7(texturecube_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texturecube_array tint_symbol_2) { + textureNumLayers_053df7(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_053df7(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.hlsl index 88b65e07ef..725e642c8d 100644 --- a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_058cc3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.msl index 7c2e7e3a1b..7327477bd5 100644 --- a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_058cc3(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_058cc3(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_058cc3(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_058cc3(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.hlsl index 5a8fd61588..75cf60c504 100644 --- a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_09d05d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.msl index 28157ad8aa..7a4461bea3 100644 --- a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_09d05d(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_09d05d(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_09d05d(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_09d05d(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.hlsl index 4220184059..1bfb035832 100644 --- a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_13b4ce(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.msl index d48a68a395..e91fc4b00e 100644 --- a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_13b4ce(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_13b4ce(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_13b4ce(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_13b4ce(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.hlsl index e22c7fb7ce..46a495a5e3 100644 --- a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_22e53b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.msl index 7fc1828c86..09c3768d96 100644 --- a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_22e53b(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_22e53b(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_22e53b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_22e53b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.hlsl index d8605ff2ef..70f4f8ec98 100644 --- a/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_2f6bb3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.msl index 39a1ce0378..640988f185 100644 --- a/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_2f6bb3(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_2f6bb3(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_2f6bb3(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_2f6bb3(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.hlsl index c89092b9c6..9b0e9fe71c 100644 --- a/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_315298(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.msl index ce79ed8c95..38ba74676c 100644 --- a/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_315298(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_315298(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_315298(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_315298(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.hlsl index 32293ecd04..2624175ac0 100644 --- a/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_3615e3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.msl index fa075f77ab..bf81a1cfb6 100644 --- a/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_3615e3(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_3615e3(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_3615e3(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_3615e3(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.hlsl index eb91accb8a..42f4d8c75c 100644 --- a/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_390fd5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.msl index 69cb563cad..c2b9c83446 100644 --- a/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_390fd5(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_390fd5(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_390fd5(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_390fd5(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.hlsl index da3140f4ee..124ab6d8e7 100644 --- a/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_45155d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.msl index 346ca65576..552499b16a 100644 --- a/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_45155d(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_45155d(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_45155d(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_45155d(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.hlsl index 9ab86fd79b..5226985298 100644 --- a/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_4bf67b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.msl index 9ec0df1979..71df5e4ce6 100644 --- a/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_4bf67b(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_4bf67b(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_4bf67b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_4bf67b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.hlsl index 7aa3f96034..5fcd67785a 100644 --- a/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_562013(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.msl index 0bcbb68e82..aa1efc5442 100644 --- a/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_562013(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_562013(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_562013(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_562013(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.hlsl index beb74781f3..f0a671feaa 100644 --- a/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_57092f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.msl index 1f4863ccab..e9f9323d1d 100644 --- a/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_57092f(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_57092f(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_57092f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_57092f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.hlsl index 23b9859827..9a46da2570 100644 --- a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_5d59cd(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.msl index 081ef51d0a..023d182b34 100644 --- a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_5d59cd(texturecube_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_5d59cd(texturecube_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texturecube_array tint_symbol_2) { + textureNumLayers_5d59cd(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_5d59cd(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.hlsl index b894728522..3b3e7c5e4d 100644 --- a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_68a65b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.msl index 59335e9978..bd4a5509bc 100644 --- a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_68a65b(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_68a65b(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_68a65b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_68a65b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.hlsl index 9a29d96261..fd57842021 100644 --- a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_778bd1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.msl index 0253d3e8f9..a9531296fa 100644 --- a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_778bd1(depthcube_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_778bd1(depthcube_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(depthcube_array tint_symbol_2) { + textureNumLayers_778bd1(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depthcube_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_778bd1(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depthcube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.hlsl index 3183a27ef6..a352bf5a28 100644 --- a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_7f1937(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.msl index 222cf7d18b..d094de4409 100644 --- a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_7f1937(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_7f1937(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_7f1937(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_7f1937(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.hlsl index 0799841df5..383ad274a4 100644 --- a/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_85f980(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.msl index 3c7904b2d1..0967c44aed 100644 --- a/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_85f980(texturecube_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_85f980(texturecube_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texturecube_array tint_symbol_2) { + textureNumLayers_85f980(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_85f980(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.hlsl index 6209dc5d33..383343871e 100644 --- a/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_87953e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.msl index 4fb2af2e8b..e64875b3d7 100644 --- a/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_87953e(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_87953e(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_87953e(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_87953e(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.hlsl index 0603e1fc76..5326a55c29 100644 --- a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_893e7c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.msl index fbab05ec6c..ca4397b4aa 100644 --- a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_893e7c(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_893e7c(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_893e7c(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_893e7c(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.hlsl index e12beac107..a55a57b086 100644 --- a/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_938763(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.msl index e33db79a4d..a085d35508 100644 --- a/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_938763(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_938763(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_938763(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_938763(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.hlsl index 15aea2d0aa..463ebe26c2 100644 --- a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_9700fb(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.msl index f71315f348..7563653f7c 100644 --- a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_9700fb(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_9700fb(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_9700fb(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_9700fb(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.hlsl index 339019ead8..dab107c44b 100644 --- a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_a216d2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.msl index 744b00eba3..dc42607280 100644 --- a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_a216d2(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_a216d2(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_a216d2(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_a216d2(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.hlsl index 0f18614ad9..bef0612566 100644 --- a/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_aa08a7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.msl index 742c5336cf..c0eb7ca24d 100644 --- a/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_aa08a7(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_aa08a7(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_aa08a7(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_aa08a7(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.hlsl index b983ecf271..b3fde74836 100644 --- a/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_ab0c9b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.msl index 14192729c6..071a9473ac 100644 --- a/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_ab0c9b(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_ab0c9b(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_ab0c9b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_ab0c9b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.hlsl index afe52d309a..c99a1b30ce 100644 --- a/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_b8cd76(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.msl index 80b3c55c47..6c00f3310e 100644 --- a/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_b8cd76(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_b8cd76(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_b8cd76(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_b8cd76(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.hlsl index 58ed81d733..6ae1e4a9c8 100644 --- a/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_be1d70(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.msl index e6be933be3..41158ad34e 100644 --- a/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_be1d70(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_be1d70(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_be1d70(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_be1d70(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.hlsl index 61b1d8442d..b1d63af87e 100644 --- a/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_be3acb(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.msl index 74cae632ba..ded07b487d 100644 --- a/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_be3acb(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_be3acb(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_be3acb(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_be3acb(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.hlsl index d4e9f79bee..c398bb4227 100644 --- a/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_c09917(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.msl index 33c9b86670..a56a650936 100644 --- a/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_c09917(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_c09917(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_c09917(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_c09917(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.hlsl index 71a9624180..23408e8c01 100644 --- a/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_c7c7f2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.msl index e417cdf643..23cc7ab2d2 100644 --- a/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_c7c7f2(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_c7c7f2(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_c7c7f2(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_c7c7f2(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.hlsl index 026390ac5d..fbcb1238df 100644 --- a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_cd5dc8(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.msl index 8c49d95bfc..43c8cdb677 100644 --- a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_cd5dc8(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_cd5dc8(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_cd5dc8(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_cd5dc8(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.hlsl index 95ffefc291..d8bc0a4f21 100644 --- a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_d5b228(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.msl index 8519317622..89bc26e439 100644 --- a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_d5b228(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_d5b228(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_d5b228(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_d5b228(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.hlsl index a209e248c3..43dd45a0d3 100644 --- a/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_e15642(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.msl index 279401f2b7..5b4754710f 100644 --- a/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_e15642(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_e15642(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_e15642(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_e15642(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.hlsl index a7cfc8a676..d41a82144f 100644 --- a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_e31be1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.msl index 74c73d202c..037b86def7 100644 --- a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_e31be1(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_e31be1(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_e31be1(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_e31be1(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.hlsl index cfed8731b1..a15c460a07 100644 --- a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_e653c0(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.msl index 6625911c80..6ef95eac5a 100644 --- a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_e653c0(depth2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_e653c0(depth2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(depth2d_array tint_symbol_2) { + textureNumLayers_e653c0(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depth2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_e653c0(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depth2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.hlsl index b06ea98175..110c6c9e01 100644 --- a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_ee942f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.msl index caa697864a..bddf8a105d 100644 --- a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_ee942f(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_ee942f(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_ee942f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_ee942f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.hlsl index 9b6e7a4814..d6b9fa8bd4 100644 --- a/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_f33005(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.msl index 0aef0029e6..37f4a9adb4 100644 --- a/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_f33005(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_f33005(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_f33005(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_f33005(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.hlsl index 234f8a0572..288d736c39 100644 --- a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_fcec98(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.msl index b19a43b3c4..9e764d33cc 100644 --- a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_fcec98(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_fcec98(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_fcec98(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_fcec98(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.hlsl index 6689c51faf..0b420c2eeb 100644 --- a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLayers_ff5e89(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.msl index 071635eb93..1d0a63877e 100644 --- a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLayers_ff5e89(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_array_size()); +void textureNumLayers_ff5e89(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_array_size()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLayers_ff5e89(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLayers_ff5e89(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.hlsl index 4014d82b6c..404709c33c 100644 --- a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_076cb5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.msl index d43f837b3c..14c225f31c 100644 --- a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_076cb5(depthcube tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_076cb5(depthcube tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(depthcube tint_symbol_2) { + textureNumLevels_076cb5(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depthcube tint_symbol_3 [[texture(0)]]) { - textureNumLevels_076cb5(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depthcube tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.hlsl index 15ca2512ff..039799da6b 100644 --- a/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_080d95(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.msl index 1212cf0891..b05f3ee370 100644 --- a/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_080d95(texturecube tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_080d95(texturecube tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texturecube tint_symbol_2) { + textureNumLevels_080d95(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube tint_symbol_3 [[texture(0)]]) { - textureNumLevels_080d95(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.hlsl index 09cdf3abac..a903d8102d 100644 --- a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_09ddd0(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.msl index ab8fc7b684..c1df2e621b 100644 --- a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_09ddd0(texture2d tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_09ddd0(texture2d tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureNumLevels_09ddd0(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureNumLevels_09ddd0(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.hlsl index 4e0e12d46b..71be44d9cd 100644 --- a/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_105988(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.msl index 9fba11ebac..3ed02e4d70 100644 --- a/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_105988(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_105988(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLevels_105988(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLevels_105988(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.hlsl index 033109083c..4ef4ca87cf 100644 --- a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_1e6f3b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.msl index 8a84fac777..bd923ca988 100644 --- a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_1e6f3b(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_1e6f3b(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureNumLevels_1e6f3b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureNumLevels_1e6f3b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.hlsl index e619001974..958afdcd24 100644 --- a/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_23f750(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.msl index 69bf6aabda..588b57bb8a 100644 --- a/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_23f750(texture2d tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_23f750(texture2d tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureNumLevels_23f750(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureNumLevels_23f750(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.hlsl index ef2d08b730..7aa8570e0f 100644 --- a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_2c3575(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.msl index 0326a45cdf..4acb4d6c86 100644 --- a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_2c3575(depthcube_array tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_2c3575(depthcube_array tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(depthcube_array tint_symbol_2) { + textureNumLevels_2c3575(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depthcube_array tint_symbol_3 [[texture(0)]]) { - textureNumLevels_2c3575(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depthcube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.hlsl index 3d42d38827..f22518ce79 100644 --- a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_32a0ae(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.msl index 2b939bd6ae..985edcb051 100644 --- a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_32a0ae(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_32a0ae(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureNumLevels_32a0ae(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureNumLevels_32a0ae(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.hlsl index c8a722c5b4..7091b8e737 100644 --- a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_5101cf(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.msl index d04511acff..c675b3f980 100644 --- a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_5101cf(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_5101cf(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLevels_5101cf(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLevels_5101cf(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.hlsl index 4fe8de8a31..40f25f21fc 100644 --- a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_51b5bb(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.msl index cf592d9404..c1bb13c64c 100644 --- a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_51b5bb(texture1d tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_51b5bb(texture1d tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureNumLevels_51b5bb(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureNumLevels_51b5bb(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.hlsl index 771f21970c..acaeff7432 100644 --- a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_897aaf(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.msl index 0d4b582f9d..2bf8904b4c 100644 --- a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_897aaf(texturecube tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_897aaf(texturecube tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texturecube tint_symbol_2) { + textureNumLevels_897aaf(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube tint_symbol_3 [[texture(0)]]) { - textureNumLevels_897aaf(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.hlsl index e12ce59171..4e34c92448 100644 --- a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_9da7a5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.msl index d3ff2dfcf9..f079eeadea 100644 --- a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_9da7a5(texture3d tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_9da7a5(texture3d tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureNumLevels_9da7a5(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureNumLevels_9da7a5(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.hlsl index 6a2f7d271f..b93c10e7ad 100644 --- a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_a91c03(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.msl index 2a9047dcb3..52ef85bad0 100644 --- a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_a91c03(texturecube_array tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_a91c03(texturecube_array tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texturecube_array tint_symbol_2) { + textureNumLevels_a91c03(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube_array tint_symbol_3 [[texture(0)]]) { - textureNumLevels_a91c03(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.hlsl index 9f46f5b95f..8408bc84c2 100644 --- a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_aee7c8(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.msl index e8235f7ff6..30353f3a85 100644 --- a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_aee7c8(texturecube_array tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_aee7c8(texturecube_array tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texturecube_array tint_symbol_2) { + textureNumLevels_aee7c8(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube_array tint_symbol_3 [[texture(0)]]) { - textureNumLevels_aee7c8(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.hlsl index d3c0ca994f..f69cf8c990 100644 --- a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_b1b12b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.msl index bd18c15c4e..ecaa1cc165 100644 --- a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_b1b12b(depth2d tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_b1b12b(depth2d tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(depth2d tint_symbol_2) { + textureNumLevels_b1b12b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depth2d tint_symbol_3 [[texture(0)]]) { - textureNumLevels_b1b12b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depth2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.hlsl index 1baa2e0fa8..b7ae80c4cb 100644 --- a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_b4f5ea(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.msl index 2251f59122..13415a666d 100644 --- a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_b4f5ea(texture3d tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_b4f5ea(texture3d tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureNumLevels_b4f5ea(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureNumLevels_b4f5ea(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.hlsl index ccd62a4952..c97a707b31 100644 --- a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_d004a9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.msl index b1ec41db68..6dc92ef4e6 100644 --- a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_d004a9(texture2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_d004a9(texture2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureNumLevels_d004a9(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLevels_d004a9(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.hlsl index aaa711a53d..5c8af176e6 100644 --- a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_dca09e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.msl index 8fa8f419f1..b347341ab6 100644 --- a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_dca09e(texture3d tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_dca09e(texture3d tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureNumLevels_dca09e(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureNumLevels_dca09e(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.hlsl index 9313856ee5..f0b07cc963 100644 --- a/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_e67231(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.msl index d2dffa16b1..2e89dbf920 100644 --- a/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_e67231(texture2d tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_e67231(texture2d tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureNumLevels_e67231(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureNumLevels_e67231(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.hlsl index 80bbd457c0..60a817de0c 100644 --- a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_ed078b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.msl index e3caac8faf..a3c75b191c 100644 --- a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_ed078b(texturecube tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_ed078b(texturecube tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texturecube tint_symbol_2) { + textureNumLevels_ed078b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube tint_symbol_3 [[texture(0)]]) { - textureNumLevels_ed078b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.hlsl index a7bbe7980a..c6079db1c6 100644 --- a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_f46ec6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.msl index ef13bc61b1..daa9048c3e 100644 --- a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_f46ec6(texturecube_array tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_f46ec6(texturecube_array tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(texturecube_array tint_symbol_2) { + textureNumLevels_f46ec6(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texturecube_array tint_symbol_3 [[texture(0)]]) { - textureNumLevels_f46ec6(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texturecube_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.hlsl index 80a3ebbb62..3885eb10e2 100644 --- a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumLevels_f5828d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.msl index 91b3f31d3c..9a85d11b15 100644 --- a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumLevels_f5828d(depth2d_array tint_symbol_2) { - int res = int(tint_symbol_2.get_num_mip_levels()); +void textureNumLevels_f5828d(depth2d_array tint_symbol_1) { + int res = int(tint_symbol_1.get_num_mip_levels()); +} + +float4 vertex_main_inner(depth2d_array tint_symbol_2) { + textureNumLevels_f5828d(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depth2d_array tint_symbol_3 [[texture(0)]]) { - textureNumLevels_f5828d(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depth2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.hlsl index 520b0de607..0e8148bc0d 100644 --- a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumSamples_2c6f14(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.msl b/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.msl index c3b22ea7a8..9da173ffbd 100644 --- a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumSamples_2c6f14(texture2d_ms tint_symbol_2) { - int res = int(tint_symbol_2.get_num_samples()); +void textureNumSamples_2c6f14(texture2d_ms tint_symbol_1) { + int res = int(tint_symbol_1.get_num_samples()); +} + +float4 vertex_main_inner(texture2d_ms tint_symbol_2) { + textureNumSamples_2c6f14(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_ms tint_symbol_3 [[texture(0)]]) { - textureNumSamples_2c6f14(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_ms tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.hlsl index 0e7092e176..4d7256ea96 100644 --- a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumSamples_42f8bb(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.msl b/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.msl index aa8bbd9216..520f48486b 100644 --- a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumSamples_42f8bb(texture2d_ms tint_symbol_2) { - int res = int(tint_symbol_2.get_num_samples()); +void textureNumSamples_42f8bb(texture2d_ms tint_symbol_1) { + int res = int(tint_symbol_1.get_num_samples()); +} + +float4 vertex_main_inner(texture2d_ms tint_symbol_2) { + textureNumSamples_42f8bb(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_ms tint_symbol_3 [[texture(0)]]) { - textureNumSamples_42f8bb(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_ms tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.hlsl index 1ff9771754..4cbc214060 100644 --- a/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumSamples_449d23(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.msl b/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.msl index 2b38a2be89..7935aff003 100644 --- a/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumSamples_449d23(texture2d_ms tint_symbol_2) { - int res = int(tint_symbol_2.get_num_samples()); +void textureNumSamples_449d23(texture2d_ms tint_symbol_1) { + int res = int(tint_symbol_1.get_num_samples()); +} + +float4 vertex_main_inner(texture2d_ms tint_symbol_2) { + textureNumSamples_449d23(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_ms tint_symbol_3 [[texture(0)]]) { - textureNumSamples_449d23(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_ms tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.hlsl index a585b13aa7..106cba4713 100644 --- a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.hlsl @@ -10,10 +10,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureNumSamples_a3c8a0(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.msl b/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.msl index b2ba8c6790..a5fbae4994 100644 --- a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.msl +++ b/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureNumSamples_a3c8a0(depth2d_ms tint_symbol_2) { - int res = int(tint_symbol_2.get_num_samples()); +void textureNumSamples_a3c8a0(depth2d_ms tint_symbol_1) { + int res = int(tint_symbol_1.get_num_samples()); +} + +float4 vertex_main_inner(depth2d_ms tint_symbol_2) { + textureNumSamples_a3c8a0(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(depth2d_ms tint_symbol_3 [[texture(0)]]) { - textureNumSamples_a3c8a0(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(depth2d_ms tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.hlsl index 6fb7e54bf8..8662f0c6fd 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleCompareLevel_011a8f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl index 1d5f63f463..3b3c683ff4 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleCompareLevel_011a8f(depth2d_array tint_symbol_2, sampler tint_symbol_3) { - float res = tint_symbol_2.sample_compare(tint_symbol_3, float2(), 1, 1.0f, level(0), int2()); +void textureSampleCompareLevel_011a8f(depth2d_array tint_symbol_1, sampler tint_symbol_2) { + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(), 1, 1.0f, level(0), int2()); } -vertex tint_symbol vertex_main(depth2d_array tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleCompareLevel_011a8f(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(depth2d_array tint_symbol_3, sampler tint_symbol_4) { + textureSampleCompareLevel_011a8f(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(depth2d_array tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleCompareLevel_011a8f(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(depth2d_array tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(depth2d_array tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleCompareLevel_011a8f(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(depth2d_array tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleCompareLevel_011a8f(tint_symbol_8, tint_symbol_9); +kernel void compute_main(depth2d_array tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleCompareLevel_011a8f(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.hlsl index 32135fe912..b37ef587cd 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleCompareLevel_1116ed(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl index 1501fc5c31..a960b6838a 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleCompareLevel_1116ed(depth2d_array tint_symbol_2, sampler tint_symbol_3) { - float res = tint_symbol_2.sample_compare(tint_symbol_3, float2(), 1, 1.0f, level(0)); +void textureSampleCompareLevel_1116ed(depth2d_array tint_symbol_1, sampler tint_symbol_2) { + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(), 1, 1.0f, level(0)); } -vertex tint_symbol vertex_main(depth2d_array tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleCompareLevel_1116ed(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(depth2d_array tint_symbol_3, sampler tint_symbol_4) { + textureSampleCompareLevel_1116ed(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(depth2d_array tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleCompareLevel_1116ed(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(depth2d_array tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(depth2d_array tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleCompareLevel_1116ed(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(depth2d_array tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleCompareLevel_1116ed(tint_symbol_8, tint_symbol_9); +kernel void compute_main(depth2d_array tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleCompareLevel_1116ed(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.hlsl index 4d3c9a9b1a..0596d33d4a 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleCompareLevel_1568e3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl index 6382fd5c1e..d0d7d39825 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleCompareLevel_1568e3(depthcube tint_symbol_2, sampler tint_symbol_3) { - float res = tint_symbol_2.sample_compare(tint_symbol_3, float3(), 1.0f, level(0)); +void textureSampleCompareLevel_1568e3(depthcube tint_symbol_1, sampler tint_symbol_2) { + float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(), 1.0f, level(0)); } -vertex tint_symbol vertex_main(depthcube tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleCompareLevel_1568e3(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(depthcube tint_symbol_3, sampler tint_symbol_4) { + textureSampleCompareLevel_1568e3(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(depthcube tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleCompareLevel_1568e3(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(depthcube tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(depthcube tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleCompareLevel_1568e3(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(depthcube tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleCompareLevel_1568e3(tint_symbol_8, tint_symbol_9); +kernel void compute_main(depthcube tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleCompareLevel_1568e3(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.hlsl index 52d0476308..9b86db7cbf 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleCompareLevel_2ad2b1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl index c838bede41..ec4036b14e 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleCompareLevel_2ad2b1(depth2d tint_symbol_2, sampler tint_symbol_3) { - float res = tint_symbol_2.sample_compare(tint_symbol_3, float2(), 1.0f, level(0)); +void textureSampleCompareLevel_2ad2b1(depth2d tint_symbol_1, sampler tint_symbol_2) { + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(), 1.0f, level(0)); } -vertex tint_symbol vertex_main(depth2d tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleCompareLevel_2ad2b1(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(depth2d tint_symbol_3, sampler tint_symbol_4) { + textureSampleCompareLevel_2ad2b1(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(depth2d tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleCompareLevel_2ad2b1(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(depth2d tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(depth2d tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleCompareLevel_2ad2b1(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(depth2d tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleCompareLevel_2ad2b1(tint_symbol_8, tint_symbol_9); +kernel void compute_main(depth2d tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleCompareLevel_2ad2b1(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.hlsl index 7438832679..6429d444b7 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleCompareLevel_4cf3a2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl index d7a3b56774..6ff319f65a 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleCompareLevel_4cf3a2(depthcube_array tint_symbol_2, sampler tint_symbol_3) { - float res = tint_symbol_2.sample_compare(tint_symbol_3, float3(), 1, 1.0f, level(0)); +void textureSampleCompareLevel_4cf3a2(depthcube_array tint_symbol_1, sampler tint_symbol_2) { + float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(), 1, 1.0f, level(0)); } -vertex tint_symbol vertex_main(depthcube_array tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleCompareLevel_4cf3a2(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(depthcube_array tint_symbol_3, sampler tint_symbol_4) { + textureSampleCompareLevel_4cf3a2(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(depthcube_array tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleCompareLevel_4cf3a2(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(depthcube_array tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(depthcube_array tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleCompareLevel_4cf3a2(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(depthcube_array tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleCompareLevel_4cf3a2(tint_symbol_8, tint_symbol_9); +kernel void compute_main(depthcube_array tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleCompareLevel_4cf3a2(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.hlsl index 6013b198c6..a96b6312fe 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleCompareLevel_f8121c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl index 485e108815..13a12be4b7 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleCompareLevel_f8121c(depth2d tint_symbol_2, sampler tint_symbol_3) { - float res = tint_symbol_2.sample_compare(tint_symbol_3, float2(), 1.0f, level(0), int2()); +void textureSampleCompareLevel_f8121c(depth2d tint_symbol_1, sampler tint_symbol_2) { + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(), 1.0f, level(0), int2()); } -vertex tint_symbol vertex_main(depth2d tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleCompareLevel_f8121c(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(depth2d tint_symbol_3, sampler tint_symbol_4) { + textureSampleCompareLevel_f8121c(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(depth2d tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleCompareLevel_f8121c(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(depth2d tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(depth2d tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleCompareLevel_f8121c(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(depth2d tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleCompareLevel_f8121c(tint_symbol_8, tint_symbol_9); +kernel void compute_main(depth2d tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleCompareLevel_f8121c(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.hlsl index cf45e6db60..d983c7549c 100644 --- a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleGrad_21402b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.msl index 219cb0f19c..a28705095f 100644 --- a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleGrad_21402b(texture3d tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), gradient3d(float3(), float3())); +void textureSampleGrad_21402b(texture3d tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), gradient3d(float3(), float3())); } -vertex tint_symbol vertex_main(texture3d tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleGrad_21402b(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texture3d tint_symbol_3, sampler tint_symbol_4) { + textureSampleGrad_21402b(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texture3d tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleGrad_21402b(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texture3d tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texture3d tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleGrad_21402b(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texture3d tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleGrad_21402b(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texture3d tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleGrad_21402b(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.hlsl index 19eae0dfd5..618dadc6a1 100644 --- a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleGrad_2ecd8f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl index 7c2dc9fab6..d358769260 100644 --- a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleGrad_2ecd8f(texture2d_array tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), 1, gradient2d(float2(), float2())); +void textureSampleGrad_2ecd8f(texture2d_array tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), 1, gradient2d(float2(), float2())); } -vertex tint_symbol vertex_main(texture2d_array tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleGrad_2ecd8f(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texture2d_array tint_symbol_3, sampler tint_symbol_4) { + textureSampleGrad_2ecd8f(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texture2d_array tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleGrad_2ecd8f(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texture2d_array tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texture2d_array tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleGrad_2ecd8f(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texture2d_array tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleGrad_2ecd8f(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texture2d_array tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleGrad_2ecd8f(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.hlsl index 879825ac88..a3aa56facb 100644 --- a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleGrad_468f88(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.msl index 4e95d39068..e51e7172d2 100644 --- a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleGrad_468f88(texture2d tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), gradient2d(float2(), float2()), int2()); +void textureSampleGrad_468f88(texture2d tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), gradient2d(float2(), float2()), int2()); } -vertex tint_symbol vertex_main(texture2d tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleGrad_468f88(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texture2d tint_symbol_3, sampler tint_symbol_4) { + textureSampleGrad_468f88(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texture2d tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleGrad_468f88(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texture2d tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texture2d tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleGrad_468f88(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texture2d tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleGrad_468f88(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texture2d tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleGrad_468f88(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.hlsl index 1bfe914d18..434705bf94 100644 --- a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleGrad_521263(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.msl index ade4b16e81..b7774952e6 100644 --- a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleGrad_521263(texture2d tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), gradient2d(float2(), float2())); +void textureSampleGrad_521263(texture2d tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), gradient2d(float2(), float2())); } -vertex tint_symbol vertex_main(texture2d tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleGrad_521263(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texture2d tint_symbol_3, sampler tint_symbol_4) { + textureSampleGrad_521263(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texture2d tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleGrad_521263(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texture2d tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texture2d tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleGrad_521263(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texture2d tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleGrad_521263(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texture2d tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleGrad_521263(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.hlsl index f3bcc925f6..279979df18 100644 --- a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleGrad_5312f4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.msl index 4509bb3fd2..8feeefc18c 100644 --- a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleGrad_5312f4(texturecube tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), gradientcube(float3(), float3())); +void textureSampleGrad_5312f4(texturecube tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), gradientcube(float3(), float3())); } -vertex tint_symbol vertex_main(texturecube tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleGrad_5312f4(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texturecube tint_symbol_3, sampler tint_symbol_4) { + textureSampleGrad_5312f4(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texturecube tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleGrad_5312f4(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texturecube tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texturecube tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleGrad_5312f4(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texturecube tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleGrad_5312f4(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texturecube tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleGrad_5312f4(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.hlsl index 61740d20f6..6768f3a968 100644 --- a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleGrad_872f00(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.msl index f946dad827..b3437421fd 100644 --- a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleGrad_872f00(texture2d_array tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), 1, gradient2d(float2(), float2()), int2()); +void textureSampleGrad_872f00(texture2d_array tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), 1, gradient2d(float2(), float2()), int2()); } -vertex tint_symbol vertex_main(texture2d_array tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleGrad_872f00(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texture2d_array tint_symbol_3, sampler tint_symbol_4) { + textureSampleGrad_872f00(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texture2d_array tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleGrad_872f00(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texture2d_array tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texture2d_array tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleGrad_872f00(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texture2d_array tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleGrad_872f00(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texture2d_array tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleGrad_872f00(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.hlsl index 122b16aac7..72c2207d94 100644 --- a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleGrad_e383db(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.msl index e25de9bd58..5316216b89 100644 --- a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleGrad_e383db(texturecube_array tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), 1, gradientcube(float3(), float3())); +void textureSampleGrad_e383db(texturecube_array tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), 1, gradientcube(float3(), float3())); } -vertex tint_symbol vertex_main(texturecube_array tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleGrad_e383db(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texturecube_array tint_symbol_3, sampler tint_symbol_4) { + textureSampleGrad_e383db(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texturecube_array tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleGrad_e383db(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texturecube_array tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texturecube_array tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleGrad_e383db(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texturecube_array tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleGrad_e383db(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texturecube_array tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleGrad_e383db(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.hlsl index f76f445b16..a3855dd8a5 100644 --- a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleGrad_e9a2f7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl index 814d619ee3..8da1b01645 100644 --- a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleGrad_e9a2f7(texture3d tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), gradient3d(float3(), float3()), int3()); +void textureSampleGrad_e9a2f7(texture3d tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), gradient3d(float3(), float3()), int3()); } -vertex tint_symbol vertex_main(texture3d tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleGrad_e9a2f7(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texture3d tint_symbol_3, sampler tint_symbol_4) { + textureSampleGrad_e9a2f7(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texture3d tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleGrad_e9a2f7(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texture3d tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texture3d tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleGrad_e9a2f7(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texture3d tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleGrad_e9a2f7(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texture3d tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleGrad_e9a2f7(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.hlsl index 78c5d89344..0f2e171f7c 100644 --- a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleLevel_02be59(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.msl index 06b7dedd5f..e044bbd65c 100644 --- a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleLevel_02be59(depth2d tint_symbol_2, sampler tint_symbol_3) { - float res = tint_symbol_2.sample(tint_symbol_3, float2(), level(0)); +void textureSampleLevel_02be59(depth2d tint_symbol_1, sampler tint_symbol_2) { + float res = tint_symbol_1.sample(tint_symbol_2, float2(), level(0)); } -vertex tint_symbol vertex_main(depth2d tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleLevel_02be59(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(depth2d tint_symbol_3, sampler tint_symbol_4) { + textureSampleLevel_02be59(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(depth2d tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleLevel_02be59(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(depth2d tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(depth2d tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleLevel_02be59(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(depth2d tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleLevel_02be59(tint_symbol_8, tint_symbol_9); +kernel void compute_main(depth2d tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleLevel_02be59(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.hlsl index ac25ece29e..79982318dd 100644 --- a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleLevel_0bdd9a(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl index b3008f4e50..1dedfaaed8 100644 --- a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleLevel_0bdd9a(texturecube_array tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), 1, level(1.0f)); +void textureSampleLevel_0bdd9a(texturecube_array tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), 1, level(1.0f)); } -vertex tint_symbol vertex_main(texturecube_array tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleLevel_0bdd9a(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texturecube_array tint_symbol_3, sampler tint_symbol_4) { + textureSampleLevel_0bdd9a(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texturecube_array tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleLevel_0bdd9a(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texturecube_array tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texturecube_array tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleLevel_0bdd9a(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texturecube_array tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleLevel_0bdd9a(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texturecube_array tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleLevel_0bdd9a(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.hlsl index c13724759f..b21e9fda1a 100644 --- a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleLevel_1b0291(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.msl index 3513f47f53..31fec00779 100644 --- a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleLevel_1b0291(depthcube tint_symbol_2, sampler tint_symbol_3) { - float res = tint_symbol_2.sample(tint_symbol_3, float3(), level(0)); +void textureSampleLevel_1b0291(depthcube tint_symbol_1, sampler tint_symbol_2) { + float res = tint_symbol_1.sample(tint_symbol_2, float3(), level(0)); } -vertex tint_symbol vertex_main(depthcube tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleLevel_1b0291(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(depthcube tint_symbol_3, sampler tint_symbol_4) { + textureSampleLevel_1b0291(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(depthcube tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleLevel_1b0291(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(depthcube tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(depthcube tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleLevel_1b0291(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(depthcube tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleLevel_1b0291(tint_symbol_8, tint_symbol_9); +kernel void compute_main(depthcube tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleLevel_1b0291(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.hlsl index b9f8cb6781..9231e911f6 100644 --- a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleLevel_1bf73e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.msl index 0227e1629d..8a195e26dd 100644 --- a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleLevel_1bf73e(depth2d_array tint_symbol_2, sampler tint_symbol_3) { - float res = tint_symbol_2.sample(tint_symbol_3, float2(), 1, level(0)); +void textureSampleLevel_1bf73e(depth2d_array tint_symbol_1, sampler tint_symbol_2) { + float res = tint_symbol_1.sample(tint_symbol_2, float2(), 1, level(0)); } -vertex tint_symbol vertex_main(depth2d_array tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleLevel_1bf73e(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(depth2d_array tint_symbol_3, sampler tint_symbol_4) { + textureSampleLevel_1bf73e(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(depth2d_array tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleLevel_1bf73e(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(depth2d_array tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(depth2d_array tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleLevel_1bf73e(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(depth2d_array tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleLevel_1bf73e(tint_symbol_8, tint_symbol_9); +kernel void compute_main(depth2d_array tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleLevel_1bf73e(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.hlsl index f86a1fa4d1..71a5560e87 100644 --- a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleLevel_302be4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.msl index 67386fc86b..b0ab284c06 100644 --- a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleLevel_302be4(texture2d_array tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), 1, level(1.0f)); +void textureSampleLevel_302be4(texture2d_array tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), 1, level(1.0f)); } -vertex tint_symbol vertex_main(texture2d_array tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleLevel_302be4(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texture2d_array tint_symbol_3, sampler tint_symbol_4) { + textureSampleLevel_302be4(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texture2d_array tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleLevel_302be4(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texture2d_array tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texture2d_array tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleLevel_302be4(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texture2d_array tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleLevel_302be4(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texture2d_array tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleLevel_302be4(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.hlsl index f7a0d52f77..0c1ee21277 100644 --- a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleLevel_47daa4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.msl index 7c0b3af4f1..fed118a8ab 100644 --- a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleLevel_47daa4(depth2d tint_symbol_2, sampler tint_symbol_3) { - float res = tint_symbol_2.sample(tint_symbol_3, float2(), level(0), int2()); +void textureSampleLevel_47daa4(depth2d tint_symbol_1, sampler tint_symbol_2) { + float res = tint_symbol_1.sample(tint_symbol_2, float2(), level(0), int2()); } -vertex tint_symbol vertex_main(depth2d tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleLevel_47daa4(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(depth2d tint_symbol_3, sampler tint_symbol_4) { + textureSampleLevel_47daa4(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(depth2d tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleLevel_47daa4(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(depth2d tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(depth2d tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleLevel_47daa4(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(depth2d tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleLevel_47daa4(tint_symbol_8, tint_symbol_9); +kernel void compute_main(depth2d tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleLevel_47daa4(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.hlsl index 2afa96bae8..3e1fd5638e 100644 --- a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleLevel_690d95(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.msl index 19335c7a90..a077b7da1b 100644 --- a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleLevel_690d95(texture2d tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), level(1.0f), int2()); +void textureSampleLevel_690d95(texture2d tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), level(1.0f), int2()); } -vertex tint_symbol vertex_main(texture2d tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleLevel_690d95(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texture2d tint_symbol_3, sampler tint_symbol_4) { + textureSampleLevel_690d95(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texture2d tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleLevel_690d95(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texture2d tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texture2d tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleLevel_690d95(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texture2d tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleLevel_690d95(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texture2d tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleLevel_690d95(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.hlsl index 436fd647a0..9a039f3cb8 100644 --- a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleLevel_979816(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.msl index 52e5e0dc8e..9e703fc96b 100644 --- a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleLevel_979816(texture2d tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), level(0.0f)); +void textureSampleLevel_979816(texture2d tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), level(0.0f)); } -vertex tint_symbol vertex_main(texture2d tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleLevel_979816(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texture2d tint_symbol_3, sampler tint_symbol_4) { + textureSampleLevel_979816(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texture2d tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleLevel_979816(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texture2d tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texture2d tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleLevel_979816(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texture2d tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleLevel_979816(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texture2d tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleLevel_979816(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.hlsl index 62bf3fd688..9d059defcd 100644 --- a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleLevel_9bd37b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.msl index f7ba24598e..635aa58a19 100644 --- a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleLevel_9bd37b(texture3d tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), level(1.0f), int3()); +void textureSampleLevel_9bd37b(texture3d tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), level(1.0f), int3()); } -vertex tint_symbol vertex_main(texture3d tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleLevel_9bd37b(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texture3d tint_symbol_3, sampler tint_symbol_4) { + textureSampleLevel_9bd37b(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texture3d tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleLevel_9bd37b(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texture3d tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texture3d tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleLevel_9bd37b(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texture3d tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleLevel_9bd37b(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texture3d tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleLevel_9bd37b(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.hlsl index 38f0bd14fa..c1d9157db1 100644 --- a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleLevel_a4af26(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.msl index 777e17ea32..5d3ef95f72 100644 --- a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleLevel_a4af26(texture2d_array tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), 1, level(1.0f), int2()); +void textureSampleLevel_a4af26(texture2d_array tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), 1, level(1.0f), int2()); } -vertex tint_symbol vertex_main(texture2d_array tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleLevel_a4af26(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texture2d_array tint_symbol_3, sampler tint_symbol_4) { + textureSampleLevel_a4af26(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texture2d_array tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleLevel_a4af26(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texture2d_array tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texture2d_array tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleLevel_a4af26(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texture2d_array tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleLevel_a4af26(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texture2d_array tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleLevel_a4af26(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.hlsl index 8911de57ef..2110c77419 100644 --- a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleLevel_abfcc0(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.msl index 16820040ef..5a60388761 100644 --- a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleLevel_abfcc0(texture3d tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), level(1.0f)); +void textureSampleLevel_abfcc0(texture3d tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), level(1.0f)); } -vertex tint_symbol vertex_main(texture3d tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleLevel_abfcc0(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texture3d tint_symbol_3, sampler tint_symbol_4) { + textureSampleLevel_abfcc0(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texture3d tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleLevel_abfcc0(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texture3d tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texture3d tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleLevel_abfcc0(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texture3d tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleLevel_abfcc0(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texture3d tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleLevel_abfcc0(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.hlsl index e20afdc9e7..e03bc6671b 100644 --- a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleLevel_ae5e39(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.msl index a538eedfe5..47fae9b505 100644 --- a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleLevel_ae5e39(depthcube_array tint_symbol_2, sampler tint_symbol_3) { - float res = tint_symbol_2.sample(tint_symbol_3, float3(), 1, level(0)); +void textureSampleLevel_ae5e39(depthcube_array tint_symbol_1, sampler tint_symbol_2) { + float res = tint_symbol_1.sample(tint_symbol_2, float3(), 1, level(0)); } -vertex tint_symbol vertex_main(depthcube_array tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleLevel_ae5e39(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(depthcube_array tint_symbol_3, sampler tint_symbol_4) { + textureSampleLevel_ae5e39(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(depthcube_array tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleLevel_ae5e39(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(depthcube_array tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(depthcube_array tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleLevel_ae5e39(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(depthcube_array tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleLevel_ae5e39(tint_symbol_8, tint_symbol_9); +kernel void compute_main(depthcube_array tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleLevel_ae5e39(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.hlsl index e5a0aeee22..c375c7ce1f 100644 --- a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleLevel_ba93b3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.msl index b10f15c365..1bde28fb68 100644 --- a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleLevel_ba93b3(depth2d_array tint_symbol_2, sampler tint_symbol_3) { - float res = tint_symbol_2.sample(tint_symbol_3, float2(), 1, level(0), int2()); +void textureSampleLevel_ba93b3(depth2d_array tint_symbol_1, sampler tint_symbol_2) { + float res = tint_symbol_1.sample(tint_symbol_2, float2(), 1, level(0), int2()); } -vertex tint_symbol vertex_main(depth2d_array tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleLevel_ba93b3(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(depth2d_array tint_symbol_3, sampler tint_symbol_4) { + textureSampleLevel_ba93b3(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(depth2d_array tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleLevel_ba93b3(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(depth2d_array tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(depth2d_array tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleLevel_ba93b3(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(depth2d_array tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleLevel_ba93b3(tint_symbol_8, tint_symbol_9); +kernel void compute_main(depth2d_array tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleLevel_ba93b3(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.hlsl index 235499f7b0..92b39bb254 100644 --- a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleLevel_c32df7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.msl index 62943cadfc..3a24298f51 100644 --- a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleLevel_c32df7(texturecube tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), level(1.0f)); +void textureSampleLevel_c32df7(texturecube tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), level(1.0f)); } -vertex tint_symbol vertex_main(texturecube tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleLevel_c32df7(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texturecube tint_symbol_3, sampler tint_symbol_4) { + textureSampleLevel_c32df7(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texturecube tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleLevel_c32df7(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texturecube tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texturecube tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleLevel_c32df7(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texturecube tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleLevel_c32df7(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texturecube tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleLevel_c32df7(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.hlsl index a0ea4e6174..69ec00e251 100644 --- a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.hlsl @@ -9,10 +9,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureSampleLevel_c6aca6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.msl index bbe79664b3..e3c3831e8c 100644 --- a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.msl +++ b/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.msl @@ -5,23 +5,29 @@ struct tint_symbol { float4 value [[position]]; }; -void textureSampleLevel_c6aca6(texture2d tint_symbol_2, sampler tint_symbol_3) { - float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), level(1.0f)); +void textureSampleLevel_c6aca6(texture2d tint_symbol_1, sampler tint_symbol_2) { + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), level(1.0f)); } -vertex tint_symbol vertex_main(texture2d tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) { - textureSampleLevel_c6aca6(tint_symbol_4, tint_symbol_5); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; +float4 vertex_main_inner(texture2d tint_symbol_3, sampler tint_symbol_4) { + textureSampleLevel_c6aca6(tint_symbol_3, tint_symbol_4); + return float4(); } -fragment void fragment_main(texture2d tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) { - textureSampleLevel_c6aca6(tint_symbol_6, tint_symbol_7); +vertex tint_symbol vertex_main(texture2d tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) { + float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main(texture2d tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) { + textureSampleLevel_c6aca6(tint_symbol_7, tint_symbol_8); return; } -kernel void compute_main(texture2d tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) { - textureSampleLevel_c6aca6(tint_symbol_8, tint_symbol_9); +kernel void compute_main(texture2d tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) { + textureSampleLevel_c6aca6(tint_symbol_9, tint_symbol_10); return; } diff --git a/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.hlsl index 6a0b80217d..ed042228cf 100644 --- a/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_05ce15(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.msl b/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.msl index 905ce5adab..c041d583dd 100644 --- a/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_05ce15(texture2d tint_symbol_2) { - tint_symbol_2.write(float4(), uint2(int2())); +void textureStore_05ce15(texture2d tint_symbol_1) { + tint_symbol_1.write(float4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_05ce15(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_05ce15(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.hlsl index 00c6038bec..39c01859f7 100644 --- a/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_064c7f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.msl index fecd34efe1..6f99242b71 100644 --- a/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_064c7f(texture2d tint_symbol_2) { - tint_symbol_2.write(float4(), uint2(int2())); +void textureStore_064c7f(texture2d tint_symbol_1) { + tint_symbol_1.write(float4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_064c7f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_064c7f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/068641.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/068641.wgsl.expected.hlsl index d6c30929ea..e6cd71aea0 100644 --- a/test/intrinsics/gen/textureStore/068641.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/068641.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_068641(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/068641.wgsl.expected.msl b/test/intrinsics/gen/textureStore/068641.wgsl.expected.msl index efeb713525..4853ced2e7 100644 --- a/test/intrinsics/gen/textureStore/068641.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/068641.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_068641(texture3d tint_symbol_2) { - tint_symbol_2.write(uint4(), uint3(int3())); +void textureStore_068641(texture3d tint_symbol_1) { + tint_symbol_1.write(uint4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_068641(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_068641(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.hlsl index 86fef182f2..a7f40f74bf 100644 --- a/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_0af6b5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.msl b/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.msl index c8f9a600da..1e3da7e555 100644 --- a/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_0af6b5(texture2d tint_symbol_2) { - tint_symbol_2.write(float4(), uint2(int2())); +void textureStore_0af6b5(texture2d tint_symbol_1) { + tint_symbol_1.write(float4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_0af6b5(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_0af6b5(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.hlsl index 0718849ea8..0ca7a424aa 100644 --- a/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_0c3dff(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.msl b/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.msl index 181dcde059..e3cbd453a4 100644 --- a/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_0c3dff(texture2d tint_symbol_2) { - tint_symbol_2.write(uint4(), uint2(int2())); +void textureStore_0c3dff(texture2d tint_symbol_1) { + tint_symbol_1.write(uint4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_0c3dff(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_0c3dff(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/102722.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/102722.wgsl.expected.hlsl index 6b2b0d7c79..5ff0d4427e 100644 --- a/test/intrinsics/gen/textureStore/102722.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/102722.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_102722(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/102722.wgsl.expected.msl b/test/intrinsics/gen/textureStore/102722.wgsl.expected.msl index e6798fe346..7857f9fb81 100644 --- a/test/intrinsics/gen/textureStore/102722.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/102722.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_102722(texture1d tint_symbol_2) { - tint_symbol_2.write(uint4(), uint(1)); +void textureStore_102722(texture1d tint_symbol_1) { + tint_symbol_1.write(uint4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_102722(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_102722(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.hlsl index f16d991b26..7394a043ed 100644 --- a/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_1bbd08(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.msl b/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.msl index 358a92c825..dea867a4e1 100644 --- a/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_1bbd08(texture3d tint_symbol_2) { - tint_symbol_2.write(float4(), uint3(int3())); +void textureStore_1bbd08(texture3d tint_symbol_1) { + tint_symbol_1.write(float4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_1bbd08(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_1bbd08(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.hlsl index 4e599925df..18e87d37e8 100644 --- a/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_1c02e7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.msl b/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.msl index dbadaba2f3..d4cfdf2935 100644 --- a/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_1c02e7(texture2d_array tint_symbol_2) { - tint_symbol_2.write(int4(), uint2(int2()), 1); +void textureStore_1c02e7(texture2d_array tint_symbol_1) { + tint_symbol_1.write(int4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_1c02e7(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_1c02e7(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/22d955.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/22d955.wgsl.expected.hlsl index 354610a469..3621eee4e8 100644 --- a/test/intrinsics/gen/textureStore/22d955.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/22d955.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_22d955(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/22d955.wgsl.expected.msl b/test/intrinsics/gen/textureStore/22d955.wgsl.expected.msl index 96ab7caef1..ae923cf0aa 100644 --- a/test/intrinsics/gen/textureStore/22d955.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/22d955.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_22d955(texture2d_array tint_symbol_2) { - tint_symbol_2.write(uint4(), uint2(int2()), 1); +void textureStore_22d955(texture2d_array tint_symbol_1) { + tint_symbol_1.write(uint4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_22d955(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_22d955(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.hlsl index 0f4f2186bc..9e7dc61094 100644 --- a/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_26bf70(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.msl b/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.msl index 0478e59a98..9a6b102976 100644 --- a/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_26bf70(texture2d tint_symbol_2) { - tint_symbol_2.write(uint4(), uint2(int2())); +void textureStore_26bf70(texture2d tint_symbol_1) { + tint_symbol_1.write(uint4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_26bf70(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_26bf70(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.hlsl index e97dd7a337..4a08b65c2c 100644 --- a/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_2796b4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.msl b/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.msl index 22b40b0c4f..be3965bc50 100644 --- a/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_2796b4(texture3d tint_symbol_2) { - tint_symbol_2.write(int4(), uint3(int3())); +void textureStore_2796b4(texture3d tint_symbol_1) { + tint_symbol_1.write(int4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_2796b4(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_2796b4(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.hlsl index bdef603b56..07e338efb4 100644 --- a/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_2ac6c7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.msl b/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.msl index 2262931487..29ad3142d4 100644 --- a/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_2ac6c7(texture1d tint_symbol_2) { - tint_symbol_2.write(float4(), uint(1)); +void textureStore_2ac6c7(texture1d tint_symbol_1) { + tint_symbol_1.write(float4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_2ac6c7(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_2ac6c7(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.hlsl index dd4d347f23..7bdb1f6ec7 100644 --- a/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_2eb2a4(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.msl b/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.msl index b0c20f5672..3fc966aa30 100644 --- a/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_2eb2a4(texture1d tint_symbol_2) { - tint_symbol_2.write(uint4(), uint(1)); +void textureStore_2eb2a4(texture1d tint_symbol_1) { + tint_symbol_1.write(uint4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_2eb2a4(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_2eb2a4(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.hlsl index 891d15515e..a0822a03c5 100644 --- a/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_2ed2a3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.msl b/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.msl index c5dfae2e41..6e9b58412d 100644 --- a/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_2ed2a3(texture1d tint_symbol_2) { - tint_symbol_2.write(float4(), uint(1)); +void textureStore_2ed2a3(texture1d tint_symbol_1) { + tint_symbol_1.write(float4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_2ed2a3(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_2ed2a3(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/31745b.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/31745b.wgsl.expected.hlsl index 5fa3d20161..c9378fad2a 100644 --- a/test/intrinsics/gen/textureStore/31745b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/31745b.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_31745b(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/31745b.wgsl.expected.msl b/test/intrinsics/gen/textureStore/31745b.wgsl.expected.msl index a57589a999..5fad31945e 100644 --- a/test/intrinsics/gen/textureStore/31745b.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/31745b.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_31745b(texture2d tint_symbol_2) { - tint_symbol_2.write(int4(), uint2(int2())); +void textureStore_31745b(texture2d tint_symbol_1) { + tint_symbol_1.write(int4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_31745b(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_31745b(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/32f368.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/32f368.wgsl.expected.hlsl index fa61fc31ad..35cb76fbbc 100644 --- a/test/intrinsics/gen/textureStore/32f368.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/32f368.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_32f368(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/32f368.wgsl.expected.msl b/test/intrinsics/gen/textureStore/32f368.wgsl.expected.msl index 71c924526f..be3045e6cc 100644 --- a/test/intrinsics/gen/textureStore/32f368.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/32f368.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_32f368(texture2d_array tint_symbol_2) { - tint_symbol_2.write(float4(), uint2(int2()), 1); +void textureStore_32f368(texture2d_array tint_symbol_1) { + tint_symbol_1.write(float4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_32f368(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_32f368(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/331aee.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/331aee.wgsl.expected.hlsl index 7429918b09..5a823d41c5 100644 --- a/test/intrinsics/gen/textureStore/331aee.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/331aee.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_331aee(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/331aee.wgsl.expected.msl b/test/intrinsics/gen/textureStore/331aee.wgsl.expected.msl index 0eeef88f92..62e62dd1ff 100644 --- a/test/intrinsics/gen/textureStore/331aee.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/331aee.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_331aee(texture3d tint_symbol_2) { - tint_symbol_2.write(float4(), uint3(int3())); +void textureStore_331aee(texture3d tint_symbol_1) { + tint_symbol_1.write(float4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_331aee(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_331aee(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.hlsl index dca4cfd8b7..9ab58469d7 100644 --- a/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_38e8d7(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.msl b/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.msl index ac9cdd5fb7..0a7fa791ab 100644 --- a/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_38e8d7(texture2d_array tint_symbol_2) { - tint_symbol_2.write(uint4(), uint2(int2()), 1); +void textureStore_38e8d7(texture2d_array tint_symbol_1) { + tint_symbol_1.write(uint4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_38e8d7(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_38e8d7(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.hlsl index 27f3a36c9d..7e1c172e06 100644 --- a/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_3a52ac(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.msl b/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.msl index 0c932b198b..22fa157514 100644 --- a/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_3a52ac(texture2d_array tint_symbol_2) { - tint_symbol_2.write(int4(), uint2(int2()), 1); +void textureStore_3a52ac(texture2d_array tint_symbol_1) { + tint_symbol_1.write(int4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_3a52ac(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_3a52ac(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.hlsl index ebae98e868..a81883ca60 100644 --- a/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_3bb7a1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.msl b/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.msl index 1ae07e4a38..8f2e7cf9a5 100644 --- a/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_3bb7a1(texture2d_array tint_symbol_2) { - tint_symbol_2.write(float4(), uint2(int2()), 1); +void textureStore_3bb7a1(texture2d_array tint_symbol_1) { + tint_symbol_1.write(float4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_3bb7a1(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_3bb7a1(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.hlsl index 080d475b46..a9f622dcda 100644 --- a/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_3bec15(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.msl b/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.msl index cda786e535..3364232472 100644 --- a/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_3bec15(texture1d tint_symbol_2) { - tint_symbol_2.write(uint4(), uint(1)); +void textureStore_3bec15(texture1d tint_symbol_1) { + tint_symbol_1.write(uint4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_3bec15(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_3bec15(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.hlsl index a79520f128..593faf20e6 100644 --- a/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_441ba8(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.msl b/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.msl index 4dd21a5444..2f99fdfc72 100644 --- a/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_441ba8(texture3d tint_symbol_2) { - tint_symbol_2.write(uint4(), uint3(int3())); +void textureStore_441ba8(texture3d tint_symbol_1) { + tint_symbol_1.write(uint4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_441ba8(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_441ba8(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.hlsl index a899c7e7a8..b8e3f68abd 100644 --- a/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_4fc057(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.msl b/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.msl index 39d0e12e59..631009a615 100644 --- a/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_4fc057(texture2d_array tint_symbol_2) { - tint_symbol_2.write(float4(), uint2(int2()), 1); +void textureStore_4fc057(texture2d_array tint_symbol_1) { + tint_symbol_1.write(float4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_4fc057(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_4fc057(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.hlsl index db027573e2..7fa35a8870 100644 --- a/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_5a2f8f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.msl index 2fa1d0efac..fdbd1c59ce 100644 --- a/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_5a2f8f(texture1d tint_symbol_2) { - tint_symbol_2.write(int4(), uint(1)); +void textureStore_5a2f8f(texture1d tint_symbol_1) { + tint_symbol_1.write(int4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_5a2f8f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_5a2f8f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/60975f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/60975f.wgsl.expected.hlsl index 968507f41c..811a27c847 100644 --- a/test/intrinsics/gen/textureStore/60975f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/60975f.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_60975f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/60975f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/60975f.wgsl.expected.msl index 1cde839abb..e9e4275ad7 100644 --- a/test/intrinsics/gen/textureStore/60975f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/60975f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_60975f(texture2d_array tint_symbol_2) { - tint_symbol_2.write(float4(), uint2(int2()), 1); +void textureStore_60975f(texture2d_array tint_symbol_1) { + tint_symbol_1.write(float4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_60975f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_60975f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.hlsl index a1b098732c..95a07d3746 100644 --- a/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_682fd6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.msl b/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.msl index 6b9bd649ff..457dcffee8 100644 --- a/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_682fd6(texture2d tint_symbol_2) { - tint_symbol_2.write(uint4(), uint2(int2())); +void textureStore_682fd6(texture2d tint_symbol_1) { + tint_symbol_1.write(uint4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_682fd6(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_682fd6(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.hlsl index 1f0ded5448..d2c7cacacb 100644 --- a/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_6b75c3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.msl b/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.msl index bbedf08b88..457a6b2d9b 100644 --- a/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_6b75c3(texture1d tint_symbol_2) { - tint_symbol_2.write(float4(), uint(1)); +void textureStore_6b75c3(texture1d tint_symbol_1) { + tint_symbol_1.write(float4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_6b75c3(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_6b75c3(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.hlsl index 1b1cbed6af..630297ab7a 100644 --- a/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_6b80d2(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.msl b/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.msl index e6d79a840d..fa97d97e10 100644 --- a/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_6b80d2(texture1d tint_symbol_2) { - tint_symbol_2.write(int4(), uint(1)); +void textureStore_6b80d2(texture1d tint_symbol_1) { + tint_symbol_1.write(int4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_6b80d2(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_6b80d2(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.hlsl index 1d3d6a6d62..e6355996a6 100644 --- a/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_6cff2e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.msl b/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.msl index 46eb274c5a..1653c874d7 100644 --- a/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_6cff2e(texture2d tint_symbol_2) { - tint_symbol_2.write(uint4(), uint2(int2())); +void textureStore_6cff2e(texture2d tint_symbol_1) { + tint_symbol_1.write(uint4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_6cff2e(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_6cff2e(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/6da692.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/6da692.wgsl.expected.hlsl index 10a2b76d31..a227f8f6dc 100644 --- a/test/intrinsics/gen/textureStore/6da692.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/6da692.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_6da692(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/6da692.wgsl.expected.msl b/test/intrinsics/gen/textureStore/6da692.wgsl.expected.msl index d29caadc23..ac4c507671 100644 --- a/test/intrinsics/gen/textureStore/6da692.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/6da692.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_6da692(texture2d_array tint_symbol_2) { - tint_symbol_2.write(uint4(), uint2(int2()), 1); +void textureStore_6da692(texture2d_array tint_symbol_1) { + tint_symbol_1.write(uint4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_6da692(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_6da692(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/731349.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/731349.wgsl.expected.hlsl index 4d587bb447..b13dd3024e 100644 --- a/test/intrinsics/gen/textureStore/731349.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/731349.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_731349(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/731349.wgsl.expected.msl b/test/intrinsics/gen/textureStore/731349.wgsl.expected.msl index fe597ead2e..29ceabc177 100644 --- a/test/intrinsics/gen/textureStore/731349.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/731349.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_731349(texture2d tint_symbol_2) { - tint_symbol_2.write(float4(), uint2(int2())); +void textureStore_731349(texture2d tint_symbol_1) { + tint_symbol_1.write(float4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_731349(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_731349(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/752da6.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/752da6.wgsl.expected.hlsl index 68edf8a041..5e8ed8ac72 100644 --- a/test/intrinsics/gen/textureStore/752da6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/752da6.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_752da6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/752da6.wgsl.expected.msl b/test/intrinsics/gen/textureStore/752da6.wgsl.expected.msl index 28e75f76e3..999bc504da 100644 --- a/test/intrinsics/gen/textureStore/752da6.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/752da6.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_752da6(texture2d tint_symbol_2) { - tint_symbol_2.write(int4(), uint2(int2())); +void textureStore_752da6(texture2d tint_symbol_1) { + tint_symbol_1.write(int4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_752da6(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_752da6(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.hlsl index 442a1058b1..ad9871f15e 100644 --- a/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_77c0ae(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.msl b/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.msl index 7ea0267ee2..de193a5521 100644 --- a/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_77c0ae(texture2d tint_symbol_2) { - tint_symbol_2.write(uint4(), uint2(int2())); +void textureStore_77c0ae(texture2d tint_symbol_1) { + tint_symbol_1.write(uint4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_77c0ae(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_77c0ae(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.hlsl index f0207bc3c6..312c3d8d06 100644 --- a/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_7cec8d(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.msl b/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.msl index af5784bdb5..5b1c950f8c 100644 --- a/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_7cec8d(texture2d_array tint_symbol_2) { - tint_symbol_2.write(int4(), uint2(int2()), 1); +void textureStore_7cec8d(texture2d_array tint_symbol_1) { + tint_symbol_1.write(int4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_7cec8d(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_7cec8d(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.hlsl index 51e509c149..aa796401b8 100644 --- a/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_7f7fae(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.msl b/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.msl index 0ace63b1d4..b1482ceee8 100644 --- a/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_7f7fae(texture1d tint_symbol_2) { - tint_symbol_2.write(float4(), uint(1)); +void textureStore_7f7fae(texture1d tint_symbol_1) { + tint_symbol_1.write(float4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_7f7fae(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_7f7fae(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/804942.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/804942.wgsl.expected.hlsl index 1373d28eaf..e8cf229829 100644 --- a/test/intrinsics/gen/textureStore/804942.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/804942.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_804942(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/804942.wgsl.expected.msl b/test/intrinsics/gen/textureStore/804942.wgsl.expected.msl index 93097c5cc8..e58994eee0 100644 --- a/test/intrinsics/gen/textureStore/804942.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/804942.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_804942(texture2d tint_symbol_2) { - tint_symbol_2.write(int4(), uint2(int2())); +void textureStore_804942(texture2d tint_symbol_1) { + tint_symbol_1.write(int4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_804942(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_804942(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/805dae.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/805dae.wgsl.expected.hlsl index f31ad09dfe..1259ff3c77 100644 --- a/test/intrinsics/gen/textureStore/805dae.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/805dae.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_805dae(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/805dae.wgsl.expected.msl b/test/intrinsics/gen/textureStore/805dae.wgsl.expected.msl index a1c32f73a7..d8fa59400f 100644 --- a/test/intrinsics/gen/textureStore/805dae.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/805dae.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_805dae(texture2d tint_symbol_2) { - tint_symbol_2.write(float4(), uint2(int2())); +void textureStore_805dae(texture2d tint_symbol_1) { + tint_symbol_1.write(float4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_805dae(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_805dae(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.hlsl index 8adf9504d7..c73ba1f8a5 100644 --- a/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_83bcc1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.msl b/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.msl index 81093f4236..ac927b784a 100644 --- a/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_83bcc1(texture1d tint_symbol_2) { - tint_symbol_2.write(uint4(), uint(1)); +void textureStore_83bcc1(texture1d tint_symbol_1) { + tint_symbol_1.write(uint4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_83bcc1(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_83bcc1(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/872747.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/872747.wgsl.expected.hlsl index b2d9eaf4b4..2f1f45b901 100644 --- a/test/intrinsics/gen/textureStore/872747.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/872747.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_872747(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/872747.wgsl.expected.msl b/test/intrinsics/gen/textureStore/872747.wgsl.expected.msl index 3b310db38c..4cdef4d754 100644 --- a/test/intrinsics/gen/textureStore/872747.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/872747.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_872747(texture1d tint_symbol_2) { - tint_symbol_2.write(float4(), uint(1)); +void textureStore_872747(texture1d tint_symbol_1) { + tint_symbol_1.write(float4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_872747(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_872747(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.hlsl index 59f63afb79..7ce20468bc 100644 --- a/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_8e0479(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.msl b/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.msl index 18d1a53be2..afda699dd1 100644 --- a/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_8e0479(texture2d_array tint_symbol_2) { - tint_symbol_2.write(uint4(), uint2(int2()), 1); +void textureStore_8e0479(texture2d_array tint_symbol_1) { + tint_symbol_1.write(uint4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_8e0479(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_8e0479(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.hlsl index dd640276b0..6a9b01f2e7 100644 --- a/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_8f71a1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.msl b/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.msl index b05a0078e3..9070535625 100644 --- a/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_8f71a1(texture3d tint_symbol_2) { - tint_symbol_2.write(int4(), uint3(int3())); +void textureStore_8f71a1(texture3d tint_symbol_1) { + tint_symbol_1.write(int4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_8f71a1(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_8f71a1(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/969534.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/969534.wgsl.expected.hlsl index 6aa37611de..4ec5ed25d4 100644 --- a/test/intrinsics/gen/textureStore/969534.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/969534.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_969534(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/969534.wgsl.expected.msl b/test/intrinsics/gen/textureStore/969534.wgsl.expected.msl index 031459809a..9ff764b403 100644 --- a/test/intrinsics/gen/textureStore/969534.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/969534.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_969534(texture1d tint_symbol_2) { - tint_symbol_2.write(int4(), uint(1)); +void textureStore_969534(texture1d tint_symbol_1) { + tint_symbol_1.write(int4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_969534(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_969534(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.hlsl index ead5d45f91..f57c02d772 100644 --- a/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_9a3ecc(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.msl b/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.msl index 922ad72c53..09a9db9d79 100644 --- a/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_9a3ecc(texture3d tint_symbol_2) { - tint_symbol_2.write(int4(), uint3(int3())); +void textureStore_9a3ecc(texture3d tint_symbol_1) { + tint_symbol_1.write(int4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_9a3ecc(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_9a3ecc(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.hlsl index 3467927664..1f1816f6c4 100644 --- a/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_9d9cd5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.msl b/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.msl index 2b264c549a..e08d4a10d5 100644 --- a/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_9d9cd5(texture2d_array tint_symbol_2) { - tint_symbol_2.write(float4(), uint2(int2()), 1); +void textureStore_9d9cd5(texture2d_array tint_symbol_1) { + tint_symbol_1.write(float4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_9d9cd5(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_9d9cd5(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.hlsl index eb90843c9e..8dc4ac13bd 100644 --- a/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_9e3ec5(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.msl b/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.msl index 85aa4c977e..d08f76d7eb 100644 --- a/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_9e3ec5(texture2d tint_symbol_2) { - tint_symbol_2.write(int4(), uint2(int2())); +void textureStore_9e3ec5(texture2d tint_symbol_1) { + tint_symbol_1.write(int4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_9e3ec5(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_9e3ec5(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.hlsl index a71ff12581..e80007ede2 100644 --- a/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_ac67aa(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.msl b/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.msl index 6d6474648d..47a142d3bd 100644 --- a/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_ac67aa(texture3d tint_symbol_2) { - tint_symbol_2.write(uint4(), uint3(int3())); +void textureStore_ac67aa(texture3d tint_symbol_1) { + tint_symbol_1.write(uint4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_ac67aa(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_ac67aa(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.hlsl index 1d77639b39..60cde5e9ce 100644 --- a/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_b706b1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.msl b/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.msl index 1136938b29..9d9c3f7671 100644 --- a/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_b706b1(texture3d tint_symbol_2) { - tint_symbol_2.write(int4(), uint3(int3())); +void textureStore_b706b1(texture3d tint_symbol_1) { + tint_symbol_1.write(int4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_b706b1(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_b706b1(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.hlsl index bf654d6528..9b7d1734ed 100644 --- a/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_bbcb7f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.msl index 2d4ab0fdc9..4e92cd5470 100644 --- a/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_bbcb7f(texture2d tint_symbol_2) { - tint_symbol_2.write(int4(), uint2(int2())); +void textureStore_bbcb7f(texture2d tint_symbol_1) { + tint_symbol_1.write(int4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_bbcb7f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_bbcb7f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.hlsl index 8299ac7447..7e32849ac7 100644 --- a/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_be6e30(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.msl b/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.msl index a9134c6bab..a5e126d169 100644 --- a/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_be6e30(texture2d tint_symbol_2) { - tint_symbol_2.write(float4(), uint2(int2())); +void textureStore_be6e30(texture2d tint_symbol_1) { + tint_symbol_1.write(float4(), uint2(int2())); +} + +float4 vertex_main_inner(texture2d tint_symbol_2) { + textureStore_be6e30(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d tint_symbol_3 [[texture(0)]]) { - textureStore_be6e30(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.hlsl index 03ef5bc1ed..e7f85a4f7d 100644 --- a/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_bf775c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.msl b/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.msl index 524037d9ca..bbd28edf7b 100644 --- a/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_bf775c(texture1d tint_symbol_2) { - tint_symbol_2.write(int4(), uint(1)); +void textureStore_bf775c(texture1d tint_symbol_1) { + tint_symbol_1.write(int4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_bf775c(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_bf775c(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.hlsl index 5bf8ada3a8..21f9e2c045 100644 --- a/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_c5af1e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.msl b/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.msl index 15d4ba3f8c..220943d150 100644 --- a/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_c5af1e(texture3d tint_symbol_2) { - tint_symbol_2.write(float4(), uint3(int3())); +void textureStore_c5af1e(texture3d tint_symbol_1) { + tint_symbol_1.write(float4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_c5af1e(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_c5af1e(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/c863be.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/c863be.wgsl.expected.hlsl index 4912eacd31..80266bd8db 100644 --- a/test/intrinsics/gen/textureStore/c863be.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/c863be.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_c863be(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/c863be.wgsl.expected.msl b/test/intrinsics/gen/textureStore/c863be.wgsl.expected.msl index 880329213a..e55e2c48e1 100644 --- a/test/intrinsics/gen/textureStore/c863be.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/c863be.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_c863be(texture2d_array tint_symbol_2) { - tint_symbol_2.write(float4(), uint2(int2()), 1); +void textureStore_c863be(texture2d_array tint_symbol_1) { + tint_symbol_1.write(float4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_c863be(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_c863be(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.hlsl index 82ab66187b..d3ded482f8 100644 --- a/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_d73b5c(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.msl b/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.msl index fda662dd1c..e41c4390eb 100644 --- a/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_d73b5c(texture1d tint_symbol_2) { - tint_symbol_2.write(int4(), uint(1)); +void textureStore_d73b5c(texture1d tint_symbol_1) { + tint_symbol_1.write(int4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_d73b5c(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_d73b5c(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.hlsl index 383d9582e3..c46b2b6a1c 100644 --- a/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_dd7d81(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.msl b/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.msl index a838752601..3e3903830d 100644 --- a/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_dd7d81(texture3d tint_symbol_2) { - tint_symbol_2.write(float4(), uint3(int3())); +void textureStore_dd7d81(texture3d tint_symbol_1) { + tint_symbol_1.write(float4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_dd7d81(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_dd7d81(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/dde364.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/dde364.wgsl.expected.hlsl index 6775d47035..ad7b855c2c 100644 --- a/test/intrinsics/gen/textureStore/dde364.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/dde364.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_dde364(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/dde364.wgsl.expected.msl b/test/intrinsics/gen/textureStore/dde364.wgsl.expected.msl index aaea0199e2..115e7ab108 100644 --- a/test/intrinsics/gen/textureStore/dde364.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/dde364.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_dde364(texture2d_array tint_symbol_2) { - tint_symbol_2.write(uint4(), uint2(int2()), 1); +void textureStore_dde364(texture2d_array tint_symbol_1) { + tint_symbol_1.write(uint4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_dde364(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_dde364(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.hlsl index 2766a15bae..0cc502d3cf 100644 --- a/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_e885e8(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.msl b/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.msl index 9d476ea3ae..8ef1a12300 100644 --- a/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_e885e8(texture1d tint_symbol_2) { - tint_symbol_2.write(float4(), uint(1)); +void textureStore_e885e8(texture1d tint_symbol_1) { + tint_symbol_1.write(float4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_e885e8(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_e885e8(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.hlsl index 90d8682fb1..8d2e233f3c 100644 --- a/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_eb702f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.msl index 6047f22b54..41d7c7f4fa 100644 --- a/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_eb702f(texture3d tint_symbol_2) { - tint_symbol_2.write(float4(), uint3(int3())); +void textureStore_eb702f(texture3d tint_symbol_1) { + tint_symbol_1.write(float4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_eb702f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_eb702f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.hlsl index b89b62b95a..1268ff76fc 100644 --- a/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_eb78b9(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.msl b/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.msl index 966e81b670..c96a6be4aa 100644 --- a/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_eb78b9(texture3d tint_symbol_2) { - tint_symbol_2.write(int4(), uint3(int3())); +void textureStore_eb78b9(texture3d tint_symbol_1) { + tint_symbol_1.write(int4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_eb78b9(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_eb78b9(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.hlsl index c432941fb0..3b0c419c30 100644 --- a/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_ee6acc(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.msl b/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.msl index 54dd77b134..ff1b33757f 100644 --- a/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_ee6acc(texture3d tint_symbol_2) { - tint_symbol_2.write(float4(), uint3(int3())); +void textureStore_ee6acc(texture3d tint_symbol_1) { + tint_symbol_1.write(float4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_ee6acc(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_ee6acc(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.hlsl index 83c0963ba0..65da5f360c 100644 --- a/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_ef9f2f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.msl index 155a2392ca..ea717deaa0 100644 --- a/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_ef9f2f(texture3d tint_symbol_2) { - tint_symbol_2.write(uint4(), uint3(int3())); +void textureStore_ef9f2f(texture3d tint_symbol_1) { + tint_symbol_1.write(uint4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_ef9f2f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_ef9f2f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.hlsl index d2b20cbf9c..dd2268a5de 100644 --- a/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_f8dead(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.msl b/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.msl index 21a8db295f..86b857ad64 100644 --- a/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_f8dead(texture3d tint_symbol_2) { - tint_symbol_2.write(uint4(), uint3(int3())); +void textureStore_f8dead(texture3d tint_symbol_1) { + tint_symbol_1.write(uint4(), uint3(int3())); +} + +float4 vertex_main_inner(texture3d tint_symbol_2) { + textureStore_f8dead(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture3d tint_symbol_3 [[texture(0)]]) { - textureStore_f8dead(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture3d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.hlsl index 042fbffaa7..6194d27473 100644 --- a/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_f9be83(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.msl b/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.msl index b01a1a8c6b..c8bb94f237 100644 --- a/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_f9be83(texture2d_array tint_symbol_2) { - tint_symbol_2.write(int4(), uint2(int2()), 1); +void textureStore_f9be83(texture2d_array tint_symbol_1) { + tint_symbol_1.write(int4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_f9be83(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_f9be83(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.hlsl index 7edd42cc7e..8c233c3022 100644 --- a/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_fb9a8f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.msl index f324700a02..ee37f346e8 100644 --- a/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_fb9a8f(texture1d tint_symbol_2) { - tint_symbol_2.write(uint4(), uint(1)); +void textureStore_fb9a8f(texture1d tint_symbol_1) { + tint_symbol_1.write(uint4(), uint(1)); +} + +float4 vertex_main_inner(texture1d tint_symbol_2) { + textureStore_fb9a8f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture1d tint_symbol_3 [[texture(0)]]) { - textureStore_fb9a8f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture1d tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.hlsl index 511cf6506b..6cf5b0183c 100644 --- a/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.hlsl +++ b/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.hlsl @@ -8,10 +8,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { textureStore_fbf53f(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.msl index ba5cb0cfa6..68b5283fdf 100644 --- a/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.msl +++ b/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.msl @@ -5,14 +5,20 @@ struct tint_symbol { float4 value [[position]]; }; -void textureStore_fbf53f(texture2d_array tint_symbol_2) { - tint_symbol_2.write(int4(), uint2(int2()), 1); +void textureStore_fbf53f(texture2d_array tint_symbol_1) { + tint_symbol_1.write(int4(), uint2(int2()), 1); +} + +float4 vertex_main_inner(texture2d_array tint_symbol_2) { + textureStore_fbf53f(tint_symbol_2); + return float4(); } vertex tint_symbol vertex_main(texture2d_array tint_symbol_3 [[texture(0)]]) { - textureStore_fbf53f(tint_symbol_3); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + float4 const inner_result = vertex_main_inner(tint_symbol_3); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main(texture2d_array tint_symbol_4 [[texture(0)]]) { diff --git a/test/intrinsics/gen/transpose/2585cd.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/2585cd.wgsl.expected.hlsl index 2a84d71196..0dcb894c5e 100644 --- a/test/intrinsics/gen/transpose/2585cd.wgsl.expected.hlsl +++ b/test/intrinsics/gen/transpose/2585cd.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_2585cd(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/transpose/2585cd.wgsl.expected.msl b/test/intrinsics/gen/transpose/2585cd.wgsl.expected.msl index 6ae1bbd28d..b3b56c86ad 100644 --- a/test/intrinsics/gen/transpose/2585cd.wgsl.expected.msl +++ b/test/intrinsics/gen/transpose/2585cd.wgsl.expected.msl @@ -9,10 +9,16 @@ void transpose_2585cd() { float3x4 res = transpose(float4x3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_2585cd(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/transpose/31d679.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/31d679.wgsl.expected.hlsl index 17e49401ba..f81bc9b663 100644 --- a/test/intrinsics/gen/transpose/31d679.wgsl.expected.hlsl +++ b/test/intrinsics/gen/transpose/31d679.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_31d679(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/transpose/31d679.wgsl.expected.msl b/test/intrinsics/gen/transpose/31d679.wgsl.expected.msl index f76b6eba48..6e589edadb 100644 --- a/test/intrinsics/gen/transpose/31d679.wgsl.expected.msl +++ b/test/intrinsics/gen/transpose/31d679.wgsl.expected.msl @@ -9,10 +9,16 @@ void transpose_31d679() { float2x2 res = transpose(float2x2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_31d679(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/transpose/31e37e.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/31e37e.wgsl.expected.hlsl index a24ce445aa..7a98209a1b 100644 --- a/test/intrinsics/gen/transpose/31e37e.wgsl.expected.hlsl +++ b/test/intrinsics/gen/transpose/31e37e.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_31e37e(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/transpose/31e37e.wgsl.expected.msl b/test/intrinsics/gen/transpose/31e37e.wgsl.expected.msl index 6549c6053f..e0fd198dfe 100644 --- a/test/intrinsics/gen/transpose/31e37e.wgsl.expected.msl +++ b/test/intrinsics/gen/transpose/31e37e.wgsl.expected.msl @@ -9,10 +9,16 @@ void transpose_31e37e() { float2x4 res = transpose(float4x2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_31e37e(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/transpose/4ce359.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/4ce359.wgsl.expected.hlsl index 26f5d082db..ce5e8de2ea 100644 --- a/test/intrinsics/gen/transpose/4ce359.wgsl.expected.hlsl +++ b/test/intrinsics/gen/transpose/4ce359.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_4ce359(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/transpose/4ce359.wgsl.expected.msl b/test/intrinsics/gen/transpose/4ce359.wgsl.expected.msl index 82ad61fb2e..84d1993e11 100644 --- a/test/intrinsics/gen/transpose/4ce359.wgsl.expected.msl +++ b/test/intrinsics/gen/transpose/4ce359.wgsl.expected.msl @@ -9,10 +9,16 @@ void transpose_4ce359() { float4x2 res = transpose(float2x4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_4ce359(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.hlsl index 4ad47cfe79..2471cff5b4 100644 --- a/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_4dc9a1(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.msl b/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.msl index 856b2ccc36..b26fea1780 100644 --- a/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.msl +++ b/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.msl @@ -9,10 +9,16 @@ void transpose_4dc9a1() { float3x2 res = transpose(float2x3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_4dc9a1(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/transpose/854336.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/854336.wgsl.expected.hlsl index c6b76f19b5..e90dab8d76 100644 --- a/test/intrinsics/gen/transpose/854336.wgsl.expected.hlsl +++ b/test/intrinsics/gen/transpose/854336.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_854336(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/transpose/854336.wgsl.expected.msl b/test/intrinsics/gen/transpose/854336.wgsl.expected.msl index 11184d7922..745cc681d8 100644 --- a/test/intrinsics/gen/transpose/854336.wgsl.expected.msl +++ b/test/intrinsics/gen/transpose/854336.wgsl.expected.msl @@ -9,10 +9,16 @@ void transpose_854336() { float3x3 res = transpose(float3x3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_854336(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/transpose/c1b600.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/c1b600.wgsl.expected.hlsl index ee2635bc13..bc2bd204a6 100644 --- a/test/intrinsics/gen/transpose/c1b600.wgsl.expected.hlsl +++ b/test/intrinsics/gen/transpose/c1b600.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_c1b600(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/transpose/c1b600.wgsl.expected.msl b/test/intrinsics/gen/transpose/c1b600.wgsl.expected.msl index 59920dca8a..df995780b7 100644 --- a/test/intrinsics/gen/transpose/c1b600.wgsl.expected.msl +++ b/test/intrinsics/gen/transpose/c1b600.wgsl.expected.msl @@ -9,10 +9,16 @@ void transpose_c1b600() { float4x4 res = transpose(float4x4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_c1b600(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.hlsl index aba7571f94..860eed7630 100644 --- a/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.hlsl +++ b/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_d8f8ba(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.msl b/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.msl index 98f2384b41..fd5a36fd0c 100644 --- a/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.msl +++ b/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.msl @@ -9,10 +9,16 @@ void transpose_d8f8ba() { float4x3 res = transpose(float3x4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_d8f8ba(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.hlsl index 49a9f84c38..fc957c6b36 100644 --- a/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_ed4bdc(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.msl b/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.msl index 4fdec15767..5952069a30 100644 --- a/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.msl +++ b/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.msl @@ -9,10 +9,16 @@ void transpose_ed4bdc() { float2x3 res = transpose(float3x2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { transpose_ed4bdc(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/trunc/562d05.wgsl.expected.hlsl b/test/intrinsics/gen/trunc/562d05.wgsl.expected.hlsl index ab059b2531..2d89674637 100644 --- a/test/intrinsics/gen/trunc/562d05.wgsl.expected.hlsl +++ b/test/intrinsics/gen/trunc/562d05.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { trunc_562d05(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/trunc/562d05.wgsl.expected.msl b/test/intrinsics/gen/trunc/562d05.wgsl.expected.msl index 062cae497c..75d45acbcb 100644 --- a/test/intrinsics/gen/trunc/562d05.wgsl.expected.msl +++ b/test/intrinsics/gen/trunc/562d05.wgsl.expected.msl @@ -9,10 +9,16 @@ void trunc_562d05() { float3 res = trunc(float3()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { trunc_562d05(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/trunc/e183aa.wgsl.expected.hlsl b/test/intrinsics/gen/trunc/e183aa.wgsl.expected.hlsl index 9e2b9e1b59..d65dc52f04 100644 --- a/test/intrinsics/gen/trunc/e183aa.wgsl.expected.hlsl +++ b/test/intrinsics/gen/trunc/e183aa.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { trunc_e183aa(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/trunc/e183aa.wgsl.expected.msl b/test/intrinsics/gen/trunc/e183aa.wgsl.expected.msl index 847cb9d741..b6fb817f91 100644 --- a/test/intrinsics/gen/trunc/e183aa.wgsl.expected.msl +++ b/test/intrinsics/gen/trunc/e183aa.wgsl.expected.msl @@ -9,10 +9,16 @@ void trunc_e183aa() { float4 res = trunc(float4()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { trunc_e183aa(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/trunc/eb83df.wgsl.expected.hlsl b/test/intrinsics/gen/trunc/eb83df.wgsl.expected.hlsl index 1526f70879..2e556ed556 100644 --- a/test/intrinsics/gen/trunc/eb83df.wgsl.expected.hlsl +++ b/test/intrinsics/gen/trunc/eb83df.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { trunc_eb83df(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/trunc/eb83df.wgsl.expected.msl b/test/intrinsics/gen/trunc/eb83df.wgsl.expected.msl index e9b0df0e6c..5e951029cf 100644 --- a/test/intrinsics/gen/trunc/eb83df.wgsl.expected.msl +++ b/test/intrinsics/gen/trunc/eb83df.wgsl.expected.msl @@ -9,10 +9,16 @@ void trunc_eb83df() { float res = trunc(1.0f); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { trunc_eb83df(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/trunc/f370d3.wgsl.expected.hlsl b/test/intrinsics/gen/trunc/f370d3.wgsl.expected.hlsl index 679f4162d3..bd5514f382 100644 --- a/test/intrinsics/gen/trunc/f370d3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/trunc/f370d3.wgsl.expected.hlsl @@ -6,10 +6,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { trunc_f370d3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/trunc/f370d3.wgsl.expected.msl b/test/intrinsics/gen/trunc/f370d3.wgsl.expected.msl index 34e6620db2..da0192f46e 100644 --- a/test/intrinsics/gen/trunc/f370d3.wgsl.expected.msl +++ b/test/intrinsics/gen/trunc/f370d3.wgsl.expected.msl @@ -9,10 +9,16 @@ void trunc_f370d3() { float2 res = trunc(float2()); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { trunc_f370d3(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.hlsl b/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.hlsl index b828aaa304..3402aff335 100644 --- a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.hlsl +++ b/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.hlsl @@ -11,10 +11,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { unpack2x16float_32a5cf(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.msl b/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.msl index e5746f1224..780a847eed 100644 --- a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.msl +++ b/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.msl @@ -9,10 +9,16 @@ void unpack2x16float_32a5cf() { float2 res = float2(as_type(1u)); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { unpack2x16float_32a5cf(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.hlsl b/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.hlsl index 75ed01c419..3ad23703a7 100644 --- a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.hlsl +++ b/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { unpack2x16snorm_b4aea6(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.msl b/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.msl index 2374a87602..4b72608903 100644 --- a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.msl +++ b/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.msl @@ -9,10 +9,16 @@ void unpack2x16snorm_b4aea6() { float2 res = unpack_snorm2x16_to_float(1u); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { unpack2x16snorm_b4aea6(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.hlsl b/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.hlsl index 3481fbb616..a404f41658 100644 --- a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.hlsl +++ b/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { unpack2x16unorm_7699c0(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.msl b/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.msl index 45815ca491..c4eba4ece1 100644 --- a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.msl +++ b/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.msl @@ -9,10 +9,16 @@ void unpack2x16unorm_7699c0() { float2 res = unpack_unorm2x16_to_float(1u); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { unpack2x16unorm_7699c0(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.hlsl b/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.hlsl index 849087da61..c7e5031c16 100644 --- a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { unpack4x8snorm_523fb3(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.msl b/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.msl index 06cc514180..e3e1244bd4 100644 --- a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.msl +++ b/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.msl @@ -9,10 +9,16 @@ void unpack4x8snorm_523fb3() { float4 res = unpack_snorm4x8_to_float(1u); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { unpack4x8snorm_523fb3(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.hlsl b/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.hlsl index 6e048429bb..78266e5a9e 100644 --- a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.hlsl +++ b/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.hlsl @@ -12,10 +12,16 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol vertex_main() { +float4 vertex_main_inner() { unpack4x8unorm_750c74(); - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } void fragment_main() { diff --git a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.msl b/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.msl index e6226c8009..e05632de07 100644 --- a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.msl +++ b/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.msl @@ -9,10 +9,16 @@ void unpack4x8unorm_750c74() { float4 res = unpack_unorm4x8_to_float(1u); } -vertex tint_symbol vertex_main() { +float4 vertex_main_inner() { unpack4x8unorm_750c74(); - tint_symbol const tint_symbol_1 = {.value=float4()}; - return tint_symbol_1; + return float4(); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } fragment void fragment_main() { diff --git a/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.hlsl b/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.hlsl index 16dec5d56d..f031e02803 100644 --- a/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.hlsl +++ b/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.hlsl @@ -28,11 +28,17 @@ struct tint_symbol_3 { float4 tint_symbol_1_1 : SV_Position; }; -tint_symbol_3 vertex_main() { +vertex_main_out vertex_main_inner() { vertex_main_1(); const vertex_main_out tint_symbol_4 = {tint_symbol_1}; - const tint_symbol_3 tint_symbol_5 = {tint_symbol_4.tint_symbol_1_1}; - return tint_symbol_5; + return tint_symbol_4; +} + +tint_symbol_3 vertex_main() { + const vertex_main_out inner_result = vertex_main_inner(); + tint_symbol_3 wrapper_result = (tint_symbol_3)0; + wrapper_result.tint_symbol_1_1 = inner_result.tint_symbol_1_1; + return wrapper_result; } void fragment_main_1() { diff --git a/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.msl b/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.msl index d68fff0bee..ab54f6fbba 100644 --- a/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.msl +++ b/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.msl @@ -8,49 +8,55 @@ struct tint_symbol_3 { float4 tint_symbol_1_1 [[position]]; }; -void textureDimensions_f60bdb(depth2d_ms tint_symbol_6) { +void textureDimensions_f60bdb(depth2d_ms tint_symbol_5) { int2 res = int2(0, 0); - int2 const x_16 = int2(int2(tint_symbol_6.get_width(), tint_symbol_6.get_height())); + int2 const x_16 = int2(int2(tint_symbol_5.get_width(), tint_symbol_5.get_height())); res = x_16; return; } -void tint_symbol_2(float4 tint_symbol, thread float4* const tint_symbol_7) { - *(tint_symbol_7) = tint_symbol; +void tint_symbol_2(float4 tint_symbol, thread float4* const tint_symbol_6) { + *(tint_symbol_6) = tint_symbol; return; } -void vertex_main_1(depth2d_ms tint_symbol_8, thread float4* const tint_symbol_9) { - textureDimensions_f60bdb(tint_symbol_8); - tint_symbol_2(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_symbol_9); +void vertex_main_1(depth2d_ms tint_symbol_7, thread float4* const tint_symbol_8) { + textureDimensions_f60bdb(tint_symbol_7); + tint_symbol_2(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_symbol_8); return; } -vertex tint_symbol_3 vertex_main(depth2d_ms tint_symbol_10 [[texture(0)]]) { - thread float4 tint_symbol_11 = float4(0.0f, 0.0f, 0.0f, 0.0f); - vertex_main_1(tint_symbol_10, &(tint_symbol_11)); - vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.tint_symbol_1_1=tint_symbol_4.tint_symbol_1_1}; - return tint_symbol_5; +vertex_main_out vertex_main_inner(depth2d_ms tint_symbol_9, thread float4* const tint_symbol_10) { + vertex_main_1(tint_symbol_9, tint_symbol_10); + vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=*(tint_symbol_10)}; + return tint_symbol_4; } -void fragment_main_1(depth2d_ms tint_symbol_12) { - textureDimensions_f60bdb(tint_symbol_12); +vertex tint_symbol_3 vertex_main(depth2d_ms tint_symbol_11 [[texture(0)]]) { + thread float4 tint_symbol_12 = float4(0.0f, 0.0f, 0.0f, 0.0f); + vertex_main_out const inner_result = vertex_main_inner(tint_symbol_11, &(tint_symbol_12)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.tint_symbol_1_1 = inner_result.tint_symbol_1_1; + return wrapper_result; +} + +void fragment_main_1(depth2d_ms tint_symbol_13) { + textureDimensions_f60bdb(tint_symbol_13); return; } -fragment void fragment_main(depth2d_ms tint_symbol_13 [[texture(0)]]) { - fragment_main_1(tint_symbol_13); +fragment void fragment_main(depth2d_ms tint_symbol_14 [[texture(0)]]) { + fragment_main_1(tint_symbol_14); return; } -void compute_main_1(depth2d_ms tint_symbol_14) { - textureDimensions_f60bdb(tint_symbol_14); +void compute_main_1(depth2d_ms tint_symbol_15) { + textureDimensions_f60bdb(tint_symbol_15); return; } -kernel void compute_main(depth2d_ms tint_symbol_15 [[texture(0)]]) { - compute_main_1(tint_symbol_15); +kernel void compute_main(depth2d_ms tint_symbol_16 [[texture(0)]]) { + compute_main_1(tint_symbol_16); return; } diff --git a/test/intrinsics/textureLoad/depth_ms.spvasm.expected.hlsl b/test/intrinsics/textureLoad/depth_ms.spvasm.expected.hlsl index 8acb0b5935..41cb191251 100644 --- a/test/intrinsics/textureLoad/depth_ms.spvasm.expected.hlsl +++ b/test/intrinsics/textureLoad/depth_ms.spvasm.expected.hlsl @@ -26,11 +26,17 @@ struct tint_symbol_3 { float4 tint_symbol_1_1 : SV_Position; }; -tint_symbol_3 vertex_main() { +vertex_main_out vertex_main_inner() { vertex_main_1(); const vertex_main_out tint_symbol_4 = {tint_symbol_1}; - const tint_symbol_3 tint_symbol_5 = {tint_symbol_4.tint_symbol_1_1}; - return tint_symbol_5; + return tint_symbol_4; +} + +tint_symbol_3 vertex_main() { + const vertex_main_out inner_result = vertex_main_inner(); + tint_symbol_3 wrapper_result = (tint_symbol_3)0; + wrapper_result.tint_symbol_1_1 = inner_result.tint_symbol_1_1; + return wrapper_result; } void fragment_main_1() { diff --git a/test/intrinsics/textureLoad/depth_ms.spvasm.expected.msl b/test/intrinsics/textureLoad/depth_ms.spvasm.expected.msl index 05a872ba46..9b56186436 100644 --- a/test/intrinsics/textureLoad/depth_ms.spvasm.expected.msl +++ b/test/intrinsics/textureLoad/depth_ms.spvasm.expected.msl @@ -8,49 +8,55 @@ struct tint_symbol_3 { float4 tint_symbol_1_1 [[position]]; }; -void textureLoad_6273b1(depth2d_ms tint_symbol_6) { +void textureLoad_6273b1(depth2d_ms tint_symbol_5) { float res = 0.0f; - float4 const x_17 = float4(tint_symbol_6.read(uint2(int2(0, 0)), 1), 0.0f, 0.0f, 0.0f); + float4 const x_17 = float4(tint_symbol_5.read(uint2(int2(0, 0)), 1), 0.0f, 0.0f, 0.0f); res = x_17.x; return; } -void tint_symbol_2(float4 tint_symbol, thread float4* const tint_symbol_7) { - *(tint_symbol_7) = tint_symbol; +void tint_symbol_2(float4 tint_symbol, thread float4* const tint_symbol_6) { + *(tint_symbol_6) = tint_symbol; return; } -void vertex_main_1(depth2d_ms tint_symbol_8, thread float4* const tint_symbol_9) { - textureLoad_6273b1(tint_symbol_8); - tint_symbol_2(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_symbol_9); +void vertex_main_1(depth2d_ms tint_symbol_7, thread float4* const tint_symbol_8) { + textureLoad_6273b1(tint_symbol_7); + tint_symbol_2(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_symbol_8); return; } -vertex tint_symbol_3 vertex_main(depth2d_ms tint_symbol_10 [[texture(0)]]) { - thread float4 tint_symbol_11 = float4(0.0f, 0.0f, 0.0f, 0.0f); - vertex_main_1(tint_symbol_10, &(tint_symbol_11)); - vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.tint_symbol_1_1=tint_symbol_4.tint_symbol_1_1}; - return tint_symbol_5; +vertex_main_out vertex_main_inner(depth2d_ms tint_symbol_9, thread float4* const tint_symbol_10) { + vertex_main_1(tint_symbol_9, tint_symbol_10); + vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=*(tint_symbol_10)}; + return tint_symbol_4; } -void fragment_main_1(depth2d_ms tint_symbol_12) { - textureLoad_6273b1(tint_symbol_12); +vertex tint_symbol_3 vertex_main(depth2d_ms tint_symbol_11 [[texture(0)]]) { + thread float4 tint_symbol_12 = float4(0.0f, 0.0f, 0.0f, 0.0f); + vertex_main_out const inner_result = vertex_main_inner(tint_symbol_11, &(tint_symbol_12)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.tint_symbol_1_1 = inner_result.tint_symbol_1_1; + return wrapper_result; +} + +void fragment_main_1(depth2d_ms tint_symbol_13) { + textureLoad_6273b1(tint_symbol_13); return; } -fragment void fragment_main(depth2d_ms tint_symbol_13 [[texture(0)]]) { - fragment_main_1(tint_symbol_13); +fragment void fragment_main(depth2d_ms tint_symbol_14 [[texture(0)]]) { + fragment_main_1(tint_symbol_14); return; } -void compute_main_1(depth2d_ms tint_symbol_14) { - textureLoad_6273b1(tint_symbol_14); +void compute_main_1(depth2d_ms tint_symbol_15) { + textureLoad_6273b1(tint_symbol_15); return; } -kernel void compute_main(depth2d_ms tint_symbol_15 [[texture(0)]]) { - compute_main_1(tint_symbol_15); +kernel void compute_main(depth2d_ms tint_symbol_16 [[texture(0)]]) { + compute_main_1(tint_symbol_16); return; } diff --git a/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.hlsl b/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.hlsl index a968cd1da5..4d492d297e 100644 --- a/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.hlsl +++ b/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.hlsl @@ -28,11 +28,17 @@ struct tint_symbol_3 { float4 tint_symbol_1_1 : SV_Position; }; -tint_symbol_3 vertex_main() { +vertex_main_out vertex_main_inner() { vertex_main_1(); const vertex_main_out tint_symbol_4 = {tint_symbol_1}; - const tint_symbol_3 tint_symbol_5 = {tint_symbol_4.tint_symbol_1_1}; - return tint_symbol_5; + return tint_symbol_4; +} + +tint_symbol_3 vertex_main() { + const vertex_main_out inner_result = vertex_main_inner(); + tint_symbol_3 wrapper_result = (tint_symbol_3)0; + wrapper_result.tint_symbol_1_1 = inner_result.tint_symbol_1_1; + return wrapper_result; } void fragment_main_1() { diff --git a/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.msl b/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.msl index 572f1e0a28..a91182ba3e 100644 --- a/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.msl +++ b/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.msl @@ -8,49 +8,55 @@ struct tint_symbol_3 { float4 tint_symbol_1_1 [[position]]; }; -void textureNumSamples_a3c8a0(depth2d_ms tint_symbol_6) { +void textureNumSamples_a3c8a0(depth2d_ms tint_symbol_5) { int res = 0; - int const x_16 = int(tint_symbol_6.get_num_samples()); + int const x_16 = int(tint_symbol_5.get_num_samples()); res = x_16; return; } -void tint_symbol_2(float4 tint_symbol, thread float4* const tint_symbol_7) { - *(tint_symbol_7) = tint_symbol; +void tint_symbol_2(float4 tint_symbol, thread float4* const tint_symbol_6) { + *(tint_symbol_6) = tint_symbol; return; } -void vertex_main_1(depth2d_ms tint_symbol_8, thread float4* const tint_symbol_9) { - textureNumSamples_a3c8a0(tint_symbol_8); - tint_symbol_2(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_symbol_9); +void vertex_main_1(depth2d_ms tint_symbol_7, thread float4* const tint_symbol_8) { + textureNumSamples_a3c8a0(tint_symbol_7); + tint_symbol_2(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_symbol_8); return; } -vertex tint_symbol_3 vertex_main(depth2d_ms tint_symbol_10 [[texture(0)]]) { - thread float4 tint_symbol_11 = float4(0.0f, 0.0f, 0.0f, 0.0f); - vertex_main_1(tint_symbol_10, &(tint_symbol_11)); - vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.tint_symbol_1_1=tint_symbol_4.tint_symbol_1_1}; - return tint_symbol_5; +vertex_main_out vertex_main_inner(depth2d_ms tint_symbol_9, thread float4* const tint_symbol_10) { + vertex_main_1(tint_symbol_9, tint_symbol_10); + vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=*(tint_symbol_10)}; + return tint_symbol_4; } -void fragment_main_1(depth2d_ms tint_symbol_12) { - textureNumSamples_a3c8a0(tint_symbol_12); +vertex tint_symbol_3 vertex_main(depth2d_ms tint_symbol_11 [[texture(0)]]) { + thread float4 tint_symbol_12 = float4(0.0f, 0.0f, 0.0f, 0.0f); + vertex_main_out const inner_result = vertex_main_inner(tint_symbol_11, &(tint_symbol_12)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.tint_symbol_1_1 = inner_result.tint_symbol_1_1; + return wrapper_result; +} + +void fragment_main_1(depth2d_ms tint_symbol_13) { + textureNumSamples_a3c8a0(tint_symbol_13); return; } -fragment void fragment_main(depth2d_ms tint_symbol_13 [[texture(0)]]) { - fragment_main_1(tint_symbol_13); +fragment void fragment_main(depth2d_ms tint_symbol_14 [[texture(0)]]) { + fragment_main_1(tint_symbol_14); return; } -void compute_main_1(depth2d_ms tint_symbol_14) { - textureNumSamples_a3c8a0(tint_symbol_14); +void compute_main_1(depth2d_ms tint_symbol_15) { + textureNumSamples_a3c8a0(tint_symbol_15); return; } -kernel void compute_main(depth2d_ms tint_symbol_15 [[texture(0)]]) { - compute_main_1(tint_symbol_15); +kernel void compute_main(depth2d_ms tint_symbol_16 [[texture(0)]]) { + compute_main_1(tint_symbol_16); return; } diff --git a/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.hlsl b/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.hlsl index 1d722c728d..fbd6076821 100644 --- a/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.hlsl +++ b/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.hlsl @@ -4,14 +4,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void main_inner(uint local_invocation_index) { { i = 0; } GroupMemoryBarrierWithGroupSync(); i = 123; const int use = (i + 1); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.msl b/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.msl index bc311a2bdc..7853720bbc 100644 --- a/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.msl +++ b/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.msl @@ -1,14 +1,18 @@ #include using namespace metal; -kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) { - threadgroup int tint_symbol_2; +void tint_symbol_inner(uint local_invocation_index, threadgroup int* const tint_symbol_1) { { - tint_symbol_2 = int(); + *(tint_symbol_1) = int(); } threadgroup_barrier(mem_flags::mem_threadgroup); - tint_symbol_2 = 123; - int const use = as_type((as_type(tint_symbol_2) + as_type(1))); + *(tint_symbol_1) = 123; + int const use = as_type((as_type(*(tint_symbol_1)) + as_type(1))); +} + +kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) { + threadgroup int tint_symbol_2; + tint_symbol_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/samples/compute_boids.wgsl.expected.hlsl b/test/samples/compute_boids.wgsl.expected.hlsl index 3a883073d0..a19fa71a12 100644 --- a/test/samples/compute_boids.wgsl.expected.hlsl +++ b/test/samples/compute_boids.wgsl.expected.hlsl @@ -7,23 +7,32 @@ struct tint_symbol_2 { float4 value : SV_Position; }; -tint_symbol_2 vert_main(tint_symbol_1 tint_symbol) { - const float2 a_particlePos = tint_symbol.a_particlePos; - const float2 a_particleVel = tint_symbol.a_particleVel; - const float2 a_pos = tint_symbol.a_pos; +float4 vert_main_inner(float2 a_particlePos, float2 a_particleVel, float2 a_pos) { float angle = -(atan2(a_particleVel.x, a_particleVel.y)); float2 pos = float2(((a_pos.x * cos(angle)) - (a_pos.y * sin(angle))), ((a_pos.x * sin(angle)) + (a_pos.y * cos(angle)))); - const tint_symbol_2 tint_symbol_9 = {float4((pos + a_particlePos), 0.0f, 1.0f)}; - return tint_symbol_9; + return float4((pos + a_particlePos), 0.0f, 1.0f); +} + +tint_symbol_2 vert_main(tint_symbol_1 tint_symbol) { + const float4 inner_result = vert_main_inner(tint_symbol.a_particlePos, tint_symbol.a_particleVel, tint_symbol.a_pos); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.value = inner_result; + return wrapper_result; } struct tint_symbol_3 { float4 value : SV_Target0; }; +float4 frag_main_inner() { + return float4(1.0f, 1.0f, 1.0f, 1.0f); +} + tint_symbol_3 frag_main() { - const tint_symbol_3 tint_symbol_10 = {float4(1.0f, 1.0f, 1.0f, 1.0f)}; - return tint_symbol_10; + const float4 inner_result_1 = frag_main_inner(); + tint_symbol_3 wrapper_result_1 = (tint_symbol_3)0; + wrapper_result_1.value = inner_result_1; + return wrapper_result_1; } cbuffer cbuffer_params : register(b0, space0) { @@ -36,9 +45,7 @@ struct tint_symbol_5 { uint3 gl_GlobalInvocationID : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void comp_main(tint_symbol_5 tint_symbol_4) { - const uint3 gl_GlobalInvocationID = tint_symbol_4.gl_GlobalInvocationID; +void comp_main_inner(uint3 gl_GlobalInvocationID) { uint index = gl_GlobalInvocationID.x; if ((index >= 5u)) { return; @@ -95,5 +102,10 @@ void comp_main(tint_symbol_5 tint_symbol_4) { } particlesB.Store2((16u * index), asuint(vPos)); particlesB.Store2(((16u * index) + 8u), asuint(vVel)); +} + +[numthreads(1, 1, 1)] +void comp_main(tint_symbol_5 tint_symbol_4) { + comp_main_inner(tint_symbol_4.gl_GlobalInvocationID); return; } diff --git a/test/samples/compute_boids.wgsl.expected.msl b/test/samples/compute_boids.wgsl.expected.msl index 980c2378fb..005dfaa103 100644 --- a/test/samples/compute_boids.wgsl.expected.msl +++ b/test/samples/compute_boids.wgsl.expected.msl @@ -32,22 +32,31 @@ struct Particles { /* 0x0000 */ tint_array_wrapper particles; }; -vertex tint_symbol_2 vert_main(tint_symbol_1 tint_symbol [[stage_in]]) { - float2 const a_particlePos = tint_symbol.a_particlePos; - float2 const a_particleVel = tint_symbol.a_particleVel; - float2 const a_pos = tint_symbol.a_pos; +float4 vert_main_inner(float2 a_particlePos, float2 a_particleVel, float2 a_pos) { float angle = -(atan2(a_particleVel.x, a_particleVel.y)); float2 pos = float2(((a_pos.x * cos(angle)) - (a_pos.y * sin(angle))), ((a_pos.x * sin(angle)) + (a_pos.y * cos(angle)))); - tint_symbol_2 const tint_symbol_5 = {.value=float4((pos + a_particlePos), 0.0f, 1.0f)}; - return tint_symbol_5; + return float4((pos + a_particlePos), 0.0f, 1.0f); +} + +vertex tint_symbol_2 vert_main(tint_symbol_1 tint_symbol [[stage_in]]) { + float4 const inner_result = vert_main_inner(tint_symbol.a_particlePos, tint_symbol.a_particleVel, tint_symbol.a_pos); + tint_symbol_2 wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +float4 frag_main_inner() { + return float4(1.0f, 1.0f, 1.0f, 1.0f); } fragment tint_symbol_3 frag_main() { - tint_symbol_3 const tint_symbol_6 = {.value=float4(1.0f, 1.0f, 1.0f, 1.0f)}; - return tint_symbol_6; + float4 const inner_result_1 = frag_main_inner(); + tint_symbol_3 wrapper_result_1 = {}; + wrapper_result_1.value = inner_result_1; + return wrapper_result_1; } -kernel void comp_main(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], constant SimParams& params [[buffer(0)]], device Particles& particlesA [[buffer(1)]], device Particles& particlesB [[buffer(2)]]) { +void comp_main_inner(constant SimParams& params, device Particles& particlesA, device Particles& particlesB, uint3 gl_GlobalInvocationID) { uint index = gl_GlobalInvocationID.x; if ((index >= 5u)) { return; @@ -102,6 +111,10 @@ kernel void comp_main(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], c } particlesB.particles.arr[index].pos = vPos; particlesB.particles.arr[index].vel = vVel; +} + +kernel void comp_main(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], constant SimParams& params [[buffer(0)]], device Particles& particlesA [[buffer(1)]], device Particles& particlesB [[buffer(2)]]) { + comp_main_inner(params, particlesA, particlesB, gl_GlobalInvocationID); return; } diff --git a/test/samples/cube.wgsl.expected.hlsl b/test/samples/cube.wgsl.expected.hlsl index f83fd1f5e0..82af450e84 100644 --- a/test/samples/cube.wgsl.expected.hlsl +++ b/test/samples/cube.wgsl.expected.hlsl @@ -27,13 +27,20 @@ float4x4 tint_symbol_6(uint4 buffer[4], uint offset) { return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4])); } -tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol) { - const VertexInput input = {tint_symbol.cur_position, tint_symbol.color}; +VertexOutput vtx_main_inner(VertexInput input) { VertexOutput output = (VertexOutput)0; output.Position = mul(input.cur_position, tint_symbol_6(uniforms, 0u)); output.vtxFragColor = input.color; - const tint_symbol_2 tint_symbol_8 = {output.vtxFragColor, output.Position}; - return tint_symbol_8; + return output; +} + +tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol) { + const VertexInput tint_symbol_8 = {tint_symbol.cur_position, tint_symbol.color}; + const VertexOutput inner_result = vtx_main_inner(tint_symbol_8); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.vtxFragColor = inner_result.vtxFragColor; + wrapper_result.Position = inner_result.Position; + return wrapper_result; } struct tint_symbol_4 { @@ -43,8 +50,13 @@ struct tint_symbol_5 { float4 value : SV_Target0; }; -tint_symbol_5 frag_main(tint_symbol_4 tint_symbol_3) { - const float4 fragColor = tint_symbol_3.fragColor; - const tint_symbol_5 tint_symbol_9 = {fragColor}; - return tint_symbol_9; +float4 frag_main_inner(float4 fragColor) { + return fragColor; +} + +tint_symbol_5 frag_main(tint_symbol_4 tint_symbol_3) { + const float4 inner_result_1 = frag_main_inner(tint_symbol_3.fragColor); + tint_symbol_5 wrapper_result_1 = (tint_symbol_5)0; + wrapper_result_1.value = inner_result_1; + return wrapper_result_1; } diff --git a/test/samples/cube.wgsl.expected.msl b/test/samples/cube.wgsl.expected.msl index 0e581be1e5..1ce68b4e30 100644 --- a/test/samples/cube.wgsl.expected.msl +++ b/test/samples/cube.wgsl.expected.msl @@ -27,18 +27,30 @@ struct tint_symbol_5 { float4 value [[color(0)]]; }; -vertex tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol [[stage_in]], constant Uniforms& uniforms [[buffer(0)]]) { - VertexInput const input = {.cur_position=tint_symbol.cur_position, .color=tint_symbol.color}; +VertexOutput vtx_main_inner(constant Uniforms& uniforms, VertexInput input) { VertexOutput output = {}; output.Position = (uniforms.modelViewProjectionMatrix * input.cur_position); output.vtxFragColor = input.color; - tint_symbol_2 const tint_symbol_6 = {.vtxFragColor=output.vtxFragColor, .Position=output.Position}; - return tint_symbol_6; + return output; +} + +vertex tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol [[stage_in]], constant Uniforms& uniforms [[buffer(0)]]) { + VertexInput const tint_symbol_6 = {.cur_position=tint_symbol.cur_position, .color=tint_symbol.color}; + VertexOutput const inner_result = vtx_main_inner(uniforms, tint_symbol_6); + tint_symbol_2 wrapper_result = {}; + wrapper_result.vtxFragColor = inner_result.vtxFragColor; + wrapper_result.Position = inner_result.Position; + return wrapper_result; +} + +float4 frag_main_inner(float4 fragColor) { + return fragColor; } fragment tint_symbol_5 frag_main(tint_symbol_4 tint_symbol_3 [[stage_in]]) { - float4 const fragColor = tint_symbol_3.fragColor; - tint_symbol_5 const tint_symbol_7 = {.value=fragColor}; - return tint_symbol_7; + float4 const inner_result_1 = frag_main_inner(tint_symbol_3.fragColor); + tint_symbol_5 wrapper_result_1 = {}; + wrapper_result_1.value = inner_result_1; + return wrapper_result_1; } diff --git a/test/samples/simple.wgsl.expected.hlsl b/test/samples/simple.wgsl.expected.hlsl index 9771c4264d..93c7fa7301 100644 --- a/test/samples/simple.wgsl.expected.hlsl +++ b/test/samples/simple.wgsl.expected.hlsl @@ -5,9 +5,15 @@ struct tint_symbol { float4 value : SV_Target0; }; -tint_symbol main() { +float4 main_inner() { float2 a = float2(0.0f, 0.0f); bar(); - const tint_symbol tint_symbol_1 = {float4(0.400000006f, 0.400000006f, 0.800000012f, 1.0f)}; - return tint_symbol_1; + return float4(0.400000006f, 0.400000006f, 0.800000012f, 1.0f); +} + +tint_symbol main() { + const float4 inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/samples/simple.wgsl.expected.msl b/test/samples/simple.wgsl.expected.msl index 0429e295e8..2f376672fb 100644 --- a/test/samples/simple.wgsl.expected.msl +++ b/test/samples/simple.wgsl.expected.msl @@ -8,10 +8,16 @@ struct tint_symbol_1 { void bar() { } -fragment tint_symbol_1 tint_symbol() { +float4 tint_symbol_inner() { float2 a = float2(); bar(); - tint_symbol_1 const tint_symbol_2 = {.value=float4(0.400000006f, 0.400000006f, 0.800000012f, 1.0f)}; - return tint_symbol_2; + return float4(0.400000006f, 0.400000006f, 0.800000012f, 1.0f); +} + +fragment tint_symbol_1 tint_symbol() { + float4 const inner_result = tint_symbol_inner(); + tint_symbol_1 wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/samples/simple_vertex.spvasm.expected.hlsl b/test/samples/simple_vertex.spvasm.expected.hlsl index 05826f0dd1..b262a94103 100644 --- a/test/samples/simple_vertex.spvasm.expected.hlsl +++ b/test/samples/simple_vertex.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { float4 gl_Position : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {gl_Position}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/samples/simple_vertex.spvasm.expected.msl b/test/samples/simple_vertex.spvasm.expected.msl index cbba9403c3..8622e3b4ca 100644 --- a/test/samples/simple_vertex.spvasm.expected.msl +++ b/test/samples/simple_vertex.spvasm.expected.msl @@ -8,16 +8,22 @@ struct tint_symbol_1 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_4) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); +void main_1(thread float4* const tint_symbol_3) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_4)}; + return tint_symbol_2; +} + vertex tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.gl_Position=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/samples/triangle.wgsl.expected.hlsl b/test/samples/triangle.wgsl.expected.hlsl index 21724d6b23..47ca492cd9 100644 --- a/test/samples/triangle.wgsl.expected.hlsl +++ b/test/samples/triangle.wgsl.expected.hlsl @@ -5,18 +5,29 @@ struct tint_symbol_2 { float4 value : SV_Position; }; -tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol) { - const uint VertexIndex = tint_symbol.VertexIndex; +float4 vtx_main_inner(uint VertexIndex) { float2 pos[3] = {float2(0.0f, 0.5f), float2(-0.5f, -0.5f), float2(0.5f, -0.5f)}; - const tint_symbol_2 tint_symbol_4 = {float4(pos[VertexIndex], 0.0f, 1.0f)}; - return tint_symbol_4; + return float4(pos[VertexIndex], 0.0f, 1.0f); +} + +tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol) { + const float4 inner_result = vtx_main_inner(tint_symbol.VertexIndex); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.value = inner_result; + return wrapper_result; } struct tint_symbol_3 { float4 value : SV_Target0; }; -tint_symbol_3 frag_main() { - const tint_symbol_3 tint_symbol_5 = {float4(1.0f, 0.0f, 0.0f, 1.0f)}; - return tint_symbol_5; +float4 frag_main_inner() { + return float4(1.0f, 0.0f, 0.0f, 1.0f); +} + +tint_symbol_3 frag_main() { + const float4 inner_result_1 = frag_main_inner(); + tint_symbol_3 wrapper_result_1 = (tint_symbol_3)0; + wrapper_result_1.value = inner_result_1; + return wrapper_result_1; } diff --git a/test/samples/triangle.wgsl.expected.msl b/test/samples/triangle.wgsl.expected.msl index a0657e47a7..7b4bccf815 100644 --- a/test/samples/triangle.wgsl.expected.msl +++ b/test/samples/triangle.wgsl.expected.msl @@ -1,24 +1,36 @@ #include using namespace metal; -struct tint_symbol_1 { +struct tint_symbol { float4 value [[position]]; }; struct tint_array_wrapper { float2 arr[3]; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 value [[color(0)]]; }; -vertex tint_symbol_1 vtx_main(uint VertexIndex [[vertex_id]]) { +float4 vtx_main_inner(uint VertexIndex) { tint_array_wrapper pos = {.arr={float2(0.0f, 0.5f), float2(-0.5f, -0.5f), float2(0.5f, -0.5f)}}; - tint_symbol_1 const tint_symbol_3 = {.value=float4(pos.arr[VertexIndex], 0.0f, 1.0f)}; - return tint_symbol_3; + return float4(pos.arr[VertexIndex], 0.0f, 1.0f); } -fragment tint_symbol_2 frag_main() { - tint_symbol_2 const tint_symbol_4 = {.value=float4(1.0f, 0.0f, 0.0f, 1.0f)}; - return tint_symbol_4; +vertex tint_symbol vtx_main(uint VertexIndex [[vertex_id]]) { + float4 const inner_result = vtx_main_inner(VertexIndex); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +float4 frag_main_inner() { + return float4(1.0f, 0.0f, 0.0f, 1.0f); +} + +fragment tint_symbol_1 frag_main() { + float4 const inner_result_1 = frag_main_inner(); + tint_symbol_1 wrapper_result_1 = {}; + wrapper_result_1.value = inner_result_1; + return wrapper_result_1; } diff --git a/test/shader_io/compute_input_builtins.wgsl.expected.hlsl b/test/shader_io/compute_input_builtins.wgsl.expected.hlsl index 8473e6cdb4..cb71cd9808 100644 --- a/test/shader_io/compute_input_builtins.wgsl.expected.hlsl +++ b/test/shader_io/compute_input_builtins.wgsl.expected.hlsl @@ -5,12 +5,12 @@ struct tint_symbol_1 { uint3 workgroup_id : SV_GroupID; }; +void main_inner(uint3 local_invocation_id, uint local_invocation_index, uint3 global_invocation_id, uint3 workgroup_id) { + const uint foo = (((local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + workgroup_id.x); +} + [numthreads(1, 1, 1)] void main(tint_symbol_1 tint_symbol) { - const uint3 local_invocation_id = tint_symbol.local_invocation_id; - const uint local_invocation_index = tint_symbol.local_invocation_index; - const uint3 global_invocation_id = tint_symbol.global_invocation_id; - const uint3 workgroup_id = tint_symbol.workgroup_id; - const uint foo = (((local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + workgroup_id.x); + main_inner(tint_symbol.local_invocation_id, tint_symbol.local_invocation_index, tint_symbol.global_invocation_id, tint_symbol.workgroup_id); return; } diff --git a/test/shader_io/compute_input_builtins.wgsl.expected.msl b/test/shader_io/compute_input_builtins.wgsl.expected.msl index 2774a3d733..60095f3325 100644 --- a/test/shader_io/compute_input_builtins.wgsl.expected.msl +++ b/test/shader_io/compute_input_builtins.wgsl.expected.msl @@ -1,8 +1,12 @@ #include using namespace metal; -kernel void tint_symbol(uint3 local_invocation_id [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 workgroup_id [[threadgroup_position_in_grid]]) { +void tint_symbol_inner(uint3 local_invocation_id, uint local_invocation_index, uint3 global_invocation_id, uint3 workgroup_id) { uint const foo = (((local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + workgroup_id.x); +} + +kernel void tint_symbol(uint3 local_invocation_id [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 workgroup_id [[threadgroup_position_in_grid]]) { + tint_symbol_inner(local_invocation_id, local_invocation_index, global_invocation_id, workgroup_id); return; } diff --git a/test/shader_io/compute_input_builtins_struct.wgsl.expected.hlsl b/test/shader_io/compute_input_builtins_struct.wgsl.expected.hlsl index 42d74abb34..8e00493735 100644 --- a/test/shader_io/compute_input_builtins_struct.wgsl.expected.hlsl +++ b/test/shader_io/compute_input_builtins_struct.wgsl.expected.hlsl @@ -11,9 +11,13 @@ struct tint_symbol_1 { uint3 workgroup_id : SV_GroupID; }; +void main_inner(ComputeInputs inputs) { + const uint foo = (((inputs.local_invocation_id.x + inputs.local_invocation_index) + inputs.global_invocation_id.x) + inputs.workgroup_id.x); +} + [numthreads(1, 1, 1)] void main(tint_symbol_1 tint_symbol) { - const ComputeInputs inputs = {tint_symbol.local_invocation_id, tint_symbol.local_invocation_index, tint_symbol.global_invocation_id, tint_symbol.workgroup_id}; - const uint foo = (((inputs.local_invocation_id.x + inputs.local_invocation_index) + inputs.global_invocation_id.x) + inputs.workgroup_id.x); + const ComputeInputs tint_symbol_2 = {tint_symbol.local_invocation_id, tint_symbol.local_invocation_index, tint_symbol.global_invocation_id, tint_symbol.workgroup_id}; + main_inner(tint_symbol_2); return; } diff --git a/test/shader_io/compute_input_builtins_struct.wgsl.expected.msl b/test/shader_io/compute_input_builtins_struct.wgsl.expected.msl index 9a16f1bd64..56db89c34d 100644 --- a/test/shader_io/compute_input_builtins_struct.wgsl.expected.msl +++ b/test/shader_io/compute_input_builtins_struct.wgsl.expected.msl @@ -8,9 +8,13 @@ struct ComputeInputs { uint3 workgroup_id; }; -kernel void tint_symbol(uint3 tint_symbol_2 [[thread_position_in_threadgroup]], uint tint_symbol_3 [[thread_index_in_threadgroup]], uint3 tint_symbol_4 [[thread_position_in_grid]], uint3 tint_symbol_5 [[threadgroup_position_in_grid]]) { - ComputeInputs const inputs = {.local_invocation_id=tint_symbol_2, .local_invocation_index=tint_symbol_3, .global_invocation_id=tint_symbol_4, .workgroup_id=tint_symbol_5}; +void tint_symbol_inner(ComputeInputs inputs) { uint const foo = (((inputs.local_invocation_id.x + inputs.local_invocation_index) + inputs.global_invocation_id.x) + inputs.workgroup_id.x); +} + +kernel void tint_symbol(uint3 local_invocation_id [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 workgroup_id [[threadgroup_position_in_grid]]) { + ComputeInputs const tint_symbol_1 = {.local_invocation_id=local_invocation_id, .local_invocation_index=local_invocation_index, .global_invocation_id=global_invocation_id, .workgroup_id=workgroup_id}; + tint_symbol_inner(tint_symbol_1); return; } diff --git a/test/shader_io/compute_input_mixed.wgsl.expected.hlsl b/test/shader_io/compute_input_mixed.wgsl.expected.hlsl index 452731766e..e72a9d2d3c 100644 --- a/test/shader_io/compute_input_mixed.wgsl.expected.hlsl +++ b/test/shader_io/compute_input_mixed.wgsl.expected.hlsl @@ -11,12 +11,14 @@ struct tint_symbol_1 { uint3 workgroup_id : SV_GroupID; }; +void main_inner(ComputeInputs0 inputs0, uint local_invocation_index, uint3 global_invocation_id, ComputeInputs1 inputs1) { + const uint foo = (((inputs0.local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + inputs1.workgroup_id.x); +} + [numthreads(1, 1, 1)] void main(tint_symbol_1 tint_symbol) { - const ComputeInputs0 inputs0 = {tint_symbol.local_invocation_id}; - const uint local_invocation_index = tint_symbol.local_invocation_index; - const uint3 global_invocation_id = tint_symbol.global_invocation_id; - const ComputeInputs1 inputs1 = {tint_symbol.workgroup_id}; - const uint foo = (((inputs0.local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + inputs1.workgroup_id.x); + const ComputeInputs0 tint_symbol_2 = {tint_symbol.local_invocation_id}; + const ComputeInputs1 tint_symbol_3 = {tint_symbol.workgroup_id}; + main_inner(tint_symbol_2, tint_symbol.local_invocation_index, tint_symbol.global_invocation_id, tint_symbol_3); return; } diff --git a/test/shader_io/compute_input_mixed.wgsl.expected.msl b/test/shader_io/compute_input_mixed.wgsl.expected.msl index fe6293b350..65ca123149 100644 --- a/test/shader_io/compute_input_mixed.wgsl.expected.msl +++ b/test/shader_io/compute_input_mixed.wgsl.expected.msl @@ -8,10 +8,14 @@ struct ComputeInputs1 { uint3 workgroup_id; }; -kernel void tint_symbol(uint3 tint_symbol_2 [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 tint_symbol_3 [[threadgroup_position_in_grid]]) { - ComputeInputs0 const inputs0 = {.local_invocation_id=tint_symbol_2}; - ComputeInputs1 const inputs1 = {.workgroup_id=tint_symbol_3}; +void tint_symbol_inner(ComputeInputs0 inputs0, uint local_invocation_index, uint3 global_invocation_id, ComputeInputs1 inputs1) { uint const foo = (((inputs0.local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + inputs1.workgroup_id.x); +} + +kernel void tint_symbol(uint3 local_invocation_id [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 workgroup_id [[threadgroup_position_in_grid]]) { + ComputeInputs0 const tint_symbol_1 = {.local_invocation_id=local_invocation_id}; + ComputeInputs1 const tint_symbol_2 = {.workgroup_id=workgroup_id}; + tint_symbol_inner(tint_symbol_1, local_invocation_index, global_invocation_id, tint_symbol_2); return; } diff --git a/test/shader_io/fragment_input_builtins.wgsl.expected.hlsl b/test/shader_io/fragment_input_builtins.wgsl.expected.hlsl index b40247e338..cc5f201352 100644 --- a/test/shader_io/fragment_input_builtins.wgsl.expected.hlsl +++ b/test/shader_io/fragment_input_builtins.wgsl.expected.hlsl @@ -5,14 +5,14 @@ struct tint_symbol_1 { uint sample_mask : SV_Coverage; }; -void main(tint_symbol_1 tint_symbol) { - const float4 position = tint_symbol.position; - const bool front_facing = tint_symbol.front_facing; - const uint sample_index = tint_symbol.sample_index; - const uint sample_mask = tint_symbol.sample_mask; +void main_inner(float4 position, bool front_facing, uint sample_index, uint sample_mask) { if (front_facing) { const float4 foo = position; const uint bar = (sample_index + sample_mask); } +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.position, tint_symbol.front_facing, tint_symbol.sample_index, tint_symbol.sample_mask); return; } diff --git a/test/shader_io/fragment_input_builtins.wgsl.expected.msl b/test/shader_io/fragment_input_builtins.wgsl.expected.msl index 4204e5ea8d..fea0205d71 100644 --- a/test/shader_io/fragment_input_builtins.wgsl.expected.msl +++ b/test/shader_io/fragment_input_builtins.wgsl.expected.msl @@ -1,11 +1,15 @@ #include using namespace metal; -fragment void tint_symbol(float4 position [[position]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint sample_mask [[sample_mask]]) { +void tint_symbol_inner(float4 position, bool front_facing, uint sample_index, uint sample_mask) { if (front_facing) { float4 const foo = position; uint const bar = (sample_index + sample_mask); } +} + +fragment void tint_symbol(float4 position [[position]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint sample_mask [[sample_mask]]) { + tint_symbol_inner(position, front_facing, sample_index, sample_mask); return; } diff --git a/test/shader_io/fragment_input_builtins_struct.wgsl.expected.hlsl b/test/shader_io/fragment_input_builtins_struct.wgsl.expected.hlsl index df29a001e7..6f38a1f522 100644 --- a/test/shader_io/fragment_input_builtins_struct.wgsl.expected.hlsl +++ b/test/shader_io/fragment_input_builtins_struct.wgsl.expected.hlsl @@ -11,11 +11,15 @@ struct tint_symbol_1 { uint sample_mask : SV_Coverage; }; -void main(tint_symbol_1 tint_symbol) { - const FragmentInputs inputs = {tint_symbol.position, tint_symbol.front_facing, tint_symbol.sample_index, tint_symbol.sample_mask}; +void main_inner(FragmentInputs inputs) { if (inputs.front_facing) { const float4 foo = inputs.position; const uint bar = (inputs.sample_index + inputs.sample_mask); } +} + +void main(tint_symbol_1 tint_symbol) { + const FragmentInputs tint_symbol_2 = {tint_symbol.position, tint_symbol.front_facing, tint_symbol.sample_index, tint_symbol.sample_mask}; + main_inner(tint_symbol_2); return; } diff --git a/test/shader_io/fragment_input_builtins_struct.wgsl.expected.msl b/test/shader_io/fragment_input_builtins_struct.wgsl.expected.msl index 284dbe564e..4915bec50e 100644 --- a/test/shader_io/fragment_input_builtins_struct.wgsl.expected.msl +++ b/test/shader_io/fragment_input_builtins_struct.wgsl.expected.msl @@ -8,12 +8,16 @@ struct FragmentInputs { uint sample_mask; }; -fragment void tint_symbol(float4 tint_symbol_2 [[position]], bool tint_symbol_3 [[front_facing]], uint tint_symbol_4 [[sample_id]], uint tint_symbol_5 [[sample_mask]]) { - FragmentInputs const inputs = {.position=tint_symbol_2, .front_facing=tint_symbol_3, .sample_index=tint_symbol_4, .sample_mask=tint_symbol_5}; +void tint_symbol_inner(FragmentInputs inputs) { if (inputs.front_facing) { float4 const foo = inputs.position; uint const bar = (inputs.sample_index + inputs.sample_mask); } +} + +fragment void tint_symbol(float4 position [[position]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint sample_mask [[sample_mask]]) { + FragmentInputs const tint_symbol_1 = {.position=position, .front_facing=front_facing, .sample_index=sample_index, .sample_mask=sample_mask}; + tint_symbol_inner(tint_symbol_1); return; } diff --git a/test/shader_io/fragment_input_locations.wgsl.expected.hlsl b/test/shader_io/fragment_input_locations.wgsl.expected.hlsl index 8590130b83..5b6022e4a7 100644 --- a/test/shader_io/fragment_input_locations.wgsl.expected.hlsl +++ b/test/shader_io/fragment_input_locations.wgsl.expected.hlsl @@ -5,14 +5,14 @@ struct tint_symbol_1 { float4 loc3 : TEXCOORD3; }; -void main(tint_symbol_1 tint_symbol) { - const int loc0 = tint_symbol.loc0; - const uint loc1 = tint_symbol.loc1; - const float loc2 = tint_symbol.loc2; - const float4 loc3 = tint_symbol.loc3; +void main_inner(int loc0, uint loc1, float loc2, float4 loc3) { const int i = loc0; const uint u = loc1; const float f = loc2; const float4 v = loc3; +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.loc0, tint_symbol.loc1, tint_symbol.loc2, tint_symbol.loc3); return; } diff --git a/test/shader_io/fragment_input_locations.wgsl.expected.msl b/test/shader_io/fragment_input_locations.wgsl.expected.msl index c8014ad315..f73afbe021 100644 --- a/test/shader_io/fragment_input_locations.wgsl.expected.msl +++ b/test/shader_io/fragment_input_locations.wgsl.expected.msl @@ -8,15 +8,15 @@ struct tint_symbol_2 { float4 loc3 [[user(locn3)]]; }; -fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - int const loc0 = tint_symbol_1.loc0; - uint const loc1 = tint_symbol_1.loc1; - float const loc2 = tint_symbol_1.loc2; - float4 const loc3 = tint_symbol_1.loc3; +void tint_symbol_inner(int loc0, uint loc1, float loc2, float4 loc3) { int const i = loc0; uint const u = loc1; float const f = loc2; float4 const v = loc3; +} + +fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + tint_symbol_inner(tint_symbol_1.loc0, tint_symbol_1.loc1, tint_symbol_1.loc2, tint_symbol_1.loc3); return; } diff --git a/test/shader_io/fragment_input_locations_struct.wgsl.expected.hlsl b/test/shader_io/fragment_input_locations_struct.wgsl.expected.hlsl index 9aa01ec734..bea6f96301 100644 --- a/test/shader_io/fragment_input_locations_struct.wgsl.expected.hlsl +++ b/test/shader_io/fragment_input_locations_struct.wgsl.expected.hlsl @@ -11,11 +11,15 @@ struct tint_symbol_1 { float4 loc3 : TEXCOORD3; }; -void main(tint_symbol_1 tint_symbol) { - const FragmentInputs inputs = {tint_symbol.loc0, tint_symbol.loc1, tint_symbol.loc2, tint_symbol.loc3}; +void main_inner(FragmentInputs inputs) { const int i = inputs.loc0; const uint u = inputs.loc1; const float f = inputs.loc2; const float4 v = inputs.loc3; +} + +void main(tint_symbol_1 tint_symbol) { + const FragmentInputs tint_symbol_2 = {tint_symbol.loc0, tint_symbol.loc1, tint_symbol.loc2, tint_symbol.loc3}; + main_inner(tint_symbol_2); return; } diff --git a/test/shader_io/fragment_input_locations_struct.wgsl.expected.msl b/test/shader_io/fragment_input_locations_struct.wgsl.expected.msl index 19145f5e5b..bddd084a58 100644 --- a/test/shader_io/fragment_input_locations_struct.wgsl.expected.msl +++ b/test/shader_io/fragment_input_locations_struct.wgsl.expected.msl @@ -14,12 +14,16 @@ struct tint_symbol_2 { float4 loc3 [[user(locn3)]]; }; -fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - FragmentInputs const inputs = {.loc0=tint_symbol_1.loc0, .loc1=tint_symbol_1.loc1, .loc2=tint_symbol_1.loc2, .loc3=tint_symbol_1.loc3}; +void tint_symbol_inner(FragmentInputs inputs) { int const i = inputs.loc0; uint const u = inputs.loc1; float const f = inputs.loc2; float4 const v = inputs.loc3; +} + +fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + FragmentInputs const tint_symbol_3 = {.loc0=tint_symbol_1.loc0, .loc1=tint_symbol_1.loc1, .loc2=tint_symbol_1.loc2, .loc3=tint_symbol_1.loc3}; + tint_symbol_inner(tint_symbol_3); return; } diff --git a/test/shader_io/fragment_input_mixed.wgsl.expected.hlsl b/test/shader_io/fragment_input_mixed.wgsl.expected.hlsl index bd63b41aa9..569a409bf8 100644 --- a/test/shader_io/fragment_input_mixed.wgsl.expected.hlsl +++ b/test/shader_io/fragment_input_mixed.wgsl.expected.hlsl @@ -17,13 +17,7 @@ struct tint_symbol_1 { uint sample_mask : SV_Coverage; }; -void main(tint_symbol_1 tint_symbol) { - const FragmentInputs0 inputs0 = {tint_symbol.position, tint_symbol.loc0}; - const bool front_facing = tint_symbol.front_facing; - const uint loc1 = tint_symbol.loc1; - const uint sample_index = tint_symbol.sample_index; - const FragmentInputs1 inputs1 = {tint_symbol.loc3, tint_symbol.sample_mask}; - const float loc2 = tint_symbol.loc2; +void main_inner(FragmentInputs0 inputs0, bool front_facing, uint loc1, uint sample_index, FragmentInputs1 inputs1, float loc2) { if (front_facing) { const float4 foo = inputs0.position; const uint bar = (sample_index + inputs1.sample_mask); @@ -32,5 +26,11 @@ void main(tint_symbol_1 tint_symbol) { const float f = loc2; const float4 v = inputs1.loc3; } +} + +void main(tint_symbol_1 tint_symbol) { + const FragmentInputs0 tint_symbol_2 = {tint_symbol.position, tint_symbol.loc0}; + const FragmentInputs1 tint_symbol_3 = {tint_symbol.loc3, tint_symbol.sample_mask}; + main_inner(tint_symbol_2, tint_symbol.front_facing, tint_symbol.loc1, tint_symbol.sample_index, tint_symbol_3, tint_symbol.loc2); return; } diff --git a/test/shader_io/fragment_input_mixed.wgsl.expected.msl b/test/shader_io/fragment_input_mixed.wgsl.expected.msl index 9b3a13a5ba..1d3f36abf0 100644 --- a/test/shader_io/fragment_input_mixed.wgsl.expected.msl +++ b/test/shader_io/fragment_input_mixed.wgsl.expected.msl @@ -9,18 +9,14 @@ struct FragmentInputs1 { float4 loc3; uint sample_mask; }; -struct tint_symbol_4 { +struct tint_symbol_2 { int loc0 [[user(locn0)]]; uint loc1 [[user(locn1)]]; float loc2 [[user(locn2)]]; float4 loc3 [[user(locn3)]]; }; -fragment void tint_symbol(float4 tint_symbol_2 [[position]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint tint_symbol_3 [[sample_mask]], tint_symbol_4 tint_symbol_1 [[stage_in]]) { - FragmentInputs0 const inputs0 = {.position=tint_symbol_2, .loc0=tint_symbol_1.loc0}; - uint const loc1 = tint_symbol_1.loc1; - FragmentInputs1 const inputs1 = {.loc3=tint_symbol_1.loc3, .sample_mask=tint_symbol_3}; - float const loc2 = tint_symbol_1.loc2; +void tint_symbol_inner(FragmentInputs0 inputs0, bool front_facing, uint loc1, uint sample_index, FragmentInputs1 inputs1, float loc2) { if (front_facing) { float4 const foo = inputs0.position; uint const bar = (sample_index + inputs1.sample_mask); @@ -29,6 +25,12 @@ fragment void tint_symbol(float4 tint_symbol_2 [[position]], bool front_facing [ float const f = loc2; float4 const v = inputs1.loc3; } +} + +fragment void tint_symbol(float4 position [[position]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint sample_mask [[sample_mask]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + FragmentInputs0 const tint_symbol_3 = {.position=position, .loc0=tint_symbol_1.loc0}; + FragmentInputs1 const tint_symbol_4 = {.loc3=tint_symbol_1.loc3, .sample_mask=sample_mask}; + tint_symbol_inner(tint_symbol_3, front_facing, tint_symbol_1.loc1, sample_index, tint_symbol_4, tint_symbol_1.loc2); return; } diff --git a/test/shader_io/fragment_output_builtins.wgsl.expected.hlsl b/test/shader_io/fragment_output_builtins.wgsl.expected.hlsl index a24d9cf5ee..2b972d7ab4 100644 --- a/test/shader_io/fragment_output_builtins.wgsl.expected.hlsl +++ b/test/shader_io/fragment_output_builtins.wgsl.expected.hlsl @@ -2,16 +2,28 @@ struct tint_symbol { float value : SV_Depth; }; +float main1_inner() { + return 1.0f; +} + tint_symbol main1() { - const tint_symbol tint_symbol_2 = {1.0f}; - return tint_symbol_2; + const float inner_result = main1_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } struct tint_symbol_1 { uint value : SV_Coverage; }; -tint_symbol_1 main2() { - const tint_symbol_1 tint_symbol_3 = {1u}; - return tint_symbol_3; +uint main2_inner() { + return 1u; +} + +tint_symbol_1 main2() { + const uint inner_result_1 = main2_inner(); + tint_symbol_1 wrapper_result_1 = (tint_symbol_1)0; + wrapper_result_1.value = inner_result_1; + return wrapper_result_1; } diff --git a/test/shader_io/fragment_output_builtins.wgsl.expected.msl b/test/shader_io/fragment_output_builtins.wgsl.expected.msl index 8129f6633a..97d6904308 100644 --- a/test/shader_io/fragment_output_builtins.wgsl.expected.msl +++ b/test/shader_io/fragment_output_builtins.wgsl.expected.msl @@ -8,13 +8,25 @@ struct tint_symbol_1 { uint value [[sample_mask]]; }; +float main1_inner() { + return 1.0f; +} + fragment tint_symbol main1() { - tint_symbol const tint_symbol_2 = {.value=1.0f}; - return tint_symbol_2; + float const inner_result = main1_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +uint main2_inner() { + return 1u; } fragment tint_symbol_1 main2() { - tint_symbol_1 const tint_symbol_3 = {.value=1u}; - return tint_symbol_3; + uint const inner_result_1 = main2_inner(); + tint_symbol_1 wrapper_result_1 = {}; + wrapper_result_1.value = inner_result_1; + return wrapper_result_1; } diff --git a/test/shader_io/fragment_output_builtins_struct.wgsl.expected.hlsl b/test/shader_io/fragment_output_builtins_struct.wgsl.expected.hlsl index 889bdb9bfd..2d2e660ee7 100644 --- a/test/shader_io/fragment_output_builtins_struct.wgsl.expected.hlsl +++ b/test/shader_io/fragment_output_builtins_struct.wgsl.expected.hlsl @@ -7,8 +7,15 @@ struct tint_symbol { uint sample_mask : SV_Coverage; }; -tint_symbol main() { +FragmentOutputs main_inner() { const FragmentOutputs tint_symbol_1 = {1.0f, 1u}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.frag_depth, tint_symbol_1.sample_mask}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const FragmentOutputs inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.frag_depth = inner_result.frag_depth; + wrapper_result.sample_mask = inner_result.sample_mask; + return wrapper_result; } diff --git a/test/shader_io/fragment_output_builtins_struct.wgsl.expected.msl b/test/shader_io/fragment_output_builtins_struct.wgsl.expected.msl index 851c83b5e0..65de6df63f 100644 --- a/test/shader_io/fragment_output_builtins_struct.wgsl.expected.msl +++ b/test/shader_io/fragment_output_builtins_struct.wgsl.expected.msl @@ -10,9 +10,16 @@ struct tint_symbol_1 { uint sample_mask [[sample_mask]]; }; -fragment tint_symbol_1 tint_symbol() { +FragmentOutputs tint_symbol_inner() { FragmentOutputs const tint_symbol_2 = {.frag_depth=1.0f, .sample_mask=1u}; - tint_symbol_1 const tint_symbol_3 = {.frag_depth=tint_symbol_2.frag_depth, .sample_mask=tint_symbol_2.sample_mask}; - return tint_symbol_3; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + FragmentOutputs const inner_result = tint_symbol_inner(); + tint_symbol_1 wrapper_result = {}; + wrapper_result.frag_depth = inner_result.frag_depth; + wrapper_result.sample_mask = inner_result.sample_mask; + return wrapper_result; } diff --git a/test/shader_io/fragment_output_locations.wgsl.expected.hlsl b/test/shader_io/fragment_output_locations.wgsl.expected.hlsl index 551dbce340..0a9e48f125 100644 --- a/test/shader_io/fragment_output_locations.wgsl.expected.hlsl +++ b/test/shader_io/fragment_output_locations.wgsl.expected.hlsl @@ -2,34 +2,58 @@ struct tint_symbol { int value : SV_Target0; }; +int main0_inner() { + return 1; +} + tint_symbol main0() { - const tint_symbol tint_symbol_4 = {1}; - return tint_symbol_4; + const int inner_result = main0_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } struct tint_symbol_1 { uint value : SV_Target1; }; +uint main1_inner() { + return 1u; +} + tint_symbol_1 main1() { - const tint_symbol_1 tint_symbol_5 = {1u}; - return tint_symbol_5; + const uint inner_result_1 = main1_inner(); + tint_symbol_1 wrapper_result_1 = (tint_symbol_1)0; + wrapper_result_1.value = inner_result_1; + return wrapper_result_1; } struct tint_symbol_2 { float value : SV_Target2; }; +float main2_inner() { + return 1.0f; +} + tint_symbol_2 main2() { - const tint_symbol_2 tint_symbol_6 = {1.0f}; - return tint_symbol_6; + const float inner_result_2 = main2_inner(); + tint_symbol_2 wrapper_result_2 = (tint_symbol_2)0; + wrapper_result_2.value = inner_result_2; + return wrapper_result_2; } struct tint_symbol_3 { float4 value : SV_Target3; }; -tint_symbol_3 main3() { - const tint_symbol_3 tint_symbol_7 = {float4(1.0f, 2.0f, 3.0f, 4.0f)}; - return tint_symbol_7; +float4 main3_inner() { + return float4(1.0f, 2.0f, 3.0f, 4.0f); +} + +tint_symbol_3 main3() { + const float4 inner_result_3 = main3_inner(); + tint_symbol_3 wrapper_result_3 = (tint_symbol_3)0; + wrapper_result_3.value = inner_result_3; + return wrapper_result_3; } diff --git a/test/shader_io/fragment_output_locations.wgsl.expected.msl b/test/shader_io/fragment_output_locations.wgsl.expected.msl index fed3dca381..03ba9bb2d9 100644 --- a/test/shader_io/fragment_output_locations.wgsl.expected.msl +++ b/test/shader_io/fragment_output_locations.wgsl.expected.msl @@ -14,23 +14,47 @@ struct tint_symbol_3 { float4 value [[color(3)]]; }; +int main0_inner() { + return 1; +} + fragment tint_symbol main0() { - tint_symbol const tint_symbol_4 = {.value=1}; - return tint_symbol_4; + int const inner_result = main0_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +uint main1_inner() { + return 1u; } fragment tint_symbol_1 main1() { - tint_symbol_1 const tint_symbol_5 = {.value=1u}; - return tint_symbol_5; + uint const inner_result_1 = main1_inner(); + tint_symbol_1 wrapper_result_1 = {}; + wrapper_result_1.value = inner_result_1; + return wrapper_result_1; +} + +float main2_inner() { + return 1.0f; } fragment tint_symbol_2 main2() { - tint_symbol_2 const tint_symbol_6 = {.value=1.0f}; - return tint_symbol_6; + float const inner_result_2 = main2_inner(); + tint_symbol_2 wrapper_result_2 = {}; + wrapper_result_2.value = inner_result_2; + return wrapper_result_2; +} + +float4 main3_inner() { + return float4(1.0f, 2.0f, 3.0f, 4.0f); } fragment tint_symbol_3 main3() { - tint_symbol_3 const tint_symbol_7 = {.value=float4(1.0f, 2.0f, 3.0f, 4.0f)}; - return tint_symbol_7; + float4 const inner_result_3 = main3_inner(); + tint_symbol_3 wrapper_result_3 = {}; + wrapper_result_3.value = inner_result_3; + return wrapper_result_3; } diff --git a/test/shader_io/fragment_output_locations_struct.wgsl.expected.hlsl b/test/shader_io/fragment_output_locations_struct.wgsl.expected.hlsl index 460f4a30c3..09216c3bd6 100644 --- a/test/shader_io/fragment_output_locations_struct.wgsl.expected.hlsl +++ b/test/shader_io/fragment_output_locations_struct.wgsl.expected.hlsl @@ -11,8 +11,17 @@ struct tint_symbol { float4 loc3 : SV_Target3; }; -tint_symbol main() { +FragmentOutputs main_inner() { const FragmentOutputs tint_symbol_1 = {1, 1u, 1.0f, float4(1.0f, 2.0f, 3.0f, 4.0f)}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.loc0, tint_symbol_1.loc1, tint_symbol_1.loc2, tint_symbol_1.loc3}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const FragmentOutputs inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.loc0 = inner_result.loc0; + wrapper_result.loc1 = inner_result.loc1; + wrapper_result.loc2 = inner_result.loc2; + wrapper_result.loc3 = inner_result.loc3; + return wrapper_result; } diff --git a/test/shader_io/fragment_output_locations_struct.wgsl.expected.msl b/test/shader_io/fragment_output_locations_struct.wgsl.expected.msl index e4e75cb588..6cfad1a54e 100644 --- a/test/shader_io/fragment_output_locations_struct.wgsl.expected.msl +++ b/test/shader_io/fragment_output_locations_struct.wgsl.expected.msl @@ -14,9 +14,18 @@ struct tint_symbol_1 { float4 loc3 [[color(3)]]; }; -fragment tint_symbol_1 tint_symbol() { +FragmentOutputs tint_symbol_inner() { FragmentOutputs const tint_symbol_2 = {.loc0=1, .loc1=1u, .loc2=1.0f, .loc3=float4(1.0f, 2.0f, 3.0f, 4.0f)}; - tint_symbol_1 const tint_symbol_3 = {.loc0=tint_symbol_2.loc0, .loc1=tint_symbol_2.loc1, .loc2=tint_symbol_2.loc2, .loc3=tint_symbol_2.loc3}; - return tint_symbol_3; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + FragmentOutputs const inner_result = tint_symbol_inner(); + tint_symbol_1 wrapper_result = {}; + wrapper_result.loc0 = inner_result.loc0; + wrapper_result.loc1 = inner_result.loc1; + wrapper_result.loc2 = inner_result.loc2; + wrapper_result.loc3 = inner_result.loc3; + return wrapper_result; } diff --git a/test/shader_io/fragment_output_mixed.wgsl.expected.hlsl b/test/shader_io/fragment_output_mixed.wgsl.expected.hlsl index 9bc3fa2853..86588758d6 100644 --- a/test/shader_io/fragment_output_mixed.wgsl.expected.hlsl +++ b/test/shader_io/fragment_output_mixed.wgsl.expected.hlsl @@ -15,8 +15,19 @@ struct tint_symbol { uint sample_mask : SV_Coverage; }; -tint_symbol main() { +FragmentOutputs main_inner() { const FragmentOutputs tint_symbol_1 = {1, 2.0f, 1u, 1.0f, 2u, float4(1.0f, 2.0f, 3.0f, 4.0f)}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.loc0, tint_symbol_1.loc1, tint_symbol_1.loc2, tint_symbol_1.loc3, tint_symbol_1.frag_depth, tint_symbol_1.sample_mask}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const FragmentOutputs inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.loc0 = inner_result.loc0; + wrapper_result.frag_depth = inner_result.frag_depth; + wrapper_result.loc1 = inner_result.loc1; + wrapper_result.loc2 = inner_result.loc2; + wrapper_result.sample_mask = inner_result.sample_mask; + wrapper_result.loc3 = inner_result.loc3; + return wrapper_result; } diff --git a/test/shader_io/fragment_output_mixed.wgsl.expected.msl b/test/shader_io/fragment_output_mixed.wgsl.expected.msl index 665936b491..c7d2a13e50 100644 --- a/test/shader_io/fragment_output_mixed.wgsl.expected.msl +++ b/test/shader_io/fragment_output_mixed.wgsl.expected.msl @@ -18,9 +18,20 @@ struct tint_symbol_1 { uint sample_mask [[sample_mask]]; }; -fragment tint_symbol_1 tint_symbol() { +FragmentOutputs tint_symbol_inner() { FragmentOutputs const tint_symbol_2 = {.loc0=1, .frag_depth=2.0f, .loc1=1u, .loc2=1.0f, .sample_mask=2u, .loc3=float4(1.0f, 2.0f, 3.0f, 4.0f)}; - tint_symbol_1 const tint_symbol_3 = {.loc0=tint_symbol_2.loc0, .loc1=tint_symbol_2.loc1, .loc2=tint_symbol_2.loc2, .loc3=tint_symbol_2.loc3, .frag_depth=tint_symbol_2.frag_depth, .sample_mask=tint_symbol_2.sample_mask}; - return tint_symbol_3; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + FragmentOutputs const inner_result = tint_symbol_inner(); + tint_symbol_1 wrapper_result = {}; + wrapper_result.loc0 = inner_result.loc0; + wrapper_result.frag_depth = inner_result.frag_depth; + wrapper_result.loc1 = inner_result.loc1; + wrapper_result.loc2 = inner_result.loc2; + wrapper_result.sample_mask = inner_result.sample_mask; + wrapper_result.loc3 = inner_result.loc3; + return wrapper_result; } diff --git a/test/shader_io/interpolate_input_parameters.wgsl.expected.hlsl b/test/shader_io/interpolate_input_parameters.wgsl.expected.hlsl index e65399084f..bb78da9482 100644 --- a/test/shader_io/interpolate_input_parameters.wgsl.expected.hlsl +++ b/test/shader_io/interpolate_input_parameters.wgsl.expected.hlsl @@ -9,14 +9,10 @@ struct tint_symbol_1 { noperspective sample float linear_sample : TEXCOORD7; }; +void main_inner(float none, float flat, float perspective_center, float perspective_centroid, float perspective_sample, float linear_center, float linear_centroid, float linear_sample) { +} + void main(tint_symbol_1 tint_symbol) { - const float none = tint_symbol.none; - const float flat = tint_symbol.flat; - const float perspective_center = tint_symbol.perspective_center; - const float perspective_centroid = tint_symbol.perspective_centroid; - const float perspective_sample = tint_symbol.perspective_sample; - const float linear_center = tint_symbol.linear_center; - const float linear_centroid = tint_symbol.linear_centroid; - const float linear_sample = tint_symbol.linear_sample; + main_inner(tint_symbol.none, tint_symbol.flat, tint_symbol.perspective_center, tint_symbol.perspective_centroid, tint_symbol.perspective_sample, tint_symbol.linear_center, tint_symbol.linear_centroid, tint_symbol.linear_sample); return; } diff --git a/test/shader_io/interpolate_input_parameters.wgsl.expected.msl b/test/shader_io/interpolate_input_parameters.wgsl.expected.msl index ff195724af..d460bb0cca 100644 --- a/test/shader_io/interpolate_input_parameters.wgsl.expected.msl +++ b/test/shader_io/interpolate_input_parameters.wgsl.expected.msl @@ -12,15 +12,11 @@ struct tint_symbol_2 { float linear_sample [[user(locn7)]] [[sample_no_perspective]]; }; +void tint_symbol_inner(float none, float flat, float perspective_center, float perspective_centroid, float perspective_sample, float linear_center, float linear_centroid, float linear_sample) { +} + fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - float const none = tint_symbol_1.none; - float const flat = tint_symbol_1.flat; - float const perspective_center = tint_symbol_1.perspective_center; - float const perspective_centroid = tint_symbol_1.perspective_centroid; - float const perspective_sample = tint_symbol_1.perspective_sample; - float const linear_center = tint_symbol_1.linear_center; - float const linear_centroid = tint_symbol_1.linear_centroid; - float const linear_sample = tint_symbol_1.linear_sample; + tint_symbol_inner(tint_symbol_1.none, tint_symbol_1.flat, tint_symbol_1.perspective_center, tint_symbol_1.perspective_centroid, tint_symbol_1.perspective_sample, tint_symbol_1.linear_center, tint_symbol_1.linear_centroid, tint_symbol_1.linear_sample); return; } diff --git a/test/shader_io/interpolate_input_struct.wgsl.expected.hlsl b/test/shader_io/interpolate_input_struct.wgsl.expected.hlsl index 694807bb3c..cfc7acd02c 100644 --- a/test/shader_io/interpolate_input_struct.wgsl.expected.hlsl +++ b/test/shader_io/interpolate_input_struct.wgsl.expected.hlsl @@ -19,7 +19,11 @@ struct tint_symbol_2 { noperspective sample float linear_sample : TEXCOORD7; }; +void main_inner(In tint_symbol) { +} + void main(tint_symbol_2 tint_symbol_1) { - const In tint_symbol = {tint_symbol_1.none, tint_symbol_1.flat, tint_symbol_1.perspective_center, tint_symbol_1.perspective_centroid, tint_symbol_1.perspective_sample, tint_symbol_1.linear_center, tint_symbol_1.linear_centroid, tint_symbol_1.linear_sample}; + const In tint_symbol_3 = {tint_symbol_1.none, tint_symbol_1.flat, tint_symbol_1.perspective_center, tint_symbol_1.perspective_centroid, tint_symbol_1.perspective_sample, tint_symbol_1.linear_center, tint_symbol_1.linear_centroid, tint_symbol_1.linear_sample}; + main_inner(tint_symbol_3); return; } diff --git a/test/shader_io/interpolate_input_struct.wgsl.expected.msl b/test/shader_io/interpolate_input_struct.wgsl.expected.msl index 285f6088e8..edc350fb1f 100644 --- a/test/shader_io/interpolate_input_struct.wgsl.expected.msl +++ b/test/shader_io/interpolate_input_struct.wgsl.expected.msl @@ -22,8 +22,12 @@ struct tint_symbol_2 { float linear_sample [[user(locn7)]] [[sample_no_perspective]]; }; +void tint_symbol_inner(In in) { +} + fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - In const in = {.none=tint_symbol_1.none, .flat=tint_symbol_1.flat, .perspective_center=tint_symbol_1.perspective_center, .perspective_centroid=tint_symbol_1.perspective_centroid, .perspective_sample=tint_symbol_1.perspective_sample, .linear_center=tint_symbol_1.linear_center, .linear_centroid=tint_symbol_1.linear_centroid, .linear_sample=tint_symbol_1.linear_sample}; + In const tint_symbol_3 = {.none=tint_symbol_1.none, .flat=tint_symbol_1.flat, .perspective_center=tint_symbol_1.perspective_center, .perspective_centroid=tint_symbol_1.perspective_centroid, .perspective_sample=tint_symbol_1.perspective_sample, .linear_center=tint_symbol_1.linear_center, .linear_centroid=tint_symbol_1.linear_centroid, .linear_sample=tint_symbol_1.linear_sample}; + tint_symbol_inner(tint_symbol_3); return; } diff --git a/test/shader_io/interpolate_integers.wgsl.expected.hlsl b/test/shader_io/interpolate_integers.wgsl.expected.hlsl index 9dd38a988f..905b792550 100644 --- a/test/shader_io/interpolate_integers.wgsl.expected.hlsl +++ b/test/shader_io/interpolate_integers.wgsl.expected.hlsl @@ -13,25 +13,41 @@ struct tint_symbol { float4 pos : SV_Position; }; -tint_symbol vert_main() { - const Interface tint_symbol_1 = (Interface)0; - const tint_symbol tint_symbol_5 = {tint_symbol_1.i, tint_symbol_1.u, tint_symbol_1.vi, tint_symbol_1.vu, tint_symbol_1.pos}; - return tint_symbol_5; +Interface vert_main_inner() { + const Interface tint_symbol_4 = (Interface)0; + return tint_symbol_4; } -struct tint_symbol_3 { +tint_symbol vert_main() { + const Interface inner_result = vert_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.i = inner_result.i; + wrapper_result.u = inner_result.u; + wrapper_result.vi = inner_result.vi; + wrapper_result.vu = inner_result.vu; + wrapper_result.pos = inner_result.pos; + return wrapper_result; +} + +struct tint_symbol_2 { int i : TEXCOORD0; uint u : TEXCOORD1; int4 vi : TEXCOORD2; uint4 vu : TEXCOORD3; float4 pos : SV_Position; }; -struct tint_symbol_4 { +struct tint_symbol_3 { int value : SV_Target0; }; -tint_symbol_4 frag_main(tint_symbol_3 tint_symbol_2) { - const Interface inputs = {tint_symbol_2.i, tint_symbol_2.u, tint_symbol_2.vi, tint_symbol_2.vu, tint_symbol_2.pos}; - const tint_symbol_4 tint_symbol_6 = {inputs.i}; - return tint_symbol_6; +int frag_main_inner(Interface inputs) { + return inputs.i; +} + +tint_symbol_3 frag_main(tint_symbol_2 tint_symbol_1) { + const Interface tint_symbol_5 = {tint_symbol_1.i, tint_symbol_1.u, tint_symbol_1.vi, tint_symbol_1.vu, tint_symbol_1.pos}; + const int inner_result_1 = frag_main_inner(tint_symbol_5); + tint_symbol_3 wrapper_result_1 = (tint_symbol_3)0; + wrapper_result_1.value = inner_result_1; + return wrapper_result_1; } diff --git a/test/shader_io/interpolate_integers.wgsl.expected.msl b/test/shader_io/interpolate_integers.wgsl.expected.msl index 4fb8d3af3c..420daa76d6 100644 --- a/test/shader_io/interpolate_integers.wgsl.expected.msl +++ b/test/shader_io/interpolate_integers.wgsl.expected.msl @@ -15,25 +15,41 @@ struct tint_symbol { uint4 vu [[user(locn3)]]; float4 pos [[position]]; }; -struct tint_symbol_4 { +struct tint_symbol_2 { int i [[user(locn0)]]; uint u [[user(locn1)]]; int4 vi [[user(locn2)]]; uint4 vu [[user(locn3)]]; }; -struct tint_symbol_5 { +struct tint_symbol_3 { int value [[color(0)]]; }; +Interface vert_main_inner() { + Interface const tint_symbol_4 = {}; + return tint_symbol_4; +} + vertex tint_symbol vert_main() { - Interface const tint_symbol_1 = {}; - tint_symbol const tint_symbol_6 = {.i=tint_symbol_1.i, .u=tint_symbol_1.u, .vi=tint_symbol_1.vi, .vu=tint_symbol_1.vu, .pos=tint_symbol_1.pos}; - return tint_symbol_6; + Interface const inner_result = vert_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.i = inner_result.i; + wrapper_result.u = inner_result.u; + wrapper_result.vi = inner_result.vi; + wrapper_result.vu = inner_result.vu; + wrapper_result.pos = inner_result.pos; + return wrapper_result; } -fragment tint_symbol_5 frag_main(float4 tint_symbol_3 [[position]], tint_symbol_4 tint_symbol_2 [[stage_in]]) { - Interface const inputs = {.i=tint_symbol_2.i, .u=tint_symbol_2.u, .vi=tint_symbol_2.vi, .vu=tint_symbol_2.vu, .pos=tint_symbol_3}; - tint_symbol_5 const tint_symbol_7 = {.value=inputs.i}; - return tint_symbol_7; +int frag_main_inner(Interface inputs) { + return inputs.i; +} + +fragment tint_symbol_3 frag_main(float4 pos [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + Interface const tint_symbol_5 = {.i=tint_symbol_1.i, .u=tint_symbol_1.u, .vi=tint_symbol_1.vi, .vu=tint_symbol_1.vu, .pos=pos}; + int const inner_result_1 = frag_main_inner(tint_symbol_5); + tint_symbol_3 wrapper_result_1 = {}; + wrapper_result_1.value = inner_result_1; + return wrapper_result_1; } diff --git a/test/shader_io/interpolate_return_struct.wgsl.expected.hlsl b/test/shader_io/interpolate_return_struct.wgsl.expected.hlsl index 064119f976..19290977db 100644 --- a/test/shader_io/interpolate_return_struct.wgsl.expected.hlsl +++ b/test/shader_io/interpolate_return_struct.wgsl.expected.hlsl @@ -21,8 +21,22 @@ struct tint_symbol { float4 pos : SV_Position; }; -tint_symbol main() { +Out main_inner() { const Out tint_symbol_1 = (Out)0; - const tint_symbol tint_symbol_2 = {tint_symbol_1.none, tint_symbol_1.flat, tint_symbol_1.perspective_center, tint_symbol_1.perspective_centroid, tint_symbol_1.perspective_sample, tint_symbol_1.linear_center, tint_symbol_1.linear_centroid, tint_symbol_1.linear_sample, tint_symbol_1.pos}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const Out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.pos = inner_result.pos; + wrapper_result.none = inner_result.none; + wrapper_result.flat = inner_result.flat; + wrapper_result.perspective_center = inner_result.perspective_center; + wrapper_result.perspective_centroid = inner_result.perspective_centroid; + wrapper_result.perspective_sample = inner_result.perspective_sample; + wrapper_result.linear_center = inner_result.linear_center; + wrapper_result.linear_centroid = inner_result.linear_centroid; + wrapper_result.linear_sample = inner_result.linear_sample; + return wrapper_result; } diff --git a/test/shader_io/interpolate_return_struct.wgsl.expected.msl b/test/shader_io/interpolate_return_struct.wgsl.expected.msl index 5cb0df6f16..afac16e733 100644 --- a/test/shader_io/interpolate_return_struct.wgsl.expected.msl +++ b/test/shader_io/interpolate_return_struct.wgsl.expected.msl @@ -24,9 +24,23 @@ struct tint_symbol_1 { float4 pos [[position]]; }; -vertex tint_symbol_1 tint_symbol() { +Out tint_symbol_inner() { Out const tint_symbol_2 = {}; - tint_symbol_1 const tint_symbol_3 = {.none=tint_symbol_2.none, .flat=tint_symbol_2.flat, .perspective_center=tint_symbol_2.perspective_center, .perspective_centroid=tint_symbol_2.perspective_centroid, .perspective_sample=tint_symbol_2.perspective_sample, .linear_center=tint_symbol_2.linear_center, .linear_centroid=tint_symbol_2.linear_centroid, .linear_sample=tint_symbol_2.linear_sample, .pos=tint_symbol_2.pos}; - return tint_symbol_3; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + Out const inner_result = tint_symbol_inner(); + tint_symbol_1 wrapper_result = {}; + wrapper_result.pos = inner_result.pos; + wrapper_result.none = inner_result.none; + wrapper_result.flat = inner_result.flat; + wrapper_result.perspective_center = inner_result.perspective_center; + wrapper_result.perspective_centroid = inner_result.perspective_centroid; + wrapper_result.perspective_sample = inner_result.perspective_sample; + wrapper_result.linear_center = inner_result.linear_center; + wrapper_result.linear_centroid = inner_result.linear_centroid; + wrapper_result.linear_sample = inner_result.linear_sample; + return wrapper_result; } diff --git a/test/shader_io/invariant.wgsl.expected.hlsl b/test/shader_io/invariant.wgsl.expected.hlsl index 4597e8d10e..63c6c9a0b6 100644 --- a/test/shader_io/invariant.wgsl.expected.hlsl +++ b/test/shader_io/invariant.wgsl.expected.hlsl @@ -2,7 +2,13 @@ struct tint_symbol { precise float4 value : SV_Position; }; -tint_symbol main() { - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; +float4 main_inner() { + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol main() { + const float4 inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/shader_io/invariant.wgsl.expected.msl b/test/shader_io/invariant.wgsl.expected.msl index 5543bd0ee7..c9eb97e75b 100644 --- a/test/shader_io/invariant.wgsl.expected.msl +++ b/test/shader_io/invariant.wgsl.expected.msl @@ -5,8 +5,14 @@ struct tint_symbol_1 { float4 value [[position]] [[invariant]]; }; -vertex tint_symbol_1 tint_symbol() { - tint_symbol_1 const tint_symbol_2 = {.value=float4()}; - return tint_symbol_2; +float4 tint_symbol_inner() { + return float4(); +} + +vertex tint_symbol_1 tint_symbol() { + float4 const inner_result = tint_symbol_inner(); + tint_symbol_1 wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/shader_io/invariant_struct_member.wgsl.expected.hlsl b/test/shader_io/invariant_struct_member.wgsl.expected.hlsl index 9090f0ed63..b99e552e32 100644 --- a/test/shader_io/invariant_struct_member.wgsl.expected.hlsl +++ b/test/shader_io/invariant_struct_member.wgsl.expected.hlsl @@ -5,8 +5,14 @@ struct tint_symbol { precise float4 pos : SV_Position; }; -tint_symbol main() { +Out main_inner() { const Out tint_symbol_1 = (Out)0; - const tint_symbol tint_symbol_2 = {tint_symbol_1.pos}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const Out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.pos = inner_result.pos; + return wrapper_result; } diff --git a/test/shader_io/invariant_struct_member.wgsl.expected.msl b/test/shader_io/invariant_struct_member.wgsl.expected.msl index 545642e6b4..a2c44a7d14 100644 --- a/test/shader_io/invariant_struct_member.wgsl.expected.msl +++ b/test/shader_io/invariant_struct_member.wgsl.expected.msl @@ -8,9 +8,15 @@ struct tint_symbol_1 { float4 pos [[position]] [[invariant]]; }; -vertex tint_symbol_1 tint_symbol() { +Out tint_symbol_inner() { Out const tint_symbol_2 = {}; - tint_symbol_1 const tint_symbol_3 = {.pos=tint_symbol_2.pos}; - return tint_symbol_3; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + Out const inner_result = tint_symbol_inner(); + tint_symbol_1 wrapper_result = {}; + wrapper_result.pos = inner_result.pos; + return wrapper_result; } diff --git a/test/shader_io/shared_struct_different_stages.wgsl.expected.hlsl b/test/shader_io/shared_struct_different_stages.wgsl.expected.hlsl index 2adabe5ac7..6bb2f0aa93 100644 --- a/test/shader_io/shared_struct_different_stages.wgsl.expected.hlsl +++ b/test/shader_io/shared_struct_different_stages.wgsl.expected.hlsl @@ -9,21 +9,33 @@ struct tint_symbol { float4 pos : SV_Position; }; -tint_symbol vert_main() { - const Interface tint_symbol_1 = {0.400000006f, 0.600000024f, float4(0.0f, 0.0f, 0.0f, 0.0f)}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.col1, tint_symbol_1.col2, tint_symbol_1.pos}; - return tint_symbol_4; +Interface vert_main_inner() { + const Interface tint_symbol_3 = {0.400000006f, 0.600000024f, float4(0.0f, 0.0f, 0.0f, 0.0f)}; + return tint_symbol_3; } -struct tint_symbol_3 { +tint_symbol vert_main() { + const Interface inner_result = vert_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.col1 = inner_result.col1; + wrapper_result.col2 = inner_result.col2; + wrapper_result.pos = inner_result.pos; + return wrapper_result; +} + +struct tint_symbol_2 { float col1 : TEXCOORD1; float col2 : TEXCOORD2; float4 pos : SV_Position; }; -void frag_main(tint_symbol_3 tint_symbol_2) { - const Interface colors = {tint_symbol_2.col1, tint_symbol_2.col2, tint_symbol_2.pos}; +void frag_main_inner(Interface colors) { const float r = colors.col1; const float g = colors.col2; +} + +void frag_main(tint_symbol_2 tint_symbol_1) { + const Interface tint_symbol_4 = {tint_symbol_1.col1, tint_symbol_1.col2, tint_symbol_1.pos}; + frag_main_inner(tint_symbol_4); return; } diff --git a/test/shader_io/shared_struct_different_stages.wgsl.expected.msl b/test/shader_io/shared_struct_different_stages.wgsl.expected.msl index f51829c1e5..c4388b7e6a 100644 --- a/test/shader_io/shared_struct_different_stages.wgsl.expected.msl +++ b/test/shader_io/shared_struct_different_stages.wgsl.expected.msl @@ -11,21 +11,33 @@ struct tint_symbol { float col2 [[user(locn2)]]; float4 pos [[position]]; }; -struct tint_symbol_4 { +struct tint_symbol_2 { float col1 [[user(locn1)]]; float col2 [[user(locn2)]]; }; -vertex tint_symbol vert_main() { - Interface const tint_symbol_1 = {.col1=0.400000006f, .col2=0.600000024f, .pos=float4()}; - tint_symbol const tint_symbol_5 = {.col1=tint_symbol_1.col1, .col2=tint_symbol_1.col2, .pos=tint_symbol_1.pos}; - return tint_symbol_5; +Interface vert_main_inner() { + Interface const tint_symbol_3 = {.col1=0.400000006f, .col2=0.600000024f, .pos=float4()}; + return tint_symbol_3; } -fragment void frag_main(float4 tint_symbol_3 [[position]], tint_symbol_4 tint_symbol_2 [[stage_in]]) { - Interface const colors = {.col1=tint_symbol_2.col1, .col2=tint_symbol_2.col2, .pos=tint_symbol_3}; +vertex tint_symbol vert_main() { + Interface const inner_result = vert_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.col1 = inner_result.col1; + wrapper_result.col2 = inner_result.col2; + wrapper_result.pos = inner_result.pos; + return wrapper_result; +} + +void frag_main_inner(Interface colors) { float const r = colors.col1; float const g = colors.col2; +} + +fragment void frag_main(float4 pos [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + Interface const tint_symbol_4 = {.col1=tint_symbol_1.col1, .col2=tint_symbol_1.col2, .pos=pos}; + frag_main_inner(tint_symbol_4); return; } diff --git a/test/shader_io/shared_struct_helper_function.wgsl.expected.hlsl b/test/shader_io/shared_struct_helper_function.wgsl.expected.hlsl index 8e851837a2..8ee4d8e2a2 100644 --- a/test/shader_io/shared_struct_helper_function.wgsl.expected.hlsl +++ b/test/shader_io/shared_struct_helper_function.wgsl.expected.hlsl @@ -4,8 +4,8 @@ struct VertexOutput { }; VertexOutput foo(float x) { - const VertexOutput tint_symbol_4 = {float4(x, x, x, 1.0f), 42}; - return tint_symbol_4; + const VertexOutput tint_symbol_2 = {float4(x, x, x, 1.0f), 42}; + return tint_symbol_2; } struct tint_symbol { @@ -13,19 +13,31 @@ struct tint_symbol { float4 pos : SV_Position; }; -tint_symbol vert_main1() { - const VertexOutput tint_symbol_1 = foo(0.5f); - const tint_symbol tint_symbol_5 = {tint_symbol_1.loc0, tint_symbol_1.pos}; - return tint_symbol_5; +VertexOutput vert_main1_inner() { + return foo(0.5f); } -struct tint_symbol_2 { +tint_symbol vert_main1() { + const VertexOutput inner_result = vert_main1_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.pos = inner_result.pos; + wrapper_result.loc0 = inner_result.loc0; + return wrapper_result; +} + +struct tint_symbol_1 { int loc0 : TEXCOORD0; float4 pos : SV_Position; }; -tint_symbol_2 vert_main2() { - const VertexOutput tint_symbol_3 = foo(0.25f); - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.loc0, tint_symbol_3.pos}; - return tint_symbol_6; +VertexOutput vert_main2_inner() { + return foo(0.25f); +} + +tint_symbol_1 vert_main2() { + const VertexOutput inner_result_1 = vert_main2_inner(); + tint_symbol_1 wrapper_result_1 = (tint_symbol_1)0; + wrapper_result_1.pos = inner_result_1.pos; + wrapper_result_1.loc0 = inner_result_1.loc0; + return wrapper_result_1; } diff --git a/test/shader_io/shared_struct_helper_function.wgsl.expected.msl b/test/shader_io/shared_struct_helper_function.wgsl.expected.msl index 8131dfed1a..b07dab7668 100644 --- a/test/shader_io/shared_struct_helper_function.wgsl.expected.msl +++ b/test/shader_io/shared_struct_helper_function.wgsl.expected.msl @@ -9,25 +9,37 @@ struct tint_symbol { int loc0 [[user(locn0)]]; float4 pos [[position]]; }; -struct tint_symbol_2 { +struct tint_symbol_1 { int loc0 [[user(locn0)]]; float4 pos [[position]]; }; VertexOutput foo(float x) { - VertexOutput const tint_symbol_4 = {.pos=float4(x, x, x, 1.0f), .loc0=42}; - return tint_symbol_4; + VertexOutput const tint_symbol_2 = {.pos=float4(x, x, x, 1.0f), .loc0=42}; + return tint_symbol_2; +} + +VertexOutput vert_main1_inner() { + return foo(0.5f); } vertex tint_symbol vert_main1() { - VertexOutput const tint_symbol_1 = foo(0.5f); - tint_symbol const tint_symbol_5 = {.loc0=tint_symbol_1.loc0, .pos=tint_symbol_1.pos}; - return tint_symbol_5; + VertexOutput const inner_result = vert_main1_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.pos = inner_result.pos; + wrapper_result.loc0 = inner_result.loc0; + return wrapper_result; } -vertex tint_symbol_2 vert_main2() { - VertexOutput const tint_symbol_3 = foo(0.25f); - tint_symbol_2 const tint_symbol_6 = {.loc0=tint_symbol_3.loc0, .pos=tint_symbol_3.pos}; - return tint_symbol_6; +VertexOutput vert_main2_inner() { + return foo(0.25f); +} + +vertex tint_symbol_1 vert_main2() { + VertexOutput const inner_result_1 = vert_main2_inner(); + tint_symbol_1 wrapper_result_1 = {}; + wrapper_result_1.pos = inner_result_1.pos; + wrapper_result_1.loc0 = inner_result_1.loc0; + return wrapper_result_1; } diff --git a/test/shader_io/shared_struct_storage_buffer.wgsl.expected.hlsl b/test/shader_io/shared_struct_storage_buffer.wgsl.expected.hlsl index c06b40f372..788f1f9442 100644 --- a/test/shader_io/shared_struct_storage_buffer.wgsl.expected.hlsl +++ b/test/shader_io/shared_struct_storage_buffer.wgsl.expected.hlsl @@ -18,11 +18,15 @@ void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, S value) { buffer.Store4((offset + 128u), asuint(value.v)); } -void frag_main(tint_symbol_1 tint_symbol) { - const S input = {tint_symbol.f, tint_symbol.u, tint_symbol.v}; +void frag_main_inner(S input) { const float f = input.f; const uint u = input.u; const float4 v = input.v; tint_symbol_2(output, 0u, input); +} + +void frag_main(tint_symbol_1 tint_symbol) { + const S tint_symbol_6 = {tint_symbol.f, tint_symbol.u, tint_symbol.v}; + frag_main_inner(tint_symbol_6); return; } diff --git a/test/shader_io/shared_struct_storage_buffer.wgsl.expected.msl b/test/shader_io/shared_struct_storage_buffer.wgsl.expected.msl index 17fece7588..b4d0a25bba 100644 --- a/test/shader_io/shared_struct_storage_buffer.wgsl.expected.msl +++ b/test/shader_io/shared_struct_storage_buffer.wgsl.expected.msl @@ -8,17 +8,21 @@ struct S { /* 0x0080 */ packed_float4 v; /* 0x0090 */ int8_t tint_pad_1[112]; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float f [[user(locn0)]]; uint u [[user(locn1)]]; }; -fragment void frag_main(float4 tint_symbol_1 [[position]], tint_symbol_2 tint_symbol [[stage_in]], device S& output [[buffer(0)]]) { - S const input = {.f=tint_symbol.f, .u=tint_symbol.u, .v=tint_symbol_1}; +void frag_main_inner(device S& output, S input) { float const f = input.f; uint const u = input.u; float4 const v = input.v; output = input; +} + +fragment void frag_main(float4 v [[position]], tint_symbol_1 tint_symbol [[stage_in]], device S& output [[buffer(0)]]) { + S const tint_symbol_2 = {.f=tint_symbol.f, .u=tint_symbol.u, .v=v}; + frag_main_inner(output, tint_symbol_2); return; } diff --git a/test/shader_io/vertex_input_builtins.wgsl.expected.hlsl b/test/shader_io/vertex_input_builtins.wgsl.expected.hlsl index 8a9ad02735..99174250ec 100644 --- a/test/shader_io/vertex_input_builtins.wgsl.expected.hlsl +++ b/test/shader_io/vertex_input_builtins.wgsl.expected.hlsl @@ -6,10 +6,14 @@ struct tint_symbol_2 { float4 value : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint vertex_index = tint_symbol.vertex_index; - const uint instance_index = tint_symbol.instance_index; +float4 main_inner(uint vertex_index, uint instance_index) { const uint foo = (vertex_index + instance_index); - const tint_symbol_2 tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_3; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const float4 inner_result = main_inner(tint_symbol.vertex_index, tint_symbol.instance_index); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/shader_io/vertex_input_builtins.wgsl.expected.msl b/test/shader_io/vertex_input_builtins.wgsl.expected.msl index f3cff19300..1ef825bfe6 100644 --- a/test/shader_io/vertex_input_builtins.wgsl.expected.msl +++ b/test/shader_io/vertex_input_builtins.wgsl.expected.msl @@ -1,13 +1,19 @@ #include using namespace metal; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 value [[position]]; }; -vertex tint_symbol_2 tint_symbol(uint vertex_index [[vertex_id]], uint instance_index [[instance_id]]) { +float4 tint_symbol_inner(uint vertex_index, uint instance_index) { uint const foo = (vertex_index + instance_index); - tint_symbol_2 const tint_symbol_3 = {.value=float4()}; - return tint_symbol_3; + return float4(); +} + +vertex tint_symbol_1 tint_symbol(uint vertex_index [[vertex_id]], uint instance_index [[instance_id]]) { + float4 const inner_result = tint_symbol_inner(vertex_index, instance_index); + tint_symbol_1 wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/shader_io/vertex_input_builtins_struct.wgsl.expected.hlsl b/test/shader_io/vertex_input_builtins_struct.wgsl.expected.hlsl index cce7374834..87f19d6138 100644 --- a/test/shader_io/vertex_input_builtins_struct.wgsl.expected.hlsl +++ b/test/shader_io/vertex_input_builtins_struct.wgsl.expected.hlsl @@ -10,9 +10,15 @@ struct tint_symbol_2 { float4 value : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const VertexInputs inputs = {tint_symbol.vertex_index, tint_symbol.instance_index}; +float4 main_inner(VertexInputs inputs) { const uint foo = (inputs.vertex_index + inputs.instance_index); - const tint_symbol_2 tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_3; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const VertexInputs tint_symbol_3 = {tint_symbol.vertex_index, tint_symbol.instance_index}; + const float4 inner_result = main_inner(tint_symbol_3); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/shader_io/vertex_input_builtins_struct.wgsl.expected.msl b/test/shader_io/vertex_input_builtins_struct.wgsl.expected.msl index c973c83b1b..bd974410cd 100644 --- a/test/shader_io/vertex_input_builtins_struct.wgsl.expected.msl +++ b/test/shader_io/vertex_input_builtins_struct.wgsl.expected.msl @@ -5,14 +5,20 @@ struct VertexInputs { uint vertex_index; uint instance_index; }; -struct tint_symbol_4 { +struct tint_symbol_1 { float4 value [[position]]; }; -vertex tint_symbol_4 tint_symbol(uint tint_symbol_2 [[vertex_id]], uint tint_symbol_3 [[instance_id]]) { - VertexInputs const inputs = {.vertex_index=tint_symbol_2, .instance_index=tint_symbol_3}; +float4 tint_symbol_inner(VertexInputs inputs) { uint const foo = (inputs.vertex_index + inputs.instance_index); - tint_symbol_4 const tint_symbol_5 = {.value=float4()}; - return tint_symbol_5; + return float4(); +} + +vertex tint_symbol_1 tint_symbol(uint vertex_index [[vertex_id]], uint instance_index [[instance_id]]) { + VertexInputs const tint_symbol_2 = {.vertex_index=vertex_index, .instance_index=instance_index}; + float4 const inner_result = tint_symbol_inner(tint_symbol_2); + tint_symbol_1 wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/shader_io/vertex_input_locations.wgsl.expected.hlsl b/test/shader_io/vertex_input_locations.wgsl.expected.hlsl index e604ee9ee0..94c822008e 100644 --- a/test/shader_io/vertex_input_locations.wgsl.expected.hlsl +++ b/test/shader_io/vertex_input_locations.wgsl.expected.hlsl @@ -8,15 +8,17 @@ struct tint_symbol_2 { float4 value : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const int loc0 = tint_symbol.loc0; - const uint loc1 = tint_symbol.loc1; - const float loc2 = tint_symbol.loc2; - const float4 loc3 = tint_symbol.loc3; +float4 main_inner(int loc0, uint loc1, float loc2, float4 loc3) { const int i = loc0; const uint u = loc1; const float f = loc2; const float4 v = loc3; - const tint_symbol_2 tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_3; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const float4 inner_result = main_inner(tint_symbol.loc0, tint_symbol.loc1, tint_symbol.loc2, tint_symbol.loc3); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/shader_io/vertex_input_locations.wgsl.expected.msl b/test/shader_io/vertex_input_locations.wgsl.expected.msl index 4055450a83..a7e865860e 100644 --- a/test/shader_io/vertex_input_locations.wgsl.expected.msl +++ b/test/shader_io/vertex_input_locations.wgsl.expected.msl @@ -11,16 +11,18 @@ struct tint_symbol_3 { float4 value [[position]]; }; -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - int const loc0 = tint_symbol_1.loc0; - uint const loc1 = tint_symbol_1.loc1; - float const loc2 = tint_symbol_1.loc2; - float4 const loc3 = tint_symbol_1.loc3; +float4 tint_symbol_inner(int loc0, uint loc1, float loc2, float4 loc3) { int const i = loc0; uint const u = loc1; float const f = loc2; float4 const v = loc3; - tint_symbol_3 const tint_symbol_4 = {.value=float4()}; - return tint_symbol_4; + return float4(); +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + float4 const inner_result = tint_symbol_inner(tint_symbol_1.loc0, tint_symbol_1.loc1, tint_symbol_1.loc2, tint_symbol_1.loc3); + tint_symbol_3 wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/shader_io/vertex_input_locations_struct.wgsl.expected.hlsl b/test/shader_io/vertex_input_locations_struct.wgsl.expected.hlsl index f94ffc2672..733014dc37 100644 --- a/test/shader_io/vertex_input_locations_struct.wgsl.expected.hlsl +++ b/test/shader_io/vertex_input_locations_struct.wgsl.expected.hlsl @@ -14,12 +14,18 @@ struct tint_symbol_2 { float4 value : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const VertexInputs inputs = {tint_symbol.loc0, tint_symbol.loc1, tint_symbol.loc2, tint_symbol.loc3}; +float4 main_inner(VertexInputs inputs) { const int i = inputs.loc0; const uint u = inputs.loc1; const float f = inputs.loc2; const float4 v = inputs.loc3; - const tint_symbol_2 tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_3; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const VertexInputs tint_symbol_3 = {tint_symbol.loc0, tint_symbol.loc1, tint_symbol.loc2, tint_symbol.loc3}; + const float4 inner_result = main_inner(tint_symbol_3); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/shader_io/vertex_input_locations_struct.wgsl.expected.msl b/test/shader_io/vertex_input_locations_struct.wgsl.expected.msl index 7b033dc490..c85b7f9e10 100644 --- a/test/shader_io/vertex_input_locations_struct.wgsl.expected.msl +++ b/test/shader_io/vertex_input_locations_struct.wgsl.expected.msl @@ -17,13 +17,19 @@ struct tint_symbol_3 { float4 value [[position]]; }; -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - VertexInputs const inputs = {.loc0=tint_symbol_1.loc0, .loc1=tint_symbol_1.loc1, .loc2=tint_symbol_1.loc2, .loc3=tint_symbol_1.loc3}; +float4 tint_symbol_inner(VertexInputs inputs) { int const i = inputs.loc0; uint const u = inputs.loc1; float const f = inputs.loc2; float4 const v = inputs.loc3; - tint_symbol_3 const tint_symbol_4 = {.value=float4()}; - return tint_symbol_4; + return float4(); +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + VertexInputs const tint_symbol_4 = {.loc0=tint_symbol_1.loc0, .loc1=tint_symbol_1.loc1, .loc2=tint_symbol_1.loc2, .loc3=tint_symbol_1.loc3}; + float4 const inner_result = tint_symbol_inner(tint_symbol_4); + tint_symbol_3 wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/shader_io/vertex_input_mixed.wgsl.expected.hlsl b/test/shader_io/vertex_input_mixed.wgsl.expected.hlsl index 4b37ed7eda..916f00f5c0 100644 --- a/test/shader_io/vertex_input_mixed.wgsl.expected.hlsl +++ b/test/shader_io/vertex_input_mixed.wgsl.expected.hlsl @@ -18,16 +18,20 @@ struct tint_symbol_2 { float4 value : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const VertexInputs0 inputs0 = {tint_symbol.vertex_index, tint_symbol.loc0}; - const uint loc1 = tint_symbol.loc1; - const uint instance_index = tint_symbol.instance_index; - const VertexInputs1 inputs1 = {tint_symbol.loc2, tint_symbol.loc3}; +float4 main_inner(VertexInputs0 inputs0, uint loc1, uint instance_index, VertexInputs1 inputs1) { const uint foo = (inputs0.vertex_index + instance_index); const int i = inputs0.loc0; const uint u = loc1; const float f = inputs1.loc2; const float4 v = inputs1.loc3; - const tint_symbol_2 tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_3; + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const VertexInputs0 tint_symbol_3 = {tint_symbol.vertex_index, tint_symbol.loc0}; + const VertexInputs1 tint_symbol_4 = {tint_symbol.loc2, tint_symbol.loc3}; + const float4 inner_result = main_inner(tint_symbol_3, tint_symbol.loc1, tint_symbol.instance_index, tint_symbol_4); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/shader_io/vertex_input_mixed.wgsl.expected.msl b/test/shader_io/vertex_input_mixed.wgsl.expected.msl index 9c1e8138b7..07dd9b9039 100644 --- a/test/shader_io/vertex_input_mixed.wgsl.expected.msl +++ b/test/shader_io/vertex_input_mixed.wgsl.expected.msl @@ -9,26 +9,31 @@ struct VertexInputs1 { float loc2; float4 loc3; }; -struct tint_symbol_3 { +struct tint_symbol_2 { int loc0 [[attribute(0)]]; uint loc1 [[attribute(1)]]; float loc2 [[attribute(2)]]; float4 loc3 [[attribute(3)]]; }; -struct tint_symbol_4 { +struct tint_symbol_3 { float4 value [[position]]; }; -vertex tint_symbol_4 tint_symbol(uint tint_symbol_2 [[vertex_id]], uint instance_index [[instance_id]], tint_symbol_3 tint_symbol_1 [[stage_in]]) { - VertexInputs0 const inputs0 = {.vertex_index=tint_symbol_2, .loc0=tint_symbol_1.loc0}; - uint const loc1 = tint_symbol_1.loc1; - VertexInputs1 const inputs1 = {.loc2=tint_symbol_1.loc2, .loc3=tint_symbol_1.loc3}; +float4 tint_symbol_inner(VertexInputs0 inputs0, uint loc1, uint instance_index, VertexInputs1 inputs1) { uint const foo = (inputs0.vertex_index + instance_index); int const i = inputs0.loc0; uint const u = loc1; float const f = inputs1.loc2; float4 const v = inputs1.loc3; - tint_symbol_4 const tint_symbol_5 = {.value=float4()}; - return tint_symbol_5; + return float4(); +} + +vertex tint_symbol_3 tint_symbol(uint vertex_index [[vertex_id]], uint instance_index [[instance_id]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + VertexInputs0 const tint_symbol_4 = {.vertex_index=vertex_index, .loc0=tint_symbol_1.loc0}; + VertexInputs1 const tint_symbol_5 = {.loc2=tint_symbol_1.loc2, .loc3=tint_symbol_1.loc3}; + float4 const inner_result = tint_symbol_inner(tint_symbol_4, tint_symbol_1.loc1, instance_index, tint_symbol_5); + tint_symbol_3 wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/shader_io/vertex_output_builtins.wgsl.expected.hlsl b/test/shader_io/vertex_output_builtins.wgsl.expected.hlsl index 5a48b147b8..d08b5d5887 100644 --- a/test/shader_io/vertex_output_builtins.wgsl.expected.hlsl +++ b/test/shader_io/vertex_output_builtins.wgsl.expected.hlsl @@ -2,7 +2,13 @@ struct tint_symbol { float4 value : SV_Position; }; -tint_symbol main() { - const tint_symbol tint_symbol_1 = {float4(1.0f, 2.0f, 3.0f, 4.0f)}; - return tint_symbol_1; +float4 main_inner() { + return float4(1.0f, 2.0f, 3.0f, 4.0f); +} + +tint_symbol main() { + const float4 inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/shader_io/vertex_output_builtins.wgsl.expected.msl b/test/shader_io/vertex_output_builtins.wgsl.expected.msl index 1bc7c1c0cd..37e950f0cb 100644 --- a/test/shader_io/vertex_output_builtins.wgsl.expected.msl +++ b/test/shader_io/vertex_output_builtins.wgsl.expected.msl @@ -5,8 +5,14 @@ struct tint_symbol_1 { float4 value [[position]]; }; -vertex tint_symbol_1 tint_symbol() { - tint_symbol_1 const tint_symbol_2 = {.value=float4(1.0f, 2.0f, 3.0f, 4.0f)}; - return tint_symbol_2; +float4 tint_symbol_inner() { + return float4(1.0f, 2.0f, 3.0f, 4.0f); +} + +vertex tint_symbol_1 tint_symbol() { + float4 const inner_result = tint_symbol_inner(); + tint_symbol_1 wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/shader_io/vertex_output_builtins_struct.wgsl.expected.hlsl b/test/shader_io/vertex_output_builtins_struct.wgsl.expected.hlsl index 064dd8afc1..eeaba9692d 100644 --- a/test/shader_io/vertex_output_builtins_struct.wgsl.expected.hlsl +++ b/test/shader_io/vertex_output_builtins_struct.wgsl.expected.hlsl @@ -5,8 +5,14 @@ struct tint_symbol { float4 position : SV_Position; }; -tint_symbol main() { +VertexOutputs main_inner() { const VertexOutputs tint_symbol_1 = {float4(1.0f, 2.0f, 3.0f, 4.0f)}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.position}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const VertexOutputs inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.position = inner_result.position; + return wrapper_result; } diff --git a/test/shader_io/vertex_output_builtins_struct.wgsl.expected.msl b/test/shader_io/vertex_output_builtins_struct.wgsl.expected.msl index 24ea7ac443..d077ccc732 100644 --- a/test/shader_io/vertex_output_builtins_struct.wgsl.expected.msl +++ b/test/shader_io/vertex_output_builtins_struct.wgsl.expected.msl @@ -8,9 +8,15 @@ struct tint_symbol_1 { float4 position [[position]]; }; -vertex tint_symbol_1 tint_symbol() { +VertexOutputs tint_symbol_inner() { VertexOutputs const tint_symbol_2 = {.position=float4(1.0f, 2.0f, 3.0f, 4.0f)}; - tint_symbol_1 const tint_symbol_3 = {.position=tint_symbol_2.position}; - return tint_symbol_3; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + VertexOutputs const inner_result = tint_symbol_inner(); + tint_symbol_1 wrapper_result = {}; + wrapper_result.position = inner_result.position; + return wrapper_result; } diff --git a/test/shader_io/vertex_output_locations_struct.wgsl.expected.hlsl b/test/shader_io/vertex_output_locations_struct.wgsl.expected.hlsl index 4d62928958..301487dd44 100644 --- a/test/shader_io/vertex_output_locations_struct.wgsl.expected.hlsl +++ b/test/shader_io/vertex_output_locations_struct.wgsl.expected.hlsl @@ -13,8 +13,18 @@ struct tint_symbol { float4 position : SV_Position; }; -tint_symbol main() { +VertexOutputs main_inner() { const VertexOutputs tint_symbol_1 = {1, 1u, 1.0f, float4(1.0f, 2.0f, 3.0f, 4.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.loc0, tint_symbol_1.loc1, tint_symbol_1.loc2, tint_symbol_1.loc3, tint_symbol_1.position}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const VertexOutputs inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.loc0 = inner_result.loc0; + wrapper_result.loc1 = inner_result.loc1; + wrapper_result.loc2 = inner_result.loc2; + wrapper_result.loc3 = inner_result.loc3; + wrapper_result.position = inner_result.position; + return wrapper_result; } diff --git a/test/shader_io/vertex_output_locations_struct.wgsl.expected.msl b/test/shader_io/vertex_output_locations_struct.wgsl.expected.msl index b56fad9379..40d177a28d 100644 --- a/test/shader_io/vertex_output_locations_struct.wgsl.expected.msl +++ b/test/shader_io/vertex_output_locations_struct.wgsl.expected.msl @@ -16,9 +16,19 @@ struct tint_symbol_1 { float4 position [[position]]; }; -vertex tint_symbol_1 tint_symbol() { +VertexOutputs tint_symbol_inner() { VertexOutputs const tint_symbol_2 = {.loc0=1, .loc1=1u, .loc2=1.0f, .loc3=float4(1.0f, 2.0f, 3.0f, 4.0f), .position=float4()}; - tint_symbol_1 const tint_symbol_3 = {.loc0=tint_symbol_2.loc0, .loc1=tint_symbol_2.loc1, .loc2=tint_symbol_2.loc2, .loc3=tint_symbol_2.loc3, .position=tint_symbol_2.position}; - return tint_symbol_3; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + VertexOutputs const inner_result = tint_symbol_inner(); + tint_symbol_1 wrapper_result = {}; + wrapper_result.loc0 = inner_result.loc0; + wrapper_result.loc1 = inner_result.loc1; + wrapper_result.loc2 = inner_result.loc2; + wrapper_result.loc3 = inner_result.loc3; + wrapper_result.position = inner_result.position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.hlsl index f496a7d198..fdefc796f1 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint x_1_param : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1 = x_1_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.msl index 7e7cc9a2db..6762cc0bda 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread uint* const tint_symbol_2) { - uint const x_2 = *(tint_symbol_2); +void main_1(thread uint* const tint_symbol_1) { + uint const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint x_1_param, thread uint* const tint_symbol_2) { + *(tint_symbol_2) = x_1_param; + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) { thread uint tint_symbol_3 = 0u; - tint_symbol_3 = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.hlsl index 983314b893..da1756bfbf 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint x_1_param : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1 = asint(x_1_param); main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.msl index d6228c70ae..b933b90077 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread int* const tint_symbol_2) { - int const x_2 = *(tint_symbol_2); +void main_1(thread int* const tint_symbol_1) { + int const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint x_1_param, thread int* const tint_symbol_2) { + *(tint_symbol_2) = as_type(x_1_param); + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) { thread int tint_symbol_3 = 0; - tint_symbol_3 = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.hlsl index ab2e231851..855f1886b2 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_GroupThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = x_1_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.msl index b153c9ec77..4408675b9c 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread uint3* const tint_symbol_2) { - uint3 const x_2 = *(tint_symbol_2); +void main_1(thread uint3* const tint_symbol_1) { + uint3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_1_param; + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.hlsl index 9b5b8cc5cf..51330f40f9 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_GroupThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = asint(x_1_param); main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.msl index bdf373b670..8fcdb7c21a 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread int3* const tint_symbol_2) { - int3 const x_2 = *(tint_symbol_2); +void main_1(thread int3* const tint_symbol_1) { + int3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) { + *(tint_symbol_2) = as_type(x_1_param); + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) { thread int3 tint_symbol_3 = 0; - tint_symbol_3 = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.hlsl index 1808399df2..5a4551e8ad 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = x_1_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.msl index b63600657f..446258db8e 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread uint3* const tint_symbol_2) { - uint3 const x_2 = *(tint_symbol_2); +void main_1(thread uint3* const tint_symbol_1) { + uint3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_1_param; + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.hlsl index 4c89479d85..ec5b041c5a 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = asint(x_1_param); main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.msl index 98f26ba0ff..4bf5529dbd 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread int3* const tint_symbol_2) { - int3 const x_2 = *(tint_symbol_2); +void main_1(thread int3* const tint_symbol_1) { + int3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) { + *(tint_symbol_2) = as_type(x_1_param); + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) { thread int3 tint_symbol_3 = 0; - tint_symbol_3 = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.hlsl index 737d636cb9..f2242efa3b 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_GroupID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = x_1_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.msl index 7ccca66e32..5198dd36da 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread uint3* const tint_symbol_2) { - uint3 const x_2 = *(tint_symbol_2); +void main_1(thread uint3* const tint_symbol_1) { + uint3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_1_param; + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[threadgroup_position_in_grid]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.hlsl index 8dfa3752af..755186d9f6 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_GroupID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = asint(x_1_param); main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.msl index 6cee654587..d8fe682d5f 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread int3* const tint_symbol_2) { - int3 const x_2 = *(tint_symbol_2); +void main_1(thread int3* const tint_symbol_1) { + int3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) { + *(tint_symbol_2) = as_type(x_1_param); + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[threadgroup_position_in_grid]]) { thread int3 tint_symbol_3 = 0; - tint_symbol_3 = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.hlsl index f496a7d198..fdefc796f1 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint x_1_param : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1 = x_1_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.msl index 7e7cc9a2db..6762cc0bda 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread uint* const tint_symbol_2) { - uint const x_2 = *(tint_symbol_2); +void main_1(thread uint* const tint_symbol_1) { + uint const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint x_1_param, thread uint* const tint_symbol_2) { + *(tint_symbol_2) = x_1_param; + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) { thread uint tint_symbol_3 = 0u; - tint_symbol_3 = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.hlsl index 983314b893..da1756bfbf 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint x_1_param : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1 = asint(x_1_param); main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.msl index d6228c70ae..b933b90077 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread int* const tint_symbol_2) { - int const x_2 = *(tint_symbol_2); +void main_1(thread int* const tint_symbol_1) { + int const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint x_1_param, thread int* const tint_symbol_2) { + *(tint_symbol_2) = as_type(x_1_param); + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) { thread int tint_symbol_3 = 0; - tint_symbol_3 = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.hlsl index ab2e231851..855f1886b2 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_GroupThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = x_1_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.msl index b153c9ec77..4408675b9c 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread uint3* const tint_symbol_2) { - uint3 const x_2 = *(tint_symbol_2); +void main_1(thread uint3* const tint_symbol_1) { + uint3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_1_param; + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.hlsl index 9b5b8cc5cf..51330f40f9 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_GroupThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = asint(x_1_param); main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.msl index bdf373b670..8fcdb7c21a 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread int3* const tint_symbol_2) { - int3 const x_2 = *(tint_symbol_2); +void main_1(thread int3* const tint_symbol_1) { + int3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) { + *(tint_symbol_2) = as_type(x_1_param); + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) { thread int3 tint_symbol_3 = 0; - tint_symbol_3 = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.hlsl index 1808399df2..5a4551e8ad 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = x_1_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.msl index b63600657f..446258db8e 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread uint3* const tint_symbol_2) { - uint3 const x_2 = *(tint_symbol_2); +void main_1(thread uint3* const tint_symbol_1) { + uint3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_1_param; + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.hlsl index 4c89479d85..ec5b041c5a 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = asint(x_1_param); main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.msl index 98f26ba0ff..4bf5529dbd 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread int3* const tint_symbol_2) { - int3 const x_2 = *(tint_symbol_2); +void main_1(thread int3* const tint_symbol_1) { + int3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) { + *(tint_symbol_2) = as_type(x_1_param); + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) { thread int3 tint_symbol_3 = 0; - tint_symbol_3 = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.hlsl index 737d636cb9..f2242efa3b 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_GroupID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = x_1_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.msl index 7ccca66e32..5198dd36da 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread uint3* const tint_symbol_2) { - uint3 const x_2 = *(tint_symbol_2); +void main_1(thread uint3* const tint_symbol_1) { + uint3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_1_param; + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[threadgroup_position_in_grid]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.hlsl index 8dfa3752af..755186d9f6 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_GroupID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = asint(x_1_param); main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.msl index 6cee654587..d8fe682d5f 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread int3* const tint_symbol_2) { - int3 const x_2 = *(tint_symbol_2); +void main_1(thread int3* const tint_symbol_1) { + int3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) { + *(tint_symbol_2) = as_type(x_1_param); + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[threadgroup_position_in_grid]]) { thread int3 tint_symbol_3 = 0; - tint_symbol_3 = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.hlsl index f496a7d198..fdefc796f1 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint x_1_param : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1 = x_1_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.msl index 7e7cc9a2db..6762cc0bda 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread uint* const tint_symbol_2) { - uint const x_2 = *(tint_symbol_2); +void main_1(thread uint* const tint_symbol_1) { + uint const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint x_1_param, thread uint* const tint_symbol_2) { + *(tint_symbol_2) = x_1_param; + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) { thread uint tint_symbol_3 = 0u; - tint_symbol_3 = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.hlsl index 983314b893..da1756bfbf 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint x_1_param : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1 = asint(x_1_param); main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.msl index d6228c70ae..b933b90077 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread int* const tint_symbol_2) { - int const x_2 = *(tint_symbol_2); +void main_1(thread int* const tint_symbol_1) { + int const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint x_1_param, thread int* const tint_symbol_2) { + *(tint_symbol_2) = as_type(x_1_param); + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) { thread int tint_symbol_3 = 0; - tint_symbol_3 = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.hlsl index ab2e231851..855f1886b2 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_GroupThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = x_1_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.msl index b153c9ec77..4408675b9c 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread uint3* const tint_symbol_2) { - uint3 const x_2 = *(tint_symbol_2); +void main_1(thread uint3* const tint_symbol_1) { + uint3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_1_param; + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.hlsl index 9b5b8cc5cf..51330f40f9 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_GroupThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = asint(x_1_param); main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.msl index bdf373b670..8fcdb7c21a 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread int3* const tint_symbol_2) { - int3 const x_2 = *(tint_symbol_2); +void main_1(thread int3* const tint_symbol_1) { + int3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) { + *(tint_symbol_2) = as_type(x_1_param); + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) { thread int3 tint_symbol_3 = 0; - tint_symbol_3 = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.hlsl index 1808399df2..5a4551e8ad 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = x_1_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.msl index b63600657f..446258db8e 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread uint3* const tint_symbol_2) { - uint3 const x_2 = *(tint_symbol_2); +void main_1(thread uint3* const tint_symbol_1) { + uint3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_1_param; + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.hlsl index 4c89479d85..ec5b041c5a 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = asint(x_1_param); main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.msl index 98f26ba0ff..4bf5529dbd 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread int3* const tint_symbol_2) { - int3 const x_2 = *(tint_symbol_2); +void main_1(thread int3* const tint_symbol_1) { + int3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) { + *(tint_symbol_2) = as_type(x_1_param); + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) { thread int3 tint_symbol_3 = 0; - tint_symbol_3 = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.hlsl index 737d636cb9..f2242efa3b 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_GroupID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = x_1_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.msl index 7ccca66e32..5198dd36da 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread uint3* const tint_symbol_2) { - uint3 const x_2 = *(tint_symbol_2); +void main_1(thread uint3* const tint_symbol_1) { + uint3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_1_param; + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[threadgroup_position_in_grid]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.hlsl index 8dfa3752af..755186d9f6 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.hlsl @@ -9,10 +9,13 @@ struct tint_symbol_1 { uint3 x_1_param : SV_GroupID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_1_param = tint_symbol.x_1_param; +void main_inner(uint3 x_1_param) { x_1 = asint(x_1_param); main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.msl index 6cee654587..d8fe682d5f 100644 --- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.msl +++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread int3* const tint_symbol_2) { - int3 const x_2 = *(tint_symbol_2); +void main_1(thread int3* const tint_symbol_1) { + int3 const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) { + *(tint_symbol_2) = as_type(x_1_param); + main_1(tint_symbol_2); +} + kernel void tint_symbol(uint3 x_1_param [[threadgroup_position_in_grid]]) { thread int3 tint_symbol_3 = 0; - tint_symbol_3 = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.hlsl index 50204afd93..444c8e7ab6 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.hlsl @@ -13,9 +13,15 @@ struct tint_symbol { float4 x_2_1 : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_2}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_2_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.msl index 97f6e9e6e5..9ccdb81a2a 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.msl @@ -8,17 +8,23 @@ struct tint_symbol_1 { float4 x_2_1 [[position]]; }; -void main_1(thread float* const tint_symbol_4) { - *(tint_symbol_4) = 1.0f; +void main_1(thread float* const tint_symbol_3) { + *(tint_symbol_3) = 1.0f; return; } -vertex tint_symbol_1 tint_symbol() { - thread float tint_symbol_5 = 0.0f; - thread float4 tint_symbol_6 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_2_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_3 = {.x_2_1=tint_symbol_2.x_2_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float* const tint_symbol_4, thread float4* const tint_symbol_5) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_2_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + thread float tint_symbol_6 = 0.0f; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.hlsl index 1993bce8dc..4edc58ea02 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.hlsl @@ -11,9 +11,15 @@ struct tint_symbol { float4 x_2_1 : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_2}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_2_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.msl index 31d71451d7..2589dab657 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.msl @@ -12,11 +12,17 @@ void main_1() { return; } -vertex tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_4 = 0.0f; +main_out tint_symbol_inner(thread float4* const tint_symbol_3) { main_1(); - main_out const tint_symbol_2 = {.x_2_1=tint_symbol_4}; - tint_symbol_1 const tint_symbol_3 = {.x_2_1=tint_symbol_2.x_2_1}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.x_2_1=*(tint_symbol_3)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_4 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_4)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl index 1993bce8dc..4edc58ea02 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl @@ -11,9 +11,15 @@ struct tint_symbol { float4 x_2_1 : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_2}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_2_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl index 31d71451d7..2589dab657 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl @@ -12,11 +12,17 @@ void main_1() { return; } -vertex tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_4 = 0.0f; +main_out tint_symbol_inner(thread float4* const tint_symbol_3) { main_1(); - main_out const tint_symbol_2 = {.x_2_1=tint_symbol_4}; - tint_symbol_1 const tint_symbol_3 = {.x_2_1=tint_symbol_2.x_2_1}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.x_2_1=*(tint_symbol_3)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_4 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_4)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.hlsl index 1993bce8dc..4edc58ea02 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.hlsl @@ -11,9 +11,15 @@ struct tint_symbol { float4 x_2_1 : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_2}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_2_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.msl index 31d71451d7..2589dab657 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.msl @@ -12,11 +12,17 @@ void main_1() { return; } -vertex tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_4 = 0.0f; +main_out tint_symbol_inner(thread float4* const tint_symbol_3) { main_1(); - main_out const tint_symbol_2 = {.x_2_1=tint_symbol_4}; - tint_symbol_1 const tint_symbol_3 = {.x_2_1=tint_symbol_2.x_2_1}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.x_2_1=*(tint_symbol_3)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_4 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_4)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.hlsl index 87eb6562fc..7f01c0bdde 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.hlsl @@ -13,9 +13,15 @@ struct tint_symbol { float4 gl_Position : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {gl_Position}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.msl index 12f6b15733..1840cc22f6 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.msl @@ -8,17 +8,23 @@ struct tint_symbol_1 { float4 gl_Position [[position]]; }; -void main_1(thread float* const tint_symbol_4) { - *(tint_symbol_4) = 1.0f; +void main_1(thread float* const tint_symbol_3) { + *(tint_symbol_3) = 1.0f; return; } -vertex tint_symbol_1 tint_symbol() { - thread float tint_symbol_5 = 0.0f; - thread float4 tint_symbol_6 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.gl_Position=tint_symbol_6}; - tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float* const tint_symbol_4, thread float4* const tint_symbol_5) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + thread float tint_symbol_6 = 0.0f; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.hlsl index b773910ceb..fd53068592 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.hlsl @@ -11,9 +11,15 @@ struct tint_symbol { float4 gl_Position : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {gl_Position}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.msl index 8e83d1d3e8..9d19e8c5a7 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.msl @@ -12,11 +12,17 @@ void main_1() { return; } -vertex tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_4 = 0.0f; +main_out tint_symbol_inner(thread float4* const tint_symbol_3) { main_1(); - main_out const tint_symbol_2 = {.gl_Position=tint_symbol_4}; - tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_3)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_4 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_4)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl index b773910ceb..fd53068592 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl @@ -11,9 +11,15 @@ struct tint_symbol { float4 gl_Position : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {gl_Position}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl index 8e83d1d3e8..9d19e8c5a7 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl @@ -12,11 +12,17 @@ void main_1() { return; } -vertex tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_4 = 0.0f; +main_out tint_symbol_inner(thread float4* const tint_symbol_3) { main_1(); - main_out const tint_symbol_2 = {.gl_Position=tint_symbol_4}; - tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_3)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_4 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_4)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.hlsl index b773910ceb..fd53068592 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.hlsl @@ -11,9 +11,15 @@ struct tint_symbol { float4 gl_Position : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {gl_Position}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.msl index 8e83d1d3e8..9d19e8c5a7 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.msl @@ -12,11 +12,17 @@ void main_1() { return; } -vertex tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_4 = 0.0f; +main_out tint_symbol_inner(thread float4* const tint_symbol_3) { main_1(); - main_out const tint_symbol_2 = {.gl_Position=tint_symbol_4}; - tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_3)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_4 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_4)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.hlsl index ca9f0146ea..3558296b5a 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.hlsl @@ -11,9 +11,15 @@ struct tint_symbol { float4 gl_Position : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {gl_Position}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.msl index 09a24c31df..c969091129 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.msl @@ -12,11 +12,17 @@ void main_1() { return; } -vertex tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_4 = float4(1.0f, 2.0f, 3.0f, 4.0f); +main_out tint_symbol_inner(thread float4* const tint_symbol_3) { main_1(); - main_out const tint_symbol_2 = {.gl_Position=tint_symbol_4}; - tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_3)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_4 = float4(1.0f, 2.0f, 3.0f, 4.0f); + main_out const inner_result = tint_symbol_inner(&(tint_symbol_4)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.hlsl index 05826f0dd1..b262a94103 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { float4 gl_Position : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {gl_Position}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.msl index cbba9403c3..8622e3b4ca 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.msl @@ -8,16 +8,22 @@ struct tint_symbol_1 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_4) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); +void main_1(thread float4* const tint_symbol_3) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_4)}; + return tint_symbol_2; +} + vertex tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.gl_Position=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.hlsl index 6ce5943ffa..1236e986ec 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { float4 gl_Position : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {gl_Position}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.msl index cd58c786b8..4b46a5f40c 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.msl @@ -8,16 +8,22 @@ struct tint_symbol_1 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_4) { - (*(tint_symbol_4)).y = 0.0f; +void main_1(thread float4* const tint_symbol_3) { + (*(tint_symbol_3)).y = 0.0f; return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_4)}; + return tint_symbol_2; +} + vertex tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.gl_Position=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.hlsl index 6ce5943ffa..1236e986ec 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { float4 gl_Position : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {gl_Position}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.msl index cd58c786b8..4b46a5f40c 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.msl @@ -8,16 +8,22 @@ struct tint_symbol_1 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_4) { - (*(tint_symbol_4)).y = 0.0f; +void main_1(thread float4* const tint_symbol_3) { + (*(tint_symbol_3)).y = 0.0f; return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_4)}; + return tint_symbol_2; +} + vertex tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.gl_Position=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.hlsl index 05826f0dd1..b262a94103 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { float4 gl_Position : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {gl_Position}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.msl index cbba9403c3..8622e3b4ca 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.msl @@ -8,16 +8,22 @@ struct tint_symbol_1 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_4) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); +void main_1(thread float4* const tint_symbol_3) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_4)}; + return tint_symbol_2; +} + vertex tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.gl_Position=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.hlsl index 1e520e88b6..97cf4341dc 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.hlsl @@ -15,11 +15,16 @@ struct tint_symbol_2 { float4 position_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_2_param = tint_symbol.x_2_param; +main_out main_inner(uint x_2_param) { x_2 = x_2_param; main_1(); const main_out tint_symbol_3 = {position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.position_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_2_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.position_1 = inner_result.position_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.msl index bb4bf26bdd..0f0882a77a 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.msl @@ -4,7 +4,7 @@ using namespace metal; struct main_out { float4 position_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 position_1 [[position]]; }; @@ -12,13 +12,19 @@ void main_1() { return; } -vertex tint_symbol_2 tint_symbol(uint x_2_param [[vertex_id]]) { - thread uint tint_symbol_5 = 0u; - thread float4 tint_symbol_6 = 0.0f; - tint_symbol_5 = x_2_param; +main_out tint_symbol_inner(uint x_2_param, thread uint* const tint_symbol_3, thread float4* const tint_symbol_4) { + *(tint_symbol_3) = x_2_param; main_1(); - main_out const tint_symbol_3 = {.position_1=tint_symbol_6}; - tint_symbol_2 const tint_symbol_4 = {.position_1=tint_symbol_3.position_1}; - return tint_symbol_4; + main_out const tint_symbol_2 = {.position_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol(uint x_2_param [[vertex_id]]) { + thread uint tint_symbol_5 = 0u; + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_2_param, &(tint_symbol_5), &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.position_1 = inner_result.position_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.hlsl index 592cc4095f..340d0821c0 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.hlsl @@ -11,9 +11,15 @@ struct tint_symbol { float x_1_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_1}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.msl index 4792818531..3003cbb71d 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.msl @@ -12,11 +12,17 @@ void main_1() { return; } -fragment tint_symbol_1 tint_symbol() { - thread float tint_symbol_4 = 0.0f; +main_out tint_symbol_inner(thread float* const tint_symbol_3) { main_1(); - main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_3)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float tint_symbol_4 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_4)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.hlsl index 5aaa5ee140..068eed1eeb 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 x_1_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_4_param = tint_symbol.x_4_param; +main_out main_inner(uint x_4_param) { x_4 = asint(x_4_param); main_1(); const main_out tint_symbol_3 = {x_1}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_1_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_4_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.msl index c87d85b6cb..20da9c1370 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.msl @@ -4,22 +4,28 @@ using namespace metal; struct main_out { float4 x_1_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_1_1 [[position]]; }; -void main_1(thread int* const tint_symbol_5) { - int const x_2 = *(tint_symbol_5); +void main_1(thread int* const tint_symbol_3) { + int const x_2 = *(tint_symbol_3); return; } -vertex tint_symbol_2 tint_symbol(uint x_4_param [[instance_id]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - tint_symbol_6 = as_type(x_4_param); - main_1(&(tint_symbol_6)); - main_out const tint_symbol_3 = {.x_1_1=tint_symbol_7}; - tint_symbol_2 const tint_symbol_4 = {.x_1_1=tint_symbol_3.x_1_1}; - return tint_symbol_4; +main_out tint_symbol_inner(uint x_4_param, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = as_type(x_4_param); + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol(uint x_4_param [[instance_id]]) { + thread int tint_symbol_6 = 0; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.hlsl index 0d3adff852..0d07fb76b8 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 x_4_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +main_out main_inner(uint x_1_param) { x_1 = x_1_param; main_1(); const main_out tint_symbol_3 = {x_4}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_1_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.msl index 3a92aaa9d5..5dbfcc1c6d 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.msl @@ -4,22 +4,28 @@ using namespace metal; struct main_out { float4 x_4_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_4_1 [[position]]; }; -void main_1(thread uint* const tint_symbol_5) { - uint const x_2 = *(tint_symbol_5); +void main_1(thread uint* const tint_symbol_3) { + uint const x_2 = *(tint_symbol_3); return; } -vertex tint_symbol_2 tint_symbol(uint x_1_param [[instance_id]]) { - thread uint tint_symbol_6 = 0u; - thread float4 tint_symbol_7 = 0.0f; - tint_symbol_6 = x_1_param; - main_1(&(tint_symbol_6)); - main_out const tint_symbol_3 = {.x_4_1=tint_symbol_7}; - tint_symbol_2 const tint_symbol_4 = {.x_4_1=tint_symbol_3.x_4_1}; - return tint_symbol_4; +main_out tint_symbol_inner(uint x_1_param, thread uint* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = x_1_param; + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_4_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol(uint x_1_param [[instance_id]]) { + thread uint tint_symbol_6 = 0u; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_1_param, &(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.hlsl index 1956d46611..ae94ff8ccb 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.hlsl @@ -8,9 +8,12 @@ struct tint_symbol_1 { uint x_1_param : SV_Coverage; }; -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1[0] = asint(x_1_param); main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.msl index 17039f4398..d8d0a49089 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.msl @@ -9,10 +9,14 @@ void main_1() { return; } +void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_1) { + (*(tint_symbol_1)).arr[0] = as_type(x_1_param); + main_1(); +} + fragment void tint_symbol(uint x_1_param [[sample_mask]]) { thread tint_array_wrapper tint_symbol_2 = {}; - tint_symbol_2.arr[0] = as_type(x_1_param); - main_1(); + tint_symbol_inner(x_1_param, &(tint_symbol_2)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.hlsl index ae1dd89d79..e137b4d102 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.hlsl @@ -8,9 +8,12 @@ struct tint_symbol_1 { uint x_1_param : SV_Coverage; }; -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1[0] = x_1_param; main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.msl index 03c6bea066..a1503ead2d 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.msl @@ -9,10 +9,14 @@ void main_1() { return; } +void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_1) { + (*(tint_symbol_1)).arr[0] = x_1_param; + main_1(); +} + fragment void tint_symbol(uint x_1_param [[sample_mask]]) { thread tint_array_wrapper tint_symbol_2 = {}; - tint_symbol_2.arr[0] = x_1_param; - main_1(); + tint_symbol_inner(x_1_param, &(tint_symbol_2)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.hlsl index 19fa549491..2414617dc1 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.hlsl @@ -11,9 +11,15 @@ struct tint_symbol { uint x_1_1 : SV_Coverage; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {asuint(x_1[0])}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.msl index 2073b562f7..b7398c5f1f 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.msl @@ -15,11 +15,17 @@ void main_1() { return; } -fragment tint_symbol_1 tint_symbol() { - thread tint_array_wrapper tint_symbol_4 = {.arr={0}}; +main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_3) { main_1(); - main_out const tint_symbol_2 = {.x_1_1=as_type(tint_symbol_4.arr[0])}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.x_1_1=as_type((*(tint_symbol_3)).arr[0])}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread tint_array_wrapper tint_symbol_4 = {.arr={0}}; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_4)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.hlsl index db4a8bcbb4..979b63d4a0 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.hlsl @@ -11,9 +11,15 @@ struct tint_symbol { uint x_1_1 : SV_Coverage; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_1[0]}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.msl index a09d091b4c..0b92cd31bb 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.msl @@ -15,11 +15,17 @@ void main_1() { return; } -fragment tint_symbol_1 tint_symbol() { - thread tint_array_wrapper tint_symbol_4 = {.arr={0u}}; +main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_3) { main_1(); - main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4.arr[0]}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_3)).arr[0]}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread tint_array_wrapper tint_symbol_4 = {.arr={0u}}; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_4)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.hlsl index 8aa1229742..b5d52c8f35 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.hlsl @@ -17,15 +17,15 @@ struct tint_symbol_1 { nointerpolation float x_2_param_1 : TEXCOORD6; }; -void main(tint_symbol_1 tint_symbol) { - const float x_1_param = tint_symbol.x_1_param; - const float x_1_param_1 = tint_symbol.x_1_param_1; - const float x_2_param = tint_symbol.x_2_param; - const float x_2_param_1 = tint_symbol.x_2_param_1; +void main_inner(float x_1_param, float x_1_param_1, float x_2_param, float x_2_param_1) { x_1[0] = x_1_param; x_1[1] = x_1_param_1; x_2.field0 = x_2_param; x_2.field1 = x_2_param_1; main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param, tint_symbol.x_1_param_1, tint_symbol.x_2_param, tint_symbol.x_2_param_1); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.msl index ce7d66dd16..8c80813b5d 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.msl @@ -19,18 +19,18 @@ void main_1() { return; } -fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread tint_array_wrapper tint_symbol_3 = {}; - thread S tint_symbol_4 = {}; - float const x_1_param = tint_symbol_1.x_1_param; - float const x_1_param_1 = tint_symbol_1.x_1_param_1; - float const x_2_param = tint_symbol_1.x_2_param; - float const x_2_param_1 = tint_symbol_1.x_2_param_1; - tint_symbol_3.arr[0] = x_1_param; - tint_symbol_3.arr[1] = x_1_param_1; - tint_symbol_4.field0 = x_2_param; - tint_symbol_4.field1 = x_2_param_1; +void tint_symbol_inner(float x_1_param, float x_1_param_1, float x_2_param, float x_2_param_1, thread tint_array_wrapper* const tint_symbol_3, thread S* const tint_symbol_4) { + (*(tint_symbol_3)).arr[0] = x_1_param; + (*(tint_symbol_3)).arr[1] = x_1_param_1; + (*(tint_symbol_4)).field0 = x_2_param; + (*(tint_symbol_4)).field1 = x_2_param_1; main_1(); +} + +fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread tint_array_wrapper tint_symbol_5 = {}; + thread S tint_symbol_6 = {}; + tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_1_param_1, tint_symbol_1.x_2_param, tint_symbol_1.x_2_param_1, &(tint_symbol_5), &(tint_symbol_6)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl index acb71cc17b..a857a8bf69 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl @@ -22,13 +22,7 @@ struct tint_symbol_1 { noperspective sample float x_1_param_5 : TEXCOORD6; }; -void main(tint_symbol_1 tint_symbol) { - const float x_1_param = tint_symbol.x_1_param; - const float x_1_param_1 = tint_symbol.x_1_param_1; - const float x_1_param_2 = tint_symbol.x_1_param_2; - const float x_1_param_3 = tint_symbol.x_1_param_3; - const float x_1_param_4 = tint_symbol.x_1_param_4; - const float x_1_param_5 = tint_symbol.x_1_param_5; +void main_inner(float x_1_param, float x_1_param_1, float x_1_param_2, float x_1_param_3, float x_1_param_4, float x_1_param_5) { x_1.field0 = x_1_param; x_1.field1 = x_1_param_1; x_1.field2 = x_1_param_2; @@ -36,5 +30,9 @@ void main(tint_symbol_1 tint_symbol) { x_1.field4 = x_1_param_4; x_1.field5 = x_1_param_5; main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param, tint_symbol.x_1_param_1, tint_symbol.x_1_param_2, tint_symbol.x_1_param_3, tint_symbol.x_1_param_4, tint_symbol.x_1_param_5); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.msl index be0799e326..092ee02213 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.msl @@ -22,21 +22,19 @@ void main_1() { return; } -fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread S tint_symbol_3 = {}; - float const x_1_param = tint_symbol_1.x_1_param; - float const x_1_param_1 = tint_symbol_1.x_1_param_1; - float const x_1_param_2 = tint_symbol_1.x_1_param_2; - float const x_1_param_3 = tint_symbol_1.x_1_param_3; - float const x_1_param_4 = tint_symbol_1.x_1_param_4; - float const x_1_param_5 = tint_symbol_1.x_1_param_5; - tint_symbol_3.field0 = x_1_param; - tint_symbol_3.field1 = x_1_param_1; - tint_symbol_3.field2 = x_1_param_2; - tint_symbol_3.field3 = x_1_param_3; - tint_symbol_3.field4 = x_1_param_4; - tint_symbol_3.field5 = x_1_param_5; +void tint_symbol_inner(float x_1_param, float x_1_param_1, float x_1_param_2, float x_1_param_3, float x_1_param_4, float x_1_param_5, thread S* const tint_symbol_3) { + (*(tint_symbol_3)).field0 = x_1_param; + (*(tint_symbol_3)).field1 = x_1_param_1; + (*(tint_symbol_3)).field2 = x_1_param_2; + (*(tint_symbol_3)).field3 = x_1_param_3; + (*(tint_symbol_3)).field4 = x_1_param_4; + (*(tint_symbol_3)).field5 = x_1_param_5; main_1(); +} + +fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread S tint_symbol_4 = {}; + tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_1_param_1, tint_symbol_1.x_1_param_2, tint_symbol_1.x_1_param_3, tint_symbol_1.x_1_param_4, tint_symbol_1.x_1_param_5, &(tint_symbol_4)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl index dfc897afa9..7fe3df7ac9 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl @@ -30,9 +30,20 @@ struct tint_symbol { noperspective sample float x_1_6 : SV_Target6; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_1.field0, x_1.field1, x_1.field2, x_1.field3, x_1.field4, x_1.field5}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1, tint_symbol_1.x_1_2, tint_symbol_1.x_1_3, tint_symbol_1.x_1_4, tint_symbol_1.x_1_5, tint_symbol_1.x_1_6}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + wrapper_result.x_1_2 = inner_result.x_1_2; + wrapper_result.x_1_3 = inner_result.x_1_3; + wrapper_result.x_1_4 = inner_result.x_1_4; + wrapper_result.x_1_5 = inner_result.x_1_5; + wrapper_result.x_1_6 = inner_result.x_1_6; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.msl index 6f664e8257..907819c647 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.msl @@ -30,11 +30,22 @@ void main_1() { return; } -fragment tint_symbol_1 tint_symbol() { - thread S tint_symbol_4 = {}; +main_out tint_symbol_inner(thread S* const tint_symbol_3) { main_1(); - main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4.field0, .x_1_2=tint_symbol_4.field1, .x_1_3=tint_symbol_4.field2, .x_1_4=tint_symbol_4.field3, .x_1_5=tint_symbol_4.field4, .x_1_6=tint_symbol_4.field5}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1, .x_1_2=tint_symbol_2.x_1_2, .x_1_3=tint_symbol_2.x_1_3, .x_1_4=tint_symbol_2.x_1_4, .x_1_5=tint_symbol_2.x_1_5, .x_1_6=tint_symbol_2.x_1_6}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_3)).field0, .x_1_2=(*(tint_symbol_3)).field1, .x_1_3=(*(tint_symbol_3)).field2, .x_1_4=(*(tint_symbol_3)).field3, .x_1_5=(*(tint_symbol_3)).field4, .x_1_6=(*(tint_symbol_3)).field5}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread S tint_symbol_4 = {}; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_4)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + wrapper_result.x_1_2 = inner_result.x_1_2; + wrapper_result.x_1_3 = inner_result.x_1_3; + wrapper_result.x_1_4 = inner_result.x_1_4; + wrapper_result.x_1_5 = inner_result.x_1_5; + wrapper_result.x_1_6 = inner_result.x_1_6; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_IOLocations.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_IOLocations.spvasm.expected.hlsl index d2eadc7035..44e09c5e0d 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_IOLocations.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_IOLocations.spvasm.expected.hlsl @@ -20,13 +20,18 @@ struct tint_symbol_2 { uint x_4_1 : SV_Target6; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; - const uint x_3_param = tint_symbol.x_3_param; +main_out main_inner(uint x_1_param, uint x_3_param) { x_1 = x_1_param; x_3 = x_3_param; main_1(); const main_out tint_symbol_3 = {x_2, x_4}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_2_1, tint_symbol_3.x_4_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_1_param, tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_2_1 = inner_result.x_2_1; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.hlsl index 663d6d000a..0a3ff6591b 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.hlsl @@ -25,13 +25,7 @@ struct tint_symbol_2 { float4 x_8_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; - const uint2 x_2_param = tint_symbol.x_2_param; - const int x_3_param = tint_symbol.x_3_param; - const int2 x_4_param = tint_symbol.x_4_param; - const float x_5_param = tint_symbol.x_5_param; - const float2 x_6_param = tint_symbol.x_6_param; +main_out main_inner(uint x_1_param, uint2 x_2_param, int x_3_param, int2 x_4_param, float x_5_param, float2 x_6_param) { x_1 = x_1_param; x_2 = x_2_param; x_3 = x_3_param; @@ -40,6 +34,12 @@ tint_symbol_2 main(tint_symbol_1 tint_symbol) { x_6 = x_6_param; main_1(); const main_out tint_symbol_3 = {x_8}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_8_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_1_param, tint_symbol.x_2_param, tint_symbol.x_3_param, tint_symbol.x_4_param, tint_symbol.x_5_param, tint_symbol.x_6_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_8_1 = inner_result.x_8_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.msl index 8ddfb0777a..50e9d5fc62 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.msl @@ -20,29 +20,29 @@ void main_1() { return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread uint tint_symbol_6 = 0u; - thread uint2 tint_symbol_7 = 0u; - thread int tint_symbol_8 = 0; - thread int2 tint_symbol_9 = 0; - thread float tint_symbol_10 = 0.0f; - thread float2 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - uint const x_1_param = tint_symbol_1.x_1_param; - uint2 const x_2_param = tint_symbol_1.x_2_param; - int const x_3_param = tint_symbol_1.x_3_param; - int2 const x_4_param = tint_symbol_1.x_4_param; - float const x_5_param = tint_symbol_1.x_5_param; - float2 const x_6_param = tint_symbol_1.x_6_param; - tint_symbol_6 = x_1_param; - tint_symbol_7 = x_2_param; - tint_symbol_8 = x_3_param; - tint_symbol_9 = x_4_param; - tint_symbol_10 = x_5_param; - tint_symbol_11 = x_6_param; +main_out tint_symbol_inner(uint x_1_param, uint2 x_2_param, int x_3_param, int2 x_4_param, float x_5_param, float2 x_6_param, thread uint* const tint_symbol_5, thread uint2* const tint_symbol_6, thread int* const tint_symbol_7, thread int2* const tint_symbol_8, thread float* const tint_symbol_9, thread float2* const tint_symbol_10, thread float4* const tint_symbol_11) { + *(tint_symbol_5) = x_1_param; + *(tint_symbol_6) = x_2_param; + *(tint_symbol_7) = x_3_param; + *(tint_symbol_8) = x_4_param; + *(tint_symbol_9) = x_5_param; + *(tint_symbol_10) = x_6_param; main_1(); - main_out const tint_symbol_4 = {.x_8_1=tint_symbol_12}; - tint_symbol_3 const tint_symbol_5 = {.x_8_1=tint_symbol_4.x_8_1}; - return tint_symbol_5; + main_out const tint_symbol_4 = {.x_8_1=*(tint_symbol_11)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread uint tint_symbol_12 = 0u; + thread uint2 tint_symbol_13 = 0u; + thread int tint_symbol_14 = 0; + thread int2 tint_symbol_15 = 0; + thread float tint_symbol_16 = 0.0f; + thread float2 tint_symbol_17 = 0.0f; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_2_param, tint_symbol_1.x_3_param, tint_symbol_1.x_4_param, tint_symbol_1.x_5_param, tint_symbol_1.x_6_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_8_1 = inner_result.x_8_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.hlsl index 453432ded3..7f7e005ac0 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.hlsl @@ -29,9 +29,21 @@ struct tint_symbol { float4 x_8_1 : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_1, x_2, x_3, x_4, x_5, x_6, x_8}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1, tint_symbol_1.x_2_1, tint_symbol_1.x_3_1, tint_symbol_1.x_4_1, tint_symbol_1.x_5_1, tint_symbol_1.x_6_1, tint_symbol_1.x_8_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + wrapper_result.x_2_1 = inner_result.x_2_1; + wrapper_result.x_3_1 = inner_result.x_3_1; + wrapper_result.x_4_1 = inner_result.x_4_1; + wrapper_result.x_5_1 = inner_result.x_5_1; + wrapper_result.x_6_1 = inner_result.x_6_1; + wrapper_result.x_8_1 = inner_result.x_8_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.msl index 05b18ed806..f0325d43bb 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.msl @@ -24,17 +24,29 @@ void main_1() { return; } -vertex tint_symbol_1 tint_symbol() { - thread uint tint_symbol_4 = 0u; - thread uint2 tint_symbol_5 = 0u; - thread int tint_symbol_6 = 0; - thread int2 tint_symbol_7 = 0; - thread float tint_symbol_8 = 0.0f; - thread float2 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; +main_out tint_symbol_inner(thread uint* const tint_symbol_3, thread uint2* const tint_symbol_4, thread int* const tint_symbol_5, thread int2* const tint_symbol_6, thread float* const tint_symbol_7, thread float2* const tint_symbol_8, thread float4* const tint_symbol_9) { main_1(); - main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4, .x_2_1=tint_symbol_5, .x_3_1=tint_symbol_6, .x_4_1=tint_symbol_7, .x_5_1=tint_symbol_8, .x_6_1=tint_symbol_9, .x_8_1=tint_symbol_10}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1, .x_2_1=tint_symbol_2.x_2_1, .x_3_1=tint_symbol_2.x_3_1, .x_4_1=tint_symbol_2.x_4_1, .x_5_1=tint_symbol_2.x_5_1, .x_6_1=tint_symbol_2.x_6_1, .x_8_1=tint_symbol_2.x_8_1}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_3), .x_2_1=*(tint_symbol_4), .x_3_1=*(tint_symbol_5), .x_4_1=*(tint_symbol_6), .x_5_1=*(tint_symbol_7), .x_6_1=*(tint_symbol_8), .x_8_1=*(tint_symbol_9)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + thread uint tint_symbol_10 = 0u; + thread uint2 tint_symbol_11 = 0u; + thread int tint_symbol_12 = 0; + thread int2 tint_symbol_13 = 0; + thread float tint_symbol_14 = 0.0f; + thread float2 tint_symbol_15 = 0.0f; + thread float4 tint_symbol_16 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + wrapper_result.x_2_1 = inner_result.x_2_1; + wrapper_result.x_3_1 = inner_result.x_3_1; + wrapper_result.x_4_1 = inner_result.x_4_1; + wrapper_result.x_5_1 = inner_result.x_5_1; + wrapper_result.x_6_1 = inner_result.x_6_1; + wrapper_result.x_8_1 = inner_result.x_8_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl index 0c3175afd0..03c9fd5b2a 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl @@ -18,13 +18,7 @@ struct tint_symbol_1 { noperspective sample float x_6_param : TEXCOORD6; }; -void main(tint_symbol_1 tint_symbol) { - const float x_1_param = tint_symbol.x_1_param; - const float x_2_param = tint_symbol.x_2_param; - const float x_3_param = tint_symbol.x_3_param; - const float x_4_param = tint_symbol.x_4_param; - const float x_5_param = tint_symbol.x_5_param; - const float x_6_param = tint_symbol.x_6_param; +void main_inner(float x_1_param, float x_2_param, float x_3_param, float x_4_param, float x_5_param, float x_6_param) { x_1 = x_1_param; x_2 = x_2_param; x_3 = x_3_param; @@ -32,5 +26,9 @@ void main(tint_symbol_1 tint_symbol) { x_5 = x_5_param; x_6 = x_6_param; main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param, tint_symbol.x_2_param, tint_symbol.x_3_param, tint_symbol.x_4_param, tint_symbol.x_5_param, tint_symbol.x_6_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.msl index 783515b256..fcb08483fa 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.msl @@ -14,26 +14,24 @@ void main_1() { return; } -fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float tint_symbol_3 = 0.0f; - thread float tint_symbol_4 = 0.0f; - thread float tint_symbol_5 = 0.0f; - thread float tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - thread float tint_symbol_8 = 0.0f; - float const x_1_param = tint_symbol_1.x_1_param; - float const x_2_param = tint_symbol_1.x_2_param; - float const x_3_param = tint_symbol_1.x_3_param; - float const x_4_param = tint_symbol_1.x_4_param; - float const x_5_param = tint_symbol_1.x_5_param; - float const x_6_param = tint_symbol_1.x_6_param; - tint_symbol_3 = x_1_param; - tint_symbol_4 = x_2_param; - tint_symbol_5 = x_3_param; - tint_symbol_6 = x_4_param; - tint_symbol_7 = x_5_param; - tint_symbol_8 = x_6_param; +void tint_symbol_inner(float x_1_param, float x_2_param, float x_3_param, float x_4_param, float x_5_param, float x_6_param, thread float* const tint_symbol_3, thread float* const tint_symbol_4, thread float* const tint_symbol_5, thread float* const tint_symbol_6, thread float* const tint_symbol_7, thread float* const tint_symbol_8) { + *(tint_symbol_3) = x_1_param; + *(tint_symbol_4) = x_2_param; + *(tint_symbol_5) = x_3_param; + *(tint_symbol_6) = x_4_param; + *(tint_symbol_7) = x_5_param; + *(tint_symbol_8) = x_6_param; main_1(); +} + +fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float tint_symbol_9 = 0.0f; + thread float tint_symbol_10 = 0.0f; + thread float tint_symbol_11 = 0.0f; + thread float tint_symbol_12 = 0.0f; + thread float tint_symbol_13 = 0.0f; + thread float tint_symbol_14 = 0.0f; + tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_2_param, tint_symbol_1.x_3_param, tint_symbol_1.x_4_param, tint_symbol_1.x_5_param, tint_symbol_1.x_6_param, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl index 2832006fc1..3f44590b01 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl @@ -26,9 +26,20 @@ struct tint_symbol { noperspective sample float x_6_1 : SV_Target6; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_1, x_2, x_3, x_4, x_5, x_6}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1, tint_symbol_1.x_2_1, tint_symbol_1.x_3_1, tint_symbol_1.x_4_1, tint_symbol_1.x_5_1, tint_symbol_1.x_6_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + wrapper_result.x_2_1 = inner_result.x_2_1; + wrapper_result.x_3_1 = inner_result.x_3_1; + wrapper_result.x_4_1 = inner_result.x_4_1; + wrapper_result.x_5_1 = inner_result.x_5_1; + wrapper_result.x_6_1 = inner_result.x_6_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.msl index f4302dcd6d..8a2912301d 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.msl @@ -22,16 +22,27 @@ void main_1() { return; } -fragment tint_symbol_1 tint_symbol() { - thread float tint_symbol_4 = 0.0f; - thread float tint_symbol_5 = 0.0f; - thread float tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - thread float tint_symbol_8 = 0.0f; - thread float tint_symbol_9 = 0.0f; +main_out tint_symbol_inner(thread float* const tint_symbol_3, thread float* const tint_symbol_4, thread float* const tint_symbol_5, thread float* const tint_symbol_6, thread float* const tint_symbol_7, thread float* const tint_symbol_8) { main_1(); - main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4, .x_2_1=tint_symbol_5, .x_3_1=tint_symbol_6, .x_4_1=tint_symbol_7, .x_5_1=tint_symbol_8, .x_6_1=tint_symbol_9}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1, .x_2_1=tint_symbol_2.x_2_1, .x_3_1=tint_symbol_2.x_3_1, .x_4_1=tint_symbol_2.x_4_1, .x_5_1=tint_symbol_2.x_5_1, .x_6_1=tint_symbol_2.x_6_1}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_3), .x_2_1=*(tint_symbol_4), .x_3_1=*(tint_symbol_5), .x_4_1=*(tint_symbol_6), .x_5_1=*(tint_symbol_7), .x_6_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float tint_symbol_9 = 0.0f; + thread float tint_symbol_10 = 0.0f; + thread float tint_symbol_11 = 0.0f; + thread float tint_symbol_12 = 0.0f; + thread float tint_symbol_13 = 0.0f; + thread float tint_symbol_14 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + wrapper_result.x_2_1 = inner_result.x_2_1; + wrapper_result.x_3_1 = inner_result.x_3_1; + wrapper_result.x_4_1 = inner_result.x_4_1; + wrapper_result.x_5_1 = inner_result.x_5_1; + wrapper_result.x_6_1 = inner_result.x_6_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.hlsl index 0903e46fd6..407c8bdb3f 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.hlsl @@ -26,13 +26,19 @@ struct tint_symbol_2 { float4 x_2_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float x_1_param = tint_symbol.x_1_param; - const float4 x_1_param_1 = tint_symbol.x_1_param_1; +main_out main_inner(float x_1_param, float4 x_1_param_1) { x_1.alice = x_1_param; x_1.bob = x_1_param_1; main_1(); const main_out tint_symbol_3 = {x_2, x_3.alice, x_3.bob}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_3_1, tint_symbol_3.x_3_2, tint_symbol_3.x_2_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_1_param, tint_symbol.x_1_param_1); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_2_1 = inner_result.x_2_1; + wrapper_result.x_3_1 = inner_result.x_3_1; + wrapper_result.x_3_2 = inner_result.x_3_2; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.msl index bbe3dc42f1..6bfb232ddd 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.msl @@ -24,17 +24,23 @@ void main_1() { return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread Communicators tint_symbol_6 = {}; - thread float4 tint_symbol_7 = 0.0f; - thread Communicators tint_symbol_8 = {}; - float const x_1_param = tint_symbol_1.x_1_param; - float4 const x_1_param_1 = tint_symbol_1.x_1_param_1; - tint_symbol_6.alice = x_1_param; - tint_symbol_6.bob = x_1_param_1; +main_out tint_symbol_inner(float x_1_param, float4 x_1_param_1, thread Communicators* const tint_symbol_5, thread float4* const tint_symbol_6, thread Communicators* const tint_symbol_7) { + (*(tint_symbol_5)).alice = x_1_param; + (*(tint_symbol_5)).bob = x_1_param_1; main_1(); - main_out const tint_symbol_4 = {.x_2_1=tint_symbol_7, .x_3_1=tint_symbol_8.alice, .x_3_2=tint_symbol_8.bob}; - tint_symbol_3 const tint_symbol_5 = {.x_3_1=tint_symbol_4.x_3_1, .x_3_2=tint_symbol_4.x_3_2, .x_2_1=tint_symbol_4.x_2_1}; - return tint_symbol_5; + main_out const tint_symbol_4 = {.x_2_1=*(tint_symbol_6), .x_3_1=(*(tint_symbol_7)).alice, .x_3_2=(*(tint_symbol_7)).bob}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread Communicators tint_symbol_8 = {}; + thread float4 tint_symbol_9 = 0.0f; + thread Communicators tint_symbol_10 = {}; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_1_param_1, &(tint_symbol_8), &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_2_1 = inner_result.x_2_1; + wrapper_result.x_3_1 = inner_result.x_3_1; + wrapper_result.x_3_2 = inner_result.x_3_2; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.hlsl index 0d79f1af4f..9ae2da5570 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.hlsl @@ -17,15 +17,18 @@ struct tint_symbol_2 { float4 x_2_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float x_1_param = tint_symbol.x_1_param; - const float x_1_param_1 = tint_symbol.x_1_param_1; - const float x_1_param_2 = tint_symbol.x_1_param_2; +main_out main_inner(float x_1_param, float x_1_param_1, float x_1_param_2) { x_1[0] = x_1_param; x_1[1] = x_1_param_1; x_1[2] = x_1_param_2; main_1(); const main_out tint_symbol_3 = {x_2}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_2_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_1_param, tint_symbol.x_1_param_1, tint_symbol.x_1_param_2); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.msl index 8afc07aba4..6a3cce0276 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.msl @@ -20,18 +20,21 @@ void main_1() { return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread tint_array_wrapper tint_symbol_6 = {}; - thread float4 tint_symbol_7 = 0.0f; - float const x_1_param = tint_symbol_1.x_1_param; - float const x_1_param_1 = tint_symbol_1.x_1_param_1; - float const x_1_param_2 = tint_symbol_1.x_1_param_2; - tint_symbol_6.arr[0] = x_1_param; - tint_symbol_6.arr[1] = x_1_param_1; - tint_symbol_6.arr[2] = x_1_param_2; +main_out tint_symbol_inner(float x_1_param, float x_1_param_1, float x_1_param_2, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) { + (*(tint_symbol_5)).arr[0] = x_1_param; + (*(tint_symbol_5)).arr[1] = x_1_param_1; + (*(tint_symbol_5)).arr[2] = x_1_param_2; main_1(); - main_out const tint_symbol_4 = {.x_2_1=tint_symbol_7}; - tint_symbol_3 const tint_symbol_5 = {.x_2_1=tint_symbol_4.x_2_1}; - return tint_symbol_5; + main_out const tint_symbol_4 = {.x_2_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread tint_array_wrapper tint_symbol_7 = {}; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_1_param_1, tint_symbol_1.x_1_param_2, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.hlsl index 3165ed2654..4c25874c98 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.hlsl @@ -16,13 +16,17 @@ struct tint_symbol_2 { float4 x_2_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_1_param = tint_symbol.x_1_param; - const float4 x_1_param_1 = tint_symbol.x_1_param_1; +main_out main_inner(float4 x_1_param, float4 x_1_param_1) { x_1[0] = x_1_param; x_1[1] = x_1_param_1; main_1(); const main_out tint_symbol_3 = {x_2}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_2_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_1_param, tint_symbol.x_1_param_1); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.msl index b65de1597f..3dee922a48 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.msl @@ -16,16 +16,20 @@ void main_1() { return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float2x4 tint_symbol_6 = float2x4(0.0f); - thread float4 tint_symbol_7 = 0.0f; - float4 const x_1_param = tint_symbol_1.x_1_param; - float4 const x_1_param_1 = tint_symbol_1.x_1_param_1; - tint_symbol_6[0] = x_1_param; - tint_symbol_6[1] = x_1_param_1; +main_out tint_symbol_inner(float4 x_1_param, float4 x_1_param_1, thread float2x4* const tint_symbol_5, thread float4* const tint_symbol_6) { + (*(tint_symbol_5))[0] = x_1_param; + (*(tint_symbol_5))[1] = x_1_param_1; main_1(); - main_out const tint_symbol_4 = {.x_2_1=tint_symbol_7}; - tint_symbol_3 const tint_symbol_5 = {.x_2_1=tint_symbol_4.x_2_1}; - return tint_symbol_5; + main_out const tint_symbol_4 = {.x_2_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float2x4 tint_symbol_7 = float2x4(0.0f); + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_1_param_1, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.hlsl index 14b0548d8c..ad1ad2baad 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.hlsl @@ -18,17 +18,19 @@ struct tint_symbol_2 { float4 x_2_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_1_param = tint_symbol.x_1_param; - const float4 x_1_param_1 = tint_symbol.x_1_param_1; - const float4 x_1_param_2 = tint_symbol.x_1_param_2; - const float4 x_1_param_3 = tint_symbol.x_1_param_3; +main_out main_inner(float4 x_1_param, float4 x_1_param_1, float4 x_1_param_2, float4 x_1_param_3) { x_1[0][0] = x_1_param; x_1[0][1] = x_1_param_1; x_1[1][0] = x_1_param_2; x_1[1][1] = x_1_param_3; main_1(); const main_out tint_symbol_3 = {x_2}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_2_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_1_param, tint_symbol.x_1_param_1, tint_symbol.x_1_param_2, tint_symbol.x_1_param_3); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.msl index 059776b0a6..21e8520038 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.msl @@ -21,20 +21,22 @@ void main_1() { return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread tint_array_wrapper tint_symbol_6 = {}; - thread float4 tint_symbol_7 = 0.0f; - float4 const x_1_param = tint_symbol_1.x_1_param; - float4 const x_1_param_1 = tint_symbol_1.x_1_param_1; - float4 const x_1_param_2 = tint_symbol_1.x_1_param_2; - float4 const x_1_param_3 = tint_symbol_1.x_1_param_3; - tint_symbol_6.arr[0][0] = x_1_param; - tint_symbol_6.arr[0][1] = x_1_param_1; - tint_symbol_6.arr[1][0] = x_1_param_2; - tint_symbol_6.arr[1][1] = x_1_param_3; +main_out tint_symbol_inner(float4 x_1_param, float4 x_1_param_1, float4 x_1_param_2, float4 x_1_param_3, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) { + (*(tint_symbol_5)).arr[0][0] = x_1_param; + (*(tint_symbol_5)).arr[0][1] = x_1_param_1; + (*(tint_symbol_5)).arr[1][0] = x_1_param_2; + (*(tint_symbol_5)).arr[1][1] = x_1_param_3; main_1(); - main_out const tint_symbol_4 = {.x_2_1=tint_symbol_7}; - tint_symbol_3 const tint_symbol_5 = {.x_2_1=tint_symbol_4.x_2_1}; - return tint_symbol_5; + main_out const tint_symbol_4 = {.x_2_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread tint_array_wrapper tint_symbol_7 = {}; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_1_param_1, tint_symbol_1.x_1_param_2, tint_symbol_1.x_1_param_3, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.hlsl index f8df6da46a..0cf6df9120 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.hlsl @@ -21,13 +21,17 @@ struct tint_symbol_2 { float4 x_2_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float x_1_param = tint_symbol.x_1_param; - const float4 x_1_param_1 = tint_symbol.x_1_param_1; +main_out main_inner(float x_1_param, float4 x_1_param_1) { x_1.alice = x_1_param; x_1.bob = x_1_param_1; main_1(); const main_out tint_symbol_3 = {x_2}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_2_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_1_param, tint_symbol.x_1_param_1); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.msl index d95c9b2426..79a8f953f1 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.msl @@ -20,16 +20,20 @@ void main_1() { return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread Communicators tint_symbol_6 = {}; - thread float4 tint_symbol_7 = 0.0f; - float const x_1_param = tint_symbol_1.x_1_param; - float4 const x_1_param_1 = tint_symbol_1.x_1_param_1; - tint_symbol_6.alice = x_1_param; - tint_symbol_6.bob = x_1_param_1; +main_out tint_symbol_inner(float x_1_param, float4 x_1_param_1, thread Communicators* const tint_symbol_5, thread float4* const tint_symbol_6) { + (*(tint_symbol_5)).alice = x_1_param; + (*(tint_symbol_5)).bob = x_1_param_1; main_1(); - main_out const tint_symbol_4 = {.x_2_1=tint_symbol_7}; - tint_symbol_3 const tint_symbol_5 = {.x_2_1=tint_symbol_4.x_2_1}; - return tint_symbol_5; + main_out const tint_symbol_4 = {.x_2_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread Communicators tint_symbol_7 = {}; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_1_param_1, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.hlsl index b7ca2fa83a..38a928f484 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 position_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_4_param = tint_symbol.x_4_param; +main_out main_inner(uint x_4_param) { x_4 = asint(x_4_param); main_1(); const main_out tint_symbol_3 = {position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.position_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_4_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.position_1 = inner_result.position_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.msl index 523de1081a..2266a631a3 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.msl @@ -4,22 +4,28 @@ using namespace metal; struct main_out { float4 position_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 position_1 [[position]]; }; -void main_1(thread int* const tint_symbol_5) { - int const x_2 = *(tint_symbol_5); +void main_1(thread int* const tint_symbol_3) { + int const x_2 = *(tint_symbol_3); return; } -vertex tint_symbol_2 tint_symbol(uint x_4_param [[instance_id]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - tint_symbol_6 = as_type(x_4_param); - main_1(&(tint_symbol_6)); - main_out const tint_symbol_3 = {.position_1=tint_symbol_7}; - tint_symbol_2 const tint_symbol_4 = {.position_1=tint_symbol_3.position_1}; - return tint_symbol_4; +main_out tint_symbol_inner(uint x_4_param, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = as_type(x_4_param); + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.position_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol(uint x_4_param [[instance_id]]) { + thread int tint_symbol_6 = 0; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.position_1 = inner_result.position_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.hlsl index b7ca2fa83a..38a928f484 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 position_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_4_param = tint_symbol.x_4_param; +main_out main_inner(uint x_4_param) { x_4 = asint(x_4_param); main_1(); const main_out tint_symbol_3 = {position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.position_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_4_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.position_1 = inner_result.position_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.msl index 523de1081a..2266a631a3 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.msl @@ -4,22 +4,28 @@ using namespace metal; struct main_out { float4 position_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 position_1 [[position]]; }; -void main_1(thread int* const tint_symbol_5) { - int const x_2 = *(tint_symbol_5); +void main_1(thread int* const tint_symbol_3) { + int const x_2 = *(tint_symbol_3); return; } -vertex tint_symbol_2 tint_symbol(uint x_4_param [[instance_id]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - tint_symbol_6 = as_type(x_4_param); - main_1(&(tint_symbol_6)); - main_out const tint_symbol_3 = {.position_1=tint_symbol_7}; - tint_symbol_2 const tint_symbol_4 = {.position_1=tint_symbol_3.position_1}; - return tint_symbol_4; +main_out tint_symbol_inner(uint x_4_param, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = as_type(x_4_param); + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.position_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol(uint x_4_param [[instance_id]]) { + thread int tint_symbol_6 = 0; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.position_1 = inner_result.position_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.hlsl index b7ca2fa83a..38a928f484 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 position_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_4_param = tint_symbol.x_4_param; +main_out main_inner(uint x_4_param) { x_4 = asint(x_4_param); main_1(); const main_out tint_symbol_3 = {position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.position_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_4_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.position_1 = inner_result.position_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.msl index 523de1081a..2266a631a3 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.msl @@ -4,22 +4,28 @@ using namespace metal; struct main_out { float4 position_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 position_1 [[position]]; }; -void main_1(thread int* const tint_symbol_5) { - int const x_2 = *(tint_symbol_5); +void main_1(thread int* const tint_symbol_3) { + int const x_2 = *(tint_symbol_3); return; } -vertex tint_symbol_2 tint_symbol(uint x_4_param [[instance_id]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - tint_symbol_6 = as_type(x_4_param); - main_1(&(tint_symbol_6)); - main_out const tint_symbol_3 = {.position_1=tint_symbol_7}; - tint_symbol_2 const tint_symbol_4 = {.position_1=tint_symbol_3.position_1}; - return tint_symbol_4; +main_out tint_symbol_inner(uint x_4_param, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = as_type(x_4_param); + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.position_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol(uint x_4_param [[instance_id]]) { + thread int tint_symbol_6 = 0; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.position_1 = inner_result.position_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.hlsl index 5f44758dc5..c41df172aa 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 position_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_4_param = tint_symbol.x_4_param; +main_out main_inner(uint x_4_param) { x_4 = x_4_param; main_1(); const main_out tint_symbol_3 = {position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.position_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_4_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.position_1 = inner_result.position_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.msl index ec253ecf88..5391d305d6 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.msl @@ -4,22 +4,28 @@ using namespace metal; struct main_out { float4 position_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 position_1 [[position]]; }; -void main_1(thread uint* const tint_symbol_5) { - uint const x_2 = *(tint_symbol_5); +void main_1(thread uint* const tint_symbol_3) { + uint const x_2 = *(tint_symbol_3); return; } -vertex tint_symbol_2 tint_symbol(uint x_4_param [[instance_id]]) { - thread uint tint_symbol_6 = 0u; - thread float4 tint_symbol_7 = 0.0f; - tint_symbol_6 = x_4_param; - main_1(&(tint_symbol_6)); - main_out const tint_symbol_3 = {.position_1=tint_symbol_7}; - tint_symbol_2 const tint_symbol_4 = {.position_1=tint_symbol_3.position_1}; - return tint_symbol_4; +main_out tint_symbol_inner(uint x_4_param, thread uint* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = x_4_param; + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.position_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol(uint x_4_param [[instance_id]]) { + thread uint tint_symbol_6 = 0u; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.position_1 = inner_result.position_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.hlsl index 5f44758dc5..c41df172aa 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 position_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_4_param = tint_symbol.x_4_param; +main_out main_inner(uint x_4_param) { x_4 = x_4_param; main_1(); const main_out tint_symbol_3 = {position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.position_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_4_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.position_1 = inner_result.position_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.msl index ec253ecf88..5391d305d6 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.msl @@ -4,22 +4,28 @@ using namespace metal; struct main_out { float4 position_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 position_1 [[position]]; }; -void main_1(thread uint* const tint_symbol_5) { - uint const x_2 = *(tint_symbol_5); +void main_1(thread uint* const tint_symbol_3) { + uint const x_2 = *(tint_symbol_3); return; } -vertex tint_symbol_2 tint_symbol(uint x_4_param [[instance_id]]) { - thread uint tint_symbol_6 = 0u; - thread float4 tint_symbol_7 = 0.0f; - tint_symbol_6 = x_4_param; - main_1(&(tint_symbol_6)); - main_out const tint_symbol_3 = {.position_1=tint_symbol_7}; - tint_symbol_2 const tint_symbol_4 = {.position_1=tint_symbol_3.position_1}; - return tint_symbol_4; +main_out tint_symbol_inner(uint x_4_param, thread uint* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = x_4_param; + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.position_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol(uint x_4_param [[instance_id]]) { + thread uint tint_symbol_6 = 0u; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.position_1 = inner_result.position_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.hlsl index 5f44758dc5..c41df172aa 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 position_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_4_param = tint_symbol.x_4_param; +main_out main_inner(uint x_4_param) { x_4 = x_4_param; main_1(); const main_out tint_symbol_3 = {position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.position_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_4_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.position_1 = inner_result.position_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.msl index ec253ecf88..5391d305d6 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.msl @@ -4,22 +4,28 @@ using namespace metal; struct main_out { float4 position_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 position_1 [[position]]; }; -void main_1(thread uint* const tint_symbol_5) { - uint const x_2 = *(tint_symbol_5); +void main_1(thread uint* const tint_symbol_3) { + uint const x_2 = *(tint_symbol_3); return; } -vertex tint_symbol_2 tint_symbol(uint x_4_param [[instance_id]]) { - thread uint tint_symbol_6 = 0u; - thread float4 tint_symbol_7 = 0.0f; - tint_symbol_6 = x_4_param; - main_1(&(tint_symbol_6)); - main_out const tint_symbol_3 = {.position_1=tint_symbol_7}; - tint_symbol_2 const tint_symbol_4 = {.position_1=tint_symbol_3.position_1}; - return tint_symbol_4; +main_out tint_symbol_inner(uint x_4_param, thread uint* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = x_4_param; + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.position_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol(uint x_4_param [[instance_id]]) { + thread uint tint_symbol_6 = 0u; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.position_1 = inner_result.position_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.hlsl index 0d3cc17f2f..d5ba352b71 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.hlsl @@ -18,9 +18,18 @@ struct tint_symbol { float4 x_2_1 : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_1[0], x_1[1], x_1[2], x_2}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1, tint_symbol_1.x_1_2, tint_symbol_1.x_1_3, tint_symbol_1.x_2_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + wrapper_result.x_1_2 = inner_result.x_1_2; + wrapper_result.x_1_3 = inner_result.x_1_3; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.msl index c00c75ec1c..a11ecf4e00 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.msl @@ -21,12 +21,21 @@ void main_1() { return; } -vertex tint_symbol_1 tint_symbol() { - thread tint_array_wrapper tint_symbol_4 = {}; - thread float4 tint_symbol_5 = 0.0f; +main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_3, thread float4* const tint_symbol_4) { main_1(); - main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4.arr[0], .x_1_2=tint_symbol_4.arr[1], .x_1_3=tint_symbol_4.arr[2], .x_2_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1, .x_1_2=tint_symbol_2.x_1_2, .x_1_3=tint_symbol_2.x_1_3, .x_2_1=tint_symbol_2.x_2_1}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_3)).arr[0], .x_1_2=(*(tint_symbol_3)).arr[1], .x_1_3=(*(tint_symbol_3)).arr[2], .x_2_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + thread tint_array_wrapper tint_symbol_5 = {}; + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5), &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + wrapper_result.x_1_2 = inner_result.x_1_2; + wrapper_result.x_1_3 = inner_result.x_1_3; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.hlsl index 41ab4a7491..705ecff208 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.hlsl @@ -16,9 +16,17 @@ struct tint_symbol { float4 x_2_1 : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_1[0], x_1[1], x_2}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1, tint_symbol_1.x_1_2, tint_symbol_1.x_2_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + wrapper_result.x_1_2 = inner_result.x_1_2; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.msl index 794f327154..43846a3c93 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.msl @@ -16,12 +16,20 @@ void main_1() { return; } -vertex tint_symbol_1 tint_symbol() { - thread float2x4 tint_symbol_4 = float2x4(0.0f); - thread float4 tint_symbol_5 = 0.0f; +main_out tint_symbol_inner(thread float2x4* const tint_symbol_3, thread float4* const tint_symbol_4) { main_1(); - main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4[0], .x_1_2=tint_symbol_4[1], .x_2_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1, .x_1_2=tint_symbol_2.x_1_2, .x_2_1=tint_symbol_2.x_2_1}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_3))[0], .x_1_2=(*(tint_symbol_3))[1], .x_2_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + thread float2x4 tint_symbol_5 = float2x4(0.0f); + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5), &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + wrapper_result.x_1_2 = inner_result.x_1_2; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.hlsl index 2efd4a32e6..28260d3cbb 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.hlsl @@ -21,9 +21,17 @@ struct tint_symbol { float4 x_2_1 : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_1.alice, x_1.bob, x_2}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1, tint_symbol_1.x_1_2, tint_symbol_1.x_2_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + wrapper_result.x_1_2 = inner_result.x_1_2; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.msl index 3ecb5dadea..b1202b4b25 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.msl @@ -20,12 +20,20 @@ void main_1() { return; } -vertex tint_symbol_1 tint_symbol() { - thread Communicators tint_symbol_4 = {}; - thread float4 tint_symbol_5 = 0.0f; +main_out tint_symbol_inner(thread Communicators* const tint_symbol_3, thread float4* const tint_symbol_4) { main_1(); - main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4.alice, .x_1_2=tint_symbol_4.bob, .x_2_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1, .x_1_2=tint_symbol_2.x_1_2, .x_2_1=tint_symbol_2.x_2_1}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_3)).alice, .x_1_2=(*(tint_symbol_3)).bob, .x_2_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + thread Communicators tint_symbol_5 = {}; + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5), &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + wrapper_result.x_1_2 = inner_result.x_1_2; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.hlsl index 702cebb6a4..c61318dcac 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.hlsl @@ -9,9 +9,12 @@ struct tint_symbol_1 { uint x_1_param : SV_SampleIndex; }; -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1 = asint(x_1_param); main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.msl index 5abadcb75b..0ea0fc47e5 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread int* const tint_symbol_2) { - int const x_2 = *(tint_symbol_2); +void main_1(thread int* const tint_symbol_1) { + int const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint x_1_param, thread int* const tint_symbol_2) { + *(tint_symbol_2) = as_type(x_1_param); + main_1(tint_symbol_2); +} + fragment void tint_symbol(uint x_1_param [[sample_id]]) { thread int tint_symbol_3 = 0; - tint_symbol_3 = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.hlsl index 702cebb6a4..c61318dcac 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.hlsl @@ -9,9 +9,12 @@ struct tint_symbol_1 { uint x_1_param : SV_SampleIndex; }; -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1 = asint(x_1_param); main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.msl index 5abadcb75b..0ea0fc47e5 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread int* const tint_symbol_2) { - int const x_2 = *(tint_symbol_2); +void main_1(thread int* const tint_symbol_1) { + int const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint x_1_param, thread int* const tint_symbol_2) { + *(tint_symbol_2) = as_type(x_1_param); + main_1(tint_symbol_2); +} + fragment void tint_symbol(uint x_1_param [[sample_id]]) { thread int tint_symbol_3 = 0; - tint_symbol_3 = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.hlsl index 702cebb6a4..c61318dcac 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.hlsl @@ -9,9 +9,12 @@ struct tint_symbol_1 { uint x_1_param : SV_SampleIndex; }; -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1 = asint(x_1_param); main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.msl index 5abadcb75b..0ea0fc47e5 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread int* const tint_symbol_2) { - int const x_2 = *(tint_symbol_2); +void main_1(thread int* const tint_symbol_1) { + int const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint x_1_param, thread int* const tint_symbol_2) { + *(tint_symbol_2) = as_type(x_1_param); + main_1(tint_symbol_2); +} + fragment void tint_symbol(uint x_1_param [[sample_id]]) { thread int tint_symbol_3 = 0; - tint_symbol_3 = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.hlsl index a7810ba3b7..6daf7ac19c 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.hlsl @@ -9,9 +9,12 @@ struct tint_symbol_1 { uint x_1_param : SV_SampleIndex; }; -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1 = x_1_param; main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.msl index 68116a94c9..0f1f6d858f 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread uint* const tint_symbol_2) { - uint const x_2 = *(tint_symbol_2); +void main_1(thread uint* const tint_symbol_1) { + uint const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint x_1_param, thread uint* const tint_symbol_2) { + *(tint_symbol_2) = x_1_param; + main_1(tint_symbol_2); +} + fragment void tint_symbol(uint x_1_param [[sample_id]]) { thread uint tint_symbol_3 = 0u; - tint_symbol_3 = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.hlsl index a7810ba3b7..6daf7ac19c 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.hlsl @@ -9,9 +9,12 @@ struct tint_symbol_1 { uint x_1_param : SV_SampleIndex; }; -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1 = x_1_param; main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.msl index 68116a94c9..0f1f6d858f 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread uint* const tint_symbol_2) { - uint const x_2 = *(tint_symbol_2); +void main_1(thread uint* const tint_symbol_1) { + uint const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint x_1_param, thread uint* const tint_symbol_2) { + *(tint_symbol_2) = x_1_param; + main_1(tint_symbol_2); +} + fragment void tint_symbol(uint x_1_param [[sample_id]]) { thread uint tint_symbol_3 = 0u; - tint_symbol_3 = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.hlsl index a7810ba3b7..6daf7ac19c 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.hlsl @@ -9,9 +9,12 @@ struct tint_symbol_1 { uint x_1_param : SV_SampleIndex; }; -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1 = x_1_param; main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.msl index 68116a94c9..0f1f6d858f 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.msl @@ -1,15 +1,19 @@ #include using namespace metal; -void main_1(thread uint* const tint_symbol_2) { - uint const x_2 = *(tint_symbol_2); +void main_1(thread uint* const tint_symbol_1) { + uint const x_2 = *(tint_symbol_1); return; } +void tint_symbol_inner(uint x_1_param, thread uint* const tint_symbol_2) { + *(tint_symbol_2) = x_1_param; + main_1(tint_symbol_2); +} + fragment void tint_symbol(uint x_1_param [[sample_id]]) { thread uint tint_symbol_3 = 0u; - tint_symbol_3 = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.hlsl index 69c22b5092..41e13ad06c 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.hlsl @@ -9,9 +9,12 @@ struct tint_symbol_1 { uint x_1_param : SV_Coverage; }; -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1[0] = asint(x_1_param); main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.msl index b408ffeacb..8bb32ce286 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.msl @@ -5,15 +5,19 @@ struct tint_array_wrapper { int arr[1]; }; -void main_1(thread tint_array_wrapper* const tint_symbol_2) { - int const x_4 = (*(tint_symbol_2)).arr[0]; +void main_1(thread tint_array_wrapper* const tint_symbol_1) { + int const x_4 = (*(tint_symbol_1)).arr[0]; return; } +void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_2) { + (*(tint_symbol_2)).arr[0] = as_type(x_1_param); + main_1(tint_symbol_2); +} + fragment void tint_symbol(uint x_1_param [[sample_mask]]) { thread tint_array_wrapper tint_symbol_3 = {}; - tint_symbol_3.arr[0] = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.hlsl index 69c22b5092..41e13ad06c 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.hlsl @@ -9,9 +9,12 @@ struct tint_symbol_1 { uint x_1_param : SV_Coverage; }; -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1[0] = asint(x_1_param); main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.msl index b408ffeacb..8bb32ce286 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.msl @@ -5,15 +5,19 @@ struct tint_array_wrapper { int arr[1]; }; -void main_1(thread tint_array_wrapper* const tint_symbol_2) { - int const x_4 = (*(tint_symbol_2)).arr[0]; +void main_1(thread tint_array_wrapper* const tint_symbol_1) { + int const x_4 = (*(tint_symbol_1)).arr[0]; return; } +void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_2) { + (*(tint_symbol_2)).arr[0] = as_type(x_1_param); + main_1(tint_symbol_2); +} + fragment void tint_symbol(uint x_1_param [[sample_mask]]) { thread tint_array_wrapper tint_symbol_3 = {}; - tint_symbol_3.arr[0] = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.hlsl index 8d551f5ee7..719e31e9e3 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.hlsl @@ -9,9 +9,12 @@ struct tint_symbol_1 { uint x_1_param : SV_Coverage; }; -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1[0] = asint(x_1_param); main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.msl index 5ec09f0ad6..5282e0e1f4 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.msl @@ -5,15 +5,19 @@ struct tint_array_wrapper { int arr[1]; }; -void main_1(thread tint_array_wrapper* const tint_symbol_2) { - int const x_3 = (*(tint_symbol_2)).arr[0]; +void main_1(thread tint_array_wrapper* const tint_symbol_1) { + int const x_3 = (*(tint_symbol_1)).arr[0]; return; } +void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_2) { + (*(tint_symbol_2)).arr[0] = as_type(x_1_param); + main_1(tint_symbol_2); +} + fragment void tint_symbol(uint x_1_param [[sample_mask]]) { thread tint_array_wrapper tint_symbol_3 = {}; - tint_symbol_3.arr[0] = as_type(x_1_param); - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.hlsl index 137131249d..b628f8f186 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.hlsl @@ -9,9 +9,12 @@ struct tint_symbol_1 { uint x_1_param : SV_Coverage; }; -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1[0] = x_1_param; main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.msl index aebd0dd828..a30905724d 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.msl @@ -5,15 +5,19 @@ struct tint_array_wrapper { uint arr[1]; }; -void main_1(thread tint_array_wrapper* const tint_symbol_2) { - uint const x_4 = (*(tint_symbol_2)).arr[0]; +void main_1(thread tint_array_wrapper* const tint_symbol_1) { + uint const x_4 = (*(tint_symbol_1)).arr[0]; return; } +void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_2) { + (*(tint_symbol_2)).arr[0] = x_1_param; + main_1(tint_symbol_2); +} + fragment void tint_symbol(uint x_1_param [[sample_mask]]) { thread tint_array_wrapper tint_symbol_3 = {}; - tint_symbol_3.arr[0] = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.hlsl index 137131249d..b628f8f186 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.hlsl @@ -9,9 +9,12 @@ struct tint_symbol_1 { uint x_1_param : SV_Coverage; }; -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1[0] = x_1_param; main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.msl index aebd0dd828..a30905724d 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.msl @@ -5,15 +5,19 @@ struct tint_array_wrapper { uint arr[1]; }; -void main_1(thread tint_array_wrapper* const tint_symbol_2) { - uint const x_4 = (*(tint_symbol_2)).arr[0]; +void main_1(thread tint_array_wrapper* const tint_symbol_1) { + uint const x_4 = (*(tint_symbol_1)).arr[0]; return; } +void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_2) { + (*(tint_symbol_2)).arr[0] = x_1_param; + main_1(tint_symbol_2); +} + fragment void tint_symbol(uint x_1_param [[sample_mask]]) { thread tint_array_wrapper tint_symbol_3 = {}; - tint_symbol_3.arr[0] = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.hlsl index 46546824db..431e66bc0d 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.hlsl @@ -9,9 +9,12 @@ struct tint_symbol_1 { uint x_1_param : SV_Coverage; }; -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1[0] = x_1_param; main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.msl index 210b39c6fb..87b5d885e1 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.msl @@ -5,15 +5,19 @@ struct tint_array_wrapper { uint arr[1]; }; -void main_1(thread tint_array_wrapper* const tint_symbol_2) { - uint const x_3 = (*(tint_symbol_2)).arr[0]; +void main_1(thread tint_array_wrapper* const tint_symbol_1) { + uint const x_3 = (*(tint_symbol_1)).arr[0]; return; } +void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_2) { + (*(tint_symbol_2)).arr[0] = x_1_param; + main_1(tint_symbol_2); +} + fragment void tint_symbol(uint x_1_param [[sample_mask]]) { thread tint_array_wrapper tint_symbol_3 = {}; - tint_symbol_3.arr[0] = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.hlsl index 46546824db..431e66bc0d 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.hlsl @@ -9,9 +9,12 @@ struct tint_symbol_1 { uint x_1_param : SV_Coverage; }; -void main(tint_symbol_1 tint_symbol) { - const uint x_1_param = tint_symbol.x_1_param; +void main_inner(uint x_1_param) { x_1[0] = x_1_param; main_1(); +} + +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_1_param); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.msl index 1c10d95fc5..89663fb976 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.msl @@ -14,15 +14,19 @@ struct tint_array_wrapper_3 { int arr[2]; }; -void main_1(thread tint_array_wrapper* const tint_symbol_2) { - uint const x_3 = (*(tint_symbol_2)).arr[0]; +void main_1(thread tint_array_wrapper* const tint_symbol_1) { + uint const x_3 = (*(tint_symbol_1)).arr[0]; return; } +void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_2) { + (*(tint_symbol_2)).arr[0] = x_1_param; + main_1(tint_symbol_2); +} + fragment void tint_symbol(uint x_1_param [[sample_mask]]) { thread tint_array_wrapper tint_symbol_3 = {}; - tint_symbol_3.arr[0] = x_1_param; - main_1(&(tint_symbol_3)); + tint_symbol_inner(x_1_param, &(tint_symbol_3)); return; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.hlsl index 65e2701f73..57501e5b62 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { uint x_1_1 : SV_Coverage; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {asuint(x_1[0])}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.msl index ba3a014b6a..ee1d80b160 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.msl @@ -11,16 +11,22 @@ struct tint_symbol_1 { uint x_1_1 [[sample_mask]]; }; -void main_1(thread tint_array_wrapper* const tint_symbol_4) { - (*(tint_symbol_4)).arr[0] = 12; +void main_1(thread tint_array_wrapper* const tint_symbol_3) { + (*(tint_symbol_3)).arr[0] = 12; return; } +main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_1_1=as_type((*(tint_symbol_4)).arr[0])}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread tint_array_wrapper tint_symbol_5 = {}; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_1_1=as_type(tint_symbol_5.arr[0])}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.hlsl index 65e2701f73..57501e5b62 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { uint x_1_1 : SV_Coverage; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {asuint(x_1[0])}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.msl index ba3a014b6a..ee1d80b160 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.msl @@ -11,16 +11,22 @@ struct tint_symbol_1 { uint x_1_1 [[sample_mask]]; }; -void main_1(thread tint_array_wrapper* const tint_symbol_4) { - (*(tint_symbol_4)).arr[0] = 12; +void main_1(thread tint_array_wrapper* const tint_symbol_3) { + (*(tint_symbol_3)).arr[0] = 12; return; } +main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_1_1=as_type((*(tint_symbol_4)).arr[0])}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread tint_array_wrapper tint_symbol_5 = {}; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_1_1=as_type(tint_symbol_5.arr[0])}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.hlsl index 65e2701f73..57501e5b62 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { uint x_1_1 : SV_Coverage; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {asuint(x_1[0])}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.msl index ba3a014b6a..ee1d80b160 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.msl @@ -11,16 +11,22 @@ struct tint_symbol_1 { uint x_1_1 [[sample_mask]]; }; -void main_1(thread tint_array_wrapper* const tint_symbol_4) { - (*(tint_symbol_4)).arr[0] = 12; +void main_1(thread tint_array_wrapper* const tint_symbol_3) { + (*(tint_symbol_3)).arr[0] = 12; return; } +main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_1_1=as_type((*(tint_symbol_4)).arr[0])}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread tint_array_wrapper tint_symbol_5 = {}; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_1_1=as_type(tint_symbol_5.arr[0])}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.hlsl index a6c36ef4c7..48138a6b95 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { uint x_1_1 : SV_Coverage; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_1[0]}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.msl index 2c5517016e..e59f4bf2c8 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.msl @@ -11,16 +11,22 @@ struct tint_symbol_1 { uint x_1_1 [[sample_mask]]; }; -void main_1(thread tint_array_wrapper* const tint_symbol_4) { - (*(tint_symbol_4)).arr[0] = 0u; +void main_1(thread tint_array_wrapper* const tint_symbol_3) { + (*(tint_symbol_3)).arr[0] = 0u; return; } +main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_4)).arr[0]}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread tint_array_wrapper tint_symbol_5 = {}; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_1_1=tint_symbol_5.arr[0]}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.hlsl index a6c36ef4c7..48138a6b95 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { uint x_1_1 : SV_Coverage; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_1[0]}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.msl index 2c5517016e..e59f4bf2c8 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.msl @@ -11,16 +11,22 @@ struct tint_symbol_1 { uint x_1_1 [[sample_mask]]; }; -void main_1(thread tint_array_wrapper* const tint_symbol_4) { - (*(tint_symbol_4)).arr[0] = 0u; +void main_1(thread tint_array_wrapper* const tint_symbol_3) { + (*(tint_symbol_3)).arr[0] = 0u; return; } +main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_4)).arr[0]}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread tint_array_wrapper tint_symbol_5 = {}; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_1_1=tint_symbol_5.arr[0]}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.hlsl index a6c36ef4c7..48138a6b95 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { uint x_1_1 : SV_Coverage; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_1[0]}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.msl index 2c5517016e..e59f4bf2c8 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.msl @@ -11,16 +11,22 @@ struct tint_symbol_1 { uint x_1_1 [[sample_mask]]; }; -void main_1(thread tint_array_wrapper* const tint_symbol_4) { - (*(tint_symbol_4)).arr[0] = 0u; +void main_1(thread tint_array_wrapper* const tint_symbol_3) { + (*(tint_symbol_3)).arr[0] = 0u; return; } +main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_4)).arr[0]}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread tint_array_wrapper tint_symbol_5 = {}; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_1_1=tint_symbol_5.arr[0]}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.hlsl index a6c36ef4c7..48138a6b95 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { uint x_1_1 : SV_Coverage; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_1[0]}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.msl index 5a94feea3a..0779246835 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.msl @@ -20,16 +20,22 @@ struct tint_symbol_1 { uint x_1_1 [[sample_mask]]; }; -void main_1(thread tint_array_wrapper* const tint_symbol_4) { - (*(tint_symbol_4)).arr[0] = 0u; +void main_1(thread tint_array_wrapper* const tint_symbol_3) { + (*(tint_symbol_3)).arr[0] = 0u; return; } +main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_4)).arr[0]}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread tint_array_wrapper tint_symbol_5 = {}; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_1_1=tint_symbol_5.arr[0]}; - tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.hlsl index 8f12356286..d642d9647b 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 x_1_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_4_param = tint_symbol.x_4_param; +main_out main_inner(uint x_4_param) { x_4 = asint(x_4_param); main_1(); const main_out tint_symbol_3 = {x_1}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_1_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_4_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.msl index 884397dca6..b65c9532bf 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.msl @@ -4,22 +4,28 @@ using namespace metal; struct main_out { float4 x_1_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_1_1 [[position]]; }; -void main_1(thread int* const tint_symbol_5) { - int const x_2 = *(tint_symbol_5); +void main_1(thread int* const tint_symbol_3) { + int const x_2 = *(tint_symbol_3); return; } -vertex tint_symbol_2 tint_symbol(uint x_4_param [[vertex_id]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - tint_symbol_6 = as_type(x_4_param); - main_1(&(tint_symbol_6)); - main_out const tint_symbol_3 = {.x_1_1=tint_symbol_7}; - tint_symbol_2 const tint_symbol_4 = {.x_1_1=tint_symbol_3.x_1_1}; - return tint_symbol_4; +main_out tint_symbol_inner(uint x_4_param, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = as_type(x_4_param); + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol(uint x_4_param [[vertex_id]]) { + thread int tint_symbol_6 = 0; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.hlsl index 8f12356286..d642d9647b 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 x_1_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_4_param = tint_symbol.x_4_param; +main_out main_inner(uint x_4_param) { x_4 = asint(x_4_param); main_1(); const main_out tint_symbol_3 = {x_1}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_1_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_4_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.msl index 884397dca6..b65c9532bf 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.msl @@ -4,22 +4,28 @@ using namespace metal; struct main_out { float4 x_1_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_1_1 [[position]]; }; -void main_1(thread int* const tint_symbol_5) { - int const x_2 = *(tint_symbol_5); +void main_1(thread int* const tint_symbol_3) { + int const x_2 = *(tint_symbol_3); return; } -vertex tint_symbol_2 tint_symbol(uint x_4_param [[vertex_id]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - tint_symbol_6 = as_type(x_4_param); - main_1(&(tint_symbol_6)); - main_out const tint_symbol_3 = {.x_1_1=tint_symbol_7}; - tint_symbol_2 const tint_symbol_4 = {.x_1_1=tint_symbol_3.x_1_1}; - return tint_symbol_4; +main_out tint_symbol_inner(uint x_4_param, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = as_type(x_4_param); + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol(uint x_4_param [[vertex_id]]) { + thread int tint_symbol_6 = 0; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.hlsl index 8f12356286..d642d9647b 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 x_1_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_4_param = tint_symbol.x_4_param; +main_out main_inner(uint x_4_param) { x_4 = asint(x_4_param); main_1(); const main_out tint_symbol_3 = {x_1}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_1_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_4_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.msl index 884397dca6..b65c9532bf 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.msl @@ -4,22 +4,28 @@ using namespace metal; struct main_out { float4 x_1_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_1_1 [[position]]; }; -void main_1(thread int* const tint_symbol_5) { - int const x_2 = *(tint_symbol_5); +void main_1(thread int* const tint_symbol_3) { + int const x_2 = *(tint_symbol_3); return; } -vertex tint_symbol_2 tint_symbol(uint x_4_param [[vertex_id]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - tint_symbol_6 = as_type(x_4_param); - main_1(&(tint_symbol_6)); - main_out const tint_symbol_3 = {.x_1_1=tint_symbol_7}; - tint_symbol_2 const tint_symbol_4 = {.x_1_1=tint_symbol_3.x_1_1}; - return tint_symbol_4; +main_out tint_symbol_inner(uint x_4_param, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = as_type(x_4_param); + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol(uint x_4_param [[vertex_id]]) { + thread int tint_symbol_6 = 0; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.hlsl index 918354f662..2fa3cdf4b0 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 x_1_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_4_param = tint_symbol.x_4_param; +main_out main_inner(uint x_4_param) { x_4 = x_4_param; main_1(); const main_out tint_symbol_3 = {x_1}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_1_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_4_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.msl index 3c270f771d..000b942c5b 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.msl @@ -4,22 +4,28 @@ using namespace metal; struct main_out { float4 x_1_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_1_1 [[position]]; }; -void main_1(thread uint* const tint_symbol_5) { - uint const x_2 = *(tint_symbol_5); +void main_1(thread uint* const tint_symbol_3) { + uint const x_2 = *(tint_symbol_3); return; } -vertex tint_symbol_2 tint_symbol(uint x_4_param [[vertex_id]]) { - thread uint tint_symbol_6 = 0u; - thread float4 tint_symbol_7 = 0.0f; - tint_symbol_6 = x_4_param; - main_1(&(tint_symbol_6)); - main_out const tint_symbol_3 = {.x_1_1=tint_symbol_7}; - tint_symbol_2 const tint_symbol_4 = {.x_1_1=tint_symbol_3.x_1_1}; - return tint_symbol_4; +main_out tint_symbol_inner(uint x_4_param, thread uint* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = x_4_param; + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol(uint x_4_param [[vertex_id]]) { + thread uint tint_symbol_6 = 0u; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.hlsl index 918354f662..2fa3cdf4b0 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 x_1_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_4_param = tint_symbol.x_4_param; +main_out main_inner(uint x_4_param) { x_4 = x_4_param; main_1(); const main_out tint_symbol_3 = {x_1}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_1_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_4_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.msl index 3c270f771d..000b942c5b 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.msl @@ -4,22 +4,28 @@ using namespace metal; struct main_out { float4 x_1_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_1_1 [[position]]; }; -void main_1(thread uint* const tint_symbol_5) { - uint const x_2 = *(tint_symbol_5); +void main_1(thread uint* const tint_symbol_3) { + uint const x_2 = *(tint_symbol_3); return; } -vertex tint_symbol_2 tint_symbol(uint x_4_param [[vertex_id]]) { - thread uint tint_symbol_6 = 0u; - thread float4 tint_symbol_7 = 0.0f; - tint_symbol_6 = x_4_param; - main_1(&(tint_symbol_6)); - main_out const tint_symbol_3 = {.x_1_1=tint_symbol_7}; - tint_symbol_2 const tint_symbol_4 = {.x_1_1=tint_symbol_3.x_1_1}; - return tint_symbol_4; +main_out tint_symbol_inner(uint x_4_param, thread uint* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = x_4_param; + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol(uint x_4_param [[vertex_id]]) { + thread uint tint_symbol_6 = 0u; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.hlsl index 918354f662..2fa3cdf4b0 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 x_1_1 : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const uint x_4_param = tint_symbol.x_4_param; +main_out main_inner(uint x_4_param) { x_4 = x_4_param; main_1(); const main_out tint_symbol_3 = {x_1}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_1_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_4_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.msl index 3c270f771d..000b942c5b 100644 --- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.msl @@ -4,22 +4,28 @@ using namespace metal; struct main_out { float4 x_1_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_1_1 [[position]]; }; -void main_1(thread uint* const tint_symbol_5) { - uint const x_2 = *(tint_symbol_5); +void main_1(thread uint* const tint_symbol_3) { + uint const x_2 = *(tint_symbol_3); return; } -vertex tint_symbol_2 tint_symbol(uint x_4_param [[vertex_id]]) { - thread uint tint_symbol_6 = 0u; - thread float4 tint_symbol_7 = 0.0f; - tint_symbol_6 = x_4_param; - main_1(&(tint_symbol_6)); - main_out const tint_symbol_3 = {.x_1_1=tint_symbol_7}; - tint_symbol_2 const tint_symbol_4 = {.x_1_1=tint_symbol_3.x_1_1}; - return tint_symbol_4; +main_out tint_symbol_inner(uint x_4_param, thread uint* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = x_4_param; + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol(uint x_4_param [[vertex_id]]) { + thread uint tint_symbol_6 = 0u; + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_1_1 = inner_result.x_1_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.hlsl index 1993bce8dc..4edc58ea02 100644 --- a/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.hlsl @@ -11,9 +11,15 @@ struct tint_symbol { float4 x_2_1 : SV_Position; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_2}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_2_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.msl index 31d71451d7..2589dab657 100644 --- a/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.msl @@ -12,11 +12,17 @@ void main_1() { return; } -vertex tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_4 = 0.0f; +main_out tint_symbol_inner(thread float4* const tint_symbol_3) { main_1(); - main_out const tint_symbol_2 = {.x_2_1=tint_symbol_4}; - tint_symbol_1 const tint_symbol_3 = {.x_2_1=tint_symbol_2.x_2_1}; - return tint_symbol_3; + main_out const tint_symbol_2 = {.x_2_1=*(tint_symbol_3)}; + return tint_symbol_2; +} + +vertex tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_4 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_4)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_2_1 = inner_result.x_2_1; + return wrapper_result; } diff --git a/test/var/inferred/function-let.wgsl.expected.hlsl b/test/var/inferred/function-let.wgsl.expected.hlsl index 98f4667304..380a749323 100644 --- a/test/var/inferred/function-let.wgsl.expected.hlsl +++ b/test/var/inferred/function-let.wgsl.expected.hlsl @@ -47,7 +47,13 @@ struct tint_symbol { float4 value : SV_Target0; }; -tint_symbol main() { - const tint_symbol tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_3; +float4 main_inner() { + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol main() { + const float4 inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/var/inferred/function-let.wgsl.expected.msl b/test/var/inferred/function-let.wgsl.expected.msl index 628c4675dd..9de5eafc2b 100644 --- a/test/var/inferred/function-let.wgsl.expected.msl +++ b/test/var/inferred/function-let.wgsl.expected.msl @@ -51,8 +51,14 @@ void let_decls() { tint_array_wrapper const v15 = ret_MyArray(); } -fragment tint_symbol_1 tint_symbol() { - tint_symbol_1 const tint_symbol_4 = {.value=float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_4; +float4 tint_symbol_inner() { + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +fragment tint_symbol_1 tint_symbol() { + float4 const inner_result = tint_symbol_inner(); + tint_symbol_1 wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/var/inferred/function-var.wgsl.expected.hlsl b/test/var/inferred/function-var.wgsl.expected.hlsl index f91c6ec187..d638243ffd 100644 --- a/test/var/inferred/function-var.wgsl.expected.hlsl +++ b/test/var/inferred/function-var.wgsl.expected.hlsl @@ -47,7 +47,13 @@ struct tint_symbol { float4 value : SV_Target0; }; -tint_symbol main() { - const tint_symbol tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_3; +float4 main_inner() { + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol main() { + const float4 inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/var/inferred/function-var.wgsl.expected.msl b/test/var/inferred/function-var.wgsl.expected.msl index e0c60fc310..6786e04a60 100644 --- a/test/var/inferred/function-var.wgsl.expected.msl +++ b/test/var/inferred/function-var.wgsl.expected.msl @@ -51,8 +51,14 @@ void var_decls() { tint_array_wrapper v15 = ret_MyArray(); } -fragment tint_symbol_1 tint_symbol() { - tint_symbol_1 const tint_symbol_4 = {.value=float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_4; +float4 tint_symbol_inner() { + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +fragment tint_symbol_1 tint_symbol() { + float4 const inner_result = tint_symbol_inner(); + tint_symbol_1 wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/var/inferred/global-let.wgsl.expected.hlsl b/test/var/inferred/global-let.wgsl.expected.hlsl index 4784df7bba..6dd234ca84 100644 --- a/test/var/inferred/global-let.wgsl.expected.hlsl +++ b/test/var/inferred/global-let.wgsl.expected.hlsl @@ -16,7 +16,13 @@ struct tint_symbol { float4 value : SV_Target0; }; -tint_symbol main() { - const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_1; +float4 main_inner() { + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +tint_symbol main() { + const float4 inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/var/inferred/global-let.wgsl.expected.msl b/test/var/inferred/global-let.wgsl.expected.msl index 6ae1297ef4..2a9302bb31 100644 --- a/test/var/inferred/global-let.wgsl.expected.msl +++ b/test/var/inferred/global-let.wgsl.expected.msl @@ -20,8 +20,14 @@ constant float3 v6 = float3(1.0f, 1.0f, 1.0f); constant float3x3 v7 = float3x3(float3(1.0f, 1.0f, 1.0f), float3(1.0f, 1.0f, 1.0f), float3(1.0f, 1.0f, 1.0f)); constant MyStruct v8 = {}; constant tint_array_wrapper v9 = {.arr={}}; -fragment tint_symbol_1 tint_symbol() { - tint_symbol_1 const tint_symbol_2 = {.value=float4(0.0f, 0.0f, 0.0f, 0.0f)}; - return tint_symbol_2; +float4 tint_symbol_inner() { + return float4(0.0f, 0.0f, 0.0f, 0.0f); +} + +fragment tint_symbol_1 tint_symbol() { + float4 const inner_result = tint_symbol_inner(); + tint_symbol_1 wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; } diff --git a/test/var/initialization/workgroup/array.wgsl.expected.hlsl b/test/var/initialization/workgroup/array.wgsl.expected.hlsl index 921c6c2a4b..0b336d4e12 100644 --- a/test/var/initialization/workgroup/array.wgsl.expected.hlsl +++ b/test/var/initialization/workgroup/array.wgsl.expected.hlsl @@ -4,9 +4,7 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void main_inner(uint local_invocation_index) { { for(uint idx = local_invocation_index; (idx < 3u); idx = (idx + 1u)) { const uint i = idx; @@ -15,5 +13,10 @@ void main(tint_symbol_1 tint_symbol) { } GroupMemoryBarrierWithGroupSync(); v; +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/var/initialization/workgroup/array.wgsl.expected.msl b/test/var/initialization/workgroup/array.wgsl.expected.msl index 3360d86dfc..4be25e1a1a 100644 --- a/test/var/initialization/workgroup/array.wgsl.expected.msl +++ b/test/var/initialization/workgroup/array.wgsl.expected.msl @@ -5,14 +5,18 @@ struct tint_array_wrapper { int arr[3]; }; -kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) { - threadgroup tint_array_wrapper tint_symbol_2; +void tint_symbol_inner(uint local_invocation_index, threadgroup tint_array_wrapper* const tint_symbol_1) { for(uint idx = local_invocation_index; (idx < 3u); idx = (idx + 1u)) { uint const i = idx; - tint_symbol_2.arr[i] = int(); + (*(tint_symbol_1)).arr[i] = int(); } threadgroup_barrier(mem_flags::mem_threadgroup); - (void) tint_symbol_2; + (void) *(tint_symbol_1); +} + +kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) { + threadgroup tint_array_wrapper tint_symbol_2; + tint_symbol_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/var/initialization/workgroup/matrix.wgsl.expected.hlsl b/test/var/initialization/workgroup/matrix.wgsl.expected.hlsl index d3acb0148e..e2755de18b 100644 --- a/test/var/initialization/workgroup/matrix.wgsl.expected.hlsl +++ b/test/var/initialization/workgroup/matrix.wgsl.expected.hlsl @@ -4,13 +4,16 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void main_inner(uint local_invocation_index) { { v = float2x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f); } GroupMemoryBarrierWithGroupSync(); v; +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/var/initialization/workgroup/scalar.wgsl.expected.hlsl b/test/var/initialization/workgroup/scalar.wgsl.expected.hlsl index 485a58a15b..41547eb97c 100644 --- a/test/var/initialization/workgroup/scalar.wgsl.expected.hlsl +++ b/test/var/initialization/workgroup/scalar.wgsl.expected.hlsl @@ -4,13 +4,16 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void main_inner(uint local_invocation_index) { { v = 0; } GroupMemoryBarrierWithGroupSync(); v; +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/var/initialization/workgroup/scalar.wgsl.expected.msl b/test/var/initialization/workgroup/scalar.wgsl.expected.msl index fa76a35648..699380dc80 100644 --- a/test/var/initialization/workgroup/scalar.wgsl.expected.msl +++ b/test/var/initialization/workgroup/scalar.wgsl.expected.msl @@ -1,13 +1,17 @@ #include using namespace metal; -kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) { - threadgroup int tint_symbol_2; +void tint_symbol_inner(uint local_invocation_index, threadgroup int* const tint_symbol_1) { { - tint_symbol_2 = int(); + *(tint_symbol_1) = int(); } threadgroup_barrier(mem_flags::mem_threadgroup); - (void) tint_symbol_2; + (void) *(tint_symbol_1); +} + +kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) { + threadgroup int tint_symbol_2; + tint_symbol_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/var/initialization/workgroup/struct.wgsl.expected.hlsl b/test/var/initialization/workgroup/struct.wgsl.expected.hlsl index c512a311db..8b0b1f1893 100644 --- a/test/var/initialization/workgroup/struct.wgsl.expected.hlsl +++ b/test/var/initialization/workgroup/struct.wgsl.expected.hlsl @@ -9,14 +9,17 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void main_inner(uint local_invocation_index) { { const S tint_symbol_2 = (S)0; v = tint_symbol_2; } GroupMemoryBarrierWithGroupSync(); v; +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/var/initialization/workgroup/struct.wgsl.expected.msl b/test/var/initialization/workgroup/struct.wgsl.expected.msl index 4e238878f8..a474b8fe47 100644 --- a/test/var/initialization/workgroup/struct.wgsl.expected.msl +++ b/test/var/initialization/workgroup/struct.wgsl.expected.msl @@ -6,14 +6,18 @@ struct S { float b; }; -kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) { - threadgroup S tint_symbol_3; +void tint_symbol_inner(uint local_invocation_index, threadgroup S* const tint_symbol_2) { { - S const tint_symbol_2 = {}; - tint_symbol_3 = tint_symbol_2; + S const tint_symbol_1 = {}; + *(tint_symbol_2) = tint_symbol_1; } threadgroup_barrier(mem_flags::mem_threadgroup); - (void) tint_symbol_3; + (void) *(tint_symbol_2); +} + +kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) { + threadgroup S tint_symbol_3; + tint_symbol_inner(local_invocation_index, &(tint_symbol_3)); return; } diff --git a/test/var/initialization/workgroup/vector.wgsl.expected.hlsl b/test/var/initialization/workgroup/vector.wgsl.expected.hlsl index 042faeb7f6..4219ded428 100644 --- a/test/var/initialization/workgroup/vector.wgsl.expected.hlsl +++ b/test/var/initialization/workgroup/vector.wgsl.expected.hlsl @@ -4,13 +4,16 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void main_inner(uint local_invocation_index) { { v = int3(0, 0, 0); } GroupMemoryBarrierWithGroupSync(); v; +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.local_invocation_index); return; } diff --git a/test/var/initialization/workgroup/vector.wgsl.expected.msl b/test/var/initialization/workgroup/vector.wgsl.expected.msl index b3dc1ce34f..26843ff0a0 100644 --- a/test/var/initialization/workgroup/vector.wgsl.expected.msl +++ b/test/var/initialization/workgroup/vector.wgsl.expected.msl @@ -1,13 +1,17 @@ #include using namespace metal; -kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) { - threadgroup int3 tint_symbol_2; +void tint_symbol_inner(uint local_invocation_index, threadgroup int3* const tint_symbol_1) { { - tint_symbol_2 = int3(); + *(tint_symbol_1) = int3(); } threadgroup_barrier(mem_flags::mem_threadgroup); - (void) tint_symbol_2; + (void) *(tint_symbol_1); +} + +kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) { + threadgroup int3 tint_symbol_2; + tint_symbol_inner(local_invocation_index, &(tint_symbol_2)); return; } diff --git a/test/var/uses/workgroup.wgsl.expected.hlsl b/test/var/uses/workgroup.wgsl.expected.hlsl index f72ae0f841..c5e6b7f63f 100644 --- a/test/var/uses/workgroup.wgsl.expected.hlsl +++ b/test/var/uses/workgroup.wgsl.expected.hlsl @@ -29,15 +29,18 @@ struct tint_symbol_1 { uint local_invocation_index : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void main1(tint_symbol_1 tint_symbol) { - const uint local_invocation_index = tint_symbol.local_invocation_index; +void main1_inner(uint local_invocation_index) { { a = 0; } GroupMemoryBarrierWithGroupSync(); a = 42; uses_a(); +} + +[numthreads(1, 1, 1)] +void main1(tint_symbol_1 tint_symbol) { + main1_inner(tint_symbol.local_invocation_index); return; } @@ -45,15 +48,18 @@ struct tint_symbol_3 { uint local_invocation_index_1 : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void main2(tint_symbol_3 tint_symbol_2) { - const uint local_invocation_index_1 = tint_symbol_2.local_invocation_index_1; +void main2_inner(uint local_invocation_index_1) { { b = 0; } GroupMemoryBarrierWithGroupSync(); b = 7; uses_b(); +} + +[numthreads(1, 1, 1)] +void main2(tint_symbol_3 tint_symbol_2) { + main2_inner(tint_symbol_2.local_invocation_index_1); return; } @@ -61,9 +67,7 @@ struct tint_symbol_5 { uint local_invocation_index_2 : SV_GroupIndex; }; -[numthreads(1, 1, 1)] -void main3(tint_symbol_5 tint_symbol_4) { - const uint local_invocation_index_2 = tint_symbol_4.local_invocation_index_2; +void main3_inner(uint local_invocation_index_2) { { a = 0; b = 0; @@ -71,6 +75,11 @@ void main3(tint_symbol_5 tint_symbol_4) { GroupMemoryBarrierWithGroupSync(); outer(); no_uses(); +} + +[numthreads(1, 1, 1)] +void main3(tint_symbol_5 tint_symbol_4) { + main3_inner(tint_symbol_4.local_invocation_index_2); return; } diff --git a/test/var/uses/workgroup.wgsl.expected.msl b/test/var/uses/workgroup.wgsl.expected.msl index 4713b0efe1..94f106ffe7 100644 --- a/test/var/uses/workgroup.wgsl.expected.msl +++ b/test/var/uses/workgroup.wgsl.expected.msl @@ -1,61 +1,73 @@ #include using namespace metal; -void uses_a(threadgroup int* const tint_symbol_3) { - *(tint_symbol_3) = as_type((as_type(*(tint_symbol_3)) + as_type(1))); +void uses_a(threadgroup int* const tint_symbol) { + *(tint_symbol) = as_type((as_type(*(tint_symbol)) + as_type(1))); } -void uses_b(threadgroup int* const tint_symbol_4) { - *(tint_symbol_4) = as_type((as_type(*(tint_symbol_4)) * as_type(2))); +void uses_b(threadgroup int* const tint_symbol_1) { + *(tint_symbol_1) = as_type((as_type(*(tint_symbol_1)) * as_type(2))); } -void uses_a_and_b(threadgroup int* const tint_symbol_5, threadgroup int* const tint_symbol_6) { - *(tint_symbol_5) = *(tint_symbol_6); +void uses_a_and_b(threadgroup int* const tint_symbol_2, threadgroup int* const tint_symbol_3) { + *(tint_symbol_2) = *(tint_symbol_3); } void no_uses() { } -void outer(threadgroup int* const tint_symbol_7, threadgroup int* const tint_symbol_8) { - *(tint_symbol_7) = 0; - uses_a(tint_symbol_7); - uses_a_and_b(tint_symbol_8, tint_symbol_7); - uses_b(tint_symbol_8); +void outer(threadgroup int* const tint_symbol_4, threadgroup int* const tint_symbol_5) { + *(tint_symbol_4) = 0; + uses_a(tint_symbol_4); + uses_a_and_b(tint_symbol_5, tint_symbol_4); + uses_b(tint_symbol_5); no_uses(); } +void main1_inner(uint local_invocation_index, threadgroup int* const tint_symbol_6) { + { + *(tint_symbol_6) = int(); + } + threadgroup_barrier(mem_flags::mem_threadgroup); + *(tint_symbol_6) = 42; + uses_a(tint_symbol_6); +} + kernel void main1(uint local_invocation_index [[thread_index_in_threadgroup]]) { - threadgroup int tint_symbol_9; + threadgroup int tint_symbol_7; + main1_inner(local_invocation_index, &(tint_symbol_7)); + return; +} + +void main2_inner(uint local_invocation_index_1, threadgroup int* const tint_symbol_8) { { - tint_symbol_9 = int(); + *(tint_symbol_8) = int(); } threadgroup_barrier(mem_flags::mem_threadgroup); - tint_symbol_9 = 42; - uses_a(&(tint_symbol_9)); - return; + *(tint_symbol_8) = 7; + uses_b(tint_symbol_8); } kernel void main2(uint local_invocation_index_1 [[thread_index_in_threadgroup]]) { - threadgroup int tint_symbol_10; - { - tint_symbol_10 = int(); - } - threadgroup_barrier(mem_flags::mem_threadgroup); - tint_symbol_10 = 7; - uses_b(&(tint_symbol_10)); + threadgroup int tint_symbol_9; + main2_inner(local_invocation_index_1, &(tint_symbol_9)); return; } -kernel void main3(uint local_invocation_index_2 [[thread_index_in_threadgroup]]) { - threadgroup int tint_symbol_11; - threadgroup int tint_symbol_12; +void main3_inner(uint local_invocation_index_2, threadgroup int* const tint_symbol_10, threadgroup int* const tint_symbol_11) { { - tint_symbol_11 = int(); - tint_symbol_12 = int(); + *(tint_symbol_10) = int(); + *(tint_symbol_11) = int(); } threadgroup_barrier(mem_flags::mem_threadgroup); - outer(&(tint_symbol_11), &(tint_symbol_12)); + outer(tint_symbol_10, tint_symbol_11); no_uses(); +} + +kernel void main3(uint local_invocation_index_2 [[thread_index_in_threadgroup]]) { + threadgroup int tint_symbol_12; + threadgroup int tint_symbol_13; + main3_inner(local_invocation_index_2, &(tint_symbol_12), &(tint_symbol_13)); return; } diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.hlsl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.hlsl index 3b1f34af37..dcab099d82 100644 --- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.hlsl @@ -24,11 +24,17 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); - const main_out tint_symbol_3 = {gl_Position, frag_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position}; - return tint_symbol_5; + const main_out tint_symbol_4 = {gl_Position, frag_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.msl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.msl index de2d334c65..6aac916044 100644 --- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.msl +++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.msl @@ -16,23 +16,29 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(constant block0& x_8, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { - float4 const x_24 = *(tint_symbol_6); - *(tint_symbol_7) = x_24; +void main_1(constant block0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + float4 const x_24 = *(tint_symbol_5); + *(tint_symbol_6) = x_24; float4 const x_27 = x_8.in_color; - *(tint_symbol_8) = x_27; + *(tint_symbol_7) = x_27; return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant block0& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_9 = position_param; - main_1(x_8, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_10, .frag_color_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(constant block0& x_8, float4 position_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_8) = position_param; + main_1(x_8, tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_9), .frag_color_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant block0& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + thread float4 tint_symbol_13 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, tint_symbol_1.position_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.hlsl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.hlsl index 3b1f34af37..dcab099d82 100644 --- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.hlsl @@ -24,11 +24,17 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); - const main_out tint_symbol_3 = {gl_Position, frag_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position}; - return tint_symbol_5; + const main_out tint_symbol_4 = {gl_Position, frag_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.msl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.msl index de2d334c65..6aac916044 100644 --- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.msl +++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.msl @@ -16,23 +16,29 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(constant block0& x_8, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { - float4 const x_24 = *(tint_symbol_6); - *(tint_symbol_7) = x_24; +void main_1(constant block0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + float4 const x_24 = *(tint_symbol_5); + *(tint_symbol_6) = x_24; float4 const x_27 = x_8.in_color; - *(tint_symbol_8) = x_27; + *(tint_symbol_7) = x_27; return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant block0& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_9 = position_param; - main_1(x_8, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_10, .frag_color_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(constant block0& x_8, float4 position_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_8) = position_param; + main_1(x_8, tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_9), .frag_color_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant block0& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + thread float4 tint_symbol_13 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, tint_symbol_1.position_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.hlsl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.hlsl index acf1be902c..a918e8f1e4 100644 --- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 final_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 frag_color_param = tint_symbol.frag_color_param; +main_out main_inner(float4 frag_color_param) { frag_color = frag_color_param; main_1(); const main_out tint_symbol_3 = {final_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.final_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.frag_color_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.final_color_1 = inner_result.final_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.msl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.msl index 838993af9a..b1a11b2302 100644 --- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.msl +++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.msl @@ -11,20 +11,25 @@ struct tint_symbol_3 { float4 final_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_12 = *(tint_symbol_6); - *(tint_symbol_7) = x_12; +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_12 = *(tint_symbol_5); + *(tint_symbol_6) = x_12; return; } -fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const frag_color_param = tint_symbol_1.frag_color_param; - tint_symbol_8 = frag_color_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.final_color_1=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.final_color_1=tint_symbol_4.final_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 frag_color_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = frag_color_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.final_color_1=*(tint_symbol_8)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.frag_color_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.final_color_1 = inner_result.final_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.hlsl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.hlsl index acf1be902c..a918e8f1e4 100644 --- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 final_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 frag_color_param = tint_symbol.frag_color_param; +main_out main_inner(float4 frag_color_param) { frag_color = frag_color_param; main_1(); const main_out tint_symbol_3 = {final_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.final_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.frag_color_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.final_color_1 = inner_result.final_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.msl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.msl index 838993af9a..b1a11b2302 100644 --- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.msl +++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.msl @@ -11,20 +11,25 @@ struct tint_symbol_3 { float4 final_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_12 = *(tint_symbol_6); - *(tint_symbol_7) = x_12; +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_12 = *(tint_symbol_5); + *(tint_symbol_6) = x_12; return; } -fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const frag_color_param = tint_symbol_1.frag_color_param; - tint_symbol_8 = frag_color_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.final_color_1=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.final_color_1=tint_symbol_4.final_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 frag_color_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = frag_color_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.final_color_1=*(tint_symbol_8)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.frag_color_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.final_color_1 = inner_result.final_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.hlsl index 3cc9cde906..1667248f90 100644 --- a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.hlsl @@ -20,11 +20,17 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position, frag_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.msl b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.msl index 2ce3e850cf..f0ab629df8 100644 --- a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.msl @@ -13,23 +13,29 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { - float4 const x_21 = *(tint_symbol_6); - *(tint_symbol_7) = x_21; - float4 const x_23 = *(tint_symbol_6); - *(tint_symbol_8) = (x_23 * 0.5f); +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + float4 const x_21 = *(tint_symbol_5); + *(tint_symbol_6) = x_21; + float4 const x_23 = *(tint_symbol_5); + *(tint_symbol_7) = (x_23 * 0.5f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_9 = position_param; - main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_10, .frag_color_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_8) = position_param; + main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_9), .frag_color_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + thread float4 tint_symbol_13 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.hlsl index 3cc9cde906..1667248f90 100644 --- a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.hlsl @@ -20,11 +20,17 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position, frag_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.msl b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.msl index 2ce3e850cf..f0ab629df8 100644 --- a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.msl @@ -13,23 +13,29 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { - float4 const x_21 = *(tint_symbol_6); - *(tint_symbol_7) = x_21; - float4 const x_23 = *(tint_symbol_6); - *(tint_symbol_8) = (x_23 * 0.5f); +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + float4 const x_21 = *(tint_symbol_5); + *(tint_symbol_6) = x_21; + float4 const x_23 = *(tint_symbol_5); + *(tint_symbol_7) = (x_23 * 0.5f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_9 = position_param; - main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_10, .frag_color_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_8) = position_param; + main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_9), .frag_color_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + thread float4 tint_symbol_13 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.hlsl b/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.hlsl index 15b4ff657e..267afe928e 100644 --- a/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.hlsl @@ -24,11 +24,16 @@ struct tint_symbol_2 { float4 color_out_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 frag_color_param = tint_symbol.frag_color_param; +main_out main_inner(float4 frag_color_param) { frag_color = frag_color_param; main_1(); const main_out tint_symbol_3 = {color_out}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.color_out_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.frag_color_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.color_out_1 = inner_result.color_out_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.msl b/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.msl index ae8e6eb9c4..cdf6e4908d 100644 --- a/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.msl +++ b/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.msl @@ -11,27 +11,32 @@ struct tint_symbol_3 { float4 color_out_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { int2 iv = 0; - float4 const x_28 = *(tint_symbol_6); + float4 const x_28 = *(tint_symbol_5); iv = int2((float2(x_28.x, x_28.y) * 256.0f)); int const x_33 = iv.y; if ((((x_33 / 2) & 64) == 64)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_6) = float4(0.0f, 1.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const frag_color_param = tint_symbol_1.frag_color_param; - tint_symbol_8 = frag_color_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.color_out_1=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.color_out_1=tint_symbol_4.color_out_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 frag_color_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = frag_color_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.color_out_1=*(tint_symbol_8)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.frag_color_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.color_out_1 = inner_result.color_out_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.hlsl b/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.hlsl index 15b4ff657e..267afe928e 100644 --- a/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.hlsl @@ -24,11 +24,16 @@ struct tint_symbol_2 { float4 color_out_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 frag_color_param = tint_symbol.frag_color_param; +main_out main_inner(float4 frag_color_param) { frag_color = frag_color_param; main_1(); const main_out tint_symbol_3 = {color_out}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.color_out_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.frag_color_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.color_out_1 = inner_result.color_out_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.msl b/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.msl index ae8e6eb9c4..cdf6e4908d 100644 --- a/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.msl +++ b/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.msl @@ -11,27 +11,32 @@ struct tint_symbol_3 { float4 color_out_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { int2 iv = 0; - float4 const x_28 = *(tint_symbol_6); + float4 const x_28 = *(tint_symbol_5); iv = int2((float2(x_28.x, x_28.y) * 256.0f)); int const x_33 = iv.y; if ((((x_33 / 2) & 64) == 64)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_6) = float4(0.0f, 1.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const frag_color_param = tint_symbol_1.frag_color_param; - tint_symbol_8 = frag_color_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.color_out_1=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.color_out_1=tint_symbol_4.color_out_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 frag_color_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = frag_color_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.color_out_1=*(tint_symbol_8)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.frag_color_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.color_out_1 = inner_result.color_out_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.hlsl index 485db305e1..4b4febea2e 100644 --- a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.hlsl @@ -16,9 +16,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.msl index b9d21c38f6..a12c755545 100644 --- a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.msl @@ -8,21 +8,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int x = 0; x = 0; int const x_5 = x; if ((float4(1.0f, 1.0f, 1.0f, 1.0f)[clamp(x_5, 0, 3)] >= 1.0f)) { } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.hlsl index 485db305e1..4b4febea2e 100644 --- a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.hlsl @@ -16,9 +16,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.msl index b9d21c38f6..a12c755545 100644 --- a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.msl @@ -8,21 +8,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int x = 0; x = 0; int const x_5 = x; if ((float4(1.0f, 1.0f, 1.0f, 1.0f)[clamp(x_5, 0, 3)] >= 1.0f)) { } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.hlsl index f0e2766a28..f017b194c2 100644 --- a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.hlsl @@ -26,9 +26,9 @@ void main_1() { tmp_float = x_75; const float3 x_76 = float3(x_75, x_75, x_75); color = x_76; - const int tint_symbol_3[1] = {0}; - const tmp_struct tint_symbol_4 = {tint_symbol_3}; - x_24 = tint_symbol_4.nmb; + const int tint_symbol_2[1] = {0}; + const tmp_struct tint_symbol_3 = {tint_symbol_2}; + x_24 = tint_symbol_3.nmb; x_68 = false; x_79_phi = false; while (true) { @@ -104,11 +104,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int binarySearch_struct_tmp_struct_i1_1_1_(inout tmp_struct obj) { diff --git a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.msl index 0de2d02ce5..c7b4af485e 100644 --- a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.msl @@ -17,7 +17,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_11, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_11, thread float4* const tint_symbol_5) { tint_array_wrapper x_24 = {}; bool x_68 = false; int x_17 = 0; @@ -36,9 +36,9 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_6) { tmp_float = x_75; float3 const x_76 = float3(x_75, x_75, x_75); color = x_76; - tint_array_wrapper const tint_symbol_3 = {.arr={0}}; - tmp_struct const tint_symbol_4 = {.nmb=tint_symbol_3}; - x_24 = tint_symbol_4.nmb; + tint_array_wrapper const tint_symbol_2 = {.arr={0}}; + tmp_struct const tint_symbol_3 = {.nmb=tint_symbol_2}; + x_24 = tint_symbol_3.nmb; x_68 = false; x_79_phi = false; while (true) { @@ -90,7 +90,7 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_6) { if ((x_26 == -1)) { discard_fragment(); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); float2 const x_100 = (float2(x_76.y, x_76.z) + float2(1.0f, 1.0f)); x_101 = float3(x_76.x, x_100.x, x_100.y); color = x_101; @@ -100,19 +100,25 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_6) { break; } } - *(tint_symbol_6) = float4(x_101.x, x_101.y, x_101.z, 1.0f); + *(tint_symbol_5) = float4(x_101.x, x_101.y, x_101.z, 1.0f); x_69 = true; break; } return; } +main_out tint_symbol_inner(constant buf0& x_11, thread float4* const tint_symbol_6) { + main_1(x_11, tint_symbol_6); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_11 [[buffer(0)]]) { thread float4 tint_symbol_7 = 0.0f; - main_1(x_11, &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_5; + main_out const inner_result = tint_symbol_inner(x_11, &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int binarySearch_struct_tmp_struct_i1_1_1_(thread tmp_struct* const obj) { diff --git a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.hlsl index f0e2766a28..f017b194c2 100644 --- a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.hlsl @@ -26,9 +26,9 @@ void main_1() { tmp_float = x_75; const float3 x_76 = float3(x_75, x_75, x_75); color = x_76; - const int tint_symbol_3[1] = {0}; - const tmp_struct tint_symbol_4 = {tint_symbol_3}; - x_24 = tint_symbol_4.nmb; + const int tint_symbol_2[1] = {0}; + const tmp_struct tint_symbol_3 = {tint_symbol_2}; + x_24 = tint_symbol_3.nmb; x_68 = false; x_79_phi = false; while (true) { @@ -104,11 +104,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int binarySearch_struct_tmp_struct_i1_1_1_(inout tmp_struct obj) { diff --git a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.msl index 0de2d02ce5..c7b4af485e 100644 --- a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.msl @@ -17,7 +17,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_11, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_11, thread float4* const tint_symbol_5) { tint_array_wrapper x_24 = {}; bool x_68 = false; int x_17 = 0; @@ -36,9 +36,9 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_6) { tmp_float = x_75; float3 const x_76 = float3(x_75, x_75, x_75); color = x_76; - tint_array_wrapper const tint_symbol_3 = {.arr={0}}; - tmp_struct const tint_symbol_4 = {.nmb=tint_symbol_3}; - x_24 = tint_symbol_4.nmb; + tint_array_wrapper const tint_symbol_2 = {.arr={0}}; + tmp_struct const tint_symbol_3 = {.nmb=tint_symbol_2}; + x_24 = tint_symbol_3.nmb; x_68 = false; x_79_phi = false; while (true) { @@ -90,7 +90,7 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_6) { if ((x_26 == -1)) { discard_fragment(); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); float2 const x_100 = (float2(x_76.y, x_76.z) + float2(1.0f, 1.0f)); x_101 = float3(x_76.x, x_100.x, x_100.y); color = x_101; @@ -100,19 +100,25 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_6) { break; } } - *(tint_symbol_6) = float4(x_101.x, x_101.y, x_101.z, 1.0f); + *(tint_symbol_5) = float4(x_101.x, x_101.y, x_101.z, 1.0f); x_69 = true; break; } return; } +main_out tint_symbol_inner(constant buf0& x_11, thread float4* const tint_symbol_6) { + main_1(x_11, tint_symbol_6); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_11 [[buffer(0)]]) { thread float4 tint_symbol_7 = 0.0f; - main_1(x_11, &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_5; + main_out const inner_result = tint_symbol_inner(x_11, &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int binarySearch_struct_tmp_struct_i1_1_1_(thread tmp_struct* const obj) { diff --git a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.hlsl index 2e1f778a27..73b6df0fb6 100644 --- a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.hlsl @@ -146,9 +146,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.msl index 33c3ed3f91..fddba838de 100644 --- a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.msl @@ -17,22 +17,22 @@ 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_4) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_3) { int temp = 0; int const x_92 = *(i); - int const x_94 = (*(tint_symbol_4)).numbers.arr[x_92]; + int const x_94 = (*(tint_symbol_3)).numbers.arr[x_92]; temp = x_94; int const x_95 = *(i); int const x_96 = *(j); - int const x_98 = (*(tint_symbol_4)).numbers.arr[x_96]; - (*(tint_symbol_4)).numbers.arr[x_95] = x_98; + int const x_98 = (*(tint_symbol_3)).numbers.arr[x_96]; + (*(tint_symbol_3)).numbers.arr[x_95] = x_98; int const x_100 = *(j); int const x_101 = temp; - (*(tint_symbol_4)).numbers.arr[x_100] = x_101; + (*(tint_symbol_3)).numbers.arr[x_100] = x_101; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_5) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -41,7 +41,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_104 = *(h); - int const x_106 = (*(tint_symbol_5)).numbers.arr[x_104]; + int const x_106 = (*(tint_symbol_4)).numbers.arr[x_104]; pivot = x_106; int const x_107 = *(l); i_1 = as_type((as_type(x_107) - as_type(1))); @@ -55,7 +55,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_119 = j_1; - int const x_121 = (*(tint_symbol_5)).numbers.arr[x_119]; + int const x_121 = (*(tint_symbol_4)).numbers.arr[x_119]; int const x_122 = pivot; if ((x_121 <= x_122)) { int const x_126 = i_1; @@ -64,7 +64,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_128; int const x_129 = j_1; param_1 = x_129; - swap_i1_i1_(&(param), &(param_1), tint_symbol_5); + swap_i1_i1_(&(param), &(param_1), tint_symbol_4); } { int const x_131 = j_1; @@ -75,12 +75,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = as_type((as_type(x_133) + as_type(1))); int const x_135 = *(h); param_3 = x_135; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_5); + swap_i1_i1_(&(param_2), &(param_3), tint_symbol_4); int const x_137 = i_1; return as_type((as_type(x_137) + as_type(1))); } -void quicksort_(thread QuicksortObject* const tint_symbol_6) { +void quicksort_(thread QuicksortObject* const tint_symbol_5) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -119,7 +119,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) { param_4 = x_163; int const x_164 = h_1; param_5 = x_164; - int const x_165 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_6); + int const x_165 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_5); p = x_165; int const x_166 = p; int const x_168 = l_1; @@ -153,7 +153,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) { return; } -void main_1(thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(thread QuicksortObject* const tint_symbol_6, thread float4* const tint_symbol_7) { int i_2 = 0; i_2 = 0; while (true) { @@ -164,35 +164,41 @@ void main_1(thread QuicksortObject* const tint_symbol_7, thread float4* const ti } int const x_67 = i_2; int const x_68 = i_2; - (*(tint_symbol_7)).numbers.arr[x_67] = as_type((as_type(10) - as_type(x_68))); + (*(tint_symbol_6)).numbers.arr[x_67] = as_type((as_type(10) - as_type(x_68))); int const x_71 = i_2; int const x_72 = i_2; - int const x_74 = (*(tint_symbol_7)).numbers.arr[x_72]; + int const x_74 = (*(tint_symbol_6)).numbers.arr[x_72]; int const x_75 = i_2; - int const x_77 = (*(tint_symbol_7)).numbers.arr[x_75]; - (*(tint_symbol_7)).numbers.arr[x_71] = as_type((as_type(x_74) * as_type(x_77))); + int const x_77 = (*(tint_symbol_6)).numbers.arr[x_75]; + (*(tint_symbol_6)).numbers.arr[x_71] = as_type((as_type(x_74) * as_type(x_77))); { int const x_80 = i_2; i_2 = as_type((as_type(x_80) + as_type(1))); } } - quicksort_(tint_symbol_7); - int const x_84 = (*(tint_symbol_7)).numbers.arr[0]; - int const x_86 = (*(tint_symbol_7)).numbers.arr[4]; + quicksort_(tint_symbol_6); + int const x_84 = (*(tint_symbol_6)).numbers.arr[0]; + int const x_86 = (*(tint_symbol_6)).numbers.arr[4]; if ((x_84 < x_86)) { - *(tint_symbol_8) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_8) = float4(0.0f, 1.0f, 0.0f, 1.0f); + *(tint_symbol_7) = float4(0.0f, 1.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread QuicksortObject tint_symbol_9 = {}; - thread float4 tint_symbol_10 = 0.0f; - main_1(&(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9) { + main_1(tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_9)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread QuicksortObject tint_symbol_10 = {}; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.hlsl index 2e1f778a27..73b6df0fb6 100644 --- a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.hlsl @@ -146,9 +146,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.msl index 33c3ed3f91..fddba838de 100644 --- a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.msl @@ -17,22 +17,22 @@ 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_4) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_3) { int temp = 0; int const x_92 = *(i); - int const x_94 = (*(tint_symbol_4)).numbers.arr[x_92]; + int const x_94 = (*(tint_symbol_3)).numbers.arr[x_92]; temp = x_94; int const x_95 = *(i); int const x_96 = *(j); - int const x_98 = (*(tint_symbol_4)).numbers.arr[x_96]; - (*(tint_symbol_4)).numbers.arr[x_95] = x_98; + int const x_98 = (*(tint_symbol_3)).numbers.arr[x_96]; + (*(tint_symbol_3)).numbers.arr[x_95] = x_98; int const x_100 = *(j); int const x_101 = temp; - (*(tint_symbol_4)).numbers.arr[x_100] = x_101; + (*(tint_symbol_3)).numbers.arr[x_100] = x_101; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_5) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -41,7 +41,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_104 = *(h); - int const x_106 = (*(tint_symbol_5)).numbers.arr[x_104]; + int const x_106 = (*(tint_symbol_4)).numbers.arr[x_104]; pivot = x_106; int const x_107 = *(l); i_1 = as_type((as_type(x_107) - as_type(1))); @@ -55,7 +55,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_119 = j_1; - int const x_121 = (*(tint_symbol_5)).numbers.arr[x_119]; + int const x_121 = (*(tint_symbol_4)).numbers.arr[x_119]; int const x_122 = pivot; if ((x_121 <= x_122)) { int const x_126 = i_1; @@ -64,7 +64,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_128; int const x_129 = j_1; param_1 = x_129; - swap_i1_i1_(&(param), &(param_1), tint_symbol_5); + swap_i1_i1_(&(param), &(param_1), tint_symbol_4); } { int const x_131 = j_1; @@ -75,12 +75,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = as_type((as_type(x_133) + as_type(1))); int const x_135 = *(h); param_3 = x_135; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_5); + swap_i1_i1_(&(param_2), &(param_3), tint_symbol_4); int const x_137 = i_1; return as_type((as_type(x_137) + as_type(1))); } -void quicksort_(thread QuicksortObject* const tint_symbol_6) { +void quicksort_(thread QuicksortObject* const tint_symbol_5) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -119,7 +119,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) { param_4 = x_163; int const x_164 = h_1; param_5 = x_164; - int const x_165 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_6); + int const x_165 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_5); p = x_165; int const x_166 = p; int const x_168 = l_1; @@ -153,7 +153,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) { return; } -void main_1(thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(thread QuicksortObject* const tint_symbol_6, thread float4* const tint_symbol_7) { int i_2 = 0; i_2 = 0; while (true) { @@ -164,35 +164,41 @@ void main_1(thread QuicksortObject* const tint_symbol_7, thread float4* const ti } int const x_67 = i_2; int const x_68 = i_2; - (*(tint_symbol_7)).numbers.arr[x_67] = as_type((as_type(10) - as_type(x_68))); + (*(tint_symbol_6)).numbers.arr[x_67] = as_type((as_type(10) - as_type(x_68))); int const x_71 = i_2; int const x_72 = i_2; - int const x_74 = (*(tint_symbol_7)).numbers.arr[x_72]; + int const x_74 = (*(tint_symbol_6)).numbers.arr[x_72]; int const x_75 = i_2; - int const x_77 = (*(tint_symbol_7)).numbers.arr[x_75]; - (*(tint_symbol_7)).numbers.arr[x_71] = as_type((as_type(x_74) * as_type(x_77))); + int const x_77 = (*(tint_symbol_6)).numbers.arr[x_75]; + (*(tint_symbol_6)).numbers.arr[x_71] = as_type((as_type(x_74) * as_type(x_77))); { int const x_80 = i_2; i_2 = as_type((as_type(x_80) + as_type(1))); } } - quicksort_(tint_symbol_7); - int const x_84 = (*(tint_symbol_7)).numbers.arr[0]; - int const x_86 = (*(tint_symbol_7)).numbers.arr[4]; + quicksort_(tint_symbol_6); + int const x_84 = (*(tint_symbol_6)).numbers.arr[0]; + int const x_86 = (*(tint_symbol_6)).numbers.arr[4]; if ((x_84 < x_86)) { - *(tint_symbol_8) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_8) = float4(0.0f, 1.0f, 0.0f, 1.0f); + *(tint_symbol_7) = float4(0.0f, 1.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread QuicksortObject tint_symbol_9 = {}; - thread float4 tint_symbol_10 = 0.0f; - main_1(&(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9) { + main_1(tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_9)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread QuicksortObject tint_symbol_10 = {}; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.hlsl index b29e01e2b9..f4566b6a37 100644 --- a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.hlsl @@ -88,11 +88,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.msl index 34a6d5147d..5aecf21e19 100644 --- a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.msl @@ -10,13 +10,13 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_(constant buf0& x_7, thread float4* const tint_symbol_5) { +float func_(constant buf0& x_7, thread float4* const tint_symbol_3) { int x = 0; - float const x_99 = (*(tint_symbol_5)).x; + float const x_99 = (*(tint_symbol_3)).x; if ((x_99 < 1.0f)) { return 5.0f; } @@ -34,7 +34,7 @@ float func_(constant buf0& x_7, thread float4* const tint_symbol_5) { return (5.0f + float(x_120)); } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { int i = 0; int j = 0; tint_array_wrapper data = {}; @@ -46,7 +46,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float } else { break; } - float const x_56 = (*(tint_symbol_6)).x; + float const x_56 = (*(tint_symbol_4)).x; if ((x_56 >= 0.0f)) { j = 0; while (true) { @@ -59,7 +59,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float } int const x_67 = j; int const x_69 = i; - float const x_71 = func_(x_7, tint_symbol_6); + float const x_71 = func_(x_7, tint_symbol_4); data.arr[as_type((as_type(as_type((as_type(4) * as_type(x_67)))) + as_type(x_69)))].x = x_71; float const x_74 = data.arr[0].x; bool const x_75 = (x_74 == 5.0f); @@ -71,9 +71,9 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float } bool const x_82 = x_82_phi; if (x_82) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); } float const x_87 = x_7.injectionSwitch.x; float const x_89 = x_7.injectionSwitch.y; @@ -94,13 +94,19 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_7, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.hlsl index b29e01e2b9..f4566b6a37 100644 --- a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.hlsl @@ -88,11 +88,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.msl index 34a6d5147d..5aecf21e19 100644 --- a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.msl @@ -10,13 +10,13 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_(constant buf0& x_7, thread float4* const tint_symbol_5) { +float func_(constant buf0& x_7, thread float4* const tint_symbol_3) { int x = 0; - float const x_99 = (*(tint_symbol_5)).x; + float const x_99 = (*(tint_symbol_3)).x; if ((x_99 < 1.0f)) { return 5.0f; } @@ -34,7 +34,7 @@ float func_(constant buf0& x_7, thread float4* const tint_symbol_5) { return (5.0f + float(x_120)); } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { int i = 0; int j = 0; tint_array_wrapper data = {}; @@ -46,7 +46,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float } else { break; } - float const x_56 = (*(tint_symbol_6)).x; + float const x_56 = (*(tint_symbol_4)).x; if ((x_56 >= 0.0f)) { j = 0; while (true) { @@ -59,7 +59,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float } int const x_67 = j; int const x_69 = i; - float const x_71 = func_(x_7, tint_symbol_6); + float const x_71 = func_(x_7, tint_symbol_4); data.arr[as_type((as_type(as_type((as_type(4) * as_type(x_67)))) + as_type(x_69)))].x = x_71; float const x_74 = data.arr[0].x; bool const x_75 = (x_74 == 5.0f); @@ -71,9 +71,9 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float } bool const x_82 = x_82_phi; if (x_82) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); } float const x_87 = x_7.injectionSwitch.x; float const x_89 = x_7.injectionSwitch.y; @@ -94,13 +94,19 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_7, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.hlsl index b2bb718bcd..1d0f1e8fb4 100644 --- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.hlsl @@ -86,11 +86,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.msl index 9f12b7ce29..14056531b4 100644 --- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.msl @@ -10,22 +10,22 @@ struct tint_array_wrapper_1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6, thread tint_array_wrapper_1* const tint_symbol_7) { +float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol_3, thread float4* const tint_symbol_4, thread tint_array_wrapper_1* const tint_symbol_5) { int b = 0; int i = 0; bool x_115 = false; bool x_116_phi = false; b = 0; - (*(tint_symbol_5)).arr[0] = 5; - (*(tint_symbol_5)).arr[2] = 0; - (*(tint_symbol_5)).arr[4] = 0; - (*(tint_symbol_5)).arr[6] = 0; - (*(tint_symbol_5)).arr[8] = 0; - float const x_71 = (*(tint_symbol_6)).x; + (*(tint_symbol_3)).arr[0] = 5; + (*(tint_symbol_3)).arr[2] = 0; + (*(tint_symbol_3)).arr[4] = 0; + (*(tint_symbol_3)).arr[6] = 0; + (*(tint_symbol_3)).arr[8] = 0; + float const x_71 = (*(tint_symbol_4)).x; if ((x_71 >= 0.0f)) { while (true) { int const x_79 = b; @@ -38,8 +38,8 @@ float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol if ((x_83 <= 5)) { int const x_87 = b; int const x_88 = b; - int const x_90 = (*(tint_symbol_5)).arr[x_88]; - (*(tint_symbol_7)).arr[x_87] = x_90; + int const x_90 = (*(tint_symbol_3)).arr[x_88]; + (*(tint_symbol_5)).arr[x_87] = x_90; int const x_92 = b; b = as_type((as_type(x_92) + as_type(2))); } @@ -53,18 +53,18 @@ float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol break; } int const x_101 = i; - int const x_103 = (*(tint_symbol_7)).arr[0]; - (*(tint_symbol_5)).arr[x_101] = as_type((as_type(x_103) + as_type(1))); + int const x_103 = (*(tint_symbol_5)).arr[0]; + (*(tint_symbol_3)).arr[x_101] = as_type((as_type(x_103) + as_type(1))); { int const x_106 = i; i = as_type((as_type(x_106) + as_type(1))); } } - int const x_109 = (*(tint_symbol_7)).arr[0]; + int const x_109 = (*(tint_symbol_5)).arr[0]; bool const x_110 = (x_109 == 5); x_116_phi = x_110; if (x_110) { - int const x_114 = (*(tint_symbol_5)).arr[0]; + int const x_114 = (*(tint_symbol_3)).arr[0]; x_115 = (x_114 == 6); x_116_phi = x_115; } @@ -77,7 +77,7 @@ float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol return 0.0f; } -void main_1(thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread tint_array_wrapper_1* const tint_symbol_10, thread float4* const tint_symbol_11) { +void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7, thread tint_array_wrapper_1* const tint_symbol_8, thread float4* const tint_symbol_9) { int i_1 = 0; int param = 0; int param_1 = 0; @@ -90,14 +90,14 @@ void main_1(thread tint_array_wrapper* const tint_symbol_8, thread float4* const } int const x_54 = i_1; param = x_54; - float const x_55 = func_i1_(&(param), tint_symbol_8, tint_symbol_9, tint_symbol_10); + float const x_55 = func_i1_(&(param), tint_symbol_6, tint_symbol_7, tint_symbol_8); int const x_56 = i_1; param_1 = x_56; - float const x_57 = func_i1_(&(param_1), tint_symbol_8, tint_symbol_9, tint_symbol_10); + float const x_57 = func_i1_(&(param_1), tint_symbol_6, tint_symbol_7, tint_symbol_8); if ((x_57 == 1.0f)) { - *(tint_symbol_11) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_11) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_9) = float4(0.0f, 0.0f, 0.0f, 0.0f); } { int const x_62 = i_1; @@ -107,15 +107,21 @@ void main_1(thread tint_array_wrapper* const tint_symbol_8, thread float4* const return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_12 = 0.0f; - thread tint_array_wrapper tint_symbol_13 = {}; - thread tint_array_wrapper_1 tint_symbol_14 = {}; - thread float4 tint_symbol_15 = 0.0f; - tint_symbol_12 = gl_FragCoord_param; - main_1(&(tint_symbol_13), &(tint_symbol_12), &(tint_symbol_14), &(tint_symbol_15)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_15}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread tint_array_wrapper* const tint_symbol_11, thread tint_array_wrapper_1* const tint_symbol_12, thread float4* const tint_symbol_13) { + *(tint_symbol_10) = gl_FragCoord_param; + main_1(tint_symbol_11, tint_symbol_10, tint_symbol_12, tint_symbol_13); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_13)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_14 = 0.0f; + thread tint_array_wrapper tint_symbol_15 = {}; + thread tint_array_wrapper_1 tint_symbol_16 = {}; + thread float4 tint_symbol_17 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.hlsl index b2bb718bcd..1d0f1e8fb4 100644 --- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.hlsl @@ -86,11 +86,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.msl index 9f12b7ce29..14056531b4 100644 --- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.msl @@ -10,22 +10,22 @@ struct tint_array_wrapper_1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6, thread tint_array_wrapper_1* const tint_symbol_7) { +float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol_3, thread float4* const tint_symbol_4, thread tint_array_wrapper_1* const tint_symbol_5) { int b = 0; int i = 0; bool x_115 = false; bool x_116_phi = false; b = 0; - (*(tint_symbol_5)).arr[0] = 5; - (*(tint_symbol_5)).arr[2] = 0; - (*(tint_symbol_5)).arr[4] = 0; - (*(tint_symbol_5)).arr[6] = 0; - (*(tint_symbol_5)).arr[8] = 0; - float const x_71 = (*(tint_symbol_6)).x; + (*(tint_symbol_3)).arr[0] = 5; + (*(tint_symbol_3)).arr[2] = 0; + (*(tint_symbol_3)).arr[4] = 0; + (*(tint_symbol_3)).arr[6] = 0; + (*(tint_symbol_3)).arr[8] = 0; + float const x_71 = (*(tint_symbol_4)).x; if ((x_71 >= 0.0f)) { while (true) { int const x_79 = b; @@ -38,8 +38,8 @@ float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol if ((x_83 <= 5)) { int const x_87 = b; int const x_88 = b; - int const x_90 = (*(tint_symbol_5)).arr[x_88]; - (*(tint_symbol_7)).arr[x_87] = x_90; + int const x_90 = (*(tint_symbol_3)).arr[x_88]; + (*(tint_symbol_5)).arr[x_87] = x_90; int const x_92 = b; b = as_type((as_type(x_92) + as_type(2))); } @@ -53,18 +53,18 @@ float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol break; } int const x_101 = i; - int const x_103 = (*(tint_symbol_7)).arr[0]; - (*(tint_symbol_5)).arr[x_101] = as_type((as_type(x_103) + as_type(1))); + int const x_103 = (*(tint_symbol_5)).arr[0]; + (*(tint_symbol_3)).arr[x_101] = as_type((as_type(x_103) + as_type(1))); { int const x_106 = i; i = as_type((as_type(x_106) + as_type(1))); } } - int const x_109 = (*(tint_symbol_7)).arr[0]; + int const x_109 = (*(tint_symbol_5)).arr[0]; bool const x_110 = (x_109 == 5); x_116_phi = x_110; if (x_110) { - int const x_114 = (*(tint_symbol_5)).arr[0]; + int const x_114 = (*(tint_symbol_3)).arr[0]; x_115 = (x_114 == 6); x_116_phi = x_115; } @@ -77,7 +77,7 @@ float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol return 0.0f; } -void main_1(thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread tint_array_wrapper_1* const tint_symbol_10, thread float4* const tint_symbol_11) { +void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7, thread tint_array_wrapper_1* const tint_symbol_8, thread float4* const tint_symbol_9) { int i_1 = 0; int param = 0; int param_1 = 0; @@ -90,14 +90,14 @@ void main_1(thread tint_array_wrapper* const tint_symbol_8, thread float4* const } int const x_54 = i_1; param = x_54; - float const x_55 = func_i1_(&(param), tint_symbol_8, tint_symbol_9, tint_symbol_10); + float const x_55 = func_i1_(&(param), tint_symbol_6, tint_symbol_7, tint_symbol_8); int const x_56 = i_1; param_1 = x_56; - float const x_57 = func_i1_(&(param_1), tint_symbol_8, tint_symbol_9, tint_symbol_10); + float const x_57 = func_i1_(&(param_1), tint_symbol_6, tint_symbol_7, tint_symbol_8); if ((x_57 == 1.0f)) { - *(tint_symbol_11) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_11) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_9) = float4(0.0f, 0.0f, 0.0f, 0.0f); } { int const x_62 = i_1; @@ -107,15 +107,21 @@ void main_1(thread tint_array_wrapper* const tint_symbol_8, thread float4* const return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_12 = 0.0f; - thread tint_array_wrapper tint_symbol_13 = {}; - thread tint_array_wrapper_1 tint_symbol_14 = {}; - thread float4 tint_symbol_15 = 0.0f; - tint_symbol_12 = gl_FragCoord_param; - main_1(&(tint_symbol_13), &(tint_symbol_12), &(tint_symbol_14), &(tint_symbol_15)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_15}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread tint_array_wrapper* const tint_symbol_11, thread tint_array_wrapper_1* const tint_symbol_12, thread float4* const tint_symbol_13) { + *(tint_symbol_10) = gl_FragCoord_param; + main_1(tint_symbol_11, tint_symbol_10, tint_symbol_12, tint_symbol_13); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_13)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_14 = 0.0f; + thread tint_array_wrapper tint_symbol_15 = {}; + thread tint_array_wrapper_1 tint_symbol_16 = {}; + thread float4 tint_symbol_17 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.hlsl index 86ba9e92bc..cd614981e7 100644 --- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.hlsl @@ -67,9 +67,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.msl index 4063dcbe3b..bb5f180b58 100644 --- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void func_i1_(thread int* const x, thread float4* const tint_symbol_4) { +void func_i1_(thread int* const x, thread float4* const tint_symbol_3) { int a = 0; tint_array_wrapper data = {}; tint_array_wrapper_1 temp = {}; @@ -66,14 +66,14 @@ void func_i1_(thread int* const x, thread float4* const tint_symbol_4) { } bool const x_96 = x_96_phi; if (x_96) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -void main_1(thread float4* const tint_symbol_5) { +void main_1(thread float4* const tint_symbol_4) { int i_1 = 0; int param = 0; i_1 = 1; @@ -85,7 +85,7 @@ void main_1(thread float4* const tint_symbol_5) { } int const x_46 = i_1; param = x_46; - func_i1_(&(param), tint_symbol_5); + func_i1_(&(param), tint_symbol_4); { int const x_48 = i_1; i_1 = as_type((as_type(x_48) + as_type(1))); @@ -94,11 +94,17 @@ void main_1(thread float4* const tint_symbol_5) { return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - main_1(&(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5) { + main_1(tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.hlsl index 86ba9e92bc..cd614981e7 100644 --- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.hlsl @@ -67,9 +67,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.msl index 4063dcbe3b..bb5f180b58 100644 --- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void func_i1_(thread int* const x, thread float4* const tint_symbol_4) { +void func_i1_(thread int* const x, thread float4* const tint_symbol_3) { int a = 0; tint_array_wrapper data = {}; tint_array_wrapper_1 temp = {}; @@ -66,14 +66,14 @@ void func_i1_(thread int* const x, thread float4* const tint_symbol_4) { } bool const x_96 = x_96_phi; if (x_96) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -void main_1(thread float4* const tint_symbol_5) { +void main_1(thread float4* const tint_symbol_4) { int i_1 = 0; int param = 0; i_1 = 1; @@ -85,7 +85,7 @@ void main_1(thread float4* const tint_symbol_5) { } int const x_46 = i_1; param = x_46; - func_i1_(&(param), tint_symbol_5); + func_i1_(&(param), tint_symbol_4); { int const x_48 = i_1; i_1 = as_type((as_type(x_48) + as_type(1))); @@ -94,11 +94,17 @@ void main_1(thread float4* const tint_symbol_5) { return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - main_1(&(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5) { + main_1(tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.hlsl index 9ed54bc1f8..475a276db1 100644 --- a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.hlsl @@ -36,10 +36,13 @@ struct tint_symbol_1 { uint3 gl_LocalInvocationID_param : SV_GroupThreadID; }; -[numthreads(16, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 gl_LocalInvocationID_param = tint_symbol.gl_LocalInvocationID_param; +void main_inner(uint3 gl_LocalInvocationID_param) { gl_LocalInvocationID = gl_LocalInvocationID_param; main_1(); +} + +[numthreads(16, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.gl_LocalInvocationID_param); return; } diff --git a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl index 9d6a2d8685..833620b553 100644 --- a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl @@ -9,11 +9,11 @@ struct buf1 { /* 0x0000 */ packed_float2 injectionSwitch; }; -void main_1(constant buf1& x_10, device doesNotMatter& x_7, thread uint3* const tint_symbol_2) { +void main_1(constant buf1& x_10, device doesNotMatter& x_7, thread uint3* const tint_symbol_1) { int lid = 0; int val = 0; int i = 0; - uint const x_40 = (*(tint_symbol_2)).x; + uint const x_40 = (*(tint_symbol_1)).x; lid = as_type(x_40); int const x_43 = x_7.global_seed; val = x_43; @@ -48,10 +48,14 @@ void main_1(constant buf1& x_10, device doesNotMatter& x_7, thread uint3* const return; } +void tint_symbol_inner(constant buf1& x_10, device doesNotMatter& x_7, uint3 gl_LocalInvocationID_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = gl_LocalInvocationID_param; + main_1(x_10, x_7, tint_symbol_2); +} + kernel void tint_symbol(uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], constant buf1& x_10 [[buffer(1)]], device doesNotMatter& x_7 [[buffer(0)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = gl_LocalInvocationID_param; - main_1(x_10, x_7, &(tint_symbol_3)); + tint_symbol_inner(x_10, x_7, gl_LocalInvocationID_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.hlsl index 9ed54bc1f8..475a276db1 100644 --- a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.hlsl @@ -36,10 +36,13 @@ struct tint_symbol_1 { uint3 gl_LocalInvocationID_param : SV_GroupThreadID; }; -[numthreads(16, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 gl_LocalInvocationID_param = tint_symbol.gl_LocalInvocationID_param; +void main_inner(uint3 gl_LocalInvocationID_param) { gl_LocalInvocationID = gl_LocalInvocationID_param; main_1(); +} + +[numthreads(16, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.gl_LocalInvocationID_param); return; } diff --git a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl index 9d6a2d8685..833620b553 100644 --- a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl @@ -9,11 +9,11 @@ struct buf1 { /* 0x0000 */ packed_float2 injectionSwitch; }; -void main_1(constant buf1& x_10, device doesNotMatter& x_7, thread uint3* const tint_symbol_2) { +void main_1(constant buf1& x_10, device doesNotMatter& x_7, thread uint3* const tint_symbol_1) { int lid = 0; int val = 0; int i = 0; - uint const x_40 = (*(tint_symbol_2)).x; + uint const x_40 = (*(tint_symbol_1)).x; lid = as_type(x_40); int const x_43 = x_7.global_seed; val = x_43; @@ -48,10 +48,14 @@ void main_1(constant buf1& x_10, device doesNotMatter& x_7, thread uint3* const return; } +void tint_symbol_inner(constant buf1& x_10, device doesNotMatter& x_7, uint3 gl_LocalInvocationID_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = gl_LocalInvocationID_param; + main_1(x_10, x_7, tint_symbol_2); +} + kernel void tint_symbol(uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], constant buf1& x_10 [[buffer(1)]], device doesNotMatter& x_7 [[buffer(0)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = gl_LocalInvocationID_param; - main_1(x_10, x_7, &(tint_symbol_3)); + tint_symbol_inner(x_10, x_7, gl_LocalInvocationID_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.hlsl index 896cc41376..cf40a39206 100644 --- a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.hlsl @@ -53,9 +53,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.msl index f5bdadcd3d..b3a2b1dd96 100644 --- a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.msl @@ -11,9 +11,9 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { bool GLF_live12c5 = false; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); while (true) { float const x_31 = x_5.injectionSwitch.y; if ((x_31 < 0.0f)) { @@ -55,11 +55,17 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.hlsl index 896cc41376..cf40a39206 100644 --- a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.hlsl @@ -53,9 +53,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.msl index f5bdadcd3d..b3a2b1dd96 100644 --- a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.msl @@ -11,9 +11,9 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { bool GLF_live12c5 = false; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); while (true) { float const x_31 = x_5.injectionSwitch.y; if ((x_31 < 0.0f)) { @@ -55,11 +55,17 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.hlsl index 993c3df255..da68b65dce 100644 --- a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.hlsl @@ -31,9 +31,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.msl index 54b06ad781..c50c71e576 100644 --- a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.msl @@ -19,8 +19,8 @@ void func_(constant buf0& x_6) { return; } -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); while (true) { func_(x_6); if (false) { @@ -28,15 +28,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { break; } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.hlsl index 993c3df255..da68b65dce 100644 --- a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.hlsl @@ -31,9 +31,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.msl index 54b06ad781..c50c71e576 100644 --- a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.msl @@ -19,8 +19,8 @@ void func_(constant buf0& x_6) { return; } -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); while (true) { func_(x_6); if (false) { @@ -28,15 +28,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { break; } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.spvasm.expected.msl index b53ef9698d..1582403838 100644 --- a/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.spvasm.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { tint_array_wrapper data = {}; int x_40 = 0; int x_40_phi = 0; @@ -39,7 +39,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { x_54_phi = x_40; switch(int(x_47)) { case 78: { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); /* fallthrough */ } case 19: { @@ -77,15 +77,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } } data.arr[x_40] = 1; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl.expected.msl index b53ef9698d..1582403838 100644 --- a/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { tint_array_wrapper data = {}; int x_40 = 0; int x_40_phi = 0; @@ -39,7 +39,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { x_54_phi = x_40; switch(int(x_47)) { case 78: { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); /* fallthrough */ } case 19: { @@ -77,15 +77,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } } data.arr[x_40] = 1; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.spvasm.expected.msl index 7bf030e374..492bcf0902 100644 --- a/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.spvasm.expected.msl @@ -11,23 +11,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float const x_26 = x_5.injectionSwitch.x; if ((x_26 > 1.0f)) { while (true) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.wgsl.expected.msl index 7bf030e374..492bcf0902 100644 --- a/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.wgsl.expected.msl @@ -11,23 +11,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float const x_26 = x_5.injectionSwitch.x; if ((x_26 > 1.0f)) { while (true) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.hlsl index f98d1d7f3a..61d9c34bc9 100644 --- a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.hlsl @@ -13,8 +13,8 @@ void main_1() { S x_45 = (S)0; S x_45_phi = (S)0; int x_11_phi = 0; - const S tint_symbol_4 = {0, float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))}; - x_45_phi = tint_symbol_4; + const S tint_symbol_3 = {0, float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))}; + x_45_phi = tint_symbol_3; x_11_phi = 0; while (true) { S x_46 = (S)0; @@ -68,11 +68,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.msl index 85a576db52..c6cb6b1b7e 100644 --- a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.msl @@ -8,33 +8,33 @@ struct S { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { int x_51 = 0; int x_12_phi = 0; while (true) { S x_45 = {}; S x_45_phi = {}; int x_11_phi = 0; - S const tint_symbol_4 = {.f0=0, .f1=float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))}; - x_45_phi = tint_symbol_4; + S const tint_symbol_2 = {.f0=0, .f1=float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))}; + x_45_phi = tint_symbol_2; x_11_phi = 0; while (true) { S x_46 = {}; int x_9 = 0; x_45 = x_45_phi; int const x_11 = x_11_phi; - float const x_49 = (*(tint_symbol_6)).x; + float const x_49 = (*(tint_symbol_4)).x; x_51 = select(2, 1, (x_49 == 0.0f)); if ((x_11 < x_51)) { } else { break; } { - *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); x_46 = x_45; x_46.f0 = as_type((as_type(x_45.f0) + as_type(1))); x_9 = as_type((as_type(x_11) + as_type(1))); @@ -56,7 +56,7 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol break; } { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); x_6 = as_type((as_type(x_12) + as_type(1))); x_12_phi = x_6; } @@ -64,13 +64,19 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.hlsl index f98d1d7f3a..61d9c34bc9 100644 --- a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.hlsl @@ -13,8 +13,8 @@ void main_1() { S x_45 = (S)0; S x_45_phi = (S)0; int x_11_phi = 0; - const S tint_symbol_4 = {0, float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))}; - x_45_phi = tint_symbol_4; + const S tint_symbol_3 = {0, float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))}; + x_45_phi = tint_symbol_3; x_11_phi = 0; while (true) { S x_46 = (S)0; @@ -68,11 +68,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.msl index 85a576db52..c6cb6b1b7e 100644 --- a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.msl @@ -8,33 +8,33 @@ struct S { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { int x_51 = 0; int x_12_phi = 0; while (true) { S x_45 = {}; S x_45_phi = {}; int x_11_phi = 0; - S const tint_symbol_4 = {.f0=0, .f1=float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))}; - x_45_phi = tint_symbol_4; + S const tint_symbol_2 = {.f0=0, .f1=float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))}; + x_45_phi = tint_symbol_2; x_11_phi = 0; while (true) { S x_46 = {}; int x_9 = 0; x_45 = x_45_phi; int const x_11 = x_11_phi; - float const x_49 = (*(tint_symbol_6)).x; + float const x_49 = (*(tint_symbol_4)).x; x_51 = select(2, 1, (x_49 == 0.0f)); if ((x_11 < x_51)) { } else { break; } { - *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); x_46 = x_45; x_46.f0 = as_type((as_type(x_45.f0) + as_type(1))); x_9 = as_type((as_type(x_11) + as_type(1))); @@ -56,7 +56,7 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol break; } { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); x_6 = as_type((as_type(x_12) + as_type(1))); x_12_phi = x_6; } @@ -64,13 +64,19 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.hlsl index 626404fe98..f895653a73 100644 --- a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.msl index 8e00df92b3..76eb9ec809 100644 --- a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -int GLF_live6search_(thread tint_array_wrapper* const tint_symbol_4) { +int GLF_live6search_(thread tint_array_wrapper* const tint_symbol_3) { int GLF_live6index = 0; int GLF_live6currentNode = 0; GLF_live6index = 0; @@ -24,7 +24,7 @@ int GLF_live6search_(thread tint_array_wrapper* const tint_symbol_4) { break; } int const x_10 = GLF_live6index; - int const x_11 = (*(tint_symbol_4)).arr[x_10]; + int const x_11 = (*(tint_symbol_3)).arr[x_10]; GLF_live6currentNode = x_11; int const x_12 = GLF_live6currentNode; if ((x_12 != 1)) { @@ -35,21 +35,27 @@ int GLF_live6search_(thread tint_array_wrapper* const tint_symbol_4) { return 1; } -void main_1(constant buf0& x_9, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_9, thread tint_array_wrapper* const tint_symbol_4, thread float4* const tint_symbol_5) { float const x_40 = x_9.injectionSwitch.x; if ((x_40 > 1.0f)) { - int const x_13 = GLF_live6search_(tint_symbol_5); + int const x_13 = GLF_live6search_(tint_symbol_4); } - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { - thread tint_array_wrapper tint_symbol_7 = {}; - thread float4 tint_symbol_8 = 0.0f; - main_1(x_9, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_9, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) { + main_1(x_9, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { + thread tint_array_wrapper tint_symbol_8 = {}; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.hlsl index 626404fe98..f895653a73 100644 --- a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.msl index 8e00df92b3..76eb9ec809 100644 --- a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -int GLF_live6search_(thread tint_array_wrapper* const tint_symbol_4) { +int GLF_live6search_(thread tint_array_wrapper* const tint_symbol_3) { int GLF_live6index = 0; int GLF_live6currentNode = 0; GLF_live6index = 0; @@ -24,7 +24,7 @@ int GLF_live6search_(thread tint_array_wrapper* const tint_symbol_4) { break; } int const x_10 = GLF_live6index; - int const x_11 = (*(tint_symbol_4)).arr[x_10]; + int const x_11 = (*(tint_symbol_3)).arr[x_10]; GLF_live6currentNode = x_11; int const x_12 = GLF_live6currentNode; if ((x_12 != 1)) { @@ -35,21 +35,27 @@ int GLF_live6search_(thread tint_array_wrapper* const tint_symbol_4) { return 1; } -void main_1(constant buf0& x_9, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_9, thread tint_array_wrapper* const tint_symbol_4, thread float4* const tint_symbol_5) { float const x_40 = x_9.injectionSwitch.x; if ((x_40 > 1.0f)) { - int const x_13 = GLF_live6search_(tint_symbol_5); + int const x_13 = GLF_live6search_(tint_symbol_4); } - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { - thread tint_array_wrapper tint_symbol_7 = {}; - thread float4 tint_symbol_8 = 0.0f; - main_1(x_9, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_9, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) { + main_1(x_9, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { + thread tint_array_wrapper tint_symbol_8 = {}; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.hlsl index 0ab6d5a844..b9958ca179 100644 --- a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.hlsl @@ -199,11 +199,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl index 7fd58836de..d5becd4693 100644 --- a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl @@ -10,7 +10,7 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -264,7 +264,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { return float3(1.0f, 1.0f, 1.0f); } -void main_1(constant buf0& x_25, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_25, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 position = 0.0f; float2 param = 0.0f; float2 param_1 = 0.0f; @@ -272,7 +272,7 @@ void main_1(constant buf0& x_25, thread float4* const tint_symbol_5, thread floa float2 param_2 = 0.0f; float const x_161 = x_25.injectionSwitch.x; if ((x_161 >= 2.0f)) { - float4 const x_165 = *(tint_symbol_5); + float4 const x_165 = *(tint_symbol_3); position = float2(x_165.x, x_165.y); float2 const x_167 = position; param = x_167; @@ -296,17 +296,23 @@ void main_1(constant buf0& x_25, thread float4* const tint_symbol_5, thread floa } } } - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_25 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_25, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_25, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_25, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_25 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_25, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.hlsl index 19070703c2..4e46c3dd5c 100644 --- a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.hlsl @@ -227,11 +227,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.msl index 5842374ff3..8fcd116a3b 100644 --- a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.msl @@ -10,7 +10,7 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -264,7 +264,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { return float3(1.0f, 1.0f, 1.0f); } -void main_1(constant buf0& x_25, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_25, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 position = 0.0f; float2 param = 0.0f; float2 param_1 = 0.0f; @@ -272,7 +272,7 @@ void main_1(constant buf0& x_25, thread float4* const tint_symbol_5, thread floa float2 param_2 = 0.0f; float const x_161 = x_25.injectionSwitch.x; if ((x_161 >= 2.0f)) { - float4 const x_165 = *(tint_symbol_5); + float4 const x_165 = *(tint_symbol_3); position = float2(x_165.x, x_165.y); float2 const x_167 = position; param = x_167; @@ -296,17 +296,23 @@ void main_1(constant buf0& x_25, thread float4* const tint_symbol_5, thread floa } } } - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_25 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_25, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_25, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_25, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_25 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_25, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.hlsl index 96c79d3cc9..4e2e246d69 100644 --- a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.hlsl @@ -96,11 +96,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.msl index c65a101bb4..a67688960f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_i1_(thread int* const b, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +float func_i1_(thread int* const b, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int ndx = 0; int i = 0; ndx = 0; @@ -21,7 +21,7 @@ float func_i1_(thread int* const b, thread float4* const tint_symbol_5, thread f } else { break; } - float const x_104 = (*(tint_symbol_5)).x; + float const x_104 = (*(tint_symbol_3)).x; if ((x_104 < 0.0f)) { i = 0; while (true) { @@ -48,31 +48,31 @@ float func_i1_(thread int* const b, thread float4* const tint_symbol_5, thread f if ((x_125 > 1)) { return 3.0f; } - float const x_130 = (*(tint_symbol_5)).x; + float const x_130 = (*(tint_symbol_3)).x; if ((x_130 < 0.0f)) { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return 5.0f; } -void main_1(constant buf0& x_11, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { float f = 0.0f; int param = 0; int x_1 = 0; int param_1 = 0; - *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); f = 0.0f; while (true) { - float const x_54 = (*(tint_symbol_7)).y; + float const x_54 = (*(tint_symbol_5)).y; if ((int(x_54) < 0)) { discard_fragment(); } else { float const x_61 = x_11.zero; param = int(x_61); - float const x_63 = func_i1_(&(param), tint_symbol_8, tint_symbol_7); + float const x_63 = func_i1_(&(param), tint_symbol_6, tint_symbol_5); f = x_63; } - float const x_65 = (*(tint_symbol_7)).y; + float const x_65 = (*(tint_symbol_5)).y; if ((int(x_65) > 65)) { discard_fragment(); } @@ -86,7 +86,7 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_7, thread floa } int const x_81 = x_1; param_1 = as_type((as_type(x_81) + as_type(10))); - float const x_83 = func_i1_(&(param_1), tint_symbol_8, tint_symbol_7); + float const x_83 = func_i1_(&(param_1), tint_symbol_6, tint_symbol_5); f = x_83; { int const x_84 = x_1; @@ -103,20 +103,26 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_7, thread floa } float const x_90 = f; if ((x_90 == 3.0f)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(x_11, &(tint_symbol_10), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(x_11, tint_symbol_8, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_11, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.hlsl index 96c79d3cc9..4e2e246d69 100644 --- a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.hlsl @@ -96,11 +96,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.msl index c65a101bb4..a67688960f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_i1_(thread int* const b, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +float func_i1_(thread int* const b, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int ndx = 0; int i = 0; ndx = 0; @@ -21,7 +21,7 @@ float func_i1_(thread int* const b, thread float4* const tint_symbol_5, thread f } else { break; } - float const x_104 = (*(tint_symbol_5)).x; + float const x_104 = (*(tint_symbol_3)).x; if ((x_104 < 0.0f)) { i = 0; while (true) { @@ -48,31 +48,31 @@ float func_i1_(thread int* const b, thread float4* const tint_symbol_5, thread f if ((x_125 > 1)) { return 3.0f; } - float const x_130 = (*(tint_symbol_5)).x; + float const x_130 = (*(tint_symbol_3)).x; if ((x_130 < 0.0f)) { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return 5.0f; } -void main_1(constant buf0& x_11, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { float f = 0.0f; int param = 0; int x_1 = 0; int param_1 = 0; - *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); f = 0.0f; while (true) { - float const x_54 = (*(tint_symbol_7)).y; + float const x_54 = (*(tint_symbol_5)).y; if ((int(x_54) < 0)) { discard_fragment(); } else { float const x_61 = x_11.zero; param = int(x_61); - float const x_63 = func_i1_(&(param), tint_symbol_8, tint_symbol_7); + float const x_63 = func_i1_(&(param), tint_symbol_6, tint_symbol_5); f = x_63; } - float const x_65 = (*(tint_symbol_7)).y; + float const x_65 = (*(tint_symbol_5)).y; if ((int(x_65) > 65)) { discard_fragment(); } @@ -86,7 +86,7 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_7, thread floa } int const x_81 = x_1; param_1 = as_type((as_type(x_81) + as_type(10))); - float const x_83 = func_i1_(&(param_1), tint_symbol_8, tint_symbol_7); + float const x_83 = func_i1_(&(param_1), tint_symbol_6, tint_symbol_5); f = x_83; { int const x_84 = x_1; @@ -103,20 +103,26 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_7, thread floa } float const x_90 = f; if ((x_90 == 3.0f)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(x_11, &(tint_symbol_10), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(x_11, tint_symbol_8, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_11, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.hlsl index 01b699a0fc..f144bdd38f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.hlsl @@ -57,9 +57,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.msl index 154546203a..cdcf6c0a9a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) { tint_array_wrapper_2 numbers = {}; float2 a = 0.0f; float b = 0.0f; @@ -59,20 +59,26 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_81 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_84 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_87 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_78), float(x_81), float(x_84), float(x_87)); + *(tint_symbol_3) = float4(float(x_78), float(x_81), float(x_84), float(x_87)); } else { int const x_91 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_92 = float(x_91); - *(tint_symbol_4) = float4(x_92, x_92, x_92, x_92); + *(tint_symbol_3) = float4(x_92, x_92, x_92, x_92); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.hlsl index 01b699a0fc..f144bdd38f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.hlsl @@ -57,9 +57,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.msl index 154546203a..cdcf6c0a9a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) { tint_array_wrapper_2 numbers = {}; float2 a = 0.0f; float b = 0.0f; @@ -59,20 +59,26 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_81 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_84 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_87 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_78), float(x_81), float(x_84), float(x_87)); + *(tint_symbol_3) = float4(float(x_78), float(x_81), float(x_84), float(x_87)); } else { int const x_91 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_92 = float(x_91); - *(tint_symbol_4) = float4(x_92, x_92, x_92, x_92); + *(tint_symbol_3) = float4(x_92, x_92, x_92, x_92); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.hlsl index 897064d85d..f7df751a64 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.hlsl @@ -53,9 +53,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.msl index 007dbce846..3c0bbb7d91 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.msl @@ -51,25 +51,31 @@ float func_(constant buf0& x_8) { return x_71; } -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { float4 c = 0.0f; float const x_34 = func_(x_8); c = float4(x_34, 0.0f, 0.0f, 1.0f); float const x_36 = func_(x_8); if ((x_36 == 5.0f)) { float4 const x_41 = c; - *(tint_symbol_4) = x_41; + *(tint_symbol_3) = x_41; } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.hlsl index 897064d85d..f7df751a64 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.hlsl @@ -53,9 +53,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.msl index 007dbce846..3c0bbb7d91 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.msl @@ -51,25 +51,31 @@ float func_(constant buf0& x_8) { return x_71; } -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { float4 c = 0.0f; float const x_34 = func_(x_8); c = float4(x_34, 0.0f, 0.0f, 1.0f); float const x_36 = func_(x_8); if ((x_36 == 5.0f)) { float4 const x_41 = c; - *(tint_symbol_4) = x_41; + *(tint_symbol_3) = x_41; } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.hlsl index 810c81c7d5..7d70ea90ce 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.hlsl @@ -46,11 +46,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl index 6c4b3c8a86..6b0ac98526 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl @@ -24,20 +24,20 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int2 v = 0; - float const x_39 = (*(tint_symbol_5)).y; + float const x_39 = (*(tint_symbol_3)).y; float const x_41 = x_6.x_GLF_uniform_float_values.arr[0].el; if ((x_39 < x_41)) { int const x_47 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_48 = float(x_47); - *(tint_symbol_6) = float4(x_48, x_48, x_48, x_48); + *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48); } else { - float4 const x_50 = *(tint_symbol_5); + float4 const x_50 = *(tint_symbol_3); float const x_53 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_55 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_59 = x_6.x_GLF_uniform_float_values.arr[2].el; @@ -49,18 +49,24 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_74 = v.x; int const x_76 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_80 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_6) = float4(x_63, float((as_type((as_type(x_65) - as_type(x_67))) & x_70)), float((x_74 & x_76)), x_80); + *(tint_symbol_4) = float4(x_63, float((as_type((as_type(x_65) - as_type(x_67))) & x_70)), float((x_74 & x_76)), x_80); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, x_8, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, x_8, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.hlsl index 810c81c7d5..7d70ea90ce 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.hlsl @@ -46,11 +46,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl index 6c4b3c8a86..6b0ac98526 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl @@ -24,20 +24,20 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int2 v = 0; - float const x_39 = (*(tint_symbol_5)).y; + float const x_39 = (*(tint_symbol_3)).y; float const x_41 = x_6.x_GLF_uniform_float_values.arr[0].el; if ((x_39 < x_41)) { int const x_47 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_48 = float(x_47); - *(tint_symbol_6) = float4(x_48, x_48, x_48, x_48); + *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48); } else { - float4 const x_50 = *(tint_symbol_5); + float4 const x_50 = *(tint_symbol_3); float const x_53 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_55 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_59 = x_6.x_GLF_uniform_float_values.arr[2].el; @@ -49,18 +49,24 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_74 = v.x; int const x_76 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_80 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_6) = float4(x_63, float((as_type((as_type(x_65) - as_type(x_67))) & x_70)), float((x_74 & x_76)), x_80); + *(tint_symbol_4) = float4(x_63, float((as_type((as_type(x_65) - as_type(x_67))) & x_70)), float((x_74 & x_76)), x_80); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, x_8, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, x_8, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.hlsl index 7f591b193f..52308d75a3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.hlsl @@ -24,9 +24,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.msl index 7cbea1ffed..7baf635d34 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2 v = 0.0f; float d = 0.0f; int const x_35 = x_6.two; @@ -20,18 +20,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { d = distance(x_39, float2(1.159279943f, 0.64349997f)); float const x_41 = d; if ((x_41 < 0.01f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.hlsl index 7f591b193f..52308d75a3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.hlsl @@ -24,9 +24,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.msl index 7cbea1ffed..7baf635d34 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2 v = 0.0f; float d = 0.0f; int const x_35 = x_6.two; @@ -20,18 +20,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { d = distance(x_39, float2(1.159279943f, 0.64349997f)); float const x_41 = d; if ((x_41 < 0.01f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.hlsl index b8826cff8b..c4f79bdc30 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.hlsl @@ -58,9 +58,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.msl index 95cc7fb0e4..6e62aae4c8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3) { float nan = 0.0f; float4 undefined = 0.0f; bool x_83 = false; @@ -60,20 +60,26 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy int const x_92 = x_7.x_GLF_uniform_int_values.arr[8].el; int const x_95 = x_7.x_GLF_uniform_int_values.arr[8].el; int const x_98 = x_7.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_89), float(x_92), float(x_95), float(x_98)); + *(tint_symbol_3) = float4(float(x_89), float(x_92), float(x_95), float(x_98)); } else { int const x_102 = x_7.x_GLF_uniform_int_values.arr[8].el; float const x_103 = float(x_102); - *(tint_symbol_4) = float4(x_103, x_103, x_103, x_103); + *(tint_symbol_3) = float4(x_103, x_103, x_103, x_103); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_7, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.hlsl index b8826cff8b..c4f79bdc30 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.hlsl @@ -58,9 +58,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.msl index 95cc7fb0e4..6e62aae4c8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3) { float nan = 0.0f; float4 undefined = 0.0f; bool x_83 = false; @@ -60,20 +60,26 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy int const x_92 = x_7.x_GLF_uniform_int_values.arr[8].el; int const x_95 = x_7.x_GLF_uniform_int_values.arr[8].el; int const x_98 = x_7.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_89), float(x_92), float(x_95), float(x_98)); + *(tint_symbol_3) = float4(float(x_89), float(x_92), float(x_95), float(x_98)); } else { int const x_102 = x_7.x_GLF_uniform_int_values.arr[8].el; float const x_103 = float(x_102); - *(tint_symbol_4) = float4(x_103, x_103, x_103, x_103); + *(tint_symbol_3) = float4(x_103, x_103, x_103, x_103); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_7, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.hlsl index c5053c4da6..fa6f99abc1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.hlsl @@ -48,9 +48,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl index 7e3095b526..7a82ca481f 100755 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) { float undefined = 0.0f; bool x_51 = false; bool x_52_phi = false; @@ -50,20 +50,26 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_16 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_17 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_18 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_15), float(x_16), float(x_17), float(x_18)); + *(tint_symbol_3) = float4(float(x_15), float(x_16), float(x_17), float(x_18)); } else { int const x_19 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_66 = float(x_19); - *(tint_symbol_4) = float4(x_66, x_66, x_66, x_66); + *(tint_symbol_3) = float4(x_66, x_66, x_66, x_66); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.hlsl index 84838efda2..c21b5ad5b1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.hlsl @@ -48,9 +48,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl index 05942bce61..ab0ee7b011 100755 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) { float undefined = 0.0f; bool x_51 = false; bool x_52_phi = false; @@ -50,20 +50,26 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_16 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_17 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_18 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_15), float(x_16), float(x_17), float(x_18)); + *(tint_symbol_3) = float4(float(x_15), float(x_16), float(x_17), float(x_18)); } else { int const x_19 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_66 = float(x_19); - *(tint_symbol_4) = float4(x_66, x_66, x_66, x_66); + *(tint_symbol_3) = float4(x_66, x_66, x_66, x_66); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.hlsl index 0886ad0970..f08846b274 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.hlsl @@ -65,9 +65,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl index d72281e3c2..63a5368ed6 100755 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_8, thread float4* const tint_symbol_3) { float f0 = 0.0f; float s1 = 0.0f; float f1 = 0.0f; @@ -79,20 +79,26 @@ void main_1(constant buf1& x_8, thread float4* const tint_symbol_4) { int const x_84 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_87 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_90 = x_8.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_81), float(x_84), float(x_87), float(x_90)); + *(tint_symbol_3) = float4(float(x_81), float(x_84), float(x_87), float(x_90)); } else { int const x_94 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_95 = float(x_94); - *(tint_symbol_4) = float4(x_95, x_95, x_95, x_95); + *(tint_symbol_3) = float4(x_95, x_95, x_95, x_95); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.hlsl index 134d1e5bbb..e84ccc9215 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.hlsl @@ -80,9 +80,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl index a8cf6849ea..058c09489c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_8, thread float4* const tint_symbol_3) { float f0 = 0.0f; float s1 = 0.0f; float f1 = 0.0f; @@ -79,20 +79,26 @@ void main_1(constant buf1& x_8, thread float4* const tint_symbol_4) { int const x_84 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_87 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_90 = x_8.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_81), float(x_84), float(x_87), float(x_90)); + *(tint_symbol_3) = float4(float(x_81), float(x_84), float(x_87), float(x_90)); } else { int const x_94 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_95 = float(x_94); - *(tint_symbol_4) = float4(x_95, x_95, x_95, x_95); + *(tint_symbol_3) = float4(x_95, x_95, x_95, x_95); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.hlsl index c006c3f073..427a06ef79 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.hlsl @@ -48,9 +48,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.msl index 9237c80b01..afdf0a0328 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) { float4 I = 0.0f; float4 N = 0.0f; float4 R = 0.0f; @@ -55,20 +55,26 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_78 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_81 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_84 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_75), float(x_78), float(x_81), float(x_84)); + *(tint_symbol_3) = float4(float(x_75), float(x_78), float(x_81), float(x_84)); } else { int const x_88 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_89 = float(x_88); - *(tint_symbol_4) = float4(x_89, x_89, x_89, x_89); + *(tint_symbol_3) = float4(x_89, x_89, x_89, x_89); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.hlsl index c006c3f073..427a06ef79 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.hlsl @@ -48,9 +48,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.msl index 9237c80b01..afdf0a0328 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) { float4 I = 0.0f; float4 N = 0.0f; float4 R = 0.0f; @@ -55,20 +55,26 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_78 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_81 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_84 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_75), float(x_78), float(x_81), float(x_84)); + *(tint_symbol_3) = float4(float(x_75), float(x_78), float(x_81), float(x_84)); } else { int const x_88 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_89 = float(x_88); - *(tint_symbol_4) = float4(x_89, x_89, x_89, x_89); + *(tint_symbol_3) = float4(x_89, x_89, x_89, x_89); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.hlsl index ed5eaec306..b61eb9dd7f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.hlsl @@ -45,9 +45,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.msl index bea3fa46d3..41d7b0148d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float undefined = 0.0f; bool x_45 = false; bool x_46_phi = false; @@ -48,20 +48,26 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_13 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_14 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_15 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_12), float(x_13), float(x_14), float(x_15)); + *(tint_symbol_3) = float4(float(x_12), float(x_13), float(x_14), float(x_15)); } else { int const x_16 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_60 = float(x_16); - *(tint_symbol_4) = float4(x_60, x_60, x_60, x_60); + *(tint_symbol_3) = float4(x_60, x_60, x_60, x_60); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.hlsl index a6d9593218..9b834f7a81 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.hlsl @@ -45,9 +45,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.msl index 7a89ea85d4..1e7b6c9c4f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float undefined = 0.0f; bool x_45 = false; bool x_46_phi = false; @@ -48,20 +48,26 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_13 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_14 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_15 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_12), float(x_13), float(x_14), float(x_15)); + *(tint_symbol_3) = float4(float(x_12), float(x_13), float(x_14), float(x_15)); } else { int const x_16 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_60 = float(x_16); - *(tint_symbol_4) = float4(x_60, x_60, x_60, x_60); + *(tint_symbol_3) = float4(x_60, x_60, x_60, x_60); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.hlsl index f7fa99084a..27fad2b1a3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.msl index 16591889f2..5c3bb08605 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float4 v = 0.0f; float dist1 = 0.0f; float dist2 = 0.0f; @@ -22,18 +22,24 @@ void main_1(thread float4* const tint_symbol_4) { float const x_41 = dist1; float const x_43 = dist2; if (((x_41 < 0.100000001f) & (x_43 < 0.100000001f))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.hlsl index 5cb60bd779..3d2c160a50 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.hlsl @@ -26,9 +26,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.msl index 3b940f36bb..188130038d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float4 v = 0.0f; float dist1 = 0.0f; float dist2 = 0.0f; @@ -22,18 +22,24 @@ void main_1(thread float4* const tint_symbol_4) { float const x_41 = dist1; float const x_43 = dist2; if (((x_41 < 0.100000001f) && (x_43 < 0.100000001f))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.hlsl index 4a1c25c351..1f0d1c96c7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.hlsl @@ -69,9 +69,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.msl index 80097259bc..5a4b18de29 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_15, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_15, thread float4* const tint_symbol_3) { float3x4 m0 = float3x4(0.0f); float3x4 m1 = float3x4(0.0f); float3 undefined = 0.0f; @@ -75,26 +75,32 @@ void main_1(constant buf1& x_6, constant buf0& x_15, thread float4* const tint_s int const x_31 = x_6.x_GLF_uniform_int_values.arr[9].el; int const x_32 = x_6.x_GLF_uniform_int_values.arr[9].el; int const x_33 = x_6.x_GLF_uniform_int_values.arr[4].el; - *(tint_symbol_4) = float4(float(x_30), float(x_31), float(x_32), float(x_33)); + *(tint_symbol_3) = float4(float(x_30), float(x_31), float(x_32), float(x_33)); } else { int const x_34 = x_6.x_GLF_uniform_int_values.arr[9].el; float const x_146 = float(x_34); - *(tint_symbol_4) = float4(x_146, x_146, x_146, x_146); + *(tint_symbol_3) = float4(x_146, x_146, x_146, x_146); } float const x_149 = v0.x; float const x_151 = v1.x; if ((x_149 < x_151)) { float const x_156 = x_15.x_GLF_uniform_float_values.arr[0].el; - (*(tint_symbol_4)).y = x_156; + (*(tint_symbol_3)).y = x_156; } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_15 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_15, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_15, thread float4* const tint_symbol_4) { + main_1(x_6, x_15, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_15 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_15, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.hlsl index 4a1c25c351..1f0d1c96c7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.hlsl @@ -69,9 +69,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.msl index 80097259bc..5a4b18de29 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_15, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_15, thread float4* const tint_symbol_3) { float3x4 m0 = float3x4(0.0f); float3x4 m1 = float3x4(0.0f); float3 undefined = 0.0f; @@ -75,26 +75,32 @@ void main_1(constant buf1& x_6, constant buf0& x_15, thread float4* const tint_s int const x_31 = x_6.x_GLF_uniform_int_values.arr[9].el; int const x_32 = x_6.x_GLF_uniform_int_values.arr[9].el; int const x_33 = x_6.x_GLF_uniform_int_values.arr[4].el; - *(tint_symbol_4) = float4(float(x_30), float(x_31), float(x_32), float(x_33)); + *(tint_symbol_3) = float4(float(x_30), float(x_31), float(x_32), float(x_33)); } else { int const x_34 = x_6.x_GLF_uniform_int_values.arr[9].el; float const x_146 = float(x_34); - *(tint_symbol_4) = float4(x_146, x_146, x_146, x_146); + *(tint_symbol_3) = float4(x_146, x_146, x_146, x_146); } float const x_149 = v0.x; float const x_151 = v1.x; if ((x_149 < x_151)) { float const x_156 = x_15.x_GLF_uniform_float_values.arr[0].el; - (*(tint_symbol_4)).y = x_156; + (*(tint_symbol_3)).y = x_156; } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_15 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_15, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_15, thread float4* const tint_symbol_4) { + main_1(x_6, x_15, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_15 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_15, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.hlsl index 7fc33ee60d..7fed83686e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.hlsl @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.msl index 1b780b8900..62f061601e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; float4 v = 0.0f; int const x_30 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -36,7 +36,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { if ((int(x_42) > x_44)) { int const x_49 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_50 = float(x_49); - *(tint_symbol_4) = float4(x_50, x_50, x_50, x_50); + *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50); return; } { @@ -48,15 +48,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_61 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_64 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); + *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.hlsl index 7fc33ee60d..7fed83686e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.hlsl @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.msl index 1b780b8900..62f061601e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; float4 v = 0.0f; int const x_30 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -36,7 +36,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { if ((int(x_42) > x_44)) { int const x_49 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_50 = float(x_49); - *(tint_symbol_4) = float4(x_50, x_50, x_50, x_50); + *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50); return; } { @@ -48,15 +48,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_61 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_64 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); + *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.hlsl index 82c801a8dd..4b0f99151f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.hlsl @@ -15,8 +15,8 @@ void main_1() { const int x_40 = asint(x_7[1].x); const int x_42 = asint(x_7[1].x); const int x_44 = asint(x_7[1].x); - const int tint_symbol_6[3] = {x_40, x_42, x_44}; - arr = tint_symbol_6; + const int tint_symbol_5[3] = {x_40, x_42, x_44}; + arr = tint_symbol_5; const uint scalar_offset = ((16u * uint(0))) / 4; const int x_47 = asint(x_7[scalar_offset / 4][scalar_offset % 4]); const int x_49 = arr[x_47]; @@ -58,11 +58,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.msl index 24f173cfd6..ace5774b57 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.msl @@ -27,11 +27,11 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper_2 arr = {}; int a = 0; int b = 0; @@ -39,14 +39,14 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s int const x_40 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_44 = x_7.x_GLF_uniform_int_values.arr[1].el; - tint_array_wrapper_2 const tint_symbol_4 = {.arr={x_40, x_42, x_44}}; - arr = tint_symbol_4; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_40, x_42, x_44}}; + arr = tint_symbol_2; int const x_47 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_49 = arr.arr[x_47]; a = x_49; int const x_50 = a; b = as_type((as_type(x_50) - as_type(1))); - float const x_53 = (*(tint_symbol_6)).x; + float const x_53 = (*(tint_symbol_4)).x; float const x_55 = x_11.x_GLF_uniform_float_values.arr[0].el; if ((x_53 < x_55)) { int const x_59 = b; @@ -67,17 +67,23 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s int const x_84 = arr.arr[x_82]; int const x_87 = x_7.x_GLF_uniform_int_values.arr[2].el; int const x_89 = arr.arr[x_87]; - *(tint_symbol_7) = float4(float(x_74), float(x_79), float(x_84), float(x_89)); + *(tint_symbol_5) = float4(float(x_74), float(x_79), float(x_84), float(x_89)); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_7, x_11, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_7, x_11, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.hlsl index 82c801a8dd..4b0f99151f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.hlsl @@ -15,8 +15,8 @@ void main_1() { const int x_40 = asint(x_7[1].x); const int x_42 = asint(x_7[1].x); const int x_44 = asint(x_7[1].x); - const int tint_symbol_6[3] = {x_40, x_42, x_44}; - arr = tint_symbol_6; + const int tint_symbol_5[3] = {x_40, x_42, x_44}; + arr = tint_symbol_5; const uint scalar_offset = ((16u * uint(0))) / 4; const int x_47 = asint(x_7[scalar_offset / 4][scalar_offset % 4]); const int x_49 = arr[x_47]; @@ -58,11 +58,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.msl index 24f173cfd6..ace5774b57 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.msl @@ -27,11 +27,11 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper_2 arr = {}; int a = 0; int b = 0; @@ -39,14 +39,14 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s int const x_40 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_44 = x_7.x_GLF_uniform_int_values.arr[1].el; - tint_array_wrapper_2 const tint_symbol_4 = {.arr={x_40, x_42, x_44}}; - arr = tint_symbol_4; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_40, x_42, x_44}}; + arr = tint_symbol_2; int const x_47 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_49 = arr.arr[x_47]; a = x_49; int const x_50 = a; b = as_type((as_type(x_50) - as_type(1))); - float const x_53 = (*(tint_symbol_6)).x; + float const x_53 = (*(tint_symbol_4)).x; float const x_55 = x_11.x_GLF_uniform_float_values.arr[0].el; if ((x_53 < x_55)) { int const x_59 = b; @@ -67,17 +67,23 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s int const x_84 = arr.arr[x_82]; int const x_87 = x_7.x_GLF_uniform_int_values.arr[2].el; int const x_89 = arr.arr[x_87]; - *(tint_symbol_7) = float4(float(x_74), float(x_79), float(x_84), float(x_89)); + *(tint_symbol_5) = float4(float(x_74), float(x_79), float(x_84), float(x_89)); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_7, x_11, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_7, x_11, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.hlsl index de01a1a640..34f8a21ad1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.hlsl @@ -30,8 +30,8 @@ void main_1() { const uint scalar_offset = ((16u * uint(0))) / 4; const int x_75 = asint(x_6[scalar_offset / 4][scalar_offset % 4]); const int x_77 = asint(x_6[10].x); - const int tint_symbol_3[10] = {x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77}; - arr0 = tint_symbol_3; + const int tint_symbol_2[10] = {x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77}; + arr0 = tint_symbol_2; const int x_80 = asint(x_6[1].x); const int x_82 = asint(x_6[12].x); const int x_84 = asint(x_6[15].x); @@ -42,8 +42,8 @@ void main_1() { const int x_94 = asint(x_6[11].x); const int x_96 = asint(x_6[18].x); const int x_98 = asint(x_6[19].x); - const int tint_symbol_4[10] = {x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98}; - arr1 = tint_symbol_4; + const int tint_symbol_3[10] = {x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98}; + arr1 = tint_symbol_3; const int x_101 = asint(x_6[8].x); a = x_101; while (true) { @@ -137,8 +137,8 @@ void main_1() { const uint scalar_offset_2 = ((16u * uint(0))) / 4; const int x_212 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]); const int x_214 = asint(x_6[10].x); - const int tint_symbol_5[10] = {x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214}; - ref0 = tint_symbol_5; + const int tint_symbol_4[10] = {x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214}; + ref0 = tint_symbol_4; const int x_217 = asint(x_6[11].x); const int x_219 = asint(x_6[12].x); const int x_221 = asint(x_6[11].x); @@ -149,8 +149,8 @@ void main_1() { const int x_231 = asint(x_6[11].x); const int x_233 = asint(x_6[18].x); const int x_235 = asint(x_6[19].x); - const int tint_symbol_6[10] = {x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235}; - ref1 = tint_symbol_6; + const int tint_symbol_5[10] = {x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235}; + ref1 = tint_symbol_5; const int x_238 = asint(x_6[2].x); const int x_241 = asint(x_6[3].x); const int x_244 = asint(x_6[3].x); @@ -196,9 +196,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_7 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.msl index 60b542ad3a..fdc26d4e92 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.msl @@ -24,7 +24,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_7) { tint_array_wrapper_1 arr0 = {}; tint_array_wrapper_1 arr1 = {}; int a = 0; @@ -47,8 +47,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { int const x_73 = x_6.x_GLF_uniform_int_values.arr[9].el; int const x_75 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_77 = x_6.x_GLF_uniform_int_values.arr[10].el; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77}}; - arr0 = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77}}; + arr0 = tint_symbol_2; int const x_80 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_82 = x_6.x_GLF_uniform_int_values.arr[12].el; int const x_84 = x_6.x_GLF_uniform_int_values.arr[15].el; @@ -59,8 +59,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { int const x_94 = x_6.x_GLF_uniform_int_values.arr[11].el; int const x_96 = x_6.x_GLF_uniform_int_values.arr[18].el; int const x_98 = x_6.x_GLF_uniform_int_values.arr[19].el; - tint_array_wrapper_1 const tint_symbol_4 = {.arr={x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98}}; - arr1 = tint_symbol_4; + tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98}}; + arr1 = tint_symbol_3; int const x_101 = x_6.x_GLF_uniform_int_values.arr[8].el; a = x_101; while (true) { @@ -169,8 +169,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { int const x_210 = x_6.x_GLF_uniform_int_values.arr[9].el; int const x_212 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_214 = x_6.x_GLF_uniform_int_values.arr[10].el; - tint_array_wrapper_1 const tint_symbol_5 = {.arr={x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214}}; - ref0 = tint_symbol_5; + tint_array_wrapper_1 const tint_symbol_4 = {.arr={x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214}}; + ref0 = tint_symbol_4; int const x_217 = x_6.x_GLF_uniform_int_values.arr[11].el; int const x_219 = x_6.x_GLF_uniform_int_values.arr[12].el; int const x_221 = x_6.x_GLF_uniform_int_values.arr[11].el; @@ -181,13 +181,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { int const x_231 = x_6.x_GLF_uniform_int_values.arr[11].el; int const x_233 = x_6.x_GLF_uniform_int_values.arr[18].el; int const x_235 = x_6.x_GLF_uniform_int_values.arr[19].el; - tint_array_wrapper_1 const tint_symbol_6 = {.arr={x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235}}; - ref1 = tint_symbol_6; + tint_array_wrapper_1 const tint_symbol_5 = {.arr={x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235}}; + ref1 = tint_symbol_5; int const x_238 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_241 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_244 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_247 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_8) = float4(float(x_238), float(x_241), float(x_244), float(x_247)); + *(tint_symbol_7) = float4(float(x_238), float(x_241), float(x_244), float(x_247)); int const x_251 = x_6.x_GLF_uniform_int_values.arr[3].el; i = x_251; while (true) { @@ -217,7 +217,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { if (x_278) { int const x_282 = x_6.x_GLF_uniform_int_values.arr[3].el; float const x_283 = float(x_282); - *(tint_symbol_8) = float4(x_283, x_283, x_283, x_283); + *(tint_symbol_7) = float4(x_283, x_283, x_283, x_283); } { int const x_285 = i; @@ -227,11 +227,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - main_1(x_6, &(tint_symbol_9)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_1 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_8) { + main_1(x_6, tint_symbol_8); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.hlsl index de01a1a640..34f8a21ad1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.hlsl @@ -30,8 +30,8 @@ void main_1() { const uint scalar_offset = ((16u * uint(0))) / 4; const int x_75 = asint(x_6[scalar_offset / 4][scalar_offset % 4]); const int x_77 = asint(x_6[10].x); - const int tint_symbol_3[10] = {x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77}; - arr0 = tint_symbol_3; + const int tint_symbol_2[10] = {x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77}; + arr0 = tint_symbol_2; const int x_80 = asint(x_6[1].x); const int x_82 = asint(x_6[12].x); const int x_84 = asint(x_6[15].x); @@ -42,8 +42,8 @@ void main_1() { const int x_94 = asint(x_6[11].x); const int x_96 = asint(x_6[18].x); const int x_98 = asint(x_6[19].x); - const int tint_symbol_4[10] = {x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98}; - arr1 = tint_symbol_4; + const int tint_symbol_3[10] = {x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98}; + arr1 = tint_symbol_3; const int x_101 = asint(x_6[8].x); a = x_101; while (true) { @@ -137,8 +137,8 @@ void main_1() { const uint scalar_offset_2 = ((16u * uint(0))) / 4; const int x_212 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]); const int x_214 = asint(x_6[10].x); - const int tint_symbol_5[10] = {x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214}; - ref0 = tint_symbol_5; + const int tint_symbol_4[10] = {x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214}; + ref0 = tint_symbol_4; const int x_217 = asint(x_6[11].x); const int x_219 = asint(x_6[12].x); const int x_221 = asint(x_6[11].x); @@ -149,8 +149,8 @@ void main_1() { const int x_231 = asint(x_6[11].x); const int x_233 = asint(x_6[18].x); const int x_235 = asint(x_6[19].x); - const int tint_symbol_6[10] = {x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235}; - ref1 = tint_symbol_6; + const int tint_symbol_5[10] = {x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235}; + ref1 = tint_symbol_5; const int x_238 = asint(x_6[2].x); const int x_241 = asint(x_6[3].x); const int x_244 = asint(x_6[3].x); @@ -196,9 +196,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_7 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.msl index 60b542ad3a..fdc26d4e92 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.msl @@ -24,7 +24,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_7) { tint_array_wrapper_1 arr0 = {}; tint_array_wrapper_1 arr1 = {}; int a = 0; @@ -47,8 +47,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { int const x_73 = x_6.x_GLF_uniform_int_values.arr[9].el; int const x_75 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_77 = x_6.x_GLF_uniform_int_values.arr[10].el; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77}}; - arr0 = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77}}; + arr0 = tint_symbol_2; int const x_80 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_82 = x_6.x_GLF_uniform_int_values.arr[12].el; int const x_84 = x_6.x_GLF_uniform_int_values.arr[15].el; @@ -59,8 +59,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { int const x_94 = x_6.x_GLF_uniform_int_values.arr[11].el; int const x_96 = x_6.x_GLF_uniform_int_values.arr[18].el; int const x_98 = x_6.x_GLF_uniform_int_values.arr[19].el; - tint_array_wrapper_1 const tint_symbol_4 = {.arr={x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98}}; - arr1 = tint_symbol_4; + tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98}}; + arr1 = tint_symbol_3; int const x_101 = x_6.x_GLF_uniform_int_values.arr[8].el; a = x_101; while (true) { @@ -169,8 +169,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { int const x_210 = x_6.x_GLF_uniform_int_values.arr[9].el; int const x_212 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_214 = x_6.x_GLF_uniform_int_values.arr[10].el; - tint_array_wrapper_1 const tint_symbol_5 = {.arr={x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214}}; - ref0 = tint_symbol_5; + tint_array_wrapper_1 const tint_symbol_4 = {.arr={x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214}}; + ref0 = tint_symbol_4; int const x_217 = x_6.x_GLF_uniform_int_values.arr[11].el; int const x_219 = x_6.x_GLF_uniform_int_values.arr[12].el; int const x_221 = x_6.x_GLF_uniform_int_values.arr[11].el; @@ -181,13 +181,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { int const x_231 = x_6.x_GLF_uniform_int_values.arr[11].el; int const x_233 = x_6.x_GLF_uniform_int_values.arr[18].el; int const x_235 = x_6.x_GLF_uniform_int_values.arr[19].el; - tint_array_wrapper_1 const tint_symbol_6 = {.arr={x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235}}; - ref1 = tint_symbol_6; + tint_array_wrapper_1 const tint_symbol_5 = {.arr={x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235}}; + ref1 = tint_symbol_5; int const x_238 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_241 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_244 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_247 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_8) = float4(float(x_238), float(x_241), float(x_244), float(x_247)); + *(tint_symbol_7) = float4(float(x_238), float(x_241), float(x_244), float(x_247)); int const x_251 = x_6.x_GLF_uniform_int_values.arr[3].el; i = x_251; while (true) { @@ -217,7 +217,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { if (x_278) { int const x_282 = x_6.x_GLF_uniform_int_values.arr[3].el; float const x_283 = float(x_282); - *(tint_symbol_8) = float4(x_283, x_283, x_283, x_283); + *(tint_symbol_7) = float4(x_283, x_283, x_283, x_283); } { int const x_285 = i; @@ -227,11 +227,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - main_1(x_6, &(tint_symbol_9)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_1 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_8) { + main_1(x_6, tint_symbol_8); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.hlsl index 841bebfb4c..ade1ece525 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.hlsl @@ -86,9 +86,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.msl index f541d0e056..de0a874202 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float4 v1 = 0.0f; float4 v2 = 0.0f; float4 v3 = 0.0f; @@ -44,7 +44,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float4 const x_54 = v3; v4 = smoothstep(x_52, x_53, x_54); float4 const x_56 = v4; - *(tint_symbol_4) = float4(x_56.x, x_56.y, x_56.w, x_56.x); + *(tint_symbol_3) = float4(x_56.x, x_56.y, x_56.w, x_56.x); float const x_59 = v4.x; float const x_61 = x_6.x_GLF_uniform_float_values.arr[4].el; bool const x_62 = (x_59 > x_61); @@ -85,19 +85,25 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_101 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_103 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_105 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_99, x_101, x_103, x_105); + *(tint_symbol_3) = float4(x_99, x_101, x_103, x_105); } else { float const x_108 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_108, x_108, x_108, x_108); + *(tint_symbol_3) = float4(x_108, x_108, x_108, x_108); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.hlsl index 2624127f25..26aeb1f780 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.hlsl @@ -86,9 +86,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.msl index 66032b1060..b77e17c90e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float4 v1 = 0.0f; float4 v2 = 0.0f; float4 v3 = 0.0f; @@ -44,7 +44,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float4 const x_54 = v3; v4 = smoothstep(x_52, x_53, x_54); float4 const x_56 = v4; - *(tint_symbol_4) = float4(x_56.x, x_56.y, x_56.w, x_56.x); + *(tint_symbol_3) = float4(x_56.x, x_56.y, x_56.w, x_56.x); float const x_59 = v4.x; float const x_61 = x_6.x_GLF_uniform_float_values.arr[4].el; bool const x_62 = (x_59 > x_61); @@ -85,19 +85,25 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_101 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_103 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_105 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_99, x_101, x_103, x_105); + *(tint_symbol_3) = float4(x_99, x_101, x_103, x_105); } else { float const x_108 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_108, x_108, x_108, x_108); + *(tint_symbol_3) = float4(x_108, x_108, x_108, x_108); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.hlsl index be0338b3f2..d25ae2ce2a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.hlsl @@ -54,9 +54,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.msl index 7559de0360..12462b9423 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) { float4 v = 0.0f; float f = 0.0f; bool x_56 = false; @@ -55,20 +55,26 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_65 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_68 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_71 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_62), float(x_65), float(x_68), float(x_71)); + *(tint_symbol_3) = float4(float(x_62), float(x_65), float(x_68), float(x_71)); } else { int const x_75 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_76 = float(x_75); - *(tint_symbol_4) = float4(x_76, x_76, x_76, x_76); + *(tint_symbol_3) = float4(x_76, x_76, x_76, x_76); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.hlsl index be0338b3f2..d25ae2ce2a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.hlsl @@ -54,9 +54,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.msl index 7559de0360..12462b9423 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) { float4 v = 0.0f; float f = 0.0f; bool x_56 = false; @@ -55,20 +55,26 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_65 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_68 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_71 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_62), float(x_65), float(x_68), float(x_71)); + *(tint_symbol_3) = float4(float(x_62), float(x_65), float(x_68), float(x_71)); } else { int const x_75 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_76 = float(x_75); - *(tint_symbol_4) = float4(x_76, x_76, x_76, x_76); + *(tint_symbol_3) = float4(x_76, x_76, x_76, x_76); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.spvasm.expected.msl index 89cd26027b..a5a977a8f4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.spvasm.expected.msl @@ -20,7 +20,7 @@ int func_i1_(thread int* const x) { return x_49; } -void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) { int a = 0; int b = 0; int param = 0; @@ -44,18 +44,24 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { } } if ((x_37 == as_type(3))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl.expected.msl index 89cd26027b..a5a977a8f4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl.expected.msl @@ -20,7 +20,7 @@ int func_i1_(thread int* const x) { return x_49; } -void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) { int a = 0; int b = 0; int param = 0; @@ -44,18 +44,24 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { } } if ((x_37 == as_type(3))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.hlsl index ff5511e11a..813911249d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.hlsl @@ -61,11 +61,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.msl index 1cfbbb0eb2..f7867d5060 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.msl @@ -24,15 +24,15 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -int f1_(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_5) { +int f1_(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_3) { int a = 0; int i = 0; a = 256; - float const x_65 = (*(tint_symbol_5)).y; + float const x_65 = (*(tint_symbol_3)).y; float const x_67 = x_8.x_GLF_uniform_float_values.arr[0].el; if ((x_65 > x_67)) { int const x_71 = a; @@ -50,9 +50,9 @@ int f1_(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbo return x_83; } -void main_1(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { int a_1 = 0; - int const x_38 = f1_(x_8, x_11, tint_symbol_6); + int const x_38 = f1_(x_8, x_11, tint_symbol_4); a_1 = x_38; int const x_39 = a_1; int const x_41 = x_11.x_GLF_uniform_int_values.arr[2].el; @@ -61,22 +61,28 @@ void main_1(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_s int const x_50 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_53 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_56 = x_11.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_7) = float4(float(x_47), float(x_50), float(x_53), float(x_56)); + *(tint_symbol_5) = float4(float(x_47), float(x_50), float(x_53), float(x_56)); } else { int const x_60 = x_11.x_GLF_uniform_int_values.arr[1].el; float const x_61 = float(x_60); - *(tint_symbol_7) = float4(x_61, x_61, x_61, x_61); + *(tint_symbol_5) = float4(x_61, x_61, x_61, x_61); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_8, x_11, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_8, x_11, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.hlsl index ff5511e11a..813911249d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.hlsl @@ -61,11 +61,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.msl index 1cfbbb0eb2..f7867d5060 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.msl @@ -24,15 +24,15 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -int f1_(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_5) { +int f1_(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_3) { int a = 0; int i = 0; a = 256; - float const x_65 = (*(tint_symbol_5)).y; + float const x_65 = (*(tint_symbol_3)).y; float const x_67 = x_8.x_GLF_uniform_float_values.arr[0].el; if ((x_65 > x_67)) { int const x_71 = a; @@ -50,9 +50,9 @@ int f1_(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbo return x_83; } -void main_1(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { int a_1 = 0; - int const x_38 = f1_(x_8, x_11, tint_symbol_6); + int const x_38 = f1_(x_8, x_11, tint_symbol_4); a_1 = x_38; int const x_39 = a_1; int const x_41 = x_11.x_GLF_uniform_int_values.arr[2].el; @@ -61,22 +61,28 @@ void main_1(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_s int const x_50 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_53 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_56 = x_11.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_7) = float4(float(x_47), float(x_50), float(x_53), float(x_56)); + *(tint_symbol_5) = float4(float(x_47), float(x_50), float(x_53), float(x_56)); } else { int const x_60 = x_11.x_GLF_uniform_int_values.arr[1].el; float const x_61 = float(x_60); - *(tint_symbol_7) = float4(x_61, x_61, x_61, x_61); + *(tint_symbol_5) = float4(x_61, x_61, x_61, x_61); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_8, x_11, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_8, x_11, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.hlsl index d241a8e85c..ef9a28da94 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.hlsl @@ -59,9 +59,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.msl index be7c5a2721..d0803c549d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int x_28 = 0; int x_29 = 0; int x_28_phi = 0; @@ -56,20 +56,26 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { float const x_51 = float(x_50); int const x_53 = x_5.x_GLF_uniform_int_values.arr[1].el; float const x_54 = float(x_53); - *(tint_symbol_4) = float4(x_51, x_54, x_54, x_51); + *(tint_symbol_3) = float4(x_51, x_54, x_54, x_51); } else { int const x_57 = x_5.x_GLF_uniform_int_values.arr[1].el; float const x_58 = float(x_57); - *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.hlsl index d241a8e85c..ef9a28da94 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.hlsl @@ -59,9 +59,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.msl index be7c5a2721..d0803c549d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int x_28 = 0; int x_29 = 0; int x_28_phi = 0; @@ -56,20 +56,26 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { float const x_51 = float(x_50); int const x_53 = x_5.x_GLF_uniform_int_values.arr[1].el; float const x_54 = float(x_53); - *(tint_symbol_4) = float4(x_51, x_54, x_54, x_51); + *(tint_symbol_3) = float4(x_51, x_54, x_54, x_51); } else { int const x_57 = x_5.x_GLF_uniform_int_values.arr[1].el; float const x_58 = float(x_57); - *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.hlsl index 53fa4d4454..039913f9af 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.hlsl @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.msl index d5bab816b1..7a45463fb6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf2& x_6, constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf2& x_6, constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3) { int a = 0; int x_32 = 0; float const x_34 = x_6.zero; @@ -52,20 +52,26 @@ void main_1(constant buf2& x_6, constant buf0& x_8, constant buf1& x_10, thread int const x_60 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_63 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_66 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_57), float(x_60), float(x_63), float(x_66)); + *(tint_symbol_3) = float4(float(x_57), float(x_60), float(x_63), float(x_66)); } else { int const x_70 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_71 = float(x_70); - *(tint_symbol_4) = float4(x_71, x_71, x_71, x_71); + *(tint_symbol_3) = float4(x_71, x_71, x_71, x_71); } return; } -fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf2& x_6, constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.hlsl index 53fa4d4454..039913f9af 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.hlsl @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.msl index d5bab816b1..7a45463fb6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf2& x_6, constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf2& x_6, constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3) { int a = 0; int x_32 = 0; float const x_34 = x_6.zero; @@ -52,20 +52,26 @@ void main_1(constant buf2& x_6, constant buf0& x_8, constant buf1& x_10, thread int const x_60 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_63 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_66 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_57), float(x_60), float(x_63), float(x_66)); + *(tint_symbol_3) = float4(float(x_57), float(x_60), float(x_63), float(x_66)); } else { int const x_70 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_71 = float(x_70); - *(tint_symbol_4) = float4(x_71, x_71, x_71, x_71); + *(tint_symbol_3) = float4(x_71, x_71, x_71, x_71); } return; } -fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf2& x_6, constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.hlsl index 400e058896..53ef0803f3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.hlsl @@ -92,11 +92,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.msl index b50ffb6fb1..6f4d4bf257 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.msl @@ -4,11 +4,11 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float4 c = 0.0f; int a = 0; int i1 = 0; @@ -124,7 +124,7 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } } { - float const x_123 = (*(tint_symbol_5)).x; + float const x_123 = (*(tint_symbol_3)).x; if ((x_123 < -1.0f)) { } else { break; @@ -132,7 +132,7 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } } { - float const x_126 = (*(tint_symbol_5)).y; + float const x_126 = (*(tint_symbol_3)).y; if ((x_126 < -1.0f)) { } else { break; @@ -140,17 +140,23 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } } float4 const x_128 = c; - *(tint_symbol_6) = x_128; + *(tint_symbol_4) = x_128; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.hlsl index 400e058896..53ef0803f3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.hlsl @@ -92,11 +92,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.msl index b50ffb6fb1..6f4d4bf257 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.msl @@ -4,11 +4,11 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float4 c = 0.0f; int a = 0; int i1 = 0; @@ -124,7 +124,7 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } } { - float const x_123 = (*(tint_symbol_5)).x; + float const x_123 = (*(tint_symbol_3)).x; if ((x_123 < -1.0f)) { } else { break; @@ -132,7 +132,7 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } } { - float const x_126 = (*(tint_symbol_5)).y; + float const x_126 = (*(tint_symbol_3)).y; if ((x_126 < -1.0f)) { } else { break; @@ -140,17 +140,23 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } } float4 const x_128 = c; - *(tint_symbol_6) = x_128; + *(tint_symbol_4) = x_128; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.hlsl index 2d3af226ec..dc1d29ce2f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.hlsl @@ -120,9 +120,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl index 0972c1e1c1..c933708684 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) { tint_array_wrapper_2 sums = {}; int a = 0; int b = 0; @@ -138,20 +138,26 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_50 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_52 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_49), float(x_50), float(x_51), float(x_52)); + *(tint_symbol_3) = float4(float(x_49), float(x_50), float(x_51), float(x_52)); } else { int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_173 = float(x_53); - *(tint_symbol_4) = float4(x_173, x_173, x_173, x_173); + *(tint_symbol_3) = float4(x_173, x_173, x_173, x_173); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.hlsl index 2d3af226ec..dc1d29ce2f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.hlsl @@ -120,9 +120,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl index 0972c1e1c1..c933708684 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) { tint_array_wrapper_2 sums = {}; int a = 0; int b = 0; @@ -138,20 +138,26 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_50 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_52 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_49), float(x_50), float(x_51), float(x_52)); + *(tint_symbol_3) = float4(float(x_49), float(x_50), float(x_51), float(x_52)); } else { int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_173 = float(x_53); - *(tint_symbol_4) = float4(x_173, x_173, x_173, x_173); + *(tint_symbol_3) = float4(x_173, x_173, x_173, x_173); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.hlsl index 77a66e879b..d2b950374c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.hlsl @@ -30,9 +30,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.msl index 739634ab45..c2932f4387 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; f = 142.699996948f; float const x_25 = f; @@ -27,20 +27,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_36 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_39 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_42 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_33), float(x_36), float(x_39), float(x_42)); + *(tint_symbol_3) = float4(float(x_33), float(x_36), float(x_39), float(x_42)); } else { int const x_46 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_47 = float(x_46); - *(tint_symbol_4) = float4(x_47, x_47, x_47, x_47); + *(tint_symbol_3) = float4(x_47, x_47, x_47, x_47); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.hlsl index 77a66e879b..d2b950374c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.hlsl @@ -30,9 +30,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.msl index 739634ab45..c2932f4387 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; f = 142.699996948f; float const x_25 = f; @@ -27,20 +27,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_36 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_39 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_42 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_33), float(x_36), float(x_39), float(x_42)); + *(tint_symbol_3) = float4(float(x_33), float(x_36), float(x_39), float(x_42)); } else { int const x_46 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_47 = float(x_46); - *(tint_symbol_4) = float4(x_47, x_47, x_47, x_47); + *(tint_symbol_3) = float4(x_47, x_47, x_47, x_47); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.hlsl index d99ee638d1..6c104ffcad 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.hlsl @@ -16,8 +16,8 @@ void main_1() { const float x_42 = asfloat(x_6[scalar_offset_1 / 4][scalar_offset_1 % 4]); const uint scalar_offset_2 = ((16u * uint(0))) / 4; const float x_44 = asfloat(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]); - const float tint_symbol_4[3] = {x_40, x_42, x_44}; - sums = tint_symbol_4; + const float tint_symbol_3[3] = {x_40, x_42, x_44}; + sums = tint_symbol_3; i = 0; while (true) { const int x_50 = i; @@ -68,9 +68,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.msl index 2fbf155f87..5c389b22cb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.msl @@ -31,15 +31,15 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { tint_array_wrapper_2 sums = {}; int i = 0; float2x4 indexable = float2x4(0.0f); float const x_40 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_42 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_40, x_42, x_44}}; - sums = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_40, x_42, x_44}}; + sums = tint_symbol_2; i = 0; while (true) { int const x_50 = i; @@ -70,20 +70,26 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_90 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_93 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_96 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_87), float(x_90), float(x_93), float(x_96)); + *(tint_symbol_4) = float4(float(x_87), float(x_90), float(x_93), float(x_96)); } else { int const x_100 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_101 = float(x_100); - *(tint_symbol_5) = float4(x_101, x_101, x_101, x_101); + *(tint_symbol_4) = float4(x_101, x_101, x_101, x_101); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { + main_1(x_6, x_9, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.hlsl index d99ee638d1..6c104ffcad 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.hlsl @@ -16,8 +16,8 @@ void main_1() { const float x_42 = asfloat(x_6[scalar_offset_1 / 4][scalar_offset_1 % 4]); const uint scalar_offset_2 = ((16u * uint(0))) / 4; const float x_44 = asfloat(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]); - const float tint_symbol_4[3] = {x_40, x_42, x_44}; - sums = tint_symbol_4; + const float tint_symbol_3[3] = {x_40, x_42, x_44}; + sums = tint_symbol_3; i = 0; while (true) { const int x_50 = i; @@ -68,9 +68,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.msl index 2fbf155f87..5c389b22cb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.msl @@ -31,15 +31,15 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { tint_array_wrapper_2 sums = {}; int i = 0; float2x4 indexable = float2x4(0.0f); float const x_40 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_42 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_40, x_42, x_44}}; - sums = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_40, x_42, x_44}}; + sums = tint_symbol_2; i = 0; while (true) { int const x_50 = i; @@ -70,20 +70,26 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_90 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_93 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_96 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_87), float(x_90), float(x_93), float(x_96)); + *(tint_symbol_4) = float4(float(x_87), float(x_90), float(x_93), float(x_96)); } else { int const x_100 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_101 = float(x_100); - *(tint_symbol_5) = float4(x_101, x_101, x_101, x_101); + *(tint_symbol_4) = float4(x_101, x_101, x_101, x_101); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { + main_1(x_6, x_9, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.hlsl index 9f5ecd9d88..f9af10d731 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.hlsl @@ -40,9 +40,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.msl index 526c96a2e0..3cd5c26ea1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3) { float a = 0.0f; float b = 0.0f; a = 1.0f; @@ -43,20 +43,26 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy int const x_49 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_52 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_55 = x_9.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4((x_44 * x_46), float(x_49), float(x_52), float(x_55)); + *(tint_symbol_3) = float4((x_44 * x_46), float(x_49), float(x_52), float(x_55)); } else { int const x_59 = x_9.x_GLF_uniform_int_values.arr[0].el; float const x_60 = float(x_59); - *(tint_symbol_4) = float4(x_60, x_60, x_60, x_60); + *(tint_symbol_3) = float4(x_60, x_60, x_60, x_60); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_7, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.hlsl index 9f5ecd9d88..f9af10d731 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.hlsl @@ -40,9 +40,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.msl index 526c96a2e0..3cd5c26ea1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3) { float a = 0.0f; float b = 0.0f; a = 1.0f; @@ -43,20 +43,26 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy int const x_49 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_52 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_55 = x_9.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4((x_44 * x_46), float(x_49), float(x_52), float(x_55)); + *(tint_symbol_3) = float4((x_44 * x_46), float(x_49), float(x_52), float(x_55)); } else { int const x_59 = x_9.x_GLF_uniform_int_values.arr[0].el; float const x_60 = float(x_59); - *(tint_symbol_4) = float4(x_60, x_60, x_60, x_60); + *(tint_symbol_3) = float4(x_60, x_60, x_60, x_60); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_7, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.hlsl index 2f20f12748..0354a8eabb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.hlsl @@ -73,9 +73,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl index 95cd418fe5..9a348cbda1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) { float4 v = 0.0f; int i = 0; int const x_40 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -72,20 +72,26 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_125 = x_6.x_GLF_uniform_int_values.arr[4].el; int const x_128 = x_6.x_GLF_uniform_int_values.arr[4].el; int const x_131 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_122), float(x_125), float(x_128), float(x_131)); + *(tint_symbol_3) = float4(float(x_122), float(x_125), float(x_128), float(x_131)); } else { int const x_135 = x_6.x_GLF_uniform_int_values.arr[4].el; float const x_136 = float(x_135); - *(tint_symbol_4) = float4(x_136, x_136, x_136, x_136); + *(tint_symbol_3) = float4(x_136, x_136, x_136, x_136); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.hlsl index 2f20f12748..0354a8eabb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.hlsl @@ -73,9 +73,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl index 95cd418fe5..9a348cbda1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) { float4 v = 0.0f; int i = 0; int const x_40 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -72,20 +72,26 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_125 = x_6.x_GLF_uniform_int_values.arr[4].el; int const x_128 = x_6.x_GLF_uniform_int_values.arr[4].el; int const x_131 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_122), float(x_125), float(x_128), float(x_131)); + *(tint_symbol_3) = float4(float(x_122), float(x_125), float(x_128), float(x_131)); } else { int const x_135 = x_6.x_GLF_uniform_int_values.arr[4].el; float const x_136 = float(x_135); - *(tint_symbol_4) = float4(x_136, x_136, x_136, x_136); + *(tint_symbol_3) = float4(x_136, x_136, x_136, x_136); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.hlsl index 50ae4f32a9..7345f93c2d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.hlsl @@ -42,9 +42,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.msl index 79fe600b8f..6bbaedc0da 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) { float2 v0 = 0.0f; float2 v1 = 0.0f; float const x_36 = x_6.x_GLF_uniform_float_values.arr[1].el; @@ -44,20 +44,26 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_58 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_61 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_64 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); + *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); } else { int const x_68 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_69 = float(x_68); - *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69); + *(tint_symbol_3) = float4(x_69, x_69, x_69, x_69); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.hlsl index 50ae4f32a9..7345f93c2d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.hlsl @@ -42,9 +42,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.msl index 79fe600b8f..6bbaedc0da 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) { float2 v0 = 0.0f; float2 v1 = 0.0f; float const x_36 = x_6.x_GLF_uniform_float_values.arr[1].el; @@ -44,20 +44,26 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_58 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_61 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_64 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); + *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); } else { int const x_68 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_69 = float(x_68); - *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69); + *(tint_symbol_3) = float4(x_69, x_69, x_69, x_69); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.hlsl index 8f6279c8ad..56606d4d20 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.hlsl @@ -41,9 +41,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.msl index 154e81280e..e87cab79f9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) { float2 v0 = 0.0f; float2 v1 = 0.0f; float const x_37 = x_6.x_GLF_uniform_float_values.arr[2].el; @@ -44,20 +44,26 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_62 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_65 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_68 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_59), float(x_62), float(x_65), float(x_68)); + *(tint_symbol_3) = float4(float(x_59), float(x_62), float(x_65), float(x_68)); } else { int const x_72 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_73 = float(x_72); - *(tint_symbol_4) = float4(x_73, x_73, x_73, x_73); + *(tint_symbol_3) = float4(x_73, x_73, x_73, x_73); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.hlsl index 8f6279c8ad..56606d4d20 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.hlsl @@ -41,9 +41,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.msl index 154e81280e..e87cab79f9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) { float2 v0 = 0.0f; float2 v1 = 0.0f; float const x_37 = x_6.x_GLF_uniform_float_values.arr[2].el; @@ -44,20 +44,26 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_62 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_65 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_68 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_59), float(x_62), float(x_65), float(x_68)); + *(tint_symbol_3) = float4(float(x_59), float(x_62), float(x_65), float(x_68)); } else { int const x_72 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_73 = float(x_72); - *(tint_symbol_4) = float4(x_73, x_73, x_73, x_73); + *(tint_symbol_3) = float4(x_73, x_73, x_73, x_73); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.hlsl index 011b17f930..ed9d8cf774 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.hlsl @@ -44,9 +44,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.msl index ef7e17ecf8..f8c35f1e4e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) { float2 v0 = 0.0f; float4 v1 = 0.0f; float4 x_57 = 0.0f; @@ -45,15 +45,21 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy } else { discard_fragment(); } - *(tint_symbol_4) = x_57; + *(tint_symbol_3) = x_57; return; } +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.hlsl index 011b17f930..ed9d8cf774 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.hlsl @@ -44,9 +44,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.msl index ef7e17ecf8..f8c35f1e4e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) { float2 v0 = 0.0f; float4 v1 = 0.0f; float4 x_57 = 0.0f; @@ -45,15 +45,21 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy } else { discard_fragment(); } - *(tint_symbol_4) = x_57; + *(tint_symbol_3) = x_57; return; } +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.hlsl index 9ea252ec7e..4826bc2c32 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.hlsl @@ -109,11 +109,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; + const main_out tint_symbol_7 = {x_GLF_color}; + return tint_symbol_7; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl index 335c044a79..4702f9ae97 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl @@ -37,24 +37,24 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void func0_(constant buf1& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void func0_(constant buf1& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float4 tmp = 0.0f; - float const x_112 = (*(tint_symbol_5)).x; + float const x_112 = (*(tint_symbol_3)).x; float const x_114 = x_8.x_GLF_uniform_float_values.arr[1].el; if ((x_112 > x_114)) { - float4 const x_118 = *(tint_symbol_6); + float4 const x_118 = *(tint_symbol_4); tmp = x_118; } float4 const x_119 = tmp; - *(tint_symbol_6) = x_119; + *(tint_symbol_4) = x_119; return; } -int func1_(constant buf2& x_12, constant buf3& x_14, constant buf1& x_8, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { +int func1_(constant buf2& x_12, constant buf3& x_14, constant buf1& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { int a = 0; int const x_122 = x_12.x_GLF_uniform_int_values.arr[1].el; a = x_122; @@ -68,32 +68,32 @@ int func1_(constant buf2& x_12, constant buf3& x_14, constant buf1& x_8, thread int const x_133 = x_14.three; int const x_135 = x_12.x_GLF_uniform_int_values.arr[1].el; if ((x_133 > x_135)) { - func0_(x_8, tint_symbol_7, tint_symbol_8); + func0_(x_8, tint_symbol_5, tint_symbol_6); int const x_142 = x_12.x_GLF_uniform_int_values.arr[3].el; a = x_142; } else { - func0_(x_8, tint_symbol_7, tint_symbol_8); + func0_(x_8, tint_symbol_5, tint_symbol_6); } } int const x_144 = a; return x_144; } -void main_1(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, constant buf3& x_14, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, constant buf3& x_14, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { int a_1 = 0; int i = 0; int j = 0; - float const x_56 = (*(tint_symbol_9)).x; + float const x_56 = (*(tint_symbol_7)).x; float const x_58 = x_8.x_GLF_uniform_float_values.arr[1].el; if ((x_56 > x_58)) { float const x_64 = x_8.x_GLF_uniform_float_values.arr[0].el; float const x_66 = x_8.x_GLF_uniform_float_values.arr[1].el; float const x_68 = x_8.x_GLF_uniform_float_values.arr[0].el; float const x_70 = x_8.x_GLF_uniform_float_values.arr[2].el; - *(tint_symbol_10) = float4(x_64, x_66, x_68, x_70); + *(tint_symbol_8) = float4(x_64, x_66, x_68, x_70); } else { uint const x_73 = x_16.x_GLF_uniform_uint_values.arr[0].el; - *(tint_symbol_10) = unpack_snorm4x8_to_float(x_73); + *(tint_symbol_8) = unpack_snorm4x8_to_float(x_73); } int const x_76 = x_12.x_GLF_uniform_int_values.arr[2].el; a_1 = x_76; @@ -111,7 +111,7 @@ void main_1(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, consta } else { break; } - int const x_91 = func1_(x_12, x_14, x_8, tint_symbol_9, tint_symbol_10); + int const x_91 = func1_(x_12, x_14, x_8, tint_symbol_7, tint_symbol_8); int const x_92 = a_1; a_1 = as_type((as_type(x_92) + as_type(x_91))); { @@ -128,19 +128,25 @@ void main_1(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, consta int const x_100 = x_12.x_GLF_uniform_int_values.arr[0].el; if ((x_98 == x_100)) { float const x_105 = x_8.x_GLF_uniform_float_values.arr[0].el; - float const x_107 = (*(tint_symbol_10)).z; - (*(tint_symbol_10)).z = (x_107 - x_105); + float const x_107 = (*(tint_symbol_8)).z; + (*(tint_symbol_8)).z = (x_107 - x_105); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_16 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]], constant buf3& x_14 [[buffer(3)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_8, x_16, x_12, x_14, &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, constant buf3& x_14, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_8, x_16, x_12, x_14, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_16 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]], constant buf3& x_14 [[buffer(3)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_16, x_12, x_14, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.hlsl index 9ea252ec7e..4826bc2c32 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.hlsl @@ -109,11 +109,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; + const main_out tint_symbol_7 = {x_GLF_color}; + return tint_symbol_7; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl index 335c044a79..4702f9ae97 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl @@ -37,24 +37,24 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void func0_(constant buf1& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void func0_(constant buf1& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float4 tmp = 0.0f; - float const x_112 = (*(tint_symbol_5)).x; + float const x_112 = (*(tint_symbol_3)).x; float const x_114 = x_8.x_GLF_uniform_float_values.arr[1].el; if ((x_112 > x_114)) { - float4 const x_118 = *(tint_symbol_6); + float4 const x_118 = *(tint_symbol_4); tmp = x_118; } float4 const x_119 = tmp; - *(tint_symbol_6) = x_119; + *(tint_symbol_4) = x_119; return; } -int func1_(constant buf2& x_12, constant buf3& x_14, constant buf1& x_8, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { +int func1_(constant buf2& x_12, constant buf3& x_14, constant buf1& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { int a = 0; int const x_122 = x_12.x_GLF_uniform_int_values.arr[1].el; a = x_122; @@ -68,32 +68,32 @@ int func1_(constant buf2& x_12, constant buf3& x_14, constant buf1& x_8, thread int const x_133 = x_14.three; int const x_135 = x_12.x_GLF_uniform_int_values.arr[1].el; if ((x_133 > x_135)) { - func0_(x_8, tint_symbol_7, tint_symbol_8); + func0_(x_8, tint_symbol_5, tint_symbol_6); int const x_142 = x_12.x_GLF_uniform_int_values.arr[3].el; a = x_142; } else { - func0_(x_8, tint_symbol_7, tint_symbol_8); + func0_(x_8, tint_symbol_5, tint_symbol_6); } } int const x_144 = a; return x_144; } -void main_1(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, constant buf3& x_14, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, constant buf3& x_14, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { int a_1 = 0; int i = 0; int j = 0; - float const x_56 = (*(tint_symbol_9)).x; + float const x_56 = (*(tint_symbol_7)).x; float const x_58 = x_8.x_GLF_uniform_float_values.arr[1].el; if ((x_56 > x_58)) { float const x_64 = x_8.x_GLF_uniform_float_values.arr[0].el; float const x_66 = x_8.x_GLF_uniform_float_values.arr[1].el; float const x_68 = x_8.x_GLF_uniform_float_values.arr[0].el; float const x_70 = x_8.x_GLF_uniform_float_values.arr[2].el; - *(tint_symbol_10) = float4(x_64, x_66, x_68, x_70); + *(tint_symbol_8) = float4(x_64, x_66, x_68, x_70); } else { uint const x_73 = x_16.x_GLF_uniform_uint_values.arr[0].el; - *(tint_symbol_10) = unpack_snorm4x8_to_float(x_73); + *(tint_symbol_8) = unpack_snorm4x8_to_float(x_73); } int const x_76 = x_12.x_GLF_uniform_int_values.arr[2].el; a_1 = x_76; @@ -111,7 +111,7 @@ void main_1(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, consta } else { break; } - int const x_91 = func1_(x_12, x_14, x_8, tint_symbol_9, tint_symbol_10); + int const x_91 = func1_(x_12, x_14, x_8, tint_symbol_7, tint_symbol_8); int const x_92 = a_1; a_1 = as_type((as_type(x_92) + as_type(x_91))); { @@ -128,19 +128,25 @@ void main_1(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, consta int const x_100 = x_12.x_GLF_uniform_int_values.arr[0].el; if ((x_98 == x_100)) { float const x_105 = x_8.x_GLF_uniform_float_values.arr[0].el; - float const x_107 = (*(tint_symbol_10)).z; - (*(tint_symbol_10)).z = (x_107 - x_105); + float const x_107 = (*(tint_symbol_8)).z; + (*(tint_symbol_8)).z = (x_107 - x_105); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_16 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]], constant buf3& x_14 [[buffer(3)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_8, x_16, x_12, x_14, &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, constant buf3& x_14, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_8, x_16, x_12, x_14, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_16 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]], constant buf3& x_14 [[buffer(3)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_16, x_12, x_14, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.hlsl index 87a0b35312..5e80c3fa53 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.hlsl @@ -35,11 +35,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.msl index 1102160caf..2846e5ca09 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.msl @@ -14,38 +14,44 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - float const x_33 = (*(tint_symbol_5)).x; +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + float const x_33 = (*(tint_symbol_3)).x; float const x_35 = x_6.x_GLF_uniform_float_values.arr[0].el; if ((x_33 > x_35)) { float const x_40 = x_6.x_GLF_uniform_float_values.arr[2].el; - *(tint_symbol_6) = float4(x_40, x_40, x_40, x_40); - float const x_43 = (*(tint_symbol_5)).y; + *(tint_symbol_4) = float4(x_40, x_40, x_40, x_40); + float const x_43 = (*(tint_symbol_3)).y; if ((x_43 > x_35)) { float const x_48 = x_6.x_GLF_uniform_float_values.arr[4].el; - *(tint_symbol_6) = float4(x_48, x_48, x_48, x_48); + *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48); } float const x_51 = x_6.x_GLF_uniform_float_values.arr[3].el; - *(tint_symbol_6) = float4(x_51, x_51, x_51, x_51); + *(tint_symbol_4) = float4(x_51, x_51, x_51, x_51); } float const x_54 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_6) = float4(x_35, x_54, x_54, 10.0f); - float4 const x_61 = *(tint_symbol_6); - *(tint_symbol_6) = (float4x4(float4(x_35, 0.0f, 0.0f, 0.0f), float4(0.0f, x_35, 0.0f, 0.0f), float4(0.0f, 0.0f, x_35, 0.0f), float4(0.0f, 0.0f, 0.0f, x_35)) * x_61); + *(tint_symbol_4) = float4(x_35, x_54, x_54, 10.0f); + float4 const x_61 = *(tint_symbol_4); + *(tint_symbol_4) = (float4x4(float4(x_35, 0.0f, 0.0f, 0.0f), float4(0.0f, x_35, 0.0f, 0.0f), float4(0.0f, 0.0f, x_35, 0.0f), float4(0.0f, 0.0f, 0.0f, x_35)) * x_61); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.hlsl index 87a0b35312..5e80c3fa53 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.hlsl @@ -35,11 +35,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.msl index 1102160caf..2846e5ca09 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.msl @@ -14,38 +14,44 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - float const x_33 = (*(tint_symbol_5)).x; +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + float const x_33 = (*(tint_symbol_3)).x; float const x_35 = x_6.x_GLF_uniform_float_values.arr[0].el; if ((x_33 > x_35)) { float const x_40 = x_6.x_GLF_uniform_float_values.arr[2].el; - *(tint_symbol_6) = float4(x_40, x_40, x_40, x_40); - float const x_43 = (*(tint_symbol_5)).y; + *(tint_symbol_4) = float4(x_40, x_40, x_40, x_40); + float const x_43 = (*(tint_symbol_3)).y; if ((x_43 > x_35)) { float const x_48 = x_6.x_GLF_uniform_float_values.arr[4].el; - *(tint_symbol_6) = float4(x_48, x_48, x_48, x_48); + *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48); } float const x_51 = x_6.x_GLF_uniform_float_values.arr[3].el; - *(tint_symbol_6) = float4(x_51, x_51, x_51, x_51); + *(tint_symbol_4) = float4(x_51, x_51, x_51, x_51); } float const x_54 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_6) = float4(x_35, x_54, x_54, 10.0f); - float4 const x_61 = *(tint_symbol_6); - *(tint_symbol_6) = (float4x4(float4(x_35, 0.0f, 0.0f, 0.0f), float4(0.0f, x_35, 0.0f, 0.0f), float4(0.0f, 0.0f, x_35, 0.0f), float4(0.0f, 0.0f, 0.0f, x_35)) * x_61); + *(tint_symbol_4) = float4(x_35, x_54, x_54, 10.0f); + float4 const x_61 = *(tint_symbol_4); + *(tint_symbol_4) = (float4x4(float4(x_35, 0.0f, 0.0f, 0.0f), float4(0.0f, x_35, 0.0f, 0.0f), float4(0.0f, 0.0f, x_35, 0.0f), float4(0.0f, 0.0f, 0.0f, x_35)) * x_61); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.hlsl index f628868a23..4038aef383 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.hlsl @@ -41,9 +41,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.msl index 944acdb205..c881e3fafd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) { bool b = false; b = true; float const x_38 = x_6.v1.x; @@ -39,20 +39,26 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_11 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_12 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_13 = x_8.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_10), float(x_11), float(x_12), float(x_13)); + *(tint_symbol_3) = float4(float(x_10), float(x_11), float(x_12), float(x_13)); } else { int const x_14 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_65 = float(x_14); - *(tint_symbol_4) = float4(x_65, x_65, x_65, x_65); + *(tint_symbol_3) = float4(x_65, x_65, x_65, x_65); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.hlsl index f628868a23..4038aef383 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.hlsl @@ -41,9 +41,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.msl index 944acdb205..c881e3fafd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) { bool b = false; b = true; float const x_38 = x_6.v1.x; @@ -39,20 +39,26 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_11 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_12 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_13 = x_8.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_10), float(x_11), float(x_12), float(x_13)); + *(tint_symbol_3) = float4(float(x_10), float(x_11), float(x_12), float(x_13)); } else { int const x_14 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_65 = float(x_14); - *(tint_symbol_4) = float4(x_65, x_65, x_65, x_65); + *(tint_symbol_3) = float4(x_65, x_65, x_65, x_65); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.hlsl index 6d029f8be5..55d825c9da 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.hlsl @@ -49,9 +49,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.msl index 94b9529312..d38b081bfa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int i = 0; int const x_26 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -49,20 +49,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_61 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_64 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); + *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); } else { int const x_68 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_69 = float(x_68); - *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69); + *(tint_symbol_3) = float4(x_69, x_69, x_69, x_69); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.hlsl index 6d029f8be5..55d825c9da 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.hlsl @@ -49,9 +49,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.msl index 94b9529312..d38b081bfa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int i = 0; int const x_26 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -49,20 +49,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_61 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_64 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); + *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); } else { int const x_68 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_69 = float(x_68); - *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69); + *(tint_symbol_3) = float4(x_69, x_69, x_69, x_69); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.hlsl index 8a9fa57bb7..873f73d284 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.hlsl @@ -54,9 +54,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl index 80079dce25..08bc37980c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread float4* const tint_symbol_3) { int a = 0; int i = 0; a = 1; @@ -39,7 +39,7 @@ void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread int const x_41 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_44 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_38), float(x_41), float(x_44), float(x_47)); + *(tint_symbol_3) = float4(float(x_38), float(x_41), float(x_44), float(x_47)); int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el; i = x_51; while (true) { @@ -67,11 +67,17 @@ void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_9 [[buffer(2)]], constant buf1& x_11 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, x_11, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, x_11, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_9 [[buffer(2)]], constant buf1& x_11 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, x_11, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.hlsl index 8a9fa57bb7..873f73d284 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.hlsl @@ -54,9 +54,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl index 80079dce25..08bc37980c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread float4* const tint_symbol_3) { int a = 0; int i = 0; a = 1; @@ -39,7 +39,7 @@ void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread int const x_41 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_44 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_38), float(x_41), float(x_44), float(x_47)); + *(tint_symbol_3) = float4(float(x_38), float(x_41), float(x_44), float(x_47)); int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el; i = x_51; while (true) { @@ -67,11 +67,17 @@ void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_9 [[buffer(2)]], constant buf1& x_11 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, x_11, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, x_11, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_9 [[buffer(2)]], constant buf1& x_11 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, x_11, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.hlsl index 1009de2ec6..0e7ea3c1f6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.msl index 8e6db1d42d..a11c17fe63 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.msl @@ -11,24 +11,30 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float4 v = 0.0f; float const x_32 = x_6.quarter; v = ceil(float4(424.113006592f, x_32, 1.299999952f, 19.620000839f)); float4 const x_35 = v; if (all((x_35 == float4(425.0f, 1.0f, 2.0f, 20.0f)))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.hlsl index 1009de2ec6..0e7ea3c1f6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.msl index 8e6db1d42d..a11c17fe63 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.msl @@ -11,24 +11,30 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float4 v = 0.0f; float const x_32 = x_6.quarter; v = ceil(float4(424.113006592f, x_32, 1.299999952f, 19.620000839f)); float4 const x_35 = v; if (all((x_35 == float4(425.0f, 1.0f, 2.0f, 20.0f)))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.hlsl index e12b4af067..ddb1d032de 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.hlsl @@ -28,9 +28,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl index 57e7f66998..35277c7fc0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int i = 0; int j = 0; i = 0; @@ -28,18 +28,24 @@ void main_1(thread float4* const tint_symbol_4) { int const x_37 = i; int const x_39 = j; if (((x_37 == 9) & (x_39 == 10))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.hlsl index cef004d6c1..272d437687 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.hlsl @@ -32,9 +32,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.msl index d1907be3ae..c0a47abdfa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int i = 0; int j = 0; i = 0; @@ -28,18 +28,24 @@ void main_1(thread float4* const tint_symbol_4) { int const x_37 = i; int const x_39 = j; if (((x_37 == 9) && (x_39 == 10))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.hlsl index 94f03e4dd6..d2b12a9c5d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.hlsl @@ -21,9 +21,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.msl index 53f9786c72..dea3c08ddc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.msl @@ -11,22 +11,28 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float const x_25 = x_5.zero; float const x_28 = x_5.zero; if (any((float4(clamp(2.0f, x_25, 1.0f), clamp(-1.0f, 0.0f, x_28), 0.0f, 1.0f) != float4(1.0f, 0.0f, 0.0f, 1.0f)))) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.hlsl index 94f03e4dd6..d2b12a9c5d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.hlsl @@ -21,9 +21,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.msl index 53f9786c72..dea3c08ddc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.msl @@ -11,22 +11,28 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float const x_25 = x_5.zero; float const x_28 = x_5.zero; if (any((float4(clamp(2.0f, x_25, 1.0f), clamp(-1.0f, 0.0f, x_28), 0.0f, 1.0f) != float4(1.0f, 0.0f, 0.0f, 1.0f)))) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.hlsl index e17c5d1556..95eb5953d5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.hlsl @@ -25,9 +25,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.msl index 8239923448..3528b012f7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.msl @@ -11,27 +11,33 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); float const x_23 = x_6.one; f = clamp(x_23, 1.0f, 1.0f); float const x_25 = f; float const x_27 = x_6.one; if ((x_25 > x_27)) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { float const x_32 = f; - *(tint_symbol_4) = float4(x_32, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(x_32, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.hlsl index e17c5d1556..95eb5953d5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.hlsl @@ -25,9 +25,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.msl index 8239923448..3528b012f7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.msl @@ -11,27 +11,33 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); float const x_23 = x_6.one; f = clamp(x_23, 1.0f, 1.0f); float const x_25 = f; float const x_27 = x_6.one; if ((x_25 > x_27)) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { float const x_32 = f; - *(tint_symbol_4) = float4(x_32, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(x_32, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.hlsl index 88c13392cc..00db13acb7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.hlsl @@ -31,9 +31,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.msl index d8002a70c0..f8619a44d7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { bool x_36 = false; bool x_37_phi = false; float const x_23 = x_5.fourtytwo; @@ -26,18 +26,24 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } bool const x_37 = x_37_phi; if (x_37) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.hlsl index 88c13392cc..00db13acb7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.hlsl @@ -31,9 +31,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.msl index d8002a70c0..f8619a44d7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { bool x_36 = false; bool x_37_phi = false; float const x_23 = x_5.fourtytwo; @@ -26,18 +26,24 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } bool const x_37 = x_37_phi; if (x_37) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.hlsl index 5c12f10650..b97f10b19d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.hlsl @@ -18,9 +18,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.msl index a096be9109..bbbab38647 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.msl @@ -8,23 +8,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float one = 0.0f; one = 1.0f; float const x_21 = one; if ((dot(float2(2.0f, 1.0f), float2(1.0f, select(x_21, 0.0f, true))) != 2.0f)) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.hlsl index 5c12f10650..b97f10b19d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.hlsl @@ -18,9 +18,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.msl index a096be9109..bbbab38647 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.msl @@ -8,23 +8,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float one = 0.0f; one = 1.0f; float const x_21 = one; if ((dot(float2(2.0f, 1.0f), float2(1.0f, select(x_21, 0.0f, true))) != 2.0f)) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.hlsl index 1ca0a6909c..add5b55962 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.hlsl @@ -25,11 +25,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.msl index 6dd8555503..956c54f336 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.msl @@ -7,28 +7,34 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - float const x_29 = (*(tint_symbol_5)).x; +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + float const x_29 = (*(tint_symbol_3)).x; float const x_31 = x_6.one; if ((3.0f >= clamp(x_29, 1.0f, (2.0f + x_31)))) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.hlsl index 1ca0a6909c..add5b55962 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.hlsl @@ -25,11 +25,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.msl index 6dd8555503..956c54f336 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.msl @@ -7,28 +7,34 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - float const x_29 = (*(tint_symbol_5)).x; +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + float const x_29 = (*(tint_symbol_3)).x; float const x_31 = x_6.one; if ((3.0f >= clamp(x_29, 1.0f, (2.0f + x_31)))) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.hlsl index fa2f46040e..18a3078f20 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.hlsl @@ -64,9 +64,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.msl index e4553afc0a..f7730d2f96 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { int highSigned = 0; uint highUnsigned = 0u; int i = 0; @@ -66,18 +66,24 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { } bool const x_79 = x_79_phi; if (x_79) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.hlsl index fa2f46040e..18a3078f20 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.hlsl @@ -64,9 +64,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.msl index e4553afc0a..f7730d2f96 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { int highSigned = 0; uint highUnsigned = 0u; int i = 0; @@ -66,18 +66,24 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { } bool const x_79 = x_79_phi; if (x_79) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.hlsl index ca4f0b8e54..629e521714 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.hlsl @@ -27,9 +27,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.msl index 553197221e..9e84444964 100755 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.msl @@ -18,25 +18,31 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { if (((1.0f - (1.0f * floor((1.0f / 1.0f)))) <= 0.01f)) { int const x_29 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_32 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_35 = x_5.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(1.0f, float(x_29), float(x_32), float(x_35)); + *(tint_symbol_3) = float4(1.0f, float(x_29), float(x_32), float(x_35)); } else { int const x_39 = x_5.x_GLF_uniform_int_values.arr[0].el; float const x_40 = float(x_39); - *(tint_symbol_4) = float4(x_40, x_40, x_40, x_40); + *(tint_symbol_3) = float4(x_40, x_40, x_40, x_40); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.hlsl index 4cb3c1421e..5c592bc67f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.hlsl @@ -27,9 +27,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.msl index 3108d65839..a5fdea0ad5 100755 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.msl @@ -18,25 +18,31 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { if ((fmod(1.0f, 1.0f) <= 0.01f)) { int const x_29 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_32 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_35 = x_5.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(1.0f, float(x_29), float(x_32), float(x_35)); + *(tint_symbol_3) = float4(1.0f, float(x_29), float(x_32), float(x_35)); } else { int const x_39 = x_5.x_GLF_uniform_int_values.arr[0].el; float const x_40 = float(x_39); - *(tint_symbol_4) = float4(x_40, x_40, x_40, x_40); + *(tint_symbol_3) = float4(x_40, x_40, x_40, x_40); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.hlsl index f6a50e2633..53fefd1f78 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.hlsl @@ -48,9 +48,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.msl index 5954cddd84..cddd816545 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float f = 0.0f; bool x_48 = false; bool x_49_phi = false; @@ -50,20 +50,26 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_57 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_60 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_63 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_54), float(x_57), float(x_60), float(x_63)); + *(tint_symbol_3) = float4(float(x_54), float(x_57), float(x_60), float(x_63)); } else { int const x_67 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_68 = float(x_67); - *(tint_symbol_4) = float4(x_68, x_68, x_68, x_68); + *(tint_symbol_3) = float4(x_68, x_68, x_68, x_68); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.hlsl index f6a50e2633..53fefd1f78 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.hlsl @@ -48,9 +48,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.msl index 5954cddd84..cddd816545 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float f = 0.0f; bool x_48 = false; bool x_49_phi = false; @@ -50,20 +50,26 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_57 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_60 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_63 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_54), float(x_57), float(x_60), float(x_63)); + *(tint_symbol_3) = float4(float(x_54), float(x_57), float(x_60), float(x_63)); } else { int const x_67 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_68 = float(x_67); - *(tint_symbol_4) = float4(x_68, x_68, x_68, x_68); + *(tint_symbol_3) = float4(x_68, x_68, x_68, x_68); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.hlsl index 40ad3c75a3..2d6e50f1ec 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.hlsl @@ -42,9 +42,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.msl index 526a97587d..c4559a8598 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.msl @@ -11,10 +11,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { bool x_30 = false; bool x_31_phi = false; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); float const x_23 = x_5.one; bool const x_24 = (x_23 < 0.0f); x_31_phi = x_24; @@ -35,20 +35,26 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } else { break; } - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); break; } } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.hlsl index 40ad3c75a3..2d6e50f1ec 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.hlsl @@ -42,9 +42,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.msl index 526a97587d..c4559a8598 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.msl @@ -11,10 +11,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { bool x_30 = false; bool x_31_phi = false; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); float const x_23 = x_5.one; bool const x_24 = (x_23 < 0.0f); x_31_phi = x_24; @@ -35,20 +35,26 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } else { break; } - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); break; } } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.hlsl index 3b7aff0930..dd5987c71a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.hlsl @@ -31,9 +31,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.msl index 13962850a2..a3656f268d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; bool x_38 = false; bool x_39_phi = false; @@ -27,18 +27,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } bool const x_39 = x_39_phi; if (x_39) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.hlsl index 3b7aff0930..dd5987c71a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.hlsl @@ -31,9 +31,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.msl index 13962850a2..a3656f268d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; bool x_38 = false; bool x_39_phi = false; @@ -27,18 +27,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } bool const x_39 = x_39_phi; if (x_39) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.hlsl index 527fc4b45f..429b61404c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.hlsl @@ -46,9 +46,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.msl index 51d38f61c7..4f21011943 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float2 x_26 = 0.0f; bool x_39 = false; float2 x_26_phi = 0.0f; @@ -41,18 +41,24 @@ void main_1(thread float4* const tint_symbol_4) { } bool const x_40 = x_40_phi; if (x_40) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.hlsl index 527fc4b45f..429b61404c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.hlsl @@ -46,9 +46,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.msl index 51d38f61c7..4f21011943 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float2 x_26 = 0.0f; bool x_39 = false; float2 x_26_phi = 0.0f; @@ -41,18 +41,24 @@ void main_1(thread float4* const tint_symbol_4) { } bool const x_40 = x_40_phi; if (x_40) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.hlsl index 3067c8aa8b..b66716a076 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.hlsl @@ -18,9 +18,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.msl index b1627260be..cee837a9ba 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.msl @@ -8,24 +8,30 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float f = 0.0f; f = atan2(1.0f, tanh(1.0f)); float const x_21 = f; float const x_23 = f; if (((x_21 > 0.910000026f) & (x_23 < 0.930000007f))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.hlsl index c627f2d98f..51bc1bc599 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.msl index 2bef8185d9..7e20a84040 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.msl @@ -8,24 +8,30 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float f = 0.0f; f = atan2(1.0f, tanh(1.0f)); float const x_21 = f; float const x_23 = f; if (((x_21 > 0.910000026f) && (x_23 < 0.930000007f))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.hlsl index b8364d73ed..e0331b0e00 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.hlsl @@ -72,9 +72,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.msl index 4219d4348a..5383bb276f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.msl @@ -63,7 +63,7 @@ int func_f1_(constant buf0& x_8, thread float* const f) { return 0; } -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { float param = 0.0f; param = 0.699999988f; int const x_34 = func_f1_(x_8, &(param)); @@ -73,20 +73,26 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int const x_45 = x_8.x_GLF_uniform_int_values.arr[2].el; int const x_48 = x_8.x_GLF_uniform_int_values.arr[2].el; int const x_51 = x_8.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); + *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); } else { int const x_55 = x_8.x_GLF_uniform_int_values.arr[2].el; float const x_56 = float(x_55); - *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56); + *(tint_symbol_3) = float4(x_56, x_56, x_56, x_56); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.hlsl index b8364d73ed..e0331b0e00 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.hlsl @@ -72,9 +72,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.msl index 4219d4348a..5383bb276f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.msl @@ -63,7 +63,7 @@ int func_f1_(constant buf0& x_8, thread float* const f) { return 0; } -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { float param = 0.0f; param = 0.699999988f; int const x_34 = func_f1_(x_8, &(param)); @@ -73,20 +73,26 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int const x_45 = x_8.x_GLF_uniform_int_values.arr[2].el; int const x_48 = x_8.x_GLF_uniform_int_values.arr[2].el; int const x_51 = x_8.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); + *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); } else { int const x_55 = x_8.x_GLF_uniform_int_values.arr[2].el; float const x_56 = float(x_55); - *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56); + *(tint_symbol_3) = float4(x_56, x_56, x_56, x_56); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.hlsl index e67d2bc795..2a6bcdd527 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.hlsl @@ -23,9 +23,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.msl index b48da79378..4d278f3d4a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.msl @@ -11,25 +11,31 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2 mixed = 0.0f; float2 const x_30 = x_6.one; mixed = mix(float2(1.0f, 1.0f), x_30, float2(0.5f, 0.5f)); float2 const x_33 = mixed; if (all((x_33 == float2(1.0f, 1.0f)))) { float const x_40 = mixed.x; - *(tint_symbol_4) = float4(x_40, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(x_40, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.hlsl index e67d2bc795..2a6bcdd527 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.hlsl @@ -23,9 +23,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.msl index b48da79378..4d278f3d4a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.msl @@ -11,25 +11,31 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2 mixed = 0.0f; float2 const x_30 = x_6.one; mixed = mix(float2(1.0f, 1.0f), x_30, float2(0.5f, 0.5f)); float2 const x_33 = mixed; if (all((x_33 == float2(1.0f, 1.0f)))) { float const x_40 = mixed.x; - *(tint_symbol_4) = float4(x_40, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(x_40, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.hlsl index ad30a5cbb2..cf1b13a972 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.hlsl @@ -58,9 +58,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.msl index fc4bcb7025..97fc70150e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.msl @@ -21,12 +21,12 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_3) { int const x_28 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_31 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_34 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_37 = x_5.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_28), float(x_31), float(x_34), float(x_37)); + *(tint_symbol_3) = float4(float(x_28), float(x_31), float(x_34), float(x_37)); while (true) { int const x_45 = x_7.zero; int const x_47 = x_5.x_GLF_uniform_int_values.arr[0].el; @@ -59,15 +59,21 @@ void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_sy } int const x_66 = x_5.x_GLF_uniform_int_values.arr[1].el; float const x_67 = float(x_66); - *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67); + *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67); return; } +main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) { + main_1(x_5, x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.hlsl index ad30a5cbb2..cf1b13a972 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.hlsl @@ -58,9 +58,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.msl index fc4bcb7025..97fc70150e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.msl @@ -21,12 +21,12 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_3) { int const x_28 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_31 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_34 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_37 = x_5.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_28), float(x_31), float(x_34), float(x_37)); + *(tint_symbol_3) = float4(float(x_28), float(x_31), float(x_34), float(x_37)); while (true) { int const x_45 = x_7.zero; int const x_47 = x_5.x_GLF_uniform_int_values.arr[0].el; @@ -59,15 +59,21 @@ void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_sy } int const x_66 = x_5.x_GLF_uniform_int_values.arr[1].el; float const x_67 = float(x_66); - *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67); + *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67); return; } +main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) { + main_1(x_5, x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.hlsl index fc32950322..afcae45783 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.hlsl @@ -14,9 +14,9 @@ void main_1() { Array param = (Array)0; int x_19 = 0; int x_20_phi = 0; - const int tint_symbol_3[2] = {0, 0}; - const Array tint_symbol_4 = {tint_symbol_3}; - param = tint_symbol_4; + const int tint_symbol_2[2] = {0, 0}; + const Array tint_symbol_3 = {tint_symbol_2}; + param = tint_symbol_3; x_50 = false; while (true) { int x_19_phi = 0; @@ -63,11 +63,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int func_struct_Array_i1_2_1_(inout Array a) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.msl index a3005e8d0d..976e76d154 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.msl @@ -17,16 +17,16 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) { bool x_50 = false; int x_15 = 0; int x_16 = 0; Array param = {}; int x_19 = 0; int x_20_phi = 0; - tint_array_wrapper const tint_symbol_3 = {.arr={0, 0}}; - Array const tint_symbol_4 = {.values=tint_symbol_3}; - param = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={0, 0}}; + Array const tint_symbol_3 = {.values=tint_symbol_2}; + param = tint_symbol_3; x_50 = false; while (true) { int x_19_phi = 0; @@ -59,19 +59,25 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6) { int const x_20 = x_20_phi; x_16 = x_20; if ((x_20 == 1)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_6) { + main_1(x_8, tint_symbol_6); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { thread float4 tint_symbol_7 = 0.0f; - main_1(x_8, &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_5; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int func_struct_Array_i1_2_1_(constant buf0& x_8, thread Array* const a) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.hlsl index fc32950322..afcae45783 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.hlsl @@ -14,9 +14,9 @@ void main_1() { Array param = (Array)0; int x_19 = 0; int x_20_phi = 0; - const int tint_symbol_3[2] = {0, 0}; - const Array tint_symbol_4 = {tint_symbol_3}; - param = tint_symbol_4; + const int tint_symbol_2[2] = {0, 0}; + const Array tint_symbol_3 = {tint_symbol_2}; + param = tint_symbol_3; x_50 = false; while (true) { int x_19_phi = 0; @@ -63,11 +63,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int func_struct_Array_i1_2_1_(inout Array a) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.msl index a3005e8d0d..976e76d154 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.msl @@ -17,16 +17,16 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) { bool x_50 = false; int x_15 = 0; int x_16 = 0; Array param = {}; int x_19 = 0; int x_20_phi = 0; - tint_array_wrapper const tint_symbol_3 = {.arr={0, 0}}; - Array const tint_symbol_4 = {.values=tint_symbol_3}; - param = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={0, 0}}; + Array const tint_symbol_3 = {.values=tint_symbol_2}; + param = tint_symbol_3; x_50 = false; while (true) { int x_19_phi = 0; @@ -59,19 +59,25 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6) { int const x_20 = x_20_phi; x_16 = x_20; if ((x_20 == 1)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_6) { + main_1(x_8, tint_symbol_6); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { thread float4 tint_symbol_7 = 0.0f; - main_1(x_8, &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_5; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int func_struct_Array_i1_2_1_(constant buf0& x_8, thread Array* const a) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.spvasm.expected.msl index 92b1932fae..1aae8b525f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.spvasm.expected.msl @@ -17,7 +17,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { Array a = {}; Array b = {}; float one = 0.0f; @@ -32,15 +32,21 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { one = 1.0f; } float const x_41 = one; - *(tint_symbol_4) = float4(x_41, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(x_41, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.wgsl.expected.msl index 92b1932fae..1aae8b525f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.wgsl.expected.msl @@ -17,7 +17,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { Array a = {}; Array b = {}; float one = 0.0f; @@ -32,15 +32,21 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { one = 1.0f; } float const x_41 = one; - *(tint_symbol_4) = float4(x_41, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(x_41, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.hlsl index e7e6754715..2ba993eed3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.hlsl @@ -19,8 +19,8 @@ void main_1() { int x_23_1[2] = x_16; x_23_1[0u] = x_12; x_16 = x_23_1; - const Array tint_symbol_3 = {x_16}; - param = tint_symbol_3; + const Array tint_symbol_2 = {x_16}; + param = tint_symbol_2; x_52 = false; while (true) { int x_20_phi = 0; @@ -66,11 +66,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int func_struct_Array_i1_2_1_(inout Array a) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.msl index d77e25435d..9ad9d6e6f9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.msl @@ -17,7 +17,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { bool x_52 = false; int x_17 = 0; int x_18 = 0; @@ -32,8 +32,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) { tint_array_wrapper const x_23 = x_23_1; x_16 = x_23; tint_array_wrapper const x_54 = x_16; - Array const tint_symbol_3 = {.values=x_54}; - param = tint_symbol_3; + Array const tint_symbol_2 = {.values=x_54}; + param = tint_symbol_2; x_52 = false; while (true) { int x_20_phi = 0; @@ -65,19 +65,25 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) { int const x_21 = x_21_phi; x_18 = x_21; if ((x_21 == 42)) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_5) { + main_1(x_8, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { thread float4 tint_symbol_6 = 0.0f; - main_1(x_8, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int func_struct_Array_i1_2_1_(constant buf0& x_8, thread Array* const a) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.hlsl index e7e6754715..2ba993eed3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.hlsl @@ -19,8 +19,8 @@ void main_1() { int x_23_1[2] = x_16; x_23_1[0u] = x_12; x_16 = x_23_1; - const Array tint_symbol_3 = {x_16}; - param = tint_symbol_3; + const Array tint_symbol_2 = {x_16}; + param = tint_symbol_2; x_52 = false; while (true) { int x_20_phi = 0; @@ -66,11 +66,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int func_struct_Array_i1_2_1_(inout Array a) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.msl index d77e25435d..9ad9d6e6f9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.msl @@ -17,7 +17,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { bool x_52 = false; int x_17 = 0; int x_18 = 0; @@ -32,8 +32,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) { tint_array_wrapper const x_23 = x_23_1; x_16 = x_23; tint_array_wrapper const x_54 = x_16; - Array const tint_symbol_3 = {.values=x_54}; - param = tint_symbol_3; + Array const tint_symbol_2 = {.values=x_54}; + param = tint_symbol_2; x_52 = false; while (true) { int x_20_phi = 0; @@ -65,19 +65,25 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) { int const x_21 = x_21_phi; x_18 = x_21; if ((x_21 == 42)) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_5) { + main_1(x_8, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { thread float4 tint_symbol_6 = 0.0f; - main_1(x_8, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int func_struct_Array_i1_2_1_(constant buf0& x_8, thread Array* const a) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.hlsl index 7223823836..420b07f1c0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.hlsl @@ -28,9 +28,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.msl index 2b232fc036..2accd6bf0f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float4 v = 0.0f; float const x_33 = x_6.x_GLF_uniform_float_values.arr[0].el; v = clamp(cosh(float4(1.0f, 1.0f, 1.0f, 1.0f)), float4(x_33, x_33, x_33, x_33), float4(1.0f, 1.0f, 1.0f, 1.0f)); @@ -36,15 +36,21 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_40 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_43 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_46 = v.z; - *(tint_symbol_4) = float4(x_38, float(x_40), float(x_43), x_46); + *(tint_symbol_3) = float4(x_38, float(x_40), float(x_43), x_46); return; } +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.hlsl index 7223823836..420b07f1c0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.hlsl @@ -28,9 +28,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.msl index 2b232fc036..2accd6bf0f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float4 v = 0.0f; float const x_33 = x_6.x_GLF_uniform_float_values.arr[0].el; v = clamp(cosh(float4(1.0f, 1.0f, 1.0f, 1.0f)), float4(x_33, x_33, x_33, x_33), float4(1.0f, 1.0f, 1.0f, 1.0f)); @@ -36,15 +36,21 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_40 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_43 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_46 = v.z; - *(tint_symbol_4) = float4(x_38, float(x_40), float(x_43), x_46); + *(tint_symbol_3) = float4(x_38, float(x_40), float(x_43), x_46); return; } +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.hlsl index 773f4d43c8..da96fe67c1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.hlsl @@ -63,8 +63,8 @@ void main_1() { const int x_89 = asint(x_6[3].x); const int x_91 = asint(x_6[4].x); const int x_93 = b; - const int tint_symbol_3[2] = {x_89, x_91}; - indexable = tint_symbol_3; + const int tint_symbol_2[2] = {x_89, x_91}; + indexable = tint_symbol_2; const int x_95 = indexable[x_93]; a = (a + x_95); { @@ -90,9 +90,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.msl index 439f521d1c..a068caaa91 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int a = 0; int b = 0; int i = 0; @@ -34,7 +34,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { b = x_38; int const x_40 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_41 = float(x_40); - *(tint_symbol_5) = float4(x_41, x_41, x_41, x_41); + *(tint_symbol_4) = float4(x_41, x_41, x_41, x_41); int const x_44 = x_6.x_GLF_uniform_int_values.arr[2].el; i = x_44; while (true) { @@ -80,8 +80,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_89 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_91 = x_6.x_GLF_uniform_int_values.arr[4].el; int const x_93 = b; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_89, x_91}}; - indexable = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_89, x_91}}; + indexable = tint_symbol_2; int const x_95 = indexable.arr[x_93]; int const x_96 = a; a = as_type((as_type(x_96) + as_type(x_95))); @@ -97,16 +97,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_110 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_113 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_116 = x_6.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_5) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); + *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) { + main_1(x_6, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.hlsl index 773f4d43c8..da96fe67c1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.hlsl @@ -63,8 +63,8 @@ void main_1() { const int x_89 = asint(x_6[3].x); const int x_91 = asint(x_6[4].x); const int x_93 = b; - const int tint_symbol_3[2] = {x_89, x_91}; - indexable = tint_symbol_3; + const int tint_symbol_2[2] = {x_89, x_91}; + indexable = tint_symbol_2; const int x_95 = indexable[x_93]; a = (a + x_95); { @@ -90,9 +90,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.msl index 439f521d1c..a068caaa91 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int a = 0; int b = 0; int i = 0; @@ -34,7 +34,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { b = x_38; int const x_40 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_41 = float(x_40); - *(tint_symbol_5) = float4(x_41, x_41, x_41, x_41); + *(tint_symbol_4) = float4(x_41, x_41, x_41, x_41); int const x_44 = x_6.x_GLF_uniform_int_values.arr[2].el; i = x_44; while (true) { @@ -80,8 +80,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_89 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_91 = x_6.x_GLF_uniform_int_values.arr[4].el; int const x_93 = b; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_89, x_91}}; - indexable = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_89, x_91}}; + indexable = tint_symbol_2; int const x_95 = indexable.arr[x_93]; int const x_96 = a; a = as_type((as_type(x_96) + as_type(x_95))); @@ -97,16 +97,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_110 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_113 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_116 = x_6.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_5) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); + *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) { + main_1(x_6, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.hlsl index f8fc44b9b1..6b3aa78ae7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.hlsl @@ -32,8 +32,8 @@ void main_1() { { for(; (i_2 < 10); i_2 = (i_2 + 1)) { const int x_65 = b; - const int tint_symbol_2[2] = {1, 2}; - indexable = tint_symbol_2; + const int tint_symbol_1[2] = {1, 2}; + indexable = tint_symbol_1; const int x_67 = indexable[x_65]; a = (a + x_67); } @@ -51,9 +51,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.msl index 9a7b4b877e..719e00b871 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5) { +void main_1(thread float4* const tint_symbol_4) { int a = 0; int b = 0; int i = 0; @@ -20,7 +20,7 @@ void main_1(thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; a = 0; b = 1; - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); i = 0; while (true) { int const x_38 = i; @@ -57,8 +57,8 @@ void main_1(thread float4* const tint_symbol_5) { break; } int const x_65 = b; - tint_array_wrapper const tint_symbol_3 = {.arr={1, 2}}; - indexable = tint_symbol_3; + tint_array_wrapper const tint_symbol_2 = {.arr={1, 2}}; + indexable = tint_symbol_2; int const x_67 = indexable.arr[x_65]; int const x_68 = a; a = as_type((as_type(x_68) + as_type(x_67))); @@ -69,16 +69,22 @@ void main_1(thread float4* const tint_symbol_5) { } int const x_72 = a; if ((x_72 == 28)) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - main_1(&(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(thread float4* const tint_symbol_5) { + main_1(tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.hlsl index f8fc44b9b1..6b3aa78ae7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.hlsl @@ -32,8 +32,8 @@ void main_1() { { for(; (i_2 < 10); i_2 = (i_2 + 1)) { const int x_65 = b; - const int tint_symbol_2[2] = {1, 2}; - indexable = tint_symbol_2; + const int tint_symbol_1[2] = {1, 2}; + indexable = tint_symbol_1; const int x_67 = indexable[x_65]; a = (a + x_67); } @@ -51,9 +51,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.msl index 9a7b4b877e..719e00b871 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5) { +void main_1(thread float4* const tint_symbol_4) { int a = 0; int b = 0; int i = 0; @@ -20,7 +20,7 @@ void main_1(thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; a = 0; b = 1; - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); i = 0; while (true) { int const x_38 = i; @@ -57,8 +57,8 @@ void main_1(thread float4* const tint_symbol_5) { break; } int const x_65 = b; - tint_array_wrapper const tint_symbol_3 = {.arr={1, 2}}; - indexable = tint_symbol_3; + tint_array_wrapper const tint_symbol_2 = {.arr={1, 2}}; + indexable = tint_symbol_2; int const x_67 = indexable.arr[x_65]; int const x_68 = a; a = as_type((as_type(x_68) + as_type(x_67))); @@ -69,16 +69,22 @@ void main_1(thread float4* const tint_symbol_5) { } int const x_72 = a; if ((x_72 == 28)) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - main_1(&(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(thread float4* const tint_symbol_5) { + main_1(tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.hlsl index ee0a08b3c0..7e814d5ed7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.hlsl @@ -16,8 +16,8 @@ void main_1() { const uint scalar_offset = ((16u * uint(0))) / 4; const float x_40 = asfloat(x_6[scalar_offset / 4][scalar_offset % 4]); const float x_42 = asfloat(x_6[1].x); - const float tint_symbol_4[3] = {x_38, x_40, x_42}; - A1 = tint_symbol_4; + const float tint_symbol_3[3] = {x_38, x_40, x_42}; + A1 = tint_symbol_3; const uint scalar_offset_1 = ((16u * uint(0))) / 4; const int x_45 = asint(x_9[scalar_offset_1 / 4][scalar_offset_1 % 4]); const uint scalar_offset_2 = ((16u * uint(0))) / 4; @@ -69,9 +69,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.msl index 6b19b3695a..f1ca39d89c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { tint_array_wrapper_2 A1 = {}; int a = 0; float b = 0.0f; @@ -40,8 +40,8 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy float const x_38 = x_6.x_GLF_uniform_float_values.arr[2].el; float const x_40 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_42 = x_6.x_GLF_uniform_float_values.arr[1].el; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_38, x_40, x_42}}; - A1 = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_38, x_40, x_42}}; + A1 = tint_symbol_2; int const x_45 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_47 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_49 = x_9.x_GLF_uniform_int_values.arr[1].el; @@ -72,19 +72,25 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_89 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_92 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_95 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_86), float(x_89), float(x_92), float(x_95)); + *(tint_symbol_4) = float4(float(x_86), float(x_89), float(x_92), float(x_95)); } else { float const x_99 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_5) = float4(x_99, x_99, x_99, x_99); + *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) { + main_1(x_6, x_9, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.hlsl index ee0a08b3c0..7e814d5ed7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.hlsl @@ -16,8 +16,8 @@ void main_1() { const uint scalar_offset = ((16u * uint(0))) / 4; const float x_40 = asfloat(x_6[scalar_offset / 4][scalar_offset % 4]); const float x_42 = asfloat(x_6[1].x); - const float tint_symbol_4[3] = {x_38, x_40, x_42}; - A1 = tint_symbol_4; + const float tint_symbol_3[3] = {x_38, x_40, x_42}; + A1 = tint_symbol_3; const uint scalar_offset_1 = ((16u * uint(0))) / 4; const int x_45 = asint(x_9[scalar_offset_1 / 4][scalar_offset_1 % 4]); const uint scalar_offset_2 = ((16u * uint(0))) / 4; @@ -69,9 +69,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.msl index 6b19b3695a..f1ca39d89c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { tint_array_wrapper_2 A1 = {}; int a = 0; float b = 0.0f; @@ -40,8 +40,8 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy float const x_38 = x_6.x_GLF_uniform_float_values.arr[2].el; float const x_40 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_42 = x_6.x_GLF_uniform_float_values.arr[1].el; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_38, x_40, x_42}}; - A1 = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_38, x_40, x_42}}; + A1 = tint_symbol_2; int const x_45 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_47 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_49 = x_9.x_GLF_uniform_int_values.arr[1].el; @@ -72,19 +72,25 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_89 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_92 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_95 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_86), float(x_89), float(x_92), float(x_95)); + *(tint_symbol_4) = float4(float(x_86), float(x_89), float(x_92), float(x_95)); } else { float const x_99 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_5) = float4(x_99, x_99, x_99, x_99); + *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) { + main_1(x_6, x_9, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.hlsl index a8ef20d5a6..8960e11e9d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.hlsl @@ -58,9 +58,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.msl index 64ce0dd54a..6511c455ef 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float4 v = 0.0f; int i = 0; int const x_36 = x_6.x_GLF_uniform_int_values.arr[3].el; @@ -51,20 +51,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_80 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_83 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_86 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_77), float(x_80), float(x_83), float(x_86)); + *(tint_symbol_3) = float4(float(x_77), float(x_80), float(x_83), float(x_86)); } else { int const x_90 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_91 = float(x_90); - *(tint_symbol_4) = float4(x_91, x_91, x_91, x_91); + *(tint_symbol_3) = float4(x_91, x_91, x_91, x_91); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.hlsl index a8ef20d5a6..8960e11e9d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.hlsl @@ -58,9 +58,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.msl index 64ce0dd54a..6511c455ef 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float4 v = 0.0f; int i = 0; int const x_36 = x_6.x_GLF_uniform_int_values.arr[3].el; @@ -51,20 +51,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_80 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_83 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_86 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_77), float(x_80), float(x_83), float(x_86)); + *(tint_symbol_3) = float4(float(x_77), float(x_80), float(x_83), float(x_86)); } else { int const x_90 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_91 = float(x_90); - *(tint_symbol_4) = float4(x_91, x_91, x_91, x_91); + *(tint_symbol_3) = float4(x_91, x_91, x_91, x_91); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.hlsl index 4152b789fa..e2cb540e9a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.hlsl @@ -83,9 +83,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.msl index 3242c118d8..22daaaad75 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.msl @@ -28,13 +28,13 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_f1_(constant buf1& x_7, thread float* const b, thread float4* const tint_symbol_4) { +float func_f1_(constant buf1& x_7, thread float* const b, thread float4* const tint_symbol_3) { float const x_90 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_92 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_94 = x_7.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_90, x_92, x_94, 1.0f); - float4 const x_96 = *(tint_symbol_4); - *(tint_symbol_4) = x_96; + *(tint_symbol_3) = float4(x_90, x_92, x_94, 1.0f); + float4 const x_96 = *(tint_symbol_3); + *(tint_symbol_3) = x_96; float const x_98 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_99 = *(b); if ((x_98 >= x_99)) { @@ -45,7 +45,7 @@ float func_f1_(constant buf1& x_7, thread float* const b, thread float4* const t return x_106; } -void main_1(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_symbol_4) { float a = 0.0f; float param = 0.0f; float param_1 = 0.0f; @@ -53,12 +53,12 @@ void main_1(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_s bool x_72_phi = false; float const x_44 = x_7.x_GLF_uniform_float_values.arr[0].el; param = x_44; - float const x_45 = func_f1_(x_7, &(param), tint_symbol_5); + float const x_45 = func_f1_(x_7, &(param), tint_symbol_4); a = x_45; float const x_47 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_49 = x_7.x_GLF_uniform_float_values.arr[0].el; param_1 = (x_47 + x_49); - float const x_51 = func_f1_(x_7, &(param_1), tint_symbol_5); + float const x_51 = func_f1_(x_7, &(param_1), tint_symbol_4); float const x_52 = a; a = (x_52 + x_51); float const x_54 = a; @@ -66,7 +66,7 @@ void main_1(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_s bool const x_57 = (x_54 == x_56); x_72_phi = x_57; if (x_57) { - float4 const x_60 = *(tint_symbol_5); + float4 const x_60 = *(tint_symbol_4); float const x_62 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_64 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_66 = x_7.x_GLF_uniform_float_values.arr[1].el; @@ -80,20 +80,26 @@ void main_1(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_s int const x_16 = x_12.x_GLF_uniform_int_values.arr[1].el; int const x_17 = x_12.x_GLF_uniform_int_values.arr[1].el; int const x_18 = x_12.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_15), float(x_16), float(x_17), float(x_18)); + *(tint_symbol_4) = float4(float(x_15), float(x_16), float(x_17), float(x_18)); } else { int const x_19 = x_12.x_GLF_uniform_int_values.arr[1].el; float const x_86 = float(x_19); - *(tint_symbol_5) = float4(x_86, x_86, x_86, x_86); + *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_7, x_12, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_symbol_5) { + main_1(x_7, x_12, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_12, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.hlsl index 4152b789fa..e2cb540e9a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.hlsl @@ -83,9 +83,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.msl index 3242c118d8..22daaaad75 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.msl @@ -28,13 +28,13 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_f1_(constant buf1& x_7, thread float* const b, thread float4* const tint_symbol_4) { +float func_f1_(constant buf1& x_7, thread float* const b, thread float4* const tint_symbol_3) { float const x_90 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_92 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_94 = x_7.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_90, x_92, x_94, 1.0f); - float4 const x_96 = *(tint_symbol_4); - *(tint_symbol_4) = x_96; + *(tint_symbol_3) = float4(x_90, x_92, x_94, 1.0f); + float4 const x_96 = *(tint_symbol_3); + *(tint_symbol_3) = x_96; float const x_98 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_99 = *(b); if ((x_98 >= x_99)) { @@ -45,7 +45,7 @@ float func_f1_(constant buf1& x_7, thread float* const b, thread float4* const t return x_106; } -void main_1(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_symbol_4) { float a = 0.0f; float param = 0.0f; float param_1 = 0.0f; @@ -53,12 +53,12 @@ void main_1(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_s bool x_72_phi = false; float const x_44 = x_7.x_GLF_uniform_float_values.arr[0].el; param = x_44; - float const x_45 = func_f1_(x_7, &(param), tint_symbol_5); + float const x_45 = func_f1_(x_7, &(param), tint_symbol_4); a = x_45; float const x_47 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_49 = x_7.x_GLF_uniform_float_values.arr[0].el; param_1 = (x_47 + x_49); - float const x_51 = func_f1_(x_7, &(param_1), tint_symbol_5); + float const x_51 = func_f1_(x_7, &(param_1), tint_symbol_4); float const x_52 = a; a = (x_52 + x_51); float const x_54 = a; @@ -66,7 +66,7 @@ void main_1(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_s bool const x_57 = (x_54 == x_56); x_72_phi = x_57; if (x_57) { - float4 const x_60 = *(tint_symbol_5); + float4 const x_60 = *(tint_symbol_4); float const x_62 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_64 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_66 = x_7.x_GLF_uniform_float_values.arr[1].el; @@ -80,20 +80,26 @@ void main_1(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_s int const x_16 = x_12.x_GLF_uniform_int_values.arr[1].el; int const x_17 = x_12.x_GLF_uniform_int_values.arr[1].el; int const x_18 = x_12.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_15), float(x_16), float(x_17), float(x_18)); + *(tint_symbol_4) = float4(float(x_15), float(x_16), float(x_17), float(x_18)); } else { int const x_19 = x_12.x_GLF_uniform_int_values.arr[1].el; float const x_86 = float(x_19); - *(tint_symbol_5) = float4(x_86, x_86, x_86, x_86); + *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_7, x_12, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_symbol_5) { + main_1(x_7, x_12, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_12, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.hlsl index fdbd6e9f35..9170371178 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.hlsl @@ -36,9 +36,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.msl index b989bf7a6d..4a580c98a5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float a = 0.0f; float const x_30 = x_6.x_GLF_uniform_float_values.arr[1].el; a = x_30; @@ -29,27 +29,33 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_40 = a; a = (x_40 + x_39); float const x_42 = a; - *(tint_symbol_4) = float4(x_42, x_42, x_42, x_42); + *(tint_symbol_3) = float4(x_42, x_42, x_42, x_42); float const x_45 = x_6.x_GLF_uniform_float_values.arr[3].el; float const x_47 = x_6.x_GLF_uniform_float_values.arr[1].el; if ((x_45 > x_47)) { - float const x_52 = (*(tint_symbol_4)).x; + float const x_52 = (*(tint_symbol_3)).x; float const x_53 = a; a = (x_53 + x_52); float const x_56 = x_6.x_GLF_uniform_float_values.arr[2].el; - *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56); + *(tint_symbol_3) = float4(x_56, x_56, x_56, x_56); } } float const x_58 = a; - *(tint_symbol_4) = float4(x_58, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(x_58, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.hlsl index fdbd6e9f35..9170371178 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.hlsl @@ -36,9 +36,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.msl index b989bf7a6d..4a580c98a5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float a = 0.0f; float const x_30 = x_6.x_GLF_uniform_float_values.arr[1].el; a = x_30; @@ -29,27 +29,33 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_40 = a; a = (x_40 + x_39); float const x_42 = a; - *(tint_symbol_4) = float4(x_42, x_42, x_42, x_42); + *(tint_symbol_3) = float4(x_42, x_42, x_42, x_42); float const x_45 = x_6.x_GLF_uniform_float_values.arr[3].el; float const x_47 = x_6.x_GLF_uniform_float_values.arr[1].el; if ((x_45 > x_47)) { - float const x_52 = (*(tint_symbol_4)).x; + float const x_52 = (*(tint_symbol_3)).x; float const x_53 = a; a = (x_53 + x_52); float const x_56 = x_6.x_GLF_uniform_float_values.arr[2].el; - *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56); + *(tint_symbol_3) = float4(x_56, x_56, x_56, x_56); } } float const x_58 = a; - *(tint_symbol_4) = float4(x_58, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(x_58, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.hlsl index eacc3f8b53..236ecb9b9f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.hlsl @@ -44,9 +44,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.msl index 2ce6493af2..18385d0637 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.msl @@ -23,7 +23,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int i = 0; int const x_27 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -49,20 +49,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_55 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_61 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_52), float(x_55), float(x_58), float(x_61)); + *(tint_symbol_3) = float4(float(x_52), float(x_55), float(x_58), float(x_61)); } else { int const x_65 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_66 = float(x_65); - *(tint_symbol_4) = float4(x_66, x_66, x_66, x_66); + *(tint_symbol_3) = float4(x_66, x_66, x_66, x_66); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.hlsl index eacc3f8b53..236ecb9b9f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.hlsl @@ -44,9 +44,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.msl index 2ce6493af2..18385d0637 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.msl @@ -23,7 +23,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int i = 0; int const x_27 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -49,20 +49,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_55 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_61 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_52), float(x_55), float(x_58), float(x_61)); + *(tint_symbol_3) = float4(float(x_52), float(x_55), float(x_58), float(x_61)); } else { int const x_65 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_66 = float(x_65); - *(tint_symbol_4) = float4(x_66, x_66, x_66, x_66); + *(tint_symbol_3) = float4(x_66, x_66, x_66, x_66); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.hlsl index 7c9249ea08..f9cc633638 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.hlsl @@ -45,9 +45,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl index 56fe5a1ae4..4c2b271e5c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) { int a = 0; int b = 0; int i = 0; @@ -44,18 +44,24 @@ void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_s } int const x_54 = b; if ((x_54 == 3)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.hlsl index 7c9249ea08..f9cc633638 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.hlsl @@ -45,9 +45,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl index 56fe5a1ae4..4c2b271e5c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) { int a = 0; int b = 0; int i = 0; @@ -44,18 +44,24 @@ void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_s } int const x_54 = b; if ((x_54 == 3)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.hlsl index 173ce9c99a..73e9ec8a79 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.hlsl @@ -57,9 +57,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.msl index 5eb30b6da1..1280adf116 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; int a = 0; int b = 0; @@ -42,7 +42,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_59 = x_6.one; if ((x_59 == 1.0f)) { while (true) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); { int const x_67 = c; int const x_68 = a; @@ -55,24 +55,30 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } float const x_74 = x_6.one; if ((x_74 == 1.0f)) { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); } } float const x_79 = v.x; float const x_83 = v.y; float const x_87 = v.z; float3 const x_90 = float3(select(0.0f, 1.0f, (x_79 == 1.0f)), select(1.0f, 0.0f, (x_83 == 2.0f)), select(1.0f, 0.0f, (x_87 == 3.0f))); - float4 const x_91 = *(tint_symbol_4); - *(tint_symbol_4) = float4(x_90.x, x_90.y, x_90.z, x_91.w); - (*(tint_symbol_4)).w = 1.0f; + float4 const x_91 = *(tint_symbol_3); + *(tint_symbol_3) = float4(x_90.x, x_90.y, x_90.z, x_91.w); + (*(tint_symbol_3)).w = 1.0f; return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.hlsl index 173ce9c99a..73e9ec8a79 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.hlsl @@ -57,9 +57,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.msl index 5eb30b6da1..1280adf116 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; int a = 0; int b = 0; @@ -42,7 +42,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_59 = x_6.one; if ((x_59 == 1.0f)) { while (true) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); { int const x_67 = c; int const x_68 = a; @@ -55,24 +55,30 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } float const x_74 = x_6.one; if ((x_74 == 1.0f)) { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); } } float const x_79 = v.x; float const x_83 = v.y; float const x_87 = v.z; float3 const x_90 = float3(select(0.0f, 1.0f, (x_79 == 1.0f)), select(1.0f, 0.0f, (x_83 == 2.0f)), select(1.0f, 0.0f, (x_87 == 3.0f))); - float4 const x_91 = *(tint_symbol_4); - *(tint_symbol_4) = float4(x_90.x, x_90.y, x_90.z, x_91.w); - (*(tint_symbol_4)).w = 1.0f; + float4 const x_91 = *(tint_symbol_3); + *(tint_symbol_3) = float4(x_90.x, x_90.y, x_90.z, x_91.w); + (*(tint_symbol_3)).w = 1.0f; return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.hlsl index 0dbbaa933b..e806c84f0e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.hlsl @@ -95,11 +95,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } float func_f1_(inout float x) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.msl index cf634301c1..6cad4788f3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { bool x_29 = false; float x_30 = 0.0f; float x_31 = 0.0f; @@ -106,19 +106,25 @@ void main_1(thread float4* const tint_symbol_4) { } float const x_87 = f; if ((x_87 == 5.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } float func_f1_(thread float* const x) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.hlsl index 0dbbaa933b..e806c84f0e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.hlsl @@ -95,11 +95,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } float func_f1_(inout float x) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.msl index cf634301c1..6cad4788f3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { bool x_29 = false; float x_30 = 0.0f; float x_31 = 0.0f; @@ -106,19 +106,25 @@ void main_1(thread float4* const tint_symbol_4) { } float const x_87 = f; if ((x_87 == 5.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } float func_f1_(thread float* const x) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.spvasm.expected.msl index 031cc10d03..5ed2327010 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.spvasm.expected.msl @@ -10,16 +10,16 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_11, thread float4* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) { int q = 0; int i = 0; int c = 0; q = 0; - float const x_55 = (*(tint_symbol_5)).x; + float const x_55 = (*(tint_symbol_3)).x; i = (int(x_55) % 3); c = 0; while (true) { @@ -29,9 +29,9 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread tint break; } int const x_15 = c; - (*(tint_symbol_6)).arr[x_15] = 0.0f; + (*(tint_symbol_4)).arr[x_15] = 0.0f; int const x_16 = c; - (*(tint_symbol_7)).arr[x_16] = 0.0f; + (*(tint_symbol_5)).arr[x_16] = 0.0f; float const x_65 = x_11.injectionSwitch.x; int const x_18 = q; switch(as_type((as_type(int(x_65)) + as_type(x_18)))) { @@ -43,13 +43,13 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread tint } } int const x_20 = c; - (*(tint_symbol_6)).arr[x_20] = 1.0f; + (*(tint_symbol_4)).arr[x_20] = 1.0f; /* fallthrough */ } case 61: { - (*(tint_symbol_7)).arr[0] = 1.0f; + (*(tint_symbol_5)).arr[0] = 1.0f; int const x_21 = c; - (*(tint_symbol_7)).arr[x_21] = 1.0f; + (*(tint_symbol_5)).arr[x_21] = 1.0f; break; } case 0: { @@ -66,24 +66,30 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread tint } } int const x_24 = i; - float const x_79 = (*(tint_symbol_7)).arr[x_24]; + float const x_79 = (*(tint_symbol_5)).arr[x_24]; int const x_25 = i; - float const x_81 = (*(tint_symbol_6)).arr[x_25]; + float const x_81 = (*(tint_symbol_4)).arr[x_25]; int const x_26 = i; - float const x_83 = (*(tint_symbol_6)).arr[x_26]; - *(tint_symbol_8) = float4(x_79, x_81, x_83, 1.0f); + float const x_83 = (*(tint_symbol_4)).arr[x_26]; + *(tint_symbol_6) = float4(x_79, x_81, x_83, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread tint_array_wrapper tint_symbol_10 = {}; - thread tint_array_wrapper tint_symbol_11 = {}; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(x_11, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(x_11, tint_symbol_7, tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread tint_array_wrapper tint_symbol_12 = {}; + thread tint_array_wrapper tint_symbol_13 = {}; + thread float4 tint_symbol_14 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_11, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl.expected.msl index 031cc10d03..5ed2327010 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl.expected.msl @@ -10,16 +10,16 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_11, thread float4* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) { int q = 0; int i = 0; int c = 0; q = 0; - float const x_55 = (*(tint_symbol_5)).x; + float const x_55 = (*(tint_symbol_3)).x; i = (int(x_55) % 3); c = 0; while (true) { @@ -29,9 +29,9 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread tint break; } int const x_15 = c; - (*(tint_symbol_6)).arr[x_15] = 0.0f; + (*(tint_symbol_4)).arr[x_15] = 0.0f; int const x_16 = c; - (*(tint_symbol_7)).arr[x_16] = 0.0f; + (*(tint_symbol_5)).arr[x_16] = 0.0f; float const x_65 = x_11.injectionSwitch.x; int const x_18 = q; switch(as_type((as_type(int(x_65)) + as_type(x_18)))) { @@ -43,13 +43,13 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread tint } } int const x_20 = c; - (*(tint_symbol_6)).arr[x_20] = 1.0f; + (*(tint_symbol_4)).arr[x_20] = 1.0f; /* fallthrough */ } case 61: { - (*(tint_symbol_7)).arr[0] = 1.0f; + (*(tint_symbol_5)).arr[0] = 1.0f; int const x_21 = c; - (*(tint_symbol_7)).arr[x_21] = 1.0f; + (*(tint_symbol_5)).arr[x_21] = 1.0f; break; } case 0: { @@ -66,24 +66,30 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread tint } } int const x_24 = i; - float const x_79 = (*(tint_symbol_7)).arr[x_24]; + float const x_79 = (*(tint_symbol_5)).arr[x_24]; int const x_25 = i; - float const x_81 = (*(tint_symbol_6)).arr[x_25]; + float const x_81 = (*(tint_symbol_4)).arr[x_25]; int const x_26 = i; - float const x_83 = (*(tint_symbol_6)).arr[x_26]; - *(tint_symbol_8) = float4(x_79, x_81, x_83, 1.0f); + float const x_83 = (*(tint_symbol_4)).arr[x_26]; + *(tint_symbol_6) = float4(x_79, x_81, x_83, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread tint_array_wrapper tint_symbol_10 = {}; - thread tint_array_wrapper tint_symbol_11 = {}; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(x_11, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(x_11, tint_symbol_7, tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread tint_array_wrapper tint_symbol_12 = {}; + thread tint_array_wrapper tint_symbol_13 = {}; + thread float4 tint_symbol_14 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_11, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.hlsl index f469577c04..028788946d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.hlsl @@ -68,9 +68,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl index ae1ce51608..9aed201d44 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl @@ -31,10 +31,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { float f = 0.0f; int r = 0; - *(tint_symbol_4) = 0; + *(tint_symbol_3) = 0; float const x_42 = x_7.x_GLF_uniform_float_values.arr[0].el; f = x_42; int const x_44 = x_10.x_GLF_uniform_int_values.arr[1].el; @@ -46,8 +46,8 @@ void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread } else { break; } - int const x_54 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_54) + as_type(1))); + int const x_54 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_54) + as_type(1))); float2 const x_57 = x_12.injectionSwitch; float const x_60 = f; f = (x_60 + dfdx(x_57).y); @@ -57,13 +57,13 @@ void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread } } while (true) { - int const x_68 = *(tint_symbol_4); + int const x_68 = *(tint_symbol_3); if ((x_68 < 100)) { } else { break; } - int const x_71 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_71) + as_type(1))); + int const x_71 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_71) + as_type(1))); float const x_74 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_75 = f; f = (x_75 + x_74); @@ -75,21 +75,27 @@ void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread int const x_88 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_91 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_94 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_85), float(x_88), float(x_91), float(x_94)); + *(tint_symbol_4) = float4(float(x_85), float(x_88), float(x_91), float(x_94)); } else { int const x_98 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_99 = float(x_98); - *(tint_symbol_5) = float4(x_99, x_99, x_99, x_99); + *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_7, x_10, x_12, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_7, x_10, x_12, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_10, x_12, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.hlsl index f469577c04..028788946d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.hlsl @@ -68,9 +68,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl index ae1ce51608..9aed201d44 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl @@ -31,10 +31,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { float f = 0.0f; int r = 0; - *(tint_symbol_4) = 0; + *(tint_symbol_3) = 0; float const x_42 = x_7.x_GLF_uniform_float_values.arr[0].el; f = x_42; int const x_44 = x_10.x_GLF_uniform_int_values.arr[1].el; @@ -46,8 +46,8 @@ void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread } else { break; } - int const x_54 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_54) + as_type(1))); + int const x_54 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_54) + as_type(1))); float2 const x_57 = x_12.injectionSwitch; float const x_60 = f; f = (x_60 + dfdx(x_57).y); @@ -57,13 +57,13 @@ void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread } } while (true) { - int const x_68 = *(tint_symbol_4); + int const x_68 = *(tint_symbol_3); if ((x_68 < 100)) { } else { break; } - int const x_71 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_71) + as_type(1))); + int const x_71 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_71) + as_type(1))); float const x_74 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_75 = f; f = (x_75 + x_74); @@ -75,21 +75,27 @@ void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread int const x_88 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_91 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_94 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_85), float(x_88), float(x_91), float(x_94)); + *(tint_symbol_4) = float4(float(x_85), float(x_88), float(x_91), float(x_94)); } else { int const x_98 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_99 = float(x_98); - *(tint_symbol_5) = float4(x_99, x_99, x_99, x_99); + *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_7, x_10, x_12, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_7, x_10, x_12, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_10, x_12, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.hlsl index d60898fd08..d77706da24 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.hlsl @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.msl index 4fb97f0be8..f4adc34f61 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) { float f = 0.0f; int i = 0; float a = 0.0f; @@ -58,18 +58,24 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_66 = x_9.x_GLF_uniform_int_values.arr[2].el; float const x_68 = f; int const x_70 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_66), x_68, float(x_70), 1.0f); + *(tint_symbol_3) = float4(float(x_66), x_68, float(x_70), 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.hlsl index d60898fd08..d77706da24 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.hlsl @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.msl index 4fb97f0be8..f4adc34f61 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) { float f = 0.0f; int i = 0; float a = 0.0f; @@ -58,18 +58,24 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_66 = x_9.x_GLF_uniform_int_values.arr[2].el; float const x_68 = f; int const x_70 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_66), x_68, float(x_70), 1.0f); + *(tint_symbol_3) = float4(float(x_66), x_68, float(x_70), 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.hlsl index 14fc70601a..6003145215 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.hlsl @@ -19,9 +19,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.msl index abb0900f21..5fdcb086ff 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.msl @@ -8,23 +8,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float2x2 m = float2x2(0.0f); m = (transpose(float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f))) * (1.0f / 2.0f)); float2x2 const x_33 = m; if ((all((x_33[0u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[0u])) & all((x_33[1u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[1u])))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.hlsl index c9c5e085f7..605374b13d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.hlsl @@ -23,9 +23,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.msl index 6ff0e4222e..9322446837 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.msl @@ -8,23 +8,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float2x2 m = float2x2(0.0f); m = (transpose(float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f))) * (1.0f / 2.0f)); float2x2 const x_33 = m; if ((all((x_33[0u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[0u])) && all((x_33[1u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[1u])))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.hlsl index 6878f83c37..dcad269991 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.hlsl @@ -57,9 +57,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.msl index a0efc1edd1..5b3f8d9e8d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.msl @@ -44,7 +44,7 @@ int func_(constant buf0& x_7) { return x_71; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int const x_27 = func_(x_7); int const x_29 = x_7.x_GLF_uniform_int_values.arr[2].el; if ((x_27 == x_29)) { @@ -52,20 +52,26 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { int const x_38 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_41 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_44 = x_7.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_35), float(x_38), float(x_41), float(x_44)); + *(tint_symbol_3) = float4(float(x_35), float(x_38), float(x_41), float(x_44)); } else { int const x_48 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_49 = float(x_48); - *(tint_symbol_4) = float4(x_49, x_49, x_49, x_49); + *(tint_symbol_3) = float4(x_49, x_49, x_49, x_49); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.hlsl index 6878f83c37..dcad269991 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.hlsl @@ -57,9 +57,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.msl index a0efc1edd1..5b3f8d9e8d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.msl @@ -44,7 +44,7 @@ int func_(constant buf0& x_7) { return x_71; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int const x_27 = func_(x_7); int const x_29 = x_7.x_GLF_uniform_int_values.arr[2].el; if ((x_27 == x_29)) { @@ -52,20 +52,26 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { int const x_38 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_41 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_44 = x_7.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_35), float(x_38), float(x_41), float(x_44)); + *(tint_symbol_3) = float4(float(x_35), float(x_38), float(x_41), float(x_44)); } else { int const x_48 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_49 = float(x_48); - *(tint_symbol_4) = float4(x_49, x_49, x_49, x_49); + *(tint_symbol_3) = float4(x_49, x_49, x_49, x_49); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.hlsl index 642f1e69b9..0907d3e375 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.hlsl @@ -7,8 +7,8 @@ void main_1() { int arr[10] = (int[10])0; int a = 0; int i = 0; - const int tint_symbol_3[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - arr = tint_symbol_3; + const int tint_symbol_2[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; + arr = tint_symbol_2; a = 0; const int x_42 = asint(x_7[1].x); const int x_44 = arr[x_42]; @@ -60,9 +60,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.msl index a2e952dc68..2b54d29448 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.msl @@ -21,12 +21,12 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { tint_array_wrapper_1 arr = {}; int a = 0; int i = 0; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - arr = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; + arr = tint_symbol_2; a = 0; int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_44 = arr.arr[x_42]; @@ -63,20 +63,26 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { int const x_91 = x_7.x_GLF_uniform_int_values.arr[2].el; int const x_94 = x_7.x_GLF_uniform_int_values.arr[2].el; int const x_97 = x_7.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_5) = float4(float(x_88), float(x_91), float(x_94), float(x_97)); + *(tint_symbol_4) = float4(float(x_88), float(x_91), float(x_94), float(x_97)); } else { int const x_101 = x_7.x_GLF_uniform_int_values.arr[2].el; float const x_102 = float(x_101); - *(tint_symbol_5) = float4(x_102, x_102, x_102, x_102); + *(tint_symbol_4) = float4(x_102, x_102, x_102, x_102); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_7, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) { + main_1(x_7, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.hlsl index 642f1e69b9..0907d3e375 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.hlsl @@ -7,8 +7,8 @@ void main_1() { int arr[10] = (int[10])0; int a = 0; int i = 0; - const int tint_symbol_3[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - arr = tint_symbol_3; + const int tint_symbol_2[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; + arr = tint_symbol_2; a = 0; const int x_42 = asint(x_7[1].x); const int x_44 = arr[x_42]; @@ -60,9 +60,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.msl index a2e952dc68..2b54d29448 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.msl @@ -21,12 +21,12 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { tint_array_wrapper_1 arr = {}; int a = 0; int i = 0; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - arr = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; + arr = tint_symbol_2; a = 0; int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_44 = arr.arr[x_42]; @@ -63,20 +63,26 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { int const x_91 = x_7.x_GLF_uniform_int_values.arr[2].el; int const x_94 = x_7.x_GLF_uniform_int_values.arr[2].el; int const x_97 = x_7.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_5) = float4(float(x_88), float(x_91), float(x_94), float(x_97)); + *(tint_symbol_4) = float4(float(x_88), float(x_91), float(x_94), float(x_97)); } else { int const x_101 = x_7.x_GLF_uniform_int_values.arr[2].el; float const x_102 = float(x_101); - *(tint_symbol_5) = float4(x_102, x_102, x_102, x_102); + *(tint_symbol_4) = float4(x_102, x_102, x_102, x_102); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_7, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) { + main_1(x_7, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.hlsl index 9f1319b9ec..6055ba4a62 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.hlsl @@ -18,9 +18,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.msl index 387bc0b5ed..622544627e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.msl @@ -8,23 +8,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float f = 0.0f; f = 2.0f; float const x_19 = f; if ((exp2(x_19) == 4.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.hlsl index 9f1319b9ec..6055ba4a62 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.hlsl @@ -18,9 +18,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.msl index 387bc0b5ed..622544627e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.msl @@ -8,23 +8,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float f = 0.0f; f = 2.0f; float const x_19 = f; if ((exp2(x_19) == 4.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.hlsl index 81e45982de..af3702f2ce 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.hlsl @@ -30,8 +30,8 @@ void main_1() { const float x_55 = asfloat(x_7[scalar_offset_7 / 4][scalar_offset_7 % 4]); const uint scalar_offset_8 = ((16u * uint(0))) / 4; const float x_57 = asfloat(x_7[scalar_offset_8 / 4][scalar_offset_8 % 4]); - const float tint_symbol_4[10] = {x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57}; - arr = tint_symbol_4; + const float tint_symbol_3[10] = {x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57}; + arr = tint_symbol_3; const uint scalar_offset_9 = ((16u * uint(0))) / 4; const int x_60 = asint(x_9[scalar_offset_9 / 4][scalar_offset_9 % 4]); const float x_62 = arr[x_60]; @@ -57,9 +57,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.msl index 3eea4ecfcd..01e60e6682 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) { float f = 0.0f; tint_array_wrapper_2 arr = {}; f = 2.0f; @@ -46,8 +46,8 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy float const x_52 = x_7.x_GLF_uniform_float_values.arr[1].el; float const x_55 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_57 = x_7.x_GLF_uniform_float_values.arr[0].el; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57}}; - arr = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57}}; + arr = tint_symbol_2; int const x_60 = x_9.x_GLF_uniform_int_values.arr[0].el; float const x_62 = arr.arr[x_60]; int const x_65 = x_9.x_GLF_uniform_int_values.arr[3].el; @@ -56,20 +56,26 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy int const x_74 = x_9.x_GLF_uniform_int_values.arr[2].el; int const x_77 = x_9.x_GLF_uniform_int_values.arr[2].el; int const x_80 = x_9.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_5) = float4(float(x_71), float(x_74), float(x_77), float(x_80)); + *(tint_symbol_4) = float4(float(x_71), float(x_74), float(x_77), float(x_80)); } else { int const x_84 = x_9.x_GLF_uniform_int_values.arr[2].el; float const x_85 = float(x_84); - *(tint_symbol_5) = float4(x_85, x_85, x_85, x_85); + *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_7, x_9, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5) { + main_1(x_7, x_9, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.hlsl index 81e45982de..af3702f2ce 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.hlsl @@ -30,8 +30,8 @@ void main_1() { const float x_55 = asfloat(x_7[scalar_offset_7 / 4][scalar_offset_7 % 4]); const uint scalar_offset_8 = ((16u * uint(0))) / 4; const float x_57 = asfloat(x_7[scalar_offset_8 / 4][scalar_offset_8 % 4]); - const float tint_symbol_4[10] = {x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57}; - arr = tint_symbol_4; + const float tint_symbol_3[10] = {x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57}; + arr = tint_symbol_3; const uint scalar_offset_9 = ((16u * uint(0))) / 4; const int x_60 = asint(x_9[scalar_offset_9 / 4][scalar_offset_9 % 4]); const float x_62 = arr[x_60]; @@ -57,9 +57,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.msl index 3eea4ecfcd..01e60e6682 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) { float f = 0.0f; tint_array_wrapper_2 arr = {}; f = 2.0f; @@ -46,8 +46,8 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy float const x_52 = x_7.x_GLF_uniform_float_values.arr[1].el; float const x_55 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_57 = x_7.x_GLF_uniform_float_values.arr[0].el; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57}}; - arr = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57}}; + arr = tint_symbol_2; int const x_60 = x_9.x_GLF_uniform_int_values.arr[0].el; float const x_62 = arr.arr[x_60]; int const x_65 = x_9.x_GLF_uniform_int_values.arr[3].el; @@ -56,20 +56,26 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy int const x_74 = x_9.x_GLF_uniform_int_values.arr[2].el; int const x_77 = x_9.x_GLF_uniform_int_values.arr[2].el; int const x_80 = x_9.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_5) = float4(float(x_71), float(x_74), float(x_77), float(x_80)); + *(tint_symbol_4) = float4(float(x_71), float(x_74), float(x_77), float(x_80)); } else { int const x_84 = x_9.x_GLF_uniform_int_values.arr[2].el; float const x_85 = float(x_84); - *(tint_symbol_5) = float4(x_85, x_85, x_85, x_85); + *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_7, x_9, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5) { + main_1(x_7, x_9, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.hlsl index 757f40b3cd..0795796b8e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.msl index 7bb12689b4..228de98750 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.msl @@ -35,21 +35,27 @@ int func_(constant buf0& x_8) { return x_50; } -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { int const x_29 = func_(x_8); if ((x_29 == 2)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.hlsl index 757f40b3cd..0795796b8e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.msl index 7bb12689b4..228de98750 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.msl @@ -35,21 +35,27 @@ int func_(constant buf0& x_8) { return x_50; } -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { int const x_29 = func_(x_8); if ((x_29 == 2)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.hlsl index 34a3e6f681..1fc3eb0c89 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.msl index fab551b93a..df44d6db71 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_22 = x_5.one; if (((x_22 & 0) == 0)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.hlsl index 34a3e6f681..1fc3eb0c89 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.msl index fab551b93a..df44d6db71 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_22 = x_5.one; if (((x_22 & 0) == 0)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.hlsl index 9c6888077a..47bc4f8166 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.msl index 7b5a9e15e7..ed5a50274a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_23 = x_5.one; if (((-1 | x_23) == -1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.hlsl index 9c6888077a..47bc4f8166 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.msl index 7b5a9e15e7..ed5a50274a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_23 = x_5.one; if (((-1 | x_23) == -1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.hlsl index f27c44b0b5..561e5069b5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.msl index 5084cf3033..e9c31bd574 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int a = 0; int b = 0; a = 6; @@ -16,18 +16,24 @@ void main_1(thread float4* const tint_symbol_4) { int const x_6 = a; int const x_7 = b; if (((x_6 ^ x_7) != 3)) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.hlsl index f27c44b0b5..561e5069b5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.msl index 5084cf3033..e9c31bd574 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int a = 0; int b = 0; a = 6; @@ -16,18 +16,24 @@ void main_1(thread float4* const tint_symbol_4) { int const x_6 = a; int const x_7 = b; if (((x_6 ^ x_7) != 3)) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.hlsl index 63f7da2fa9..e30c46a077 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.hlsl @@ -18,9 +18,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.msl index dd7b01c1cf..2879d83185 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.msl @@ -8,23 +8,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { bool a = false; a = false; bool const x_19 = a; if ((true & x_19)) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.hlsl index 205d238134..a3e790553d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.msl index c5fe7c9ee7..e36ed72ffe 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.msl @@ -8,23 +8,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { bool a = false; a = false; bool const x_19 = a; if ((true && x_19)) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.hlsl index 64d9a98aed..e4ad79e452 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.hlsl @@ -32,11 +32,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl index 9a920a07a6..86f3cc737a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl @@ -4,18 +4,18 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; i = 2; while (true) { int const x_6 = i; i = as_type((as_type(x_6) + as_type(1))); { - float const x_35 = (*(tint_symbol_5)).x; + float const x_35 = (*(tint_symbol_3)).x; if (((x_35 >= 0.0f) & false)) { } else { break; @@ -24,20 +24,26 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } int const x_8 = i; if ((x_8 == 3)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.hlsl index 52e6a55491..467446ebc9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.hlsl @@ -36,11 +36,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.msl index 587b3e2d38..3b13be089e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.msl @@ -4,18 +4,18 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; i = 2; while (true) { int const x_6 = i; i = as_type((as_type(x_6) + as_type(1))); { - float const x_35 = (*(tint_symbol_5)).x; + float const x_35 = (*(tint_symbol_3)).x; if (((x_35 >= 0.0f) && false)) { } else { break; @@ -24,20 +24,26 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } int const x_8 = i; if ((x_8 == 3)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.hlsl index 62ce799792..206deb6cad 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.hlsl @@ -21,11 +21,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.msl index 62623107bf..b4d9101f71 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.msl @@ -4,27 +4,33 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - float const x_22 = (*(tint_symbol_5)).x; +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + float const x_22 = (*(tint_symbol_3)).x; if (((x_22 < 0.0f) | true)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.hlsl index e1f6bdda11..fb14b144ff 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.hlsl @@ -25,11 +25,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.msl index c32c624fcc..04c6407c07 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.msl @@ -4,27 +4,33 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - float const x_22 = (*(tint_symbol_5)).x; +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + float const x_22 = (*(tint_symbol_3)).x; if (((x_22 < 0.0f) || true)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.hlsl index 9fa0010d4d..e95f485546 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.hlsl @@ -26,9 +26,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.msl index 7272ad9c5a..4ebb8b8f91 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.msl @@ -16,7 +16,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int minValue = 0; int negMinValue = 0; minValue = (-2147483647 - 1); @@ -26,18 +26,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { int const x_28 = minValue; int const x_30 = x_7.minusOne; if ((x_27 == as_type((as_type(x_28) * as_type(x_30))))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.hlsl index 9fa0010d4d..e95f485546 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.hlsl @@ -26,9 +26,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.msl index 7272ad9c5a..4ebb8b8f91 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.msl @@ -16,7 +16,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int minValue = 0; int negMinValue = 0; minValue = (-2147483647 - 1); @@ -26,18 +26,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { int const x_28 = minValue; int const x_30 = x_7.minusOne; if ((x_27 == as_type((as_type(x_28) * as_type(x_30))))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.hlsl index 200bb961a4..f249279dfb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.hlsl @@ -18,9 +18,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.msl index cff2cd3a77..72dea6b23f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.msl @@ -8,23 +8,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int i = 0; i = 3; int const x_5 = i; if ((~(x_5) == -4)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.hlsl index 200bb961a4..f249279dfb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.hlsl @@ -18,9 +18,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.msl index cff2cd3a77..72dea6b23f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.msl @@ -8,23 +8,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int i = 0; i = 3; int const x_5 = i; if ((~(x_5) == -4)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.hlsl index 4db9a87940..a7f0fbfea1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.hlsl @@ -55,9 +55,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.msl index c8f07e82f2..619406ea12 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { uint a = 0u; uint b = 0u; uint c = 0u; @@ -61,18 +61,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { uint const x_99 = e; uint const x_102 = f; if (((((((x_88 == 1u) & (x_90 == 0u)) & (x_93 == 1u)) & (x_96 == 0u)) & (x_99 == 1u)) & (x_102 == 0u))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.hlsl index 44f7ed6f08..e7757a52b9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.hlsl @@ -75,9 +75,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.msl index 5d8fa5422b..e0dab88cdc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { uint a = 0u; uint b = 0u; uint c = 0u; @@ -61,18 +61,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { uint const x_99 = e; uint const x_102 = f; if (((((((x_88 == 1u) && (x_90 == 0u)) && (x_93 == 1u)) && (x_96 == 0u)) && (x_99 == 1u)) && (x_102 == 0u))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.hlsl index cc5e35257b..d834ffb208 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.hlsl @@ -18,9 +18,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.msl index c31454528c..5d0c7cd181 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.msl @@ -8,23 +8,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int i = 0; i = 5; int const x_5 = i; if (((x_5 >> as_type(1)) != 2)) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.hlsl index cc5e35257b..d834ffb208 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.hlsl @@ -18,9 +18,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.msl index c31454528c..5d0c7cd181 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.msl @@ -8,23 +8,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int i = 0; i = 5; int const x_5 = i; if (((x_5 >> as_type(1)) != 2)) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.hlsl index 2b46425601..1bb0cbc6d7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.hlsl @@ -23,9 +23,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.msl index a8ec9c9125..554f9d8428 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.msl @@ -8,28 +8,34 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { uint a = 0u; a = 4u; uint const x_5 = a; switch((x_5 / 2u)) { case 2u: { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); break; } default: { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); break; } } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.hlsl index 2b46425601..1bb0cbc6d7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.hlsl @@ -23,9 +23,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.msl index a8ec9c9125..554f9d8428 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.msl @@ -8,28 +8,34 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { uint a = 0u; a = 4u; uint const x_5 = a; switch((x_5 / 2u)) { case 2u: { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); break; } default: { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); break; } } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.hlsl index 2553d12f79..e2cd955295 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.hlsl @@ -33,9 +33,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.msl index bc7a9d08f1..2ec6d4f90d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; f = 1.0f; while (true) { @@ -29,18 +29,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } float const x_40 = f; if ((x_40 == 10.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.hlsl index 2553d12f79..e2cd955295 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.hlsl @@ -33,9 +33,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.msl index bc7a9d08f1..2ec6d4f90d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; f = 1.0f; while (true) { @@ -29,18 +29,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } float const x_40 = f; if ((x_40 == 10.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.hlsl index 047beed0ad..afc442cd61 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.msl index 45dc7c5440..7bab12f8ec 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_24 = x_5.one; if ((as_type((as_type(1) + as_type(as_type((as_type(3) - as_type(x_24)))))) == 3)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.hlsl index 047beed0ad..afc442cd61 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.msl index 45dc7c5440..7bab12f8ec 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_24 = x_5.one; if ((as_type((as_type(1) + as_type(as_type((as_type(3) - as_type(x_24)))))) == 3)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.hlsl index 3e0c589b7e..4b3b566b8e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.hlsl @@ -35,9 +35,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.msl index 4aa4b0c558..8361a17b03 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2 a = 0.0f; float2 b = 0.0f; bool x_46 = false; @@ -31,18 +31,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } bool const x_47 = x_47_phi; if (x_47) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.hlsl index 3e0c589b7e..4b3b566b8e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.hlsl @@ -35,9 +35,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.msl index 4aa4b0c558..8361a17b03 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2 a = 0.0f; float2 b = 0.0f; bool x_46 = false; @@ -31,18 +31,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } bool const x_47 = x_47_phi; if (x_47) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.hlsl index d3f224d7ca..0764c7e25e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.msl index 86397232cd..0b7f9ccd92 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float const x_25 = x_5.three; if ((dot(float4(1.0f, 2.0f, x_25, 4.0f), float4(0.0f, 1.0f, 0.0f, 0.0f)) == 2.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.hlsl index d3f224d7ca..0764c7e25e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.msl index 86397232cd..0b7f9ccd92 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float const x_25 = x_5.three; if ((dot(float4(1.0f, 2.0f, x_25, 4.0f), float4(0.0f, 1.0f, 0.0f, 0.0f)) == 2.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.hlsl index 43f199034d..e55072b1c3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.msl index 5f40f93f77..5b5062d37b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float const x_26 = x_5.three; if ((dot(float2(2.0f, x_26), float2(0.0f, 2.0f)) == 6.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.hlsl index 43f199034d..e55072b1c3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.msl index 5f40f93f77..5b5062d37b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float const x_26 = x_5.three; if ((dot(float2(2.0f, x_26), float2(0.0f, 2.0f)) == 6.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.hlsl index c8380b42f6..0bc576cf86 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.hlsl @@ -26,9 +26,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.msl index ade8de6413..1e79d7ebba 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int i = 0; i = 5; while (true) { @@ -24,18 +24,24 @@ void main_1(thread float4* const tint_symbol_4) { } int const x_10 = i; if ((x_10 == -1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.hlsl index c8380b42f6..0bc576cf86 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.hlsl @@ -26,9 +26,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.msl index ade8de6413..1e79d7ebba 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int i = 0; i = 5; while (true) { @@ -24,18 +24,24 @@ void main_1(thread float4* const tint_symbol_4) { } int const x_10 = i; if ((x_10 == -1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.hlsl index f5e4574976..f75ea26dae 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.msl index 9823f42c03..5ff149d542 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.msl @@ -11,25 +11,31 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; float const x_28 = x_6.one; f = (4.0f / (2.0f * x_28)); float const x_31 = f; float const x_33 = f; if (((x_31 > 1.899999976f) & (x_33 < 2.099999905f))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.hlsl index d20ee0a79f..be8a7c6d4e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.hlsl @@ -26,9 +26,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.msl index b807292e11..5dd96d48e1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.msl @@ -11,25 +11,31 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; float const x_28 = x_6.one; f = (4.0f / (2.0f * x_28)); float const x_31 = f; float const x_33 = f; if (((x_31 > 1.899999976f) && (x_33 < 2.099999905f))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.hlsl index 02ede34e96..77d565cc15 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.msl index 2a1c1bb1be..e1fc734780 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.msl @@ -11,25 +11,31 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float a = 0.0f; float const x_27 = x_6.four; a = (2.0f / (1.0f / x_27)); float const x_30 = a; float const x_32 = a; if (((x_30 > 7.900000095f) & (x_32 < 8.100000381f))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.hlsl index 1b0d83de99..3073223737 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.hlsl @@ -26,9 +26,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.msl index 21d1062174..135239f530 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.msl @@ -11,25 +11,31 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float a = 0.0f; float const x_27 = x_6.four; a = (2.0f / (1.0f / x_27)); float const x_30 = a; float const x_32 = a; if (((x_30 > 7.900000095f) && (x_32 < 8.100000381f))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.hlsl index 1020e3b3f1..1474170830 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.msl index c7f8ae3cbe..3fc585d893 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.msl @@ -11,25 +11,31 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; float const x_28 = x_6.one; f = (4.0f * (2.0f / x_28)); float const x_31 = f; float const x_33 = f; if (((x_31 > 7.900000095f) & (x_33 < 8.100000381f))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.hlsl index 33b44f018e..a85b474b21 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.hlsl @@ -26,9 +26,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.msl index 8ca949d062..fad2b8e8d1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.msl @@ -11,25 +11,31 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; float const x_28 = x_6.one; f = (4.0f * (2.0f / x_28)); float const x_31 = f; float const x_33 = f; if (((x_31 > 7.900000095f) && (x_33 < 8.100000381f))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.hlsl index e7186613a7..042c40f344 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.hlsl @@ -29,9 +29,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.msl index 971bd1116e..f16cb10169 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { bool b = false; int i = 0; float a = 0.0f; @@ -33,18 +33,24 @@ void main_1(thread float4* const tint_symbol_4) { } bool const x_44 = b; if (x_44) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.hlsl index e7186613a7..042c40f344 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.hlsl @@ -29,9 +29,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.msl index 971bd1116e..f16cb10169 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { bool b = false; int i = 0; float a = 0.0f; @@ -33,18 +33,24 @@ void main_1(thread float4* const tint_symbol_4) { } bool const x_44 = b; if (x_44) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.hlsl index a2804a20f3..bf8cf3030e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.hlsl @@ -29,9 +29,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.msl index c195bec70b..824cb46959 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { bool b = false; int i = 0; float a = 0.0f; @@ -33,18 +33,24 @@ void main_1(thread float4* const tint_symbol_4) { } bool const x_45 = b; if (x_45) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.hlsl index a2804a20f3..bf8cf3030e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.hlsl @@ -29,9 +29,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.msl index c195bec70b..824cb46959 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { bool b = false; int i = 0; float a = 0.0f; @@ -33,18 +33,24 @@ void main_1(thread float4* const tint_symbol_4) { } bool const x_45 = b; if (x_45) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.hlsl index b852869532..8572db8884 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.hlsl @@ -30,9 +30,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.msl index e51689605b..0adf33ae31 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; int const x_26 = x_6.five; i = x_26; @@ -28,18 +28,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } int const x_38 = i; if ((x_38 == -1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.hlsl index b852869532..8572db8884 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.hlsl @@ -30,9 +30,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.msl index e51689605b..0adf33ae31 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; int const x_26 = x_6.five; i = x_26; @@ -28,18 +28,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } int const x_38 = i; if ((x_38 == -1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.hlsl index 7a3d498fa5..52b9055b60 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.hlsl @@ -25,9 +25,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.msl index 02ce4045d3..ab61a046b0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float3 v = 0.0f; float d = 0.0f; float const x_36 = x_6.one; @@ -21,18 +21,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_41 = d; if ((x_41 < 0.100000001f)) { float const x_47 = v.x; - *(tint_symbol_4) = float4(x_47, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(x_47, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.hlsl index 7a3d498fa5..52b9055b60 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.hlsl @@ -25,9 +25,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.msl index 02ce4045d3..ab61a046b0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float3 v = 0.0f; float d = 0.0f; float const x_36 = x_6.one; @@ -21,18 +21,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_41 = d; if ((x_41 < 0.100000001f)) { float const x_47 = v.x; - *(tint_symbol_4) = float4(x_47, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(x_47, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.hlsl index 400828d13a..9bf1a3bd65 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.msl index 5d3b770bfa..f2c6210acf 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.msl @@ -16,21 +16,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_6 = x_5.four; if ((tint_unary_minus((x_6 / 2)) == -2)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.hlsl index 400828d13a..9bf1a3bd65 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.msl index 5d3b770bfa..f2c6210acf 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.msl @@ -16,21 +16,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_6 = x_5.four; if ((tint_unary_minus((x_6 / 2)) == -2)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.hlsl index abdc55d02c..154e2f7517 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.msl index d7a23cd22f..218bda2a35 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.msl @@ -16,24 +16,30 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int x = 0; int const x_26 = x_6.one; x = tint_unary_minus(as_type((as_type(5) - as_type(x_26)))); int const x_29 = x; if ((x_29 == -4)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.hlsl index abdc55d02c..154e2f7517 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.msl index d7a23cd22f..218bda2a35 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.msl @@ -16,24 +16,30 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int x = 0; int const x_26 = x_6.one; x = tint_unary_minus(as_type((as_type(5) - as_type(x_26)))); int const x_29 = x; if ((x_29 == -4)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.hlsl index 6aca1c8431..a4ba05247d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.msl index 945cd53139..2f956326ae 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float2 const x_27 = x_5.injectionSwitch; if (all((mix(x_27, float2(1.0f, 1.0f), float2(0.0f, 0.0f)) == float2(0.0f, 1.0f)))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.hlsl index 6aca1c8431..a4ba05247d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.msl index 945cd53139..2f956326ae 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float2 const x_27 = x_5.injectionSwitch; if (all((mix(x_27, float2(1.0f, 1.0f), float2(0.0f, 0.0f)) == float2(0.0f, 1.0f)))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.hlsl index 563318c26e..d43ef404da 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.msl index 2d5c01d249..7aa0bda199 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float2 const x_29 = x_5.injectionSwitch; if ((select(x_29, float2(1.0f, 1.0f), bool2(false, false)).x == 0.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.hlsl index 563318c26e..d43ef404da 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.msl index 2d5c01d249..7aa0bda199 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float2 const x_29 = x_5.injectionSwitch; if ((select(x_29, float2(1.0f, 1.0f), bool2(false, false)).x == 0.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.hlsl index f11d3d72c9..5e90d3a2e3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.hlsl @@ -25,9 +25,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.msl index 11c69992f6..19f18181fa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float4 v = 0.0f; v = float4(2.0f, 3.0f, 4.0f, 5.0f); float const x_40 = x_6.threeandfour.y; @@ -20,18 +20,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { v = float4(x_42.x, x_42.y, x_43.z, x_43.w); float4 const x_45 = v; if (all((x_45 == float4(1.0f, 6.0f, 4.0f, 5.0f)))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.hlsl index f11d3d72c9..5e90d3a2e3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.hlsl @@ -25,9 +25,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.msl index 11c69992f6..19f18181fa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float4 v = 0.0f; v = float4(2.0f, 3.0f, 4.0f, 5.0f); float const x_40 = x_6.threeandfour.y; @@ -20,18 +20,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { v = float4(x_42.x, x_42.y, x_43.z, x_43.w); float4 const x_45 = v; if (all((x_45 == float4(1.0f, 6.0f, 4.0f, 5.0f)))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.hlsl index 274014d47b..cd08b9bf4a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.hlsl @@ -21,9 +21,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.msl index df1620dca3..a2ec26a7fe 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float4 v = 0.0f; float4 const x_23 = v; v = float4(float2(1.0f, 1.0f).x, float2(1.0f, 1.0f).y, x_23.z, x_23.w); @@ -16,18 +16,24 @@ void main_1(thread float4* const tint_symbol_4) { v = float4(x_25.x, x_25.y, float2(2.0f, 2.0f).x, float2(2.0f, 2.0f).y); float4 const x_27 = v; if (all((x_27 == float4(1.0f, 1.0f, 2.0f, 2.0f)))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.hlsl index 274014d47b..cd08b9bf4a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.hlsl @@ -21,9 +21,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.msl index df1620dca3..a2ec26a7fe 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float4 v = 0.0f; float4 const x_23 = v; v = float4(float2(1.0f, 1.0f).x, float2(1.0f, 1.0f).y, x_23.z, x_23.w); @@ -16,18 +16,24 @@ void main_1(thread float4* const tint_symbol_4) { v = float4(x_25.x, x_25.y, float2(2.0f, 2.0f).x, float2(2.0f, 2.0f).y); float4 const x_27 = v; if (all((x_27 == float4(1.0f, 1.0f, 2.0f, 2.0f)))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.hlsl index 037715d2a7..b144af7fd0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.hlsl @@ -26,9 +26,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.msl index bea0ac6f8d..c35cbbf3b2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2 v = 0.0f; float d = 0.0f; float2 const x_37 = x_6.zeroOne; @@ -22,18 +22,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { if ((x_41 < 0.100000001f)) { float const x_47 = v.x; float const x_50 = v.y; - *(tint_symbol_4) = float4((x_47 - 1.0f), (x_50 - 5.0f), 0.0f, 1.0f); + *(tint_symbol_3) = float4((x_47 - 1.0f), (x_50 - 5.0f), 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.hlsl index 037715d2a7..b144af7fd0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.hlsl @@ -26,9 +26,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.msl index bea0ac6f8d..c35cbbf3b2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2 v = 0.0f; float d = 0.0f; float2 const x_37 = x_6.zeroOne; @@ -22,18 +22,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { if ((x_41 < 0.100000001f)) { float const x_47 = v.x; float const x_50 = v.y; - *(tint_symbol_4) = float4((x_47 - 1.0f), (x_50 - 5.0f), 0.0f, 1.0f); + *(tint_symbol_3) = float4((x_47 - 1.0f), (x_50 - 5.0f), 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.hlsl index 2d00ef0af2..d963e3fa14 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.hlsl @@ -19,8 +19,8 @@ void main_1() { const int x_43 = asint(x_6[1].x); const int x_44 = i; const int x_46 = asint(x_6[3].x); - const int tint_symbol_3[2] = {x_43, (int2(x_44, x_44) % int2(3, x_46)).y}; - a = tint_symbol_3; + const int tint_symbol_2[2] = {x_43, (int2(x_44, x_44) % int2(3, x_46)).y}; + a = tint_symbol_2; { i = (i + 1); } @@ -42,9 +42,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.msl index 917b1d979c..ac80a8ec84 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int i = 0; tint_array_wrapper_1 a = {}; int const x_32 = x_6.x_GLF_uniform_int_values.arr[2].el; @@ -36,8 +36,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_43 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_44 = i; int const x_46 = x_6.x_GLF_uniform_int_values.arr[3].el; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_43, ((int2(x_44, x_44) % int2(3, x_46))).y}}; - a = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_43, ((int2(x_44, x_44) % int2(3, x_46))).y}}; + a = tint_symbol_2; { int const x_52 = i; i = as_type((as_type(x_52) + as_type(1))); @@ -49,15 +49,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_63 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_66 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_68 = a.arr[x_66]; - *(tint_symbol_5) = float4(float(x_57), float(x_60), float(x_63), float(x_68)); + *(tint_symbol_4) = float4(float(x_57), float(x_60), float(x_63), float(x_68)); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) { + main_1(x_6, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.hlsl index 2d00ef0af2..d963e3fa14 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.hlsl @@ -19,8 +19,8 @@ void main_1() { const int x_43 = asint(x_6[1].x); const int x_44 = i; const int x_46 = asint(x_6[3].x); - const int tint_symbol_3[2] = {x_43, (int2(x_44, x_44) % int2(3, x_46)).y}; - a = tint_symbol_3; + const int tint_symbol_2[2] = {x_43, (int2(x_44, x_44) % int2(3, x_46)).y}; + a = tint_symbol_2; { i = (i + 1); } @@ -42,9 +42,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.msl index 917b1d979c..ac80a8ec84 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int i = 0; tint_array_wrapper_1 a = {}; int const x_32 = x_6.x_GLF_uniform_int_values.arr[2].el; @@ -36,8 +36,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_43 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_44 = i; int const x_46 = x_6.x_GLF_uniform_int_values.arr[3].el; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_43, ((int2(x_44, x_44) % int2(3, x_46))).y}}; - a = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_43, ((int2(x_44, x_44) % int2(3, x_46))).y}}; + a = tint_symbol_2; { int const x_52 = i; i = as_type((as_type(x_52) + as_type(1))); @@ -49,15 +49,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_63 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_66 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_68 = a.arr[x_66]; - *(tint_symbol_5) = float4(float(x_57), float(x_60), float(x_63), float(x_68)); + *(tint_symbol_4) = float4(float(x_57), float(x_60), float(x_63), float(x_68)); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) { + main_1(x_6, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.hlsl index 15bbbf8460..9ee21a823f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.hlsl @@ -13,8 +13,8 @@ void main_1() { const float x_36 = asfloat(x_6[scalar_offset / 4][scalar_offset % 4]); const float x_38 = asfloat(x_6[1].x); const float x_40 = asfloat(x_6[2].x); - const float tint_symbol_4[3] = {x_36, x_38, x_40}; - arr = tint_symbol_4; + const float tint_symbol_3[3] = {x_36, x_38, x_40}; + arr = tint_symbol_3; i = 1; while (true) { const int x_46 = i; @@ -59,9 +59,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.msl index 122ec2d143..6e2c18c8f8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.msl @@ -31,14 +31,14 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { tint_array_wrapper_2 arr = {}; int i = 0; float const x_36 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_38 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_40 = x_6.x_GLF_uniform_float_values.arr[2].el; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_36, x_38, x_40}}; - arr = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_36, x_38, x_40}}; + arr = tint_symbol_2; i = 1; while (true) { int const x_46 = i; @@ -64,20 +64,26 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_76 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_79 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_82 = x_9.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_5) = float4(float(x_73), float(x_76), float(x_79), float(x_82)); + *(tint_symbol_4) = float4(float(x_73), float(x_76), float(x_79), float(x_82)); } else { int const x_86 = x_9.x_GLF_uniform_int_values.arr[0].el; float const x_87 = float(x_86); - *(tint_symbol_5) = float4(x_87, x_87, x_87, x_87); + *(tint_symbol_4) = float4(x_87, x_87, x_87, x_87); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { + main_1(x_6, x_9, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.hlsl index 15bbbf8460..9ee21a823f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.hlsl @@ -13,8 +13,8 @@ void main_1() { const float x_36 = asfloat(x_6[scalar_offset / 4][scalar_offset % 4]); const float x_38 = asfloat(x_6[1].x); const float x_40 = asfloat(x_6[2].x); - const float tint_symbol_4[3] = {x_36, x_38, x_40}; - arr = tint_symbol_4; + const float tint_symbol_3[3] = {x_36, x_38, x_40}; + arr = tint_symbol_3; i = 1; while (true) { const int x_46 = i; @@ -59,9 +59,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.msl index 122ec2d143..6e2c18c8f8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.msl @@ -31,14 +31,14 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { tint_array_wrapper_2 arr = {}; int i = 0; float const x_36 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_38 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_40 = x_6.x_GLF_uniform_float_values.arr[2].el; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_36, x_38, x_40}}; - arr = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_36, x_38, x_40}}; + arr = tint_symbol_2; i = 1; while (true) { int const x_46 = i; @@ -64,20 +64,26 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_76 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_79 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_82 = x_9.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_5) = float4(float(x_73), float(x_76), float(x_79), float(x_82)); + *(tint_symbol_4) = float4(float(x_73), float(x_76), float(x_79), float(x_82)); } else { int const x_86 = x_9.x_GLF_uniform_int_values.arr[0].el; float const x_87 = float(x_86); - *(tint_symbol_5) = float4(x_87, x_87, x_87, x_87); + *(tint_symbol_4) = float4(x_87, x_87, x_87, x_87); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { + main_1(x_6, x_9, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.hlsl index 40b4b79f67..5c9b0a9dc1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.hlsl @@ -56,9 +56,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.msl index d08d1ee066..c737d368a7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int i = 0; int const x_26 = x_6.x_GLF_uniform_int_values.arr[2].el; @@ -56,20 +56,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_56 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_59 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_53), float(x_56), float(x_59), float(x_62)); + *(tint_symbol_3) = float4(float(x_53), float(x_56), float(x_59), float(x_62)); } else { int const x_66 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_67 = float(x_66); - *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67); + *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.hlsl index 40b4b79f67..5c9b0a9dc1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.hlsl @@ -56,9 +56,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.msl index d08d1ee066..c737d368a7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int i = 0; int const x_26 = x_6.x_GLF_uniform_int_values.arr[2].el; @@ -56,20 +56,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_56 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_59 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_53), float(x_56), float(x_59), float(x_62)); + *(tint_symbol_3) = float4(float(x_53), float(x_56), float(x_59), float(x_62)); } else { int const x_66 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_67 = float(x_66); - *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67); + *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.hlsl index 8f9bef0fe9..6c9405fdee 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.hlsl @@ -40,11 +40,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.msl index 0fb34b5163..d866d07710 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.msl @@ -24,38 +24,44 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float f0 = 0.0f; float f1 = 0.0f; f0 = NAN; float const x_35 = f0; f1 = fract(x_35); - float const x_38 = (*(tint_symbol_5)).x; + float const x_38 = (*(tint_symbol_3)).x; float const x_40 = x_8.x_GLF_uniform_float_values.arr[0].el; if ((x_38 > x_40)) { int const x_46 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_49 = x_10.x_GLF_uniform_int_values.arr[0].el; int const x_52 = x_10.x_GLF_uniform_int_values.arr[0].el; int const x_55 = x_10.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_6) = float4(float(x_46), float(x_49), float(x_52), float(x_55)); + *(tint_symbol_4) = float4(float(x_46), float(x_49), float(x_52), float(x_55)); } else { float const x_58 = f1; - *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, x_10, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, x_10, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.hlsl index 9cd37ec6fe..d1f4736b5c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.hlsl @@ -40,11 +40,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.msl index 33990e1286..94a414888c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.msl @@ -24,38 +24,44 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float f0 = 0.0f; float f1 = 0.0f; f0 = INFINITY; float const x_35 = f0; f1 = fract(x_35); - float const x_38 = (*(tint_symbol_5)).x; + float const x_38 = (*(tint_symbol_3)).x; float const x_40 = x_8.x_GLF_uniform_float_values.arr[0].el; if ((x_38 > x_40)) { int const x_46 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_49 = x_10.x_GLF_uniform_int_values.arr[0].el; int const x_52 = x_10.x_GLF_uniform_int_values.arr[0].el; int const x_55 = x_10.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_6) = float4(float(x_46), float(x_49), float(x_52), float(x_55)); + *(tint_symbol_4) = float4(float(x_46), float(x_49), float(x_52), float(x_55)); } else { float const x_58 = f1; - *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, x_10, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, x_10, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.hlsl index e520d49327..c0129378bf 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.hlsl @@ -52,9 +52,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.msl index 18c63cf680..e721dc38cb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2 v1 = 0.0f; float2 b = 0.0f; float a = 0.0f; @@ -34,7 +34,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_39 = a; float const x_40 = a; float const x_42 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_38, x_39, x_40, x_42); + *(tint_symbol_3) = float4(x_38, x_39, x_40, x_42); float const x_45 = b.x; bool const x_46 = (x_45 < 1.0f); x_52_phi = x_46; @@ -49,19 +49,25 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_59 = b.x; float const x_61 = b.y; float const x_63 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_57, x_59, x_61, x_63); + *(tint_symbol_3) = float4(x_57, x_59, x_61, x_63); } else { float const x_66 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_66, x_66, x_66, x_66); + *(tint_symbol_3) = float4(x_66, x_66, x_66, x_66); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.hlsl index e520d49327..c0129378bf 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.hlsl @@ -52,9 +52,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.msl index 18c63cf680..e721dc38cb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2 v1 = 0.0f; float2 b = 0.0f; float a = 0.0f; @@ -34,7 +34,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_39 = a; float const x_40 = a; float const x_42 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_38, x_39, x_40, x_42); + *(tint_symbol_3) = float4(x_38, x_39, x_40, x_42); float const x_45 = b.x; bool const x_46 = (x_45 < 1.0f); x_52_phi = x_46; @@ -49,19 +49,25 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_59 = b.x; float const x_61 = b.y; float const x_63 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_57, x_59, x_61, x_63); + *(tint_symbol_3) = float4(x_57, x_59, x_61, x_63); } else { float const x_66 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_66, x_66, x_66, x_66); + *(tint_symbol_3) = float4(x_66, x_66, x_66, x_66); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.hlsl index 0bc8372317..16724bcaa2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.hlsl @@ -41,11 +41,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.msl index 98f78298f6..a05be67299 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.msl @@ -14,13 +14,13 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int a = 0; - float const x_28 = (*(tint_symbol_5)).x; + float const x_28 = (*(tint_symbol_3)).x; a = int(x_28); int const x_30 = a; if ((~(x_30) < 0)) { @@ -34,22 +34,28 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float int const x_48 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_51 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_54 = x_7.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_6) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); + *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); } else { int const x_58 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_59 = float(x_58); - *(tint_symbol_6) = float4(x_59, x_59, x_59, x_59); + *(tint_symbol_4) = float4(x_59, x_59, x_59, x_59); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.hlsl index 0bc8372317..16724bcaa2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.hlsl @@ -41,11 +41,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.msl index 98f78298f6..a05be67299 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.msl @@ -14,13 +14,13 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int a = 0; - float const x_28 = (*(tint_symbol_5)).x; + float const x_28 = (*(tint_symbol_3)).x; a = int(x_28); int const x_30 = a; if ((~(x_30) < 0)) { @@ -34,22 +34,28 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float int const x_48 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_51 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_54 = x_7.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_6) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); + *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); } else { int const x_58 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_59 = float(x_58); - *(tint_symbol_6) = float4(x_59, x_59, x_59, x_59); + *(tint_symbol_4) = float4(x_59, x_59, x_59, x_59); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.spvasm.expected.msl index ac797e73ee..65126f5b16 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.spvasm.expected.msl @@ -27,24 +27,24 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper_2 data = {}; int b = 0; int y = 0; int i = 0; float const x_42 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_45 = x_7.x_GLF_uniform_float_values.arr[0].el; - tint_array_wrapper_2 const tint_symbol_4 = {.arr={float4(x_42, x_42, x_42, x_42), float4(x_45, x_45, x_45, x_45)}}; - data = tint_symbol_4; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={float4(x_42, x_42, x_42, x_42), float4(x_45, x_45, x_45, x_45)}}; + data = tint_symbol_2; int const x_49 = x_10.x_GLF_uniform_int_values.arr[1].el; b = x_49; - float const x_51 = (*(tint_symbol_6)).y; + float const x_51 = (*(tint_symbol_4)).y; int const x_54 = x_10.x_GLF_uniform_int_values.arr[1].el; - float const x_56 = (*(tint_symbol_6)).y; + float const x_56 = (*(tint_symbol_4)).y; int const x_60 = x_10.x_GLF_uniform_int_values.arr[1].el; y = clamp(int(x_51), (x_54 | int(x_56)), x_60); int const x_63 = x_10.x_GLF_uniform_int_values.arr[1].el; @@ -93,17 +93,23 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_s } int const x_118 = x_10.x_GLF_uniform_int_values.arr[1].el; float4 const x_120 = data.arr[x_118]; - *(tint_symbol_7) = float4(x_120.x, x_120.y, x_120.z, x_120.w); + *(tint_symbol_5) = float4(x_120.x, x_120.y, x_120.z, x_120.w); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_7, x_10, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_7, x_10, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl.expected.msl index ac797e73ee..65126f5b16 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl.expected.msl @@ -27,24 +27,24 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper_2 data = {}; int b = 0; int y = 0; int i = 0; float const x_42 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_45 = x_7.x_GLF_uniform_float_values.arr[0].el; - tint_array_wrapper_2 const tint_symbol_4 = {.arr={float4(x_42, x_42, x_42, x_42), float4(x_45, x_45, x_45, x_45)}}; - data = tint_symbol_4; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={float4(x_42, x_42, x_42, x_42), float4(x_45, x_45, x_45, x_45)}}; + data = tint_symbol_2; int const x_49 = x_10.x_GLF_uniform_int_values.arr[1].el; b = x_49; - float const x_51 = (*(tint_symbol_6)).y; + float const x_51 = (*(tint_symbol_4)).y; int const x_54 = x_10.x_GLF_uniform_int_values.arr[1].el; - float const x_56 = (*(tint_symbol_6)).y; + float const x_56 = (*(tint_symbol_4)).y; int const x_60 = x_10.x_GLF_uniform_int_values.arr[1].el; y = clamp(int(x_51), (x_54 | int(x_56)), x_60); int const x_63 = x_10.x_GLF_uniform_int_values.arr[1].el; @@ -93,17 +93,23 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_s } int const x_118 = x_10.x_GLF_uniform_int_values.arr[1].el; float4 const x_120 = data.arr[x_118]; - *(tint_symbol_7) = float4(x_120.x, x_120.y, x_120.z, x_120.w); + *(tint_symbol_5) = float4(x_120.x, x_120.y, x_120.z, x_120.w); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_7, x_10, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_7, x_10, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.hlsl index 8837bf0a53..5e99870e0d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.hlsl @@ -65,11 +65,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl index a4060c7120..7ff331cac8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl @@ -24,19 +24,19 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int2 icoord = 0; float x_40 = 0.0f; int2 icoord_1 = 0; - float const x_42 = (*(tint_symbol_5)).x; + float const x_42 = (*(tint_symbol_3)).x; float const x_44 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_47 = x_6.x_GLF_uniform_float_values.arr[0].el; if (((x_42 * x_44) > x_47)) { - float4 const x_52 = *(tint_symbol_5); + float4 const x_52 = *(tint_symbol_3); float const x_55 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_60 = x_6.x_GLF_uniform_float_values.arr[2].el; @@ -55,9 +55,9 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy } float const x_83 = x_40; int const x_85 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(x_65, x_67, x_83, float(x_85)); + *(tint_symbol_4) = float4(x_65, x_67, x_83, float(x_85)); } else { - float4 const x_88 = *(tint_symbol_5); + float4 const x_88 = *(tint_symbol_3); float const x_91 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_94 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_96 = x_6.x_GLF_uniform_float_values.arr[2].el; @@ -66,18 +66,24 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy float const x_103 = x_6.x_GLF_uniform_float_values.arr[3].el; int const x_105 = icoord_1.x; float const x_108 = x_6.x_GLF_uniform_float_values.arr[3].el; - *(tint_symbol_6) = float4(x_101, x_103, float(x_105), x_108); + *(tint_symbol_4) = float4(x_101, x_103, float(x_105), x_108); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, x_9, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, x_9, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.hlsl index 8837bf0a53..5e99870e0d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.hlsl @@ -65,11 +65,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl index a4060c7120..7ff331cac8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl @@ -24,19 +24,19 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int2 icoord = 0; float x_40 = 0.0f; int2 icoord_1 = 0; - float const x_42 = (*(tint_symbol_5)).x; + float const x_42 = (*(tint_symbol_3)).x; float const x_44 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_47 = x_6.x_GLF_uniform_float_values.arr[0].el; if (((x_42 * x_44) > x_47)) { - float4 const x_52 = *(tint_symbol_5); + float4 const x_52 = *(tint_symbol_3); float const x_55 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_60 = x_6.x_GLF_uniform_float_values.arr[2].el; @@ -55,9 +55,9 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy } float const x_83 = x_40; int const x_85 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(x_65, x_67, x_83, float(x_85)); + *(tint_symbol_4) = float4(x_65, x_67, x_83, float(x_85)); } else { - float4 const x_88 = *(tint_symbol_5); + float4 const x_88 = *(tint_symbol_3); float const x_91 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_94 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_96 = x_6.x_GLF_uniform_float_values.arr[2].el; @@ -66,18 +66,24 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy float const x_103 = x_6.x_GLF_uniform_float_values.arr[3].el; int const x_105 = icoord_1.x; float const x_108 = x_6.x_GLF_uniform_float_values.arr[3].el; - *(tint_symbol_6) = float4(x_101, x_103, float(x_105), x_108); + *(tint_symbol_4) = float4(x_101, x_103, float(x_105), x_108); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, x_9, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, x_9, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.hlsl index 44df57fec2..9fffe99980 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.hlsl @@ -81,11 +81,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.msl index bb3bd84896..b524bab9e3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.msl @@ -24,23 +24,23 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_f1_(constant buf1& x_8, thread float* const x, thread float4* const tint_symbol_5) { +float func_f1_(constant buf1& x_8, thread float* const x, thread float4* const tint_symbol_3) { while (true) { if (true) { } else { break; } while (true) { - float const x_77 = (*(tint_symbol_5)).y; + float const x_77 = (*(tint_symbol_3)).y; float const x_79 = x_8.x_GLF_uniform_float_values.arr[2].el; if ((x_77 < x_79)) { while (true) { { - float const x_88 = (*(tint_symbol_5)).x; + float const x_88 = (*(tint_symbol_3)).x; float const x_90 = x_8.x_GLF_uniform_float_values.arr[2].el; if ((x_88 < x_90)) { } else { @@ -56,7 +56,7 @@ float func_f1_(constant buf1& x_8, thread float* const x, thread float4* const t return x_99; } { - float const x_101 = (*(tint_symbol_5)).y; + float const x_101 = (*(tint_symbol_3)).y; float const x_103 = x_8.x_GLF_uniform_float_values.arr[2].el; if ((x_101 < x_103)) { } else { @@ -69,33 +69,39 @@ float func_f1_(constant buf1& x_8, thread float* const x, thread float4* const t return x_106; } -void main_1(constant buf1& x_8, constant buf0& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf1& x_8, constant buf0& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { float param = 0.0f; - float const x_41 = (*(tint_symbol_6)).x; + float const x_41 = (*(tint_symbol_4)).x; param = x_41; - float const x_42 = func_f1_(x_8, &(param), tint_symbol_6); + float const x_42 = func_f1_(x_8, &(param), tint_symbol_4); float const x_44 = x_8.x_GLF_uniform_float_values.arr[1].el; if ((x_42 == x_44)) { int const x_50 = x_11.x_GLF_uniform_int_values.arr[0].el; int const x_53 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_56 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_59 = x_11.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_7) = float4(float(x_50), float(x_53), float(x_56), float(x_59)); + *(tint_symbol_5) = float4(float(x_50), float(x_53), float(x_56), float(x_59)); } else { int const x_63 = x_11.x_GLF_uniform_int_values.arr[1].el; float const x_64 = float(x_63); - *(tint_symbol_7) = float4(x_64, x_64, x_64, x_64); + *(tint_symbol_5) = float4(x_64, x_64, x_64, x_64); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_8, x_11, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_8, x_11, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.hlsl index 44df57fec2..9fffe99980 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.hlsl @@ -81,11 +81,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.msl index bb3bd84896..b524bab9e3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.msl @@ -24,23 +24,23 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_f1_(constant buf1& x_8, thread float* const x, thread float4* const tint_symbol_5) { +float func_f1_(constant buf1& x_8, thread float* const x, thread float4* const tint_symbol_3) { while (true) { if (true) { } else { break; } while (true) { - float const x_77 = (*(tint_symbol_5)).y; + float const x_77 = (*(tint_symbol_3)).y; float const x_79 = x_8.x_GLF_uniform_float_values.arr[2].el; if ((x_77 < x_79)) { while (true) { { - float const x_88 = (*(tint_symbol_5)).x; + float const x_88 = (*(tint_symbol_3)).x; float const x_90 = x_8.x_GLF_uniform_float_values.arr[2].el; if ((x_88 < x_90)) { } else { @@ -56,7 +56,7 @@ float func_f1_(constant buf1& x_8, thread float* const x, thread float4* const t return x_99; } { - float const x_101 = (*(tint_symbol_5)).y; + float const x_101 = (*(tint_symbol_3)).y; float const x_103 = x_8.x_GLF_uniform_float_values.arr[2].el; if ((x_101 < x_103)) { } else { @@ -69,33 +69,39 @@ float func_f1_(constant buf1& x_8, thread float* const x, thread float4* const t return x_106; } -void main_1(constant buf1& x_8, constant buf0& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf1& x_8, constant buf0& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { float param = 0.0f; - float const x_41 = (*(tint_symbol_6)).x; + float const x_41 = (*(tint_symbol_4)).x; param = x_41; - float const x_42 = func_f1_(x_8, &(param), tint_symbol_6); + float const x_42 = func_f1_(x_8, &(param), tint_symbol_4); float const x_44 = x_8.x_GLF_uniform_float_values.arr[1].el; if ((x_42 == x_44)) { int const x_50 = x_11.x_GLF_uniform_int_values.arr[0].el; int const x_53 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_56 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_59 = x_11.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_7) = float4(float(x_50), float(x_53), float(x_56), float(x_59)); + *(tint_symbol_5) = float4(float(x_50), float(x_53), float(x_56), float(x_59)); } else { int const x_63 = x_11.x_GLF_uniform_int_values.arr[1].el; float const x_64 = float(x_63); - *(tint_symbol_7) = float4(x_64, x_64, x_64, x_64); + *(tint_symbol_5) = float4(x_64, x_64, x_64, x_64); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_8, x_11, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_8, x_11, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.hlsl index ca64df3ba9..6f574e397e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.hlsl @@ -59,11 +59,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.msl index d8dcfb969d..2aade82ea5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.msl @@ -27,7 +27,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -50,9 +50,9 @@ bool func_vf2_(constant buf1& x_8, constant buf2& x_10, thread float2* const pos return true; } -void main_1(constant buf1& x_8, constant buf2& x_10, constant buf0& x_13, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_8, constant buf2& x_10, constant buf0& x_13, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 param = 0.0f; - float4 const x_42 = *(tint_symbol_5); + float4 const x_42 = *(tint_symbol_3); param = float2(x_42.x, x_42.y); bool const x_44 = func_vf2_(x_8, x_10, &(param)); if (x_44) { @@ -62,17 +62,23 @@ void main_1(constant buf1& x_8, constant buf2& x_10, constant buf0& x_13, thread int const x_51 = x_13.x_GLF_uniform_int_values.arr[1].el; int const x_54 = x_13.x_GLF_uniform_int_values.arr[1].el; int const x_57 = x_13.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_48), float(x_51), float(x_54), float(x_57)); + *(tint_symbol_4) = float4(float(x_48), float(x_51), float(x_54), float(x_57)); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_13 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, x_10, x_13, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_8, constant buf2& x_10, constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, x_10, x_13, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_13 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, x_13, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.hlsl index ca64df3ba9..6f574e397e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.hlsl @@ -59,11 +59,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.msl index d8dcfb969d..2aade82ea5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.msl @@ -27,7 +27,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -50,9 +50,9 @@ bool func_vf2_(constant buf1& x_8, constant buf2& x_10, thread float2* const pos return true; } -void main_1(constant buf1& x_8, constant buf2& x_10, constant buf0& x_13, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_8, constant buf2& x_10, constant buf0& x_13, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 param = 0.0f; - float4 const x_42 = *(tint_symbol_5); + float4 const x_42 = *(tint_symbol_3); param = float2(x_42.x, x_42.y); bool const x_44 = func_vf2_(x_8, x_10, &(param)); if (x_44) { @@ -62,17 +62,23 @@ void main_1(constant buf1& x_8, constant buf2& x_10, constant buf0& x_13, thread int const x_51 = x_13.x_GLF_uniform_int_values.arr[1].el; int const x_54 = x_13.x_GLF_uniform_int_values.arr[1].el; int const x_57 = x_13.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_48), float(x_51), float(x_54), float(x_57)); + *(tint_symbol_4) = float4(float(x_48), float(x_51), float(x_54), float(x_57)); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_13 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, x_10, x_13, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_8, constant buf2& x_10, constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, x_10, x_13, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_13 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, x_13, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.hlsl index f3abef732a..6fc292f8d1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.hlsl @@ -54,9 +54,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.msl index e0f4d2a72a..d2b35f9c8e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.msl @@ -18,23 +18,23 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { - *(tint_symbol_4) = 0; +void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { + *(tint_symbol_3) = 0; int const x_26 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_29 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_32 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_35 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_5) = float4(float(x_26), float(x_29), float(x_32), float(x_35)); + *(tint_symbol_4) = float4(float(x_26), float(x_29), float(x_32), float(x_35)); while (true) { bool x_54 = false; bool x_55_phi = false; - int const x_42 = *(tint_symbol_4); + int const x_42 = *(tint_symbol_3); if ((x_42 < 100)) { } else { break; } - int const x_45 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_45) + as_type(1))); + int const x_45 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_45) + as_type(1))); x_55_phi = true; if (!(true)) { int const x_51 = x_6.x_GLF_uniform_int_values.arr[0].el; @@ -48,26 +48,32 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* } } while (true) { - int const x_63 = *(tint_symbol_4); + int const x_63 = *(tint_symbol_3); if ((x_63 < 100)) { } else { break; } - int const x_66 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_66) + as_type(1))); + int const x_66 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_66) + as_type(1))); int const x_69 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_70 = float(x_69); - *(tint_symbol_5) = float4(x_70, x_70, x_70, x_70); + *(tint_symbol_4) = float4(x_70, x_70, x_70, x_70); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_6, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.hlsl index f3abef732a..6fc292f8d1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.hlsl @@ -54,9 +54,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.msl index e0f4d2a72a..d2b35f9c8e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.msl @@ -18,23 +18,23 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { - *(tint_symbol_4) = 0; +void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { + *(tint_symbol_3) = 0; int const x_26 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_29 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_32 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_35 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_5) = float4(float(x_26), float(x_29), float(x_32), float(x_35)); + *(tint_symbol_4) = float4(float(x_26), float(x_29), float(x_32), float(x_35)); while (true) { bool x_54 = false; bool x_55_phi = false; - int const x_42 = *(tint_symbol_4); + int const x_42 = *(tint_symbol_3); if ((x_42 < 100)) { } else { break; } - int const x_45 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_45) + as_type(1))); + int const x_45 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_45) + as_type(1))); x_55_phi = true; if (!(true)) { int const x_51 = x_6.x_GLF_uniform_int_values.arr[0].el; @@ -48,26 +48,32 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* } } while (true) { - int const x_63 = *(tint_symbol_4); + int const x_63 = *(tint_symbol_3); if ((x_63 < 100)) { } else { break; } - int const x_66 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_66) + as_type(1))); + int const x_66 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_66) + as_type(1))); int const x_69 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_70 = float(x_69); - *(tint_symbol_5) = float4(x_70, x_70, x_70, x_70); + *(tint_symbol_4) = float4(x_70, x_70, x_70, x_70); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_6, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.hlsl index 1765c5c5aa..198f3b080e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.hlsl @@ -106,9 +106,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl index 5c952b7431..e311ccee51 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl @@ -31,14 +31,14 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { float4x4 m = float4x4(0.0f); float4 v = 0.0f; float f = 0.0f; int a = 0; int b = 0; float zero = 0.0f; - *(tint_symbol_4) = 0; + *(tint_symbol_3) = 0; float const x_62 = x_7.x_GLF_uniform_float_values.arr[1].el; float const x_64 = x_7.x_GLF_uniform_float_values.arr[2].el; float const x_66 = x_7.x_GLF_uniform_float_values.arr[3].el; @@ -66,13 +66,13 @@ void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int const x_110 = x_12.x_GLF_uniform_int_values.arr[0].el; a = x_110; while (true) { - int const x_115 = *(tint_symbol_4); + int const x_115 = *(tint_symbol_3); if ((x_115 < 10)) { } else { break; } - int const x_118 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_118) + as_type(1))); + int const x_118 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_118) + as_type(1))); int const x_120 = a; int const x_121 = clamp(x_120, 0, 3); float const x_123 = x_7.x_GLF_uniform_float_values.arr[1].el; @@ -81,13 +81,13 @@ void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int const x_129 = x_12.x_GLF_uniform_int_values.arr[2].el; b = x_129; while (true) { - int const x_134 = *(tint_symbol_4); + int const x_134 = *(tint_symbol_3); if ((x_134 < 10)) { } else { break; } - int const x_137 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_137) + as_type(1))); + int const x_137 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_137) + as_type(1))); int const x_139 = b; float const x_142 = v[clamp(x_139, 0, 3)]; int const x_143 = b; @@ -130,16 +130,22 @@ void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread float const x_185 = zero; int const x_187 = x_12.x_GLF_uniform_int_values.arr[0].el; float const x_189 = f; - *(tint_symbol_5) = float4(x_184, x_185, float(x_187), x_189); + *(tint_symbol_4) = float4(x_184, x_185, float(x_187), x_189); return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]], constant buf2& x_15 [[buffer(2)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_7, x_12, x_15, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_7, x_12, x_15, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]], constant buf2& x_15 [[buffer(2)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_12, x_15, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.hlsl index 1765c5c5aa..198f3b080e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.hlsl @@ -106,9 +106,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl index 5c952b7431..e311ccee51 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl @@ -31,14 +31,14 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { float4x4 m = float4x4(0.0f); float4 v = 0.0f; float f = 0.0f; int a = 0; int b = 0; float zero = 0.0f; - *(tint_symbol_4) = 0; + *(tint_symbol_3) = 0; float const x_62 = x_7.x_GLF_uniform_float_values.arr[1].el; float const x_64 = x_7.x_GLF_uniform_float_values.arr[2].el; float const x_66 = x_7.x_GLF_uniform_float_values.arr[3].el; @@ -66,13 +66,13 @@ void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int const x_110 = x_12.x_GLF_uniform_int_values.arr[0].el; a = x_110; while (true) { - int const x_115 = *(tint_symbol_4); + int const x_115 = *(tint_symbol_3); if ((x_115 < 10)) { } else { break; } - int const x_118 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_118) + as_type(1))); + int const x_118 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_118) + as_type(1))); int const x_120 = a; int const x_121 = clamp(x_120, 0, 3); float const x_123 = x_7.x_GLF_uniform_float_values.arr[1].el; @@ -81,13 +81,13 @@ void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int const x_129 = x_12.x_GLF_uniform_int_values.arr[2].el; b = x_129; while (true) { - int const x_134 = *(tint_symbol_4); + int const x_134 = *(tint_symbol_3); if ((x_134 < 10)) { } else { break; } - int const x_137 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_137) + as_type(1))); + int const x_137 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_137) + as_type(1))); int const x_139 = b; float const x_142 = v[clamp(x_139, 0, 3)]; int const x_143 = b; @@ -130,16 +130,22 @@ void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread float const x_185 = zero; int const x_187 = x_12.x_GLF_uniform_int_values.arr[0].el; float const x_189 = f; - *(tint_symbol_5) = float4(x_184, x_185, float(x_187), x_189); + *(tint_symbol_4) = float4(x_184, x_185, float(x_187), x_189); return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]], constant buf2& x_15 [[buffer(2)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_7, x_12, x_15, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_7, x_12, x_15, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]], constant buf2& x_15 [[buffer(2)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_12, x_15, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.hlsl index 3187dfa383..02e93befbc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.hlsl @@ -61,9 +61,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl index 3a59796c9d..1b0dd059af 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl @@ -18,15 +18,15 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -int func_(constant buf0& x_7, thread int* const tint_symbol_4) { +int func_(constant buf0& x_7, thread int* const tint_symbol_3) { while (true) { - int const x_72 = *(tint_symbol_4); + int const x_72 = *(tint_symbol_3); if ((x_72 < 100)) { } else { break; } - int const x_75 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_75) + as_type(1))); + int const x_75 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_75) + as_type(1))); int const x_78 = x_7.x_GLF_uniform_int_values.arr[0].el; return x_78; } @@ -34,24 +34,24 @@ int func_(constant buf0& x_7, thread int* const tint_symbol_4) { return x_80; } -void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { int a = 0; - *(tint_symbol_5) = 0; + *(tint_symbol_4) = 0; while (true) { - int const x_35 = *(tint_symbol_5); - *(tint_symbol_5) = as_type((as_type(x_35) + as_type(1))); + int const x_35 = *(tint_symbol_4); + *(tint_symbol_4) = as_type((as_type(x_35) + as_type(1))); if (false) { return; } { - int const x_39 = *(tint_symbol_5); + int const x_39 = *(tint_symbol_4); if ((true & (x_39 < 100))) { } else { break; } } } - int const x_42 = func_(x_7, tint_symbol_5); + int const x_42 = func_(x_7, tint_symbol_4); a = x_42; int const x_43 = a; int const x_45 = x_7.x_GLF_uniform_int_values.arr[2].el; @@ -60,21 +60,27 @@ void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* int const x_54 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_57 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_60 = x_7.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_51), float(x_54), float(x_57), float(x_60)); + *(tint_symbol_5) = float4(float(x_51), float(x_54), float(x_57), float(x_60)); } else { int const x_64 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_65 = float(x_64); - *(tint_symbol_6) = float4(x_65, x_65, x_65, x_65); + *(tint_symbol_5) = float4(x_65, x_65, x_65, x_65); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread int tint_symbol_7 = 0; - thread float4 tint_symbol_8 = 0.0f; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread int* const tint_symbol_6, thread float4* const tint_symbol_7) { + main_1(x_7, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread int tint_symbol_8 = 0; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.hlsl index d19bc36f4a..6400032eb6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.hlsl @@ -65,9 +65,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.msl index 7db4d7c31c..20d17ae61d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.msl @@ -18,15 +18,15 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -int func_(constant buf0& x_7, thread int* const tint_symbol_4) { +int func_(constant buf0& x_7, thread int* const tint_symbol_3) { while (true) { - int const x_72 = *(tint_symbol_4); + int const x_72 = *(tint_symbol_3); if ((x_72 < 100)) { } else { break; } - int const x_75 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_75) + as_type(1))); + int const x_75 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_75) + as_type(1))); int const x_78 = x_7.x_GLF_uniform_int_values.arr[0].el; return x_78; } @@ -34,24 +34,24 @@ int func_(constant buf0& x_7, thread int* const tint_symbol_4) { return x_80; } -void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { int a = 0; - *(tint_symbol_5) = 0; + *(tint_symbol_4) = 0; while (true) { - int const x_35 = *(tint_symbol_5); - *(tint_symbol_5) = as_type((as_type(x_35) + as_type(1))); + int const x_35 = *(tint_symbol_4); + *(tint_symbol_4) = as_type((as_type(x_35) + as_type(1))); if (false) { return; } { - int const x_39 = *(tint_symbol_5); + int const x_39 = *(tint_symbol_4); if ((true && (x_39 < 100))) { } else { break; } } } - int const x_42 = func_(x_7, tint_symbol_5); + int const x_42 = func_(x_7, tint_symbol_4); a = x_42; int const x_43 = a; int const x_45 = x_7.x_GLF_uniform_int_values.arr[2].el; @@ -60,21 +60,27 @@ void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* int const x_54 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_57 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_60 = x_7.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_51), float(x_54), float(x_57), float(x_60)); + *(tint_symbol_5) = float4(float(x_51), float(x_54), float(x_57), float(x_60)); } else { int const x_64 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_65 = float(x_64); - *(tint_symbol_6) = float4(x_65, x_65, x_65, x_65); + *(tint_symbol_5) = float4(x_65, x_65, x_65, x_65); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread int tint_symbol_7 = 0; - thread float4 tint_symbol_8 = 0.0f; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread int* const tint_symbol_6, thread float4* const tint_symbol_7) { + main_1(x_7, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread int tint_symbol_8 = 0; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.hlsl index 6d2b86d38f..40a6b45147 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.hlsl @@ -67,9 +67,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.msl index 56d2e87f08..657e844618 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int x_23 = 0; int x_27 = 0; int x_37 = 0; @@ -67,19 +67,25 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { if ((x_45 == x_32)) { float const x_50 = float(x_27); float const x_51 = float(x_32); - *(tint_symbol_4) = float4(x_50, x_51, x_51, x_50); + *(tint_symbol_3) = float4(x_50, x_51, x_51, x_50); } else { float const x_53 = float(x_32); - *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53); + *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.hlsl index 6d2b86d38f..40a6b45147 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.hlsl @@ -67,9 +67,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.msl index 56d2e87f08..657e844618 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int x_23 = 0; int x_27 = 0; int x_37 = 0; @@ -67,19 +67,25 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { if ((x_45 == x_32)) { float const x_50 = float(x_27); float const x_51 = float(x_32); - *(tint_symbol_4) = float4(x_50, x_51, x_51, x_50); + *(tint_symbol_3) = float4(x_50, x_51, x_51, x_50); } else { float const x_53 = float(x_32); - *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53); + *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.hlsl index b176ae54f3..cb25c1f153 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.msl index ef3b65bc3e..29a482d7c7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.msl @@ -18,43 +18,49 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { - *(tint_symbol_4) = 0; +void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { + *(tint_symbol_3) = 0; while (true) { - int const x_30 = *(tint_symbol_4); + int const x_30 = *(tint_symbol_3); if ((x_30 < 100)) { } else { break; } - int const x_33 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_33) + as_type(1))); - int const x_35 = *(tint_symbol_4); - int const x_36 = *(tint_symbol_4); + int const x_33 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_33) + as_type(1))); + int const x_35 = *(tint_symbol_3); + int const x_36 = *(tint_symbol_3); if ((as_type((as_type(x_35) * as_type(x_36))) > 10)) { break; } } - int const x_41 = *(tint_symbol_4); + int const x_41 = *(tint_symbol_3); if ((x_41 == 4)) { int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_50 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_56 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_47), float(x_50), float(x_53), float(x_56)); + *(tint_symbol_4) = float4(float(x_47), float(x_50), float(x_53), float(x_56)); } else { int const x_60 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_61 = float(x_60); - *(tint_symbol_5) = float4(x_61, x_61, x_61, x_61); + *(tint_symbol_4) = float4(x_61, x_61, x_61, x_61); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_6, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.hlsl index b176ae54f3..cb25c1f153 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.msl index ef3b65bc3e..29a482d7c7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.msl @@ -18,43 +18,49 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { - *(tint_symbol_4) = 0; +void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { + *(tint_symbol_3) = 0; while (true) { - int const x_30 = *(tint_symbol_4); + int const x_30 = *(tint_symbol_3); if ((x_30 < 100)) { } else { break; } - int const x_33 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_33) + as_type(1))); - int const x_35 = *(tint_symbol_4); - int const x_36 = *(tint_symbol_4); + int const x_33 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_33) + as_type(1))); + int const x_35 = *(tint_symbol_3); + int const x_36 = *(tint_symbol_3); if ((as_type((as_type(x_35) * as_type(x_36))) > 10)) { break; } } - int const x_41 = *(tint_symbol_4); + int const x_41 = *(tint_symbol_3); if ((x_41 == 4)) { int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_50 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_56 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_47), float(x_50), float(x_53), float(x_56)); + *(tint_symbol_4) = float4(float(x_47), float(x_50), float(x_53), float(x_56)); } else { int const x_60 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_61 = float(x_60); - *(tint_symbol_5) = float4(x_61, x_61, x_61, x_61); + *(tint_symbol_4) = float4(x_61, x_61, x_61, x_61); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_6, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.hlsl index edc0a80f30..bab5e31a87 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.hlsl @@ -27,9 +27,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.msl index 5db673bcc0..440886fec3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int const x_25 = x_6.zero; a = x_25; @@ -25,18 +25,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } int const x_35 = a; if ((x_35 == 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.hlsl index edc0a80f30..bab5e31a87 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.hlsl @@ -27,9 +27,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.msl index 5db673bcc0..440886fec3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int const x_25 = x_6.zero; a = x_25; @@ -25,18 +25,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } int const x_35 = a; if ((x_35 == 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.hlsl index 7837732df0..6470de0d5c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.hlsl @@ -49,11 +49,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.msl index 2a9fb15b47..921a389875 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.msl @@ -24,14 +24,14 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float const x_31 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_5) = float4(x_31, x_31, x_31, x_31); - float const x_34 = (*(tint_symbol_6)).y; + *(tint_symbol_3) = float4(x_31, x_31, x_31, x_31); + float const x_34 = (*(tint_symbol_4)).y; float const x_36 = x_6.x_GLF_uniform_float_values.arr[0].el; if ((x_34 >= x_36)) { int const x_41 = x_8.x_GLF_uniform_int_values.arr[1].el; @@ -41,7 +41,7 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_45 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_46 = float(x_45); float const x_47 = float(x_41); - *(tint_symbol_5) = float4(x_46, x_47, x_47, x_46); + *(tint_symbol_3) = float4(x_46, x_47, x_47, x_46); break; } default: { @@ -52,18 +52,24 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_50 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_52 = x_8.x_GLF_uniform_int_values.arr[0].el; if ((x_50 == x_52)) { - *(tint_symbol_5) = float4(x_36, x_36, x_36, x_36); + *(tint_symbol_3) = float4(x_36, x_36, x_36, x_36); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, x_8, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, x_8, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.hlsl index 7837732df0..6470de0d5c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.hlsl @@ -49,11 +49,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.msl index 2a9fb15b47..921a389875 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.msl @@ -24,14 +24,14 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float const x_31 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_5) = float4(x_31, x_31, x_31, x_31); - float const x_34 = (*(tint_symbol_6)).y; + *(tint_symbol_3) = float4(x_31, x_31, x_31, x_31); + float const x_34 = (*(tint_symbol_4)).y; float const x_36 = x_6.x_GLF_uniform_float_values.arr[0].el; if ((x_34 >= x_36)) { int const x_41 = x_8.x_GLF_uniform_int_values.arr[1].el; @@ -41,7 +41,7 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_45 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_46 = float(x_45); float const x_47 = float(x_41); - *(tint_symbol_5) = float4(x_46, x_47, x_47, x_46); + *(tint_symbol_3) = float4(x_46, x_47, x_47, x_46); break; } default: { @@ -52,18 +52,24 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_50 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_52 = x_8.x_GLF_uniform_int_values.arr[0].el; if ((x_50 == x_52)) { - *(tint_symbol_5) = float4(x_36, x_36, x_36, x_36); + *(tint_symbol_3) = float4(x_36, x_36, x_36, x_36); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, x_8, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, x_8, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.hlsl index 1ee50e8c13..18391f6bd1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.hlsl @@ -65,9 +65,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.msl index 20c03a24bb..5bbab8808a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int b = 0; int c = 0; @@ -67,20 +67,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_74 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_77 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_80 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_71), float(x_74), float(x_77), float(x_80)); + *(tint_symbol_3) = float4(float(x_71), float(x_74), float(x_77), float(x_80)); } else { int const x_84 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_85 = float(x_84); - *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85); + *(tint_symbol_3) = float4(x_85, x_85, x_85, x_85); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.hlsl index 1ee50e8c13..18391f6bd1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.hlsl @@ -65,9 +65,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.msl index 20c03a24bb..5bbab8808a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int b = 0; int c = 0; @@ -67,20 +67,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_74 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_77 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_80 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_71), float(x_74), float(x_77), float(x_80)); + *(tint_symbol_3) = float4(float(x_71), float(x_74), float(x_77), float(x_80)); } else { int const x_84 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_85 = float(x_84); - *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85); + *(tint_symbol_3) = float4(x_85, x_85, x_85, x_85); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.hlsl index 5317e21905..98a05e1529 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.hlsl @@ -47,9 +47,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.msl index 5989dc482a..48dc9ffb27 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; a = 1; while (true) { @@ -45,20 +45,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_50 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(1.0f, float(x_47), float(x_50), float(x_53)); + *(tint_symbol_3) = float4(1.0f, float(x_47), float(x_50), float(x_53)); } else { int const x_57 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_58 = float(x_57); - *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.hlsl index 5317e21905..98a05e1529 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.hlsl @@ -47,9 +47,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.msl index 5989dc482a..48dc9ffb27 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; a = 1; while (true) { @@ -45,20 +45,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_50 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(1.0f, float(x_47), float(x_50), float(x_53)); + *(tint_symbol_3) = float4(1.0f, float(x_47), float(x_50), float(x_53)); } else { int const x_57 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_58 = float(x_57); - *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.hlsl index 3ac8a37a76..bcaa7b6b06 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.hlsl @@ -44,9 +44,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.msl index 82604e9b49..c35cc8ce3e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int a = 0; int i = 0; a = 0; @@ -42,18 +42,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } int const x_44 = a; if ((x_44 == 2)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.hlsl index 3ac8a37a76..bcaa7b6b06 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.hlsl @@ -44,9 +44,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.msl index 82604e9b49..c35cc8ce3e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int a = 0; int i = 0; a = 0; @@ -42,18 +42,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } int const x_44 = a; if ((x_44 == 2)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.hlsl index 9e41aaaa38..33c8f79453 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.hlsl @@ -17,8 +17,8 @@ void main_1() { const uint scalar_offset = ((16u * uint(0))) / 4; const float x_36 = asfloat(x_6[scalar_offset / 4][scalar_offset % 4]); const float x_38 = asfloat(x_6[2].x); - const float tint_symbol_4[3] = {x_34, x_36, x_38}; - arr = tint_symbol_4; + const float tint_symbol_3[3] = {x_34, x_36, x_38}; + arr = tint_symbol_3; a = 0; while (true) { const int x_44 = a; @@ -79,9 +79,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl index 7f0eda59d9..c5dd9378b7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { tint_array_wrapper_2 arr = {}; int a = 0; bool x_69 = false; @@ -41,8 +41,8 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy float const x_34 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_36 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_38 = x_6.x_GLF_uniform_float_values.arr[2].el; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_34, x_36, x_38}}; - arr = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_34, x_36, x_38}}; + arr = tint_symbol_2; a = 0; while (true) { int const x_44 = a; @@ -84,19 +84,25 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy float const x_89 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_91 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_93 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_5) = float4(x_87, x_89, x_91, x_93); + *(tint_symbol_4) = float4(x_87, x_89, x_91, x_93); } else { float const x_96 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_5) = float4(x_96, x_96, x_96, x_96); + *(tint_symbol_4) = float4(x_96, x_96, x_96, x_96); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) { + main_1(x_6, x_9, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.hlsl index 9e41aaaa38..33c8f79453 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.hlsl @@ -17,8 +17,8 @@ void main_1() { const uint scalar_offset = ((16u * uint(0))) / 4; const float x_36 = asfloat(x_6[scalar_offset / 4][scalar_offset % 4]); const float x_38 = asfloat(x_6[2].x); - const float tint_symbol_4[3] = {x_34, x_36, x_38}; - arr = tint_symbol_4; + const float tint_symbol_3[3] = {x_34, x_36, x_38}; + arr = tint_symbol_3; a = 0; while (true) { const int x_44 = a; @@ -79,9 +79,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl index 7f0eda59d9..c5dd9378b7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { tint_array_wrapper_2 arr = {}; int a = 0; bool x_69 = false; @@ -41,8 +41,8 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy float const x_34 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_36 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_38 = x_6.x_GLF_uniform_float_values.arr[2].el; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_34, x_36, x_38}}; - arr = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_34, x_36, x_38}}; + arr = tint_symbol_2; a = 0; while (true) { int const x_44 = a; @@ -84,19 +84,25 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy float const x_89 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_91 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_93 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_5) = float4(x_87, x_89, x_91, x_93); + *(tint_symbol_4) = float4(x_87, x_89, x_91, x_93); } else { float const x_96 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_5) = float4(x_96, x_96, x_96, x_96); + *(tint_symbol_4) = float4(x_96, x_96, x_96, x_96); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) { + main_1(x_6, x_9, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.hlsl index 8d0ce84b85..f581244ca7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.hlsl @@ -65,9 +65,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.msl index 9c31fcefd0..f0d8a33d89 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) { float f0 = 0.0f; float f1 = 0.0f; int i = 0; @@ -72,20 +72,26 @@ void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_s int const x_72 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_75 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_78 = x_10.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_69), float(x_72), float(x_75), float(x_78)); + *(tint_symbol_3) = float4(float(x_69), float(x_72), float(x_75), float(x_78)); } else { int const x_82 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_83 = float(x_82); - *(tint_symbol_4) = float4(x_83, x_83, x_83, x_83); + *(tint_symbol_3) = float4(x_83, x_83, x_83, x_83); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.hlsl index 8d0ce84b85..f581244ca7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.hlsl @@ -65,9 +65,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.msl index 9c31fcefd0..f0d8a33d89 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) { float f0 = 0.0f; float f1 = 0.0f; int i = 0; @@ -72,20 +72,26 @@ void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_s int const x_72 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_75 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_78 = x_10.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_69), float(x_72), float(x_75), float(x_78)); + *(tint_symbol_3) = float4(float(x_69), float(x_72), float(x_75), float(x_78)); } else { int const x_82 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_83 = float(x_82); - *(tint_symbol_4) = float4(x_83, x_83, x_83, x_83); + *(tint_symbol_3) = float4(x_83, x_83, x_83, x_83); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.hlsl index e89c902e2a..a51dc8eb77 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.hlsl @@ -71,9 +71,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.msl index 6c3580d827..2d05e0943d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void func_(constant buf0& x_7, thread int* const tint_symbol_4) { +void func_(constant buf0& x_7, thread int* const tint_symbol_3) { int x_66_phi = 0; int const x_62 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_64 = x_7.x_GLF_uniform_int_values.arr[0].el; @@ -32,8 +32,8 @@ void func_(constant buf0& x_7, thread int* const tint_symbol_4) { break; } { - int const x_73 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_73) + as_type(1))); + int const x_73 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_73) + as_type(1))); x_67 = as_type((as_type(x_66) + as_type(1))); x_66_phi = x_67; } @@ -44,53 +44,59 @@ void func_(constant buf0& x_7, thread int* const tint_symbol_4) { return; } -void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { - *(tint_symbol_5) = 0; +void main_1(constant buf0& x_7, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = 0; while (true) { - int const x_28 = *(tint_symbol_5); + int const x_28 = *(tint_symbol_4); if ((x_28 < 10)) { } else { break; } { - int const x_32 = *(tint_symbol_5); - *(tint_symbol_5) = as_type((as_type(x_32) + as_type(1))); - func_(x_7, tint_symbol_5); + int const x_32 = *(tint_symbol_4); + *(tint_symbol_4) = as_type((as_type(x_32) + as_type(1))); + func_(x_7, tint_symbol_4); } } while (true) { - int const x_36 = *(tint_symbol_5); + int const x_36 = *(tint_symbol_4); if ((x_36 < 10)) { } else { break; } { - int const x_40 = *(tint_symbol_5); - *(tint_symbol_5) = as_type((as_type(x_40) + as_type(1))); + int const x_40 = *(tint_symbol_4); + *(tint_symbol_4) = as_type((as_type(x_40) + as_type(1))); } } - int const x_42 = *(tint_symbol_5); + int const x_42 = *(tint_symbol_4); int const x_44 = x_7.x_GLF_uniform_int_values.arr[2].el; if ((x_42 == x_44)) { int const x_50 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_51 = float(x_50); int const x_53 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_54 = float(x_53); - *(tint_symbol_6) = float4(x_51, x_54, x_54, x_51); + *(tint_symbol_5) = float4(x_51, x_54, x_54, x_51); } else { int const x_57 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_58 = float(x_57); - *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_5) = float4(x_58, x_58, x_58, x_58); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread int tint_symbol_7 = 0; - thread float4 tint_symbol_8 = 0.0f; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread int* const tint_symbol_6, thread float4* const tint_symbol_7) { + main_1(x_7, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread int tint_symbol_8 = 0; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.hlsl index e89c902e2a..a51dc8eb77 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.hlsl @@ -71,9 +71,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.msl index 6c3580d827..2d05e0943d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void func_(constant buf0& x_7, thread int* const tint_symbol_4) { +void func_(constant buf0& x_7, thread int* const tint_symbol_3) { int x_66_phi = 0; int const x_62 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_64 = x_7.x_GLF_uniform_int_values.arr[0].el; @@ -32,8 +32,8 @@ void func_(constant buf0& x_7, thread int* const tint_symbol_4) { break; } { - int const x_73 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_73) + as_type(1))); + int const x_73 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_73) + as_type(1))); x_67 = as_type((as_type(x_66) + as_type(1))); x_66_phi = x_67; } @@ -44,53 +44,59 @@ void func_(constant buf0& x_7, thread int* const tint_symbol_4) { return; } -void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { - *(tint_symbol_5) = 0; +void main_1(constant buf0& x_7, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = 0; while (true) { - int const x_28 = *(tint_symbol_5); + int const x_28 = *(tint_symbol_4); if ((x_28 < 10)) { } else { break; } { - int const x_32 = *(tint_symbol_5); - *(tint_symbol_5) = as_type((as_type(x_32) + as_type(1))); - func_(x_7, tint_symbol_5); + int const x_32 = *(tint_symbol_4); + *(tint_symbol_4) = as_type((as_type(x_32) + as_type(1))); + func_(x_7, tint_symbol_4); } } while (true) { - int const x_36 = *(tint_symbol_5); + int const x_36 = *(tint_symbol_4); if ((x_36 < 10)) { } else { break; } { - int const x_40 = *(tint_symbol_5); - *(tint_symbol_5) = as_type((as_type(x_40) + as_type(1))); + int const x_40 = *(tint_symbol_4); + *(tint_symbol_4) = as_type((as_type(x_40) + as_type(1))); } } - int const x_42 = *(tint_symbol_5); + int const x_42 = *(tint_symbol_4); int const x_44 = x_7.x_GLF_uniform_int_values.arr[2].el; if ((x_42 == x_44)) { int const x_50 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_51 = float(x_50); int const x_53 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_54 = float(x_53); - *(tint_symbol_6) = float4(x_51, x_54, x_54, x_51); + *(tint_symbol_5) = float4(x_51, x_54, x_54, x_51); } else { int const x_57 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_58 = float(x_57); - *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_5) = float4(x_58, x_58, x_58, x_58); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread int tint_symbol_7 = 0; - thread float4 tint_symbol_8 = 0.0f; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread int* const tint_symbol_6, thread float4* const tint_symbol_7) { + main_1(x_7, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread int tint_symbol_8 = 0; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.hlsl index a84f052a45..724836b949 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.msl index 141d1a78b6..9358cfe467 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { tint_array_wrapper a = {}; int b = 0; int c = 0; @@ -27,7 +27,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { c = x_40; int const x_41 = c; if ((x_41 > 1)) { - *(tint_symbol_4) = float4(0.0f, 1.0f, 1.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 1.0f, 1.0f, 0.0f); int const x_45 = b; b = as_type((as_type(x_45) + as_type(1))); } @@ -39,18 +39,24 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { a.arr[x_50_save] = as_type((as_type(x_51) + as_type(1))); int const x_54 = a.arr[2]; if ((x_54 == 4)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.hlsl index a84f052a45..724836b949 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.msl index 141d1a78b6..9358cfe467 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { tint_array_wrapper a = {}; int b = 0; int c = 0; @@ -27,7 +27,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { c = x_40; int const x_41 = c; if ((x_41 > 1)) { - *(tint_symbol_4) = float4(0.0f, 1.0f, 1.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 1.0f, 1.0f, 0.0f); int const x_45 = b; b = as_type((as_type(x_45) + as_type(1))); } @@ -39,18 +39,24 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { a.arr[x_50_save] = as_type((as_type(x_51) + as_type(1))); int const x_54 = a.arr[2]; if ((x_54 == 4)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.hlsl index 7e2ef37dbc..ae9dea0478 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.hlsl @@ -21,8 +21,8 @@ void main_1() { } const int x_50 = i; const int x_52 = asint(x_6[4].x); - const int tint_symbol_3[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; - indexable = tint_symbol_3; + const int tint_symbol_2[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; + indexable = tint_symbol_2; const int x_55 = indexable[(x_50 % x_52)]; a = (a + x_55); { @@ -52,9 +52,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.msl index 3f78d7f847..09f1285ff7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int a = 0; int i = 0; tint_array_wrapper_1 indexable = {}; @@ -38,8 +38,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { } int const x_50 = i; int const x_52 = x_6.x_GLF_uniform_int_values.arr[4].el; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9}}; - indexable = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9}}; + indexable = tint_symbol_2; int const x_55 = indexable.arr[(x_50 % x_52)]; int const x_56 = a; a = as_type((as_type(x_56) + as_type(x_55))); @@ -55,20 +55,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_71 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_74 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_77 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_5) = float4(float(x_68), float(x_71), float(x_74), float(x_77)); + *(tint_symbol_4) = float4(float(x_68), float(x_71), float(x_74), float(x_77)); } else { int const x_81 = x_6.x_GLF_uniform_int_values.arr[3].el; float const x_82 = float(x_81); - *(tint_symbol_5) = float4(x_82, x_82, x_82, x_82); + *(tint_symbol_4) = float4(x_82, x_82, x_82, x_82); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) { + main_1(x_6, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.hlsl index 7e2ef37dbc..ae9dea0478 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.hlsl @@ -21,8 +21,8 @@ void main_1() { } const int x_50 = i; const int x_52 = asint(x_6[4].x); - const int tint_symbol_3[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; - indexable = tint_symbol_3; + const int tint_symbol_2[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; + indexable = tint_symbol_2; const int x_55 = indexable[(x_50 % x_52)]; a = (a + x_55); { @@ -52,9 +52,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.msl index 3f78d7f847..09f1285ff7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int a = 0; int i = 0; tint_array_wrapper_1 indexable = {}; @@ -38,8 +38,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { } int const x_50 = i; int const x_52 = x_6.x_GLF_uniform_int_values.arr[4].el; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9}}; - indexable = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9}}; + indexable = tint_symbol_2; int const x_55 = indexable.arr[(x_50 % x_52)]; int const x_56 = a; a = as_type((as_type(x_56) + as_type(x_55))); @@ -55,20 +55,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_71 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_74 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_77 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_5) = float4(float(x_68), float(x_71), float(x_74), float(x_77)); + *(tint_symbol_4) = float4(float(x_68), float(x_71), float(x_74), float(x_77)); } else { int const x_81 = x_6.x_GLF_uniform_int_values.arr[3].el; float const x_82 = float(x_81); - *(tint_symbol_5) = float4(x_82, x_82, x_82, x_82); + *(tint_symbol_4) = float4(x_82, x_82, x_82, x_82); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) { + main_1(x_6, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.hlsl index 525515fabf..23abc3a3dc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.hlsl @@ -84,9 +84,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl index 083b8d5a5f..513a3b0bb3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int b = 0; int c = 0; @@ -86,20 +86,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_92 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_95 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_98 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_89), float(x_92), float(x_95), float(x_98)); + *(tint_symbol_3) = float4(float(x_89), float(x_92), float(x_95), float(x_98)); } else { int const x_102 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_103 = float(x_102); - *(tint_symbol_4) = float4(x_103, x_103, x_103, x_103); + *(tint_symbol_3) = float4(x_103, x_103, x_103, x_103); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.hlsl index 1693e5c4ef..bd85b496fa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.hlsl @@ -88,9 +88,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.msl index e80a8e09a1..0b75bf913b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int b = 0; int c = 0; @@ -86,20 +86,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_92 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_95 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_98 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_89), float(x_92), float(x_95), float(x_98)); + *(tint_symbol_3) = float4(float(x_89), float(x_92), float(x_95), float(x_98)); } else { int const x_102 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_103 = float(x_102); - *(tint_symbol_4) = float4(x_103, x_103, x_103, x_103); + *(tint_symbol_3) = float4(x_103, x_103, x_103, x_103); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.spvasm.expected.msl index 384a32dc46..ee2987f02c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { float3x3 m = float3x3(0.0f); int a = 0; tint_array_wrapper_2 arr = {}; @@ -47,8 +47,8 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy m[x_53][x_54] = x_56; float3 const x_59 = m[1]; float3 const x_61 = m[1]; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_59, x_61}}; - arr = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_59, x_61}}; + arr = tint_symbol_2; float const x_64 = x_9.x_GLF_uniform_float_values.arr[1].el; v = float3(x_64, x_64, x_64); int const x_66 = a; @@ -64,20 +64,26 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_91 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_94 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_97 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_88), float(x_91), float(x_94), float(x_97)); + *(tint_symbol_4) = float4(float(x_88), float(x_91), float(x_94), float(x_97)); } else { int const x_101 = x_6.x_GLF_uniform_int_values.arr[3].el; float const x_102 = float(x_101); - *(tint_symbol_5) = float4(x_102, x_102, x_102, x_102); + *(tint_symbol_4) = float4(x_102, x_102, x_102, x_102); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { + main_1(x_6, x_9, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.wgsl.expected.msl index 384a32dc46..ee2987f02c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { float3x3 m = float3x3(0.0f); int a = 0; tint_array_wrapper_2 arr = {}; @@ -47,8 +47,8 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy m[x_53][x_54] = x_56; float3 const x_59 = m[1]; float3 const x_61 = m[1]; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_59, x_61}}; - arr = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_59, x_61}}; + arr = tint_symbol_2; float const x_64 = x_9.x_GLF_uniform_float_values.arr[1].el; v = float3(x_64, x_64, x_64); int const x_66 = a; @@ -64,20 +64,26 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_91 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_94 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_97 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_88), float(x_91), float(x_94), float(x_97)); + *(tint_symbol_4) = float4(float(x_88), float(x_91), float(x_94), float(x_97)); } else { int const x_101 = x_6.x_GLF_uniform_int_values.arr[3].el; float const x_102 = float(x_101); - *(tint_symbol_5) = float4(x_102, x_102, x_102, x_102); + *(tint_symbol_4) = float4(x_102, x_102, x_102, x_102); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { + main_1(x_6, x_9, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.spvasm.expected.msl index 00f2b25e2d..09d684e4a8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) { int a = 0; float4 v = 0.0f; float3x4 m = float3x4(0.0f); @@ -58,20 +58,26 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_98 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_101 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_104 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_95), float(x_98), float(x_101), float(x_104)); + *(tint_symbol_3) = float4(float(x_95), float(x_98), float(x_101), float(x_104)); } else { int const x_108 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_109 = float(x_108); - *(tint_symbol_4) = float4(x_109, x_109, x_109, x_109); + *(tint_symbol_3) = float4(x_109, x_109, x_109, x_109); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.wgsl.expected.msl index 00f2b25e2d..09d684e4a8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) { int a = 0; float4 v = 0.0f; float3x4 m = float3x4(0.0f); @@ -58,20 +58,26 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_98 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_101 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_104 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_95), float(x_98), float(x_101), float(x_104)); + *(tint_symbol_3) = float4(float(x_95), float(x_98), float(x_101), float(x_104)); } else { int const x_108 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_109 = float(x_108); - *(tint_symbol_4) = float4(x_109, x_109, x_109, x_109); + *(tint_symbol_3) = float4(x_109, x_109, x_109, x_109); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.hlsl index 9f9794579e..4f97f3f607 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.hlsl @@ -34,11 +34,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.msl index ab5b07e356..13d527ff2b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.msl @@ -4,14 +4,14 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float4 func_(thread float4* const tint_symbol_5) { +float4 func_(thread float4* const tint_symbol_3) { float x = 0.0f; x = 1.0f; - float const x_30 = (*(tint_symbol_5)).x; + float const x_30 = (*(tint_symbol_3)).x; if ((x_30 < 0.0f)) { x = 0.5f; } @@ -19,11 +19,11 @@ float4 func_(thread float4* const tint_symbol_5) { return float4(x_34, 0.0f, 0.0f, 1.0f); } -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); +void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); while (true) { - float4 const x_26 = func_(tint_symbol_7); - *(tint_symbol_6) = x_26; + float4 const x_26 = func_(tint_symbol_5); + *(tint_symbol_4) = x_26; if (false) { } else { break; @@ -32,13 +32,19 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(&(tint_symbol_9), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(tint_symbol_7, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.hlsl index 9f9794579e..4f97f3f607 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.hlsl @@ -34,11 +34,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.msl index ab5b07e356..13d527ff2b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.msl @@ -4,14 +4,14 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float4 func_(thread float4* const tint_symbol_5) { +float4 func_(thread float4* const tint_symbol_3) { float x = 0.0f; x = 1.0f; - float const x_30 = (*(tint_symbol_5)).x; + float const x_30 = (*(tint_symbol_3)).x; if ((x_30 < 0.0f)) { x = 0.5f; } @@ -19,11 +19,11 @@ float4 func_(thread float4* const tint_symbol_5) { return float4(x_34, 0.0f, 0.0f, 1.0f); } -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); +void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); while (true) { - float4 const x_26 = func_(tint_symbol_7); - *(tint_symbol_6) = x_26; + float4 const x_26 = func_(tint_symbol_5); + *(tint_symbol_4) = x_26; if (false) { } else { break; @@ -32,13 +32,19 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(&(tint_symbol_9), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(tint_symbol_7, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.hlsl index e3f6afa45a..dc586b3c56 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.hlsl @@ -68,9 +68,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.msl index 241c4bb8b9..b982212729 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.msl @@ -58,10 +58,10 @@ float4 returnRed_(constant buf0& x_6) { return x_51; } -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { while (true) { float4 const x_30 = returnRed_(x_6); - *(tint_symbol_4) = x_30; + *(tint_symbol_3) = x_30; if (false) { } else { break; @@ -70,11 +70,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.hlsl index e3f6afa45a..dc586b3c56 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.hlsl @@ -68,9 +68,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.msl index 241c4bb8b9..b982212729 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.msl @@ -58,10 +58,10 @@ float4 returnRed_(constant buf0& x_6) { return x_51; } -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { while (true) { float4 const x_30 = returnRed_(x_6); - *(tint_symbol_4) = x_30; + *(tint_symbol_3) = x_30; if (false) { } else { break; @@ -70,11 +70,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.hlsl index 4dcae3d494..a2053a36d0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.hlsl @@ -33,9 +33,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.msl index 5db1f98520..117d43e318 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.msl @@ -34,21 +34,27 @@ float func_() { return 1.0f; } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { if (false) { float const x_28 = func_(); - *(tint_symbol_4) = float4(x_28, x_28, x_28, x_28); + *(tint_symbol_3) = float4(x_28, x_28, x_28, x_28); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.hlsl index 4dcae3d494..a2053a36d0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.hlsl @@ -33,9 +33,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.msl index 5db1f98520..117d43e318 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.msl @@ -34,21 +34,27 @@ float func_() { return 1.0f; } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { if (false) { float const x_28 = func_(); - *(tint_symbol_4) = float4(x_28, x_28, x_28, x_28); + *(tint_symbol_3) = float4(x_28, x_28, x_28, x_28); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.hlsl index e579458baa..530e5b8865 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.hlsl @@ -35,11 +35,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.msl index 019020d7ef..d992865ff4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.msl @@ -4,16 +4,16 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_(thread float4* const tint_symbol_5) { +float func_(thread float4* const tint_symbol_3) { float x = 0.0f; x = 2.0f; - float const x_35 = (*(tint_symbol_5)).x; + float const x_35 = (*(tint_symbol_3)).x; if ((x_35 == 12.0f)) { - float const x_40 = (*(tint_symbol_5)).y; + float const x_40 = (*(tint_symbol_3)).y; if ((x_40 == 13.0f)) { float const x_44 = x; x = (x_44 + 1.0f); @@ -24,23 +24,29 @@ float func_(thread float4* const tint_symbol_5) { return 1.0f; } -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { if (false) { - float const x_31 = func_(tint_symbol_6); - *(tint_symbol_7) = float4(x_31, x_31, x_31, x_31); + float const x_31 = func_(tint_symbol_4); + *(tint_symbol_5) = float4(x_31, x_31, x_31, x_31); } else { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.hlsl index e579458baa..530e5b8865 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.hlsl @@ -35,11 +35,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.msl index 019020d7ef..d992865ff4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.msl @@ -4,16 +4,16 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_(thread float4* const tint_symbol_5) { +float func_(thread float4* const tint_symbol_3) { float x = 0.0f; x = 2.0f; - float const x_35 = (*(tint_symbol_5)).x; + float const x_35 = (*(tint_symbol_3)).x; if ((x_35 == 12.0f)) { - float const x_40 = (*(tint_symbol_5)).y; + float const x_40 = (*(tint_symbol_3)).y; if ((x_40 == 13.0f)) { float const x_44 = x; x = (x_44 + 1.0f); @@ -24,23 +24,29 @@ float func_(thread float4* const tint_symbol_5) { return 1.0f; } -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { if (false) { - float const x_31 = func_(tint_symbol_6); - *(tint_symbol_7) = float4(x_31, x_31, x_31, x_31); + float const x_31 = func_(tint_symbol_4); + *(tint_symbol_5) = float4(x_31, x_31, x_31, x_31); } else { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.hlsl index 489e5a1b66..dd5b54a49e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.hlsl @@ -73,11 +73,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl index c8fdc80719..46227d46aa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl @@ -27,11 +27,11 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; tint_array_wrapper_2 arr = {}; int a = 0; @@ -53,7 +53,7 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s } } a = -1; - float const x_57 = (*(tint_symbol_5)).y; + float const x_57 = (*(tint_symbol_3)).y; float const x_59 = x_11.x_GLF_uniform_float_values.arr[0].el; if (!((x_57 < x_59))) { int const x_64 = a; @@ -75,22 +75,28 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s int const x_87 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_90 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_92 = a; - *(tint_symbol_6) = float4(float(x_84), float(x_87), float(x_90), float(x_92)); + *(tint_symbol_4) = float4(float(x_84), float(x_87), float(x_90), float(x_92)); } else { int const x_96 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_97 = float(x_96); - *(tint_symbol_6) = float4(x_97, x_97, x_97, x_97); + *(tint_symbol_4) = float4(x_97, x_97, x_97, x_97); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_11, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_11, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.hlsl index 489e5a1b66..dd5b54a49e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.hlsl @@ -73,11 +73,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl index c8fdc80719..46227d46aa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl @@ -27,11 +27,11 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; tint_array_wrapper_2 arr = {}; int a = 0; @@ -53,7 +53,7 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s } } a = -1; - float const x_57 = (*(tint_symbol_5)).y; + float const x_57 = (*(tint_symbol_3)).y; float const x_59 = x_11.x_GLF_uniform_float_values.arr[0].el; if (!((x_57 < x_59))) { int const x_64 = a; @@ -75,22 +75,28 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s int const x_87 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_90 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_92 = a; - *(tint_symbol_6) = float4(float(x_84), float(x_87), float(x_90), float(x_92)); + *(tint_symbol_4) = float4(float(x_84), float(x_87), float(x_90), float(x_92)); } else { int const x_96 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_97 = float(x_96); - *(tint_symbol_6) = float4(x_97, x_97, x_97, x_97); + *(tint_symbol_4) = float4(x_97, x_97, x_97, x_97); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_11, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_11, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.hlsl index 18402b445e..a3d6d587be 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.hlsl @@ -51,9 +51,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl index 4d2e2999d2..ff67ea0909 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl @@ -33,7 +33,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) { int a = 0; int i = 0; float b = 0.0f; @@ -65,19 +65,25 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s int const x_66 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_69 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_72 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_63), float(x_66), float(x_69), float(x_72)); + *(tint_symbol_3) = float4(float(x_63), float(x_66), float(x_69), float(x_72)); } else { float const x_75 = b; - *(tint_symbol_4) = float4(x_75, x_75, x_75, x_75); + *(tint_symbol_3) = float4(x_75, x_75, x_75, x_75); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.hlsl index 18402b445e..a3d6d587be 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.hlsl @@ -51,9 +51,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl index 4d2e2999d2..ff67ea0909 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl @@ -33,7 +33,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) { int a = 0; int i = 0; float b = 0.0f; @@ -65,19 +65,25 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s int const x_66 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_69 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_72 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_63), float(x_66), float(x_69), float(x_72)); + *(tint_symbol_3) = float4(float(x_63), float(x_66), float(x_69), float(x_72)); } else { float const x_75 = b; - *(tint_symbol_4) = float4(x_75, x_75, x_75, x_75); + *(tint_symbol_3) = float4(x_75, x_75, x_75, x_75); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.hlsl index ae1cfdfbb0..4122d2b590 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.hlsl @@ -72,9 +72,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.msl index 6c318fa632..05b50ed766 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.msl @@ -63,7 +63,7 @@ int func_f1_(constant buf0& x_8, thread float* const f) { return 0; } -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { float param = 0.0f; param = 0.699999988f; int const x_34 = func_f1_(x_8, &(param)); @@ -73,20 +73,26 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int const x_45 = x_8.x_GLF_uniform_int_values.arr[2].el; int const x_48 = x_8.x_GLF_uniform_int_values.arr[2].el; int const x_51 = x_8.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); + *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); } else { int const x_55 = x_8.x_GLF_uniform_int_values.arr[2].el; float const x_56 = float(x_55); - *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56); + *(tint_symbol_3) = float4(x_56, x_56, x_56, x_56); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.hlsl index ae1cfdfbb0..4122d2b590 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.hlsl @@ -72,9 +72,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.msl index 6c318fa632..05b50ed766 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.msl @@ -63,7 +63,7 @@ int func_f1_(constant buf0& x_8, thread float* const f) { return 0; } -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { float param = 0.0f; param = 0.699999988f; int const x_34 = func_f1_(x_8, &(param)); @@ -73,20 +73,26 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int const x_45 = x_8.x_GLF_uniform_int_values.arr[2].el; int const x_48 = x_8.x_GLF_uniform_int_values.arr[2].el; int const x_51 = x_8.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); + *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); } else { int const x_55 = x_8.x_GLF_uniform_int_values.arr[2].el; float const x_56 = float(x_55); - *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56); + *(tint_symbol_3) = float4(x_56, x_56, x_56, x_56); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.hlsl index 8a664a3d09..ca2b4ae500 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.hlsl @@ -75,11 +75,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl index 523aec7d1c..2627080fa0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl @@ -27,11 +27,11 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_5) { +int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_3) { int i = 0; tint_array_wrapper_2 A = {}; int a = 0; @@ -53,7 +53,7 @@ int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbo } } a = -1; - float const x_73 = (*(tint_symbol_5)).y; + float const x_73 = (*(tint_symbol_3)).y; float const x_75 = x_12.x_GLF_uniform_float_values.arr[0].el; if ((x_73 >= x_75)) { int const x_79 = a; @@ -78,25 +78,31 @@ int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbo return 0; } -void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { int i_1 = 0; - int const x_42 = f1_(x_8, x_12, tint_symbol_6); + int const x_42 = f1_(x_8, x_12, tint_symbol_4); i_1 = x_42; int const x_44 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_46 = i_1; int const x_48 = i_1; int const x_51 = x_8.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_7) = float4(float(x_44), float(x_46), float(x_48), float(x_51)); + *(tint_symbol_5) = float4(float(x_44), float(x_46), float(x_48), float(x_51)); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_8, x_12, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_8, x_12, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_12, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.hlsl index 8a664a3d09..ca2b4ae500 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.hlsl @@ -75,11 +75,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl index 523aec7d1c..2627080fa0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl @@ -27,11 +27,11 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_5) { +int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_3) { int i = 0; tint_array_wrapper_2 A = {}; int a = 0; @@ -53,7 +53,7 @@ int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbo } } a = -1; - float const x_73 = (*(tint_symbol_5)).y; + float const x_73 = (*(tint_symbol_3)).y; float const x_75 = x_12.x_GLF_uniform_float_values.arr[0].el; if ((x_73 >= x_75)) { int const x_79 = a; @@ -78,25 +78,31 @@ int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbo return 0; } -void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { int i_1 = 0; - int const x_42 = f1_(x_8, x_12, tint_symbol_6); + int const x_42 = f1_(x_8, x_12, tint_symbol_4); i_1 = x_42; int const x_44 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_46 = i_1; int const x_48 = i_1; int const x_51 = x_8.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_7) = float4(float(x_44), float(x_46), float(x_48), float(x_51)); + *(tint_symbol_5) = float4(float(x_44), float(x_46), float(x_48), float(x_51)); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_8, x_12, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_8, x_12, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_12, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.hlsl index 67cbab7911..9ce823c42f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.hlsl @@ -101,9 +101,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.msl index d135092add..0134af1e1a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) { uint a = 0u; float4 v1 = 0.0f; float4 ref = 0.0f; @@ -91,20 +91,26 @@ void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_s int const x_118 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_121 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_124 = x_10.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_4) = float4(float(x_115), float(x_118), float(x_121), float(x_124)); + *(tint_symbol_3) = float4(float(x_115), float(x_118), float(x_121), float(x_124)); } else { int const x_128 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_130 = v1[x_128]; - *(tint_symbol_4) = float4(x_130, x_130, x_130, x_130); + *(tint_symbol_3) = float4(x_130, x_130, x_130, x_130); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.hlsl index 67cbab7911..9ce823c42f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.hlsl @@ -101,9 +101,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.msl index d135092add..0134af1e1a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) { uint a = 0u; float4 v1 = 0.0f; float4 ref = 0.0f; @@ -91,20 +91,26 @@ void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_s int const x_118 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_121 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_124 = x_10.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_4) = float4(float(x_115), float(x_118), float(x_121), float(x_124)); + *(tint_symbol_3) = float4(float(x_115), float(x_118), float(x_121), float(x_124)); } else { int const x_128 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_130 = v1[x_128]; - *(tint_symbol_4) = float4(x_130, x_130, x_130, x_130); + *(tint_symbol_3) = float4(x_130, x_130, x_130, x_130); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.hlsl index 01a9ed0f00..199025666f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.hlsl @@ -74,9 +74,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.msl index 3db287a552..253011e338 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int count0 = 0; int count1 = 0; int i = 0; @@ -65,27 +65,33 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_64 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_67 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_70 = x_6.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_4) = float4(float(x_61), float(x_64), float(x_67), float(x_70)); + *(tint_symbol_3) = float4(float(x_61), float(x_64), float(x_67), float(x_70)); } else { int const x_74 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_75 = float(x_74); - *(tint_symbol_4) = float4(x_75, x_75, x_75, x_75); + *(tint_symbol_3) = float4(x_75, x_75, x_75, x_75); } int const x_77 = count0; int const x_79 = x_6.x_GLF_uniform_int_values.arr[1].el; if ((x_77 != x_79)) { int const x_84 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_85 = float(x_84); - *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85); + *(tint_symbol_3) = float4(x_85, x_85, x_85, x_85); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.hlsl index 01a9ed0f00..199025666f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.hlsl @@ -74,9 +74,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.msl index 3db287a552..253011e338 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int count0 = 0; int count1 = 0; int i = 0; @@ -65,27 +65,33 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_64 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_67 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_70 = x_6.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_4) = float4(float(x_61), float(x_64), float(x_67), float(x_70)); + *(tint_symbol_3) = float4(float(x_61), float(x_64), float(x_67), float(x_70)); } else { int const x_74 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_75 = float(x_74); - *(tint_symbol_4) = float4(x_75, x_75, x_75, x_75); + *(tint_symbol_3) = float4(x_75, x_75, x_75, x_75); } int const x_77 = count0; int const x_79 = x_6.x_GLF_uniform_int_values.arr[1].el; if ((x_77 != x_79)) { int const x_84 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_85 = float(x_84); - *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85); + *(tint_symbol_3) = float4(x_85, x_85, x_85, x_85); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.hlsl index 596a485322..6dae70a6ac 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.hlsl @@ -45,9 +45,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.msl index 4de038f886..36c85d4ed3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { tint_array_wrapper_2 data = {}; float a = 0.0f; int const x_33 = x_6.x_GLF_uniform_int_values.arr[0].el; @@ -50,19 +50,25 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy float const x_58 = x_8.x_GLF_uniform_float_values.arr[0].el; float const x_60 = x_8.x_GLF_uniform_float_values.arr[0].el; float const x_62 = x_8.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_56, x_58, x_60, x_62); + *(tint_symbol_3) = float4(x_56, x_58, x_60, x_62); } else { float const x_65 = x_8.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_65, x_65, x_65, x_65); + *(tint_symbol_3) = float4(x_65, x_65, x_65, x_65); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.hlsl index 596a485322..6dae70a6ac 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.hlsl @@ -45,9 +45,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.msl index 4de038f886..36c85d4ed3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { tint_array_wrapper_2 data = {}; float a = 0.0f; int const x_33 = x_6.x_GLF_uniform_int_values.arr[0].el; @@ -50,19 +50,25 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy float const x_58 = x_8.x_GLF_uniform_float_values.arr[0].el; float const x_60 = x_8.x_GLF_uniform_float_values.arr[0].el; float const x_62 = x_8.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_56, x_58, x_60, x_62); + *(tint_symbol_3) = float4(x_56, x_58, x_60, x_62); } else { float const x_65 = x_8.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_65, x_65, x_65, x_65); + *(tint_symbol_3) = float4(x_65, x_65, x_65, x_65); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.hlsl index 9971bf0c7e..83f8e3563b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.hlsl @@ -27,9 +27,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.msl index 7211d613cc..3a7031ced4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.msl @@ -18,26 +18,32 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_7 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_8 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_9 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_10 = x_5.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_7), float(x_8), float(x_9), float(x_10)); - float4 const x_36 = *(tint_symbol_4); + *(tint_symbol_3) = float4(float(x_7), float(x_8), float(x_9), float(x_10)); + float4 const x_36 = *(tint_symbol_3); if (isnan((-(x_36)).x)) { int const x_11 = x_5.x_GLF_uniform_int_values.arr[0].el; float const x_43 = float(x_11); - *(tint_symbol_4) = float4(x_43, x_43, x_43, x_43); + *(tint_symbol_3) = float4(x_43, x_43, x_43, x_43); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.hlsl index 9971bf0c7e..83f8e3563b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.hlsl @@ -27,9 +27,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.msl index 7211d613cc..3a7031ced4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.msl @@ -18,26 +18,32 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_7 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_8 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_9 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_10 = x_5.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_7), float(x_8), float(x_9), float(x_10)); - float4 const x_36 = *(tint_symbol_4); + *(tint_symbol_3) = float4(float(x_7), float(x_8), float(x_9), float(x_10)); + float4 const x_36 = *(tint_symbol_3); if (isnan((-(x_36)).x)) { int const x_11 = x_5.x_GLF_uniform_int_values.arr[0].el; float const x_43 = float(x_11); - *(tint_symbol_4) = float4(x_43, x_43, x_43, x_43); + *(tint_symbol_3) = float4(x_43, x_43, x_43, x_43); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.hlsl index 410562b76c..606fbddd73 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.hlsl @@ -38,9 +38,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.msl index 5eeaa35c02..4545d497a5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_3) { float const x_29 = x_5.x_GLF_uniform_float_values.arr[0].el; float const x_32 = x_5.x_GLF_uniform_float_values.arr[0].el; if ((ldexp(x_29, 10000) == x_32)) { @@ -36,22 +36,28 @@ void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_sy int const x_41 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_44 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_47 = x_7.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_38), float(x_41), float(x_44), float(x_47)); + *(tint_symbol_3) = float4(float(x_38), float(x_41), float(x_44), float(x_47)); } else { int const x_51 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_54 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_57 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_60 = x_7.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_51), float(x_54), float(x_57), float(x_60)); + *(tint_symbol_3) = float4(float(x_51), float(x_54), float(x_57), float(x_60)); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) { + main_1(x_5, x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.hlsl index 410562b76c..606fbddd73 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.hlsl @@ -38,9 +38,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.msl index 5eeaa35c02..4545d497a5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_3) { float const x_29 = x_5.x_GLF_uniform_float_values.arr[0].el; float const x_32 = x_5.x_GLF_uniform_float_values.arr[0].el; if ((ldexp(x_29, 10000) == x_32)) { @@ -36,22 +36,28 @@ void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_sy int const x_41 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_44 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_47 = x_7.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_38), float(x_41), float(x_44), float(x_47)); + *(tint_symbol_3) = float4(float(x_38), float(x_41), float(x_44), float(x_47)); } else { int const x_51 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_54 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_57 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_60 = x_7.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_51), float(x_54), float(x_57), float(x_60)); + *(tint_symbol_3) = float4(float(x_51), float(x_54), float(x_57), float(x_60)); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) { + main_1(x_5, x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.hlsl index 408d89c9ea..7f503bee47 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.hlsl @@ -64,11 +64,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.msl index 25b2762d81..1713d3c2fe 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.msl @@ -24,15 +24,15 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float f1_f1_(constant buf0& x_9, thread float* const a, thread float4* const tint_symbol_5) { +float f1_f1_(constant buf0& x_9, thread float* const a, thread float4* const tint_symbol_3) { int b = 0; float c = 0.0f; b = 8; - float const x_71 = (*(tint_symbol_5)).y; + float const x_71 = (*(tint_symbol_3)).y; float const x_73 = x_9.x_GLF_uniform_float_values.arr[0].el; if ((x_71 >= x_73)) { int const x_77 = b; @@ -52,12 +52,12 @@ float f1_f1_(constant buf0& x_9, thread float* const a, thread float4* const tin return x_92; } -void main_1(constant buf0& x_9, constant buf1& x_14, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_9, constant buf1& x_14, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { float a_1 = 0.0f; float param = 0.0f; float const x_43 = x_9.x_GLF_uniform_float_values.arr[1].el; param = x_43; - float const x_44 = f1_f1_(x_9, &(param), tint_symbol_6); + float const x_44 = f1_f1_(x_9, &(param), tint_symbol_4); a_1 = x_44; float const x_45 = a_1; float const x_47 = x_9.x_GLF_uniform_float_values.arr[2].el; @@ -66,22 +66,28 @@ void main_1(constant buf0& x_9, constant buf1& x_14, thread float4* const tint_s int const x_56 = x_14.x_GLF_uniform_int_values.arr[0].el; int const x_59 = x_14.x_GLF_uniform_int_values.arr[0].el; int const x_62 = x_14.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_7) = float4(float(x_53), float(x_56), float(x_59), float(x_62)); + *(tint_symbol_5) = float4(float(x_53), float(x_56), float(x_59), float(x_62)); } else { int const x_66 = x_14.x_GLF_uniform_int_values.arr[0].el; float const x_67 = float(x_66); - *(tint_symbol_7) = float4(x_67, x_67, x_67, x_67); + *(tint_symbol_5) = float4(x_67, x_67, x_67, x_67); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_14 [[buffer(1)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_9, x_14, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_14, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_9, x_14, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_14 [[buffer(1)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, x_14, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.hlsl index 408d89c9ea..7f503bee47 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.hlsl @@ -64,11 +64,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.msl index 25b2762d81..1713d3c2fe 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.msl @@ -24,15 +24,15 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float f1_f1_(constant buf0& x_9, thread float* const a, thread float4* const tint_symbol_5) { +float f1_f1_(constant buf0& x_9, thread float* const a, thread float4* const tint_symbol_3) { int b = 0; float c = 0.0f; b = 8; - float const x_71 = (*(tint_symbol_5)).y; + float const x_71 = (*(tint_symbol_3)).y; float const x_73 = x_9.x_GLF_uniform_float_values.arr[0].el; if ((x_71 >= x_73)) { int const x_77 = b; @@ -52,12 +52,12 @@ float f1_f1_(constant buf0& x_9, thread float* const a, thread float4* const tin return x_92; } -void main_1(constant buf0& x_9, constant buf1& x_14, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_9, constant buf1& x_14, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { float a_1 = 0.0f; float param = 0.0f; float const x_43 = x_9.x_GLF_uniform_float_values.arr[1].el; param = x_43; - float const x_44 = f1_f1_(x_9, &(param), tint_symbol_6); + float const x_44 = f1_f1_(x_9, &(param), tint_symbol_4); a_1 = x_44; float const x_45 = a_1; float const x_47 = x_9.x_GLF_uniform_float_values.arr[2].el; @@ -66,22 +66,28 @@ void main_1(constant buf0& x_9, constant buf1& x_14, thread float4* const tint_s int const x_56 = x_14.x_GLF_uniform_int_values.arr[0].el; int const x_59 = x_14.x_GLF_uniform_int_values.arr[0].el; int const x_62 = x_14.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_7) = float4(float(x_53), float(x_56), float(x_59), float(x_62)); + *(tint_symbol_5) = float4(float(x_53), float(x_56), float(x_59), float(x_62)); } else { int const x_66 = x_14.x_GLF_uniform_int_values.arr[0].el; float const x_67 = float(x_66); - *(tint_symbol_7) = float4(x_67, x_67, x_67, x_67); + *(tint_symbol_5) = float4(x_67, x_67, x_67, x_67); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_14 [[buffer(1)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_9, x_14, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_14, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_9, x_14, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_14 [[buffer(1)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, x_14, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.hlsl index 1aa4c950e8..cb30bc37f0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.hlsl @@ -47,11 +47,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.msl index 4dbabec88a..c2eb764e9a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.msl @@ -24,14 +24,14 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int a = 0; float b = 0.0f; - float const x_39 = (*(tint_symbol_5)).y; + float const x_39 = (*(tint_symbol_3)).y; float const x_41 = x_7.x_GLF_uniform_float_values.arr[0].el; a = select(2, 0, (x_39 >= x_41)); float const x_45 = x_7.x_GLF_uniform_float_values.arr[1].el; @@ -46,22 +46,28 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_s int const x_64 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_67 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_70 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_61), float(x_64), float(x_67), float(x_70)); + *(tint_symbol_4) = float4(float(x_61), float(x_64), float(x_67), float(x_70)); } else { int const x_74 = x_10.x_GLF_uniform_int_values.arr[0].el; float const x_75 = float(x_74); - *(tint_symbol_6) = float4(x_75, x_75, x_75, x_75); + *(tint_symbol_4) = float4(x_75, x_75, x_75, x_75); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_10, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.hlsl index 1aa4c950e8..cb30bc37f0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.hlsl @@ -47,11 +47,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.msl index 4dbabec88a..c2eb764e9a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.msl @@ -24,14 +24,14 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int a = 0; float b = 0.0f; - float const x_39 = (*(tint_symbol_5)).y; + float const x_39 = (*(tint_symbol_3)).y; float const x_41 = x_7.x_GLF_uniform_float_values.arr[0].el; a = select(2, 0, (x_39 >= x_41)); float const x_45 = x_7.x_GLF_uniform_float_values.arr[1].el; @@ -46,22 +46,28 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_s int const x_64 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_67 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_70 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_61), float(x_64), float(x_67), float(x_70)); + *(tint_symbol_4) = float4(float(x_61), float(x_64), float(x_67), float(x_70)); } else { int const x_74 = x_10.x_GLF_uniform_int_values.arr[0].el; float const x_75 = float(x_74); - *(tint_symbol_6) = float4(x_75, x_75, x_75, x_75); + *(tint_symbol_4) = float4(x_75, x_75, x_75, x_75); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_10, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.hlsl index 32708a32d3..32d03f41ac 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl index fe0cdc7f25..8b81c221c1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) { int i = 0; int const x_32 = x_6.x_GLF_uniform_int_values.arr[2].el; i = x_32; @@ -43,10 +43,10 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_50 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(1.0f, float(x_47), float(x_50), float(x_53)); + *(tint_symbol_3) = float4(1.0f, float(x_47), float(x_50), float(x_53)); } else { float const x_57 = x_8.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_57, x_57, x_57, x_57); + *(tint_symbol_3) = float4(x_57, x_57, x_57, x_57); } int const x_59 = i; i = as_type((as_type(x_59) - as_type(1))); @@ -54,11 +54,17 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.hlsl index 32708a32d3..32d03f41ac 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl index fe0cdc7f25..8b81c221c1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) { int i = 0; int const x_32 = x_6.x_GLF_uniform_int_values.arr[2].el; i = x_32; @@ -43,10 +43,10 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_50 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(1.0f, float(x_47), float(x_50), float(x_53)); + *(tint_symbol_3) = float4(1.0f, float(x_47), float(x_50), float(x_53)); } else { float const x_57 = x_8.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_57, x_57, x_57, x_57); + *(tint_symbol_3) = float4(x_57, x_57, x_57, x_57); } int const x_59 = i; i = as_type((as_type(x_59) - as_type(1))); @@ -54,11 +54,17 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.hlsl index b9e87ec1f2..94e3fa1d2d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.hlsl @@ -68,11 +68,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.msl index a3e74a594c..6001d574c5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.msl @@ -24,7 +24,7 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -33,7 +33,7 @@ float f1_f1_(thread float* const a) { return dfdx(x_100); } -void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float4 v2 = 0.0f; float a_1 = 0.0f; float x_40 = 0.0f; @@ -42,8 +42,8 @@ void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_s int const x_45 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_48 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_51 = x_8.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); - float const x_55 = (*(tint_symbol_6)).x; + *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); + float const x_55 = (*(tint_symbol_4)).x; float const x_57 = x_10.x_GLF_uniform_float_values.arr[1].el; if ((x_55 < x_57)) { float const x_62 = v2.x; @@ -67,19 +67,25 @@ void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_s float const x_90 = a_1; float3 const x_92 = mix(float3(x_85, x_85, x_85), float3(x_88, x_88, x_88), float3(x_90, x_90, x_90)); float const x_94 = x_10.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_5) = float4(x_92.x, x_92.y, x_92.z, x_94); + *(tint_symbol_3) = float4(x_92.x, x_92.y, x_92.z, x_94); } } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, x_10, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, x_10, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.hlsl index b9e87ec1f2..94e3fa1d2d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.hlsl @@ -68,11 +68,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.msl index a3e74a594c..6001d574c5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.msl @@ -24,7 +24,7 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -33,7 +33,7 @@ float f1_f1_(thread float* const a) { return dfdx(x_100); } -void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float4 v2 = 0.0f; float a_1 = 0.0f; float x_40 = 0.0f; @@ -42,8 +42,8 @@ void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_s int const x_45 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_48 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_51 = x_8.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); - float const x_55 = (*(tint_symbol_6)).x; + *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); + float const x_55 = (*(tint_symbol_4)).x; float const x_57 = x_10.x_GLF_uniform_float_values.arr[1].el; if ((x_55 < x_57)) { float const x_62 = v2.x; @@ -67,19 +67,25 @@ void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_s float const x_90 = a_1; float3 const x_92 = mix(float3(x_85, x_85, x_85), float3(x_88, x_88, x_88), float3(x_90, x_90, x_90)); float const x_94 = x_10.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_5) = float4(x_92.x, x_92.y, x_92.z, x_94); + *(tint_symbol_3) = float4(x_92.x, x_92.y, x_92.z, x_94); } } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, x_10, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, x_10, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.hlsl index c1507aed9e..03bab36eea 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.hlsl @@ -88,9 +88,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.msl index 77c6b6dbdc..cd57211f6b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) { uint a = 0u; float4 v1 = 0.0f; float E = 0.0f; @@ -88,19 +88,25 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s int const x_118 = x_10.x_GLF_uniform_int_values.arr[2].el; int const x_121 = x_10.x_GLF_uniform_int_values.arr[2].el; int const x_124 = x_10.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_115), float(x_118), float(x_121), float(x_124)); + *(tint_symbol_3) = float4(float(x_115), float(x_118), float(x_121), float(x_124)); } else { float const x_128 = x_6.x_GLF_uniform_float_values.arr[5].el; - *(tint_symbol_4) = float4(x_128, x_128, x_128, x_128); + *(tint_symbol_3) = float4(x_128, x_128, x_128, x_128); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.hlsl index c1507aed9e..03bab36eea 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.hlsl @@ -88,9 +88,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.msl index 77c6b6dbdc..cd57211f6b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) { uint a = 0u; float4 v1 = 0.0f; float E = 0.0f; @@ -88,19 +88,25 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s int const x_118 = x_10.x_GLF_uniform_int_values.arr[2].el; int const x_121 = x_10.x_GLF_uniform_int_values.arr[2].el; int const x_124 = x_10.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_115), float(x_118), float(x_121), float(x_124)); + *(tint_symbol_3) = float4(float(x_115), float(x_118), float(x_121), float(x_124)); } else { float const x_128 = x_6.x_GLF_uniform_float_values.arr[5].el; - *(tint_symbol_4) = float4(x_128, x_128, x_128, x_128); + *(tint_symbol_3) = float4(x_128, x_128, x_128, x_128); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.hlsl index 0b645490c3..44a81c5ddc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.hlsl @@ -58,11 +58,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.msl index 2bc64d6360..bf79c4e856 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.msl @@ -24,16 +24,16 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; int const x_34 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_35 = float(x_34); - *(tint_symbol_5) = float4(x_35, x_35, x_35, x_35); - float const x_38 = (*(tint_symbol_6)).y; + *(tint_symbol_3) = float4(x_35, x_35, x_35, x_35); + float const x_38 = (*(tint_symbol_4)).y; float const x_40 = x_9.x_GLF_uniform_float_values.arr[0].el; i = as_type((as_type(1) << as_type(select(1, 2, (x_38 >= x_40))))); while (true) { @@ -58,7 +58,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_64 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_67 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_70 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_61), float(x_64), float(x_67), float(x_70)); + *(tint_symbol_3) = float4(float(x_61), float(x_64), float(x_67), float(x_70)); { int const x_73 = i; i = as_type((as_type(x_73) + as_type(1))); @@ -67,13 +67,19 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, x_9, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, x_9, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.hlsl index 0b645490c3..44a81c5ddc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.hlsl @@ -58,11 +58,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.msl index 2bc64d6360..bf79c4e856 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.msl @@ -24,16 +24,16 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; int const x_34 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_35 = float(x_34); - *(tint_symbol_5) = float4(x_35, x_35, x_35, x_35); - float const x_38 = (*(tint_symbol_6)).y; + *(tint_symbol_3) = float4(x_35, x_35, x_35, x_35); + float const x_38 = (*(tint_symbol_4)).y; float const x_40 = x_9.x_GLF_uniform_float_values.arr[0].el; i = as_type((as_type(1) << as_type(select(1, 2, (x_38 >= x_40))))); while (true) { @@ -58,7 +58,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_64 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_67 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_70 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_61), float(x_64), float(x_67), float(x_70)); + *(tint_symbol_3) = float4(float(x_61), float(x_64), float(x_67), float(x_70)); { int const x_73 = i; i = as_type((as_type(x_73) + as_type(1))); @@ -67,13 +67,19 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, x_9, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, x_9, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.hlsl index ff9156f3e5..2529a97647 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.hlsl @@ -86,9 +86,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl index 166f249e43..a5bd868b7d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) { tint_array_wrapper_2 A = {}; int i = 0; int a = 0; @@ -87,20 +87,26 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s int const x_133 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_136 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_139 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_130), float(x_133), float(x_136), float(x_139)); + *(tint_symbol_3) = float4(float(x_130), float(x_133), float(x_136), float(x_139)); } else { int const x_143 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_144 = float(x_143); - *(tint_symbol_4) = float4(x_144, x_144, x_144, x_144); + *(tint_symbol_3) = float4(x_144, x_144, x_144, x_144); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.hlsl index ff9156f3e5..2529a97647 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.hlsl @@ -86,9 +86,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl index 166f249e43..a5bd868b7d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) { tint_array_wrapper_2 A = {}; int i = 0; int a = 0; @@ -87,20 +87,26 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s int const x_133 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_136 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_139 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_130), float(x_133), float(x_136), float(x_139)); + *(tint_symbol_3) = float4(float(x_130), float(x_133), float(x_136), float(x_139)); } else { int const x_143 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_144 = float(x_143); - *(tint_symbol_4) = float4(x_144, x_144, x_144, x_144); + *(tint_symbol_3) = float4(x_144, x_144, x_144, x_144); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.hlsl index 43882135d6..da81e9c6b2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.hlsl @@ -90,9 +90,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.msl index e8a5aea792..566a8abb42 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) { uint a = 0u; float4 v1 = 0.0f; float E = 0.0f; @@ -86,20 +86,26 @@ void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_s int const x_110 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_113 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_116 = x_8.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); + *(tint_symbol_3) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); } else { int const x_120 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_122 = v1[x_120]; - *(tint_symbol_4) = float4(x_122, x_122, x_122, x_122); + *(tint_symbol_3) = float4(x_122, x_122, x_122, x_122); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.hlsl index 43882135d6..da81e9c6b2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.hlsl @@ -90,9 +90,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.msl index e8a5aea792..566a8abb42 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) { uint a = 0u; float4 v1 = 0.0f; float E = 0.0f; @@ -86,20 +86,26 @@ void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_s int const x_110 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_113 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_116 = x_8.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); + *(tint_symbol_3) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); } else { int const x_120 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_122 = v1[x_120]; - *(tint_symbol_4) = float4(x_122, x_122, x_122, x_122); + *(tint_symbol_3) = float4(x_122, x_122, x_122, x_122); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.hlsl index 3019c2bfa1..66f07afc3c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.hlsl @@ -91,9 +91,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.msl index f9c669bf98..171f582aea 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) { uint a = 0u; float4 v1 = 0.0f; float E = 0.0f; @@ -88,20 +88,26 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s int const x_110 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_113 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_116 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); + *(tint_symbol_3) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); } else { int const x_120 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_121 = float(x_120); - *(tint_symbol_4) = float4(x_121, x_121, x_121, x_121); + *(tint_symbol_3) = float4(x_121, x_121, x_121, x_121); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.hlsl index 3019c2bfa1..66f07afc3c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.hlsl @@ -91,9 +91,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.msl index f9c669bf98..171f582aea 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) { uint a = 0u; float4 v1 = 0.0f; float E = 0.0f; @@ -88,20 +88,26 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s int const x_110 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_113 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_116 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); + *(tint_symbol_3) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); } else { int const x_120 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_121 = float(x_120); - *(tint_symbol_4) = float4(x_121, x_121, x_121, x_121); + *(tint_symbol_3) = float4(x_121, x_121, x_121, x_121); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.hlsl index 35a88d445c..ab5204d965 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.hlsl @@ -44,9 +44,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.msl index ec0f90fa46..baa007428e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float4 color = 0.0f; float const x_29 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_31 = x_6.x_GLF_uniform_float_values.arr[0].el; @@ -48,15 +48,21 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy } } float4 const x_48 = color; - *(tint_symbol_4) = x_48; + *(tint_symbol_3) = x_48; return; } +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.hlsl index 35a88d445c..ab5204d965 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.hlsl @@ -44,9 +44,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.msl index ec0f90fa46..baa007428e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float4 color = 0.0f; float const x_29 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_31 = x_6.x_GLF_uniform_float_values.arr[0].el; @@ -48,15 +48,21 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy } } float4 const x_48 = color; - *(tint_symbol_4) = x_48; + *(tint_symbol_3) = x_48; return; } +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.hlsl index 0df7ca0790..f5f682535d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.hlsl @@ -67,9 +67,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.msl index 63a0e833f3..d3884b13d9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) { float a = 0.0f; int i = 0; float b = 0.0f; @@ -78,20 +78,26 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_76 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_79 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_82 = x_9.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_73), float(x_76), float(x_79), float(x_82)); + *(tint_symbol_3) = float4(float(x_73), float(x_76), float(x_79), float(x_82)); } else { int const x_86 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_87 = float(x_86); - *(tint_symbol_4) = float4(x_87, x_87, x_87, x_87); + *(tint_symbol_3) = float4(x_87, x_87, x_87, x_87); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.hlsl index 0df7ca0790..f5f682535d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.hlsl @@ -67,9 +67,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.msl index 63a0e833f3..d3884b13d9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) { float a = 0.0f; int i = 0; float b = 0.0f; @@ -78,20 +78,26 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_76 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_79 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_82 = x_9.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_73), float(x_76), float(x_79), float(x_82)); + *(tint_symbol_3) = float4(float(x_73), float(x_76), float(x_79), float(x_82)); } else { int const x_86 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_87 = float(x_86); - *(tint_symbol_4) = float4(x_87, x_87, x_87, x_87); + *(tint_symbol_3) = float4(x_87, x_87, x_87, x_87); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.hlsl index 1f0d86f181..706a9579ea 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.hlsl @@ -28,9 +28,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.msl index 066a9d8c8f..6662e677d7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.msl @@ -18,26 +18,32 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float const x_23 = x_5.x_GLF_uniform_float_values.arr[1].el; if ((rsqrt(x_23) < -1.0f)) { float const x_30 = x_5.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_30, x_30, x_30, x_30); + *(tint_symbol_3) = float4(x_30, x_30, x_30, x_30); } else { float const x_33 = x_5.x_GLF_uniform_float_values.arr[1].el; float const x_35 = x_5.x_GLF_uniform_float_values.arr[0].el; float const x_37 = x_5.x_GLF_uniform_float_values.arr[0].el; float const x_39 = x_5.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_33, x_35, x_37, x_39); + *(tint_symbol_3) = float4(x_33, x_35, x_37, x_39); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.hlsl index 1f0d86f181..706a9579ea 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.hlsl @@ -28,9 +28,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.msl index 066a9d8c8f..6662e677d7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.msl @@ -18,26 +18,32 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float const x_23 = x_5.x_GLF_uniform_float_values.arr[1].el; if ((rsqrt(x_23) < -1.0f)) { float const x_30 = x_5.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_30, x_30, x_30, x_30); + *(tint_symbol_3) = float4(x_30, x_30, x_30, x_30); } else { float const x_33 = x_5.x_GLF_uniform_float_values.arr[1].el; float const x_35 = x_5.x_GLF_uniform_float_values.arr[0].el; float const x_37 = x_5.x_GLF_uniform_float_values.arr[0].el; float const x_39 = x_5.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_33, x_35, x_37, x_39); + *(tint_symbol_3) = float4(x_33, x_35, x_37, x_39); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.hlsl index 04d7fae0ee..377667e31f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.hlsl @@ -32,9 +32,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.msl index 1219c9f280..e364fa0199 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int const x_25 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_29 = x_6.x_GLF_uniform_int_values.arr[0].el; @@ -29,20 +29,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_40 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_43 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_37), float(x_40), float(x_43), float(x_46)); + *(tint_symbol_3) = float4(float(x_37), float(x_40), float(x_43), float(x_46)); } else { int const x_49 = a; float const x_50 = float(x_49); - *(tint_symbol_4) = float4(x_50, x_50, x_50, x_50); + *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.hlsl index 04d7fae0ee..377667e31f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.hlsl @@ -32,9 +32,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.msl index 1219c9f280..e364fa0199 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int const x_25 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_29 = x_6.x_GLF_uniform_int_values.arr[0].el; @@ -29,20 +29,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_40 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_43 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_37), float(x_40), float(x_43), float(x_46)); + *(tint_symbol_3) = float4(float(x_37), float(x_40), float(x_43), float(x_46)); } else { int const x_49 = a; float const x_50 = float(x_49); - *(tint_symbol_4) = float4(x_50, x_50, x_50, x_50); + *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.hlsl index f1391e1978..b808035289 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.hlsl @@ -38,9 +38,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.msl index a588885a4a..19b0bfa0b9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float a = 0.0f; int const x_31 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_34 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -41,19 +41,25 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_50 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_53 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_55 = a; - *(tint_symbol_4) = float4(x_48, float(x_50), float(x_53), x_55); + *(tint_symbol_3) = float4(x_48, float(x_50), float(x_53), x_55); } else { float const x_57 = a; - *(tint_symbol_4) = float4(x_57, x_57, x_57, x_57); + *(tint_symbol_3) = float4(x_57, x_57, x_57, x_57); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.hlsl index f1391e1978..b808035289 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.hlsl @@ -38,9 +38,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.msl index a588885a4a..19b0bfa0b9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float a = 0.0f; int const x_31 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_34 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -41,19 +41,25 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_50 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_53 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_55 = a; - *(tint_symbol_4) = float4(x_48, float(x_50), float(x_53), x_55); + *(tint_symbol_3) = float4(x_48, float(x_50), float(x_53), x_55); } else { float const x_57 = a; - *(tint_symbol_4) = float4(x_57, x_57, x_57, x_57); + *(tint_symbol_3) = float4(x_57, x_57, x_57, x_57); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.hlsl index d5ea2b6e1f..16a804befc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.hlsl @@ -164,9 +164,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.msl index 5aae4c1b30..e7f0fddb0b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.msl @@ -47,7 +47,7 @@ int f_i1_(constant buf0& x_8, thread int* const a) { return x_24; } -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { tint_array_wrapper_1 ref = {}; int i_1 = 0; tint_array_wrapper_1 a_1 = {}; @@ -162,7 +162,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { if ((x_85 != x_87)) { int const x_88 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_205 = float(x_88); - *(tint_symbol_4) = float4(x_205, x_205, x_205, x_205); + *(tint_symbol_3) = float4(x_205, x_205, x_205, x_205); return; } { @@ -174,15 +174,21 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int const x_92 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_93 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_94 = x_8.x_GLF_uniform_int_values.arr[11].el; - *(tint_symbol_4) = float4(float(x_91), float(x_92), float(x_93), float(x_94)); + *(tint_symbol_3) = float4(float(x_91), float(x_92), float(x_93), float(x_94)); return; } +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.hlsl index d5ea2b6e1f..16a804befc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.hlsl @@ -164,9 +164,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.msl index 5aae4c1b30..e7f0fddb0b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.msl @@ -47,7 +47,7 @@ int f_i1_(constant buf0& x_8, thread int* const a) { return x_24; } -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { tint_array_wrapper_1 ref = {}; int i_1 = 0; tint_array_wrapper_1 a_1 = {}; @@ -162,7 +162,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { if ((x_85 != x_87)) { int const x_88 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_205 = float(x_88); - *(tint_symbol_4) = float4(x_205, x_205, x_205, x_205); + *(tint_symbol_3) = float4(x_205, x_205, x_205, x_205); return; } { @@ -174,15 +174,21 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int const x_92 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_93 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_94 = x_8.x_GLF_uniform_int_values.arr[11].el; - *(tint_symbol_4) = float4(float(x_91), float(x_92), float(x_93), float(x_94)); + *(tint_symbol_3) = float4(float(x_91), float(x_92), float(x_93), float(x_94)); return; } +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.hlsl index ccce3d406d..1a7f4c4931 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.hlsl @@ -35,9 +35,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.msl index ac1f1760e1..73ce3e5e8e 100755 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.msl @@ -28,29 +28,35 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_3) { float a = 0.0f; int const x_10 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_11 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_12 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_13 = x_5.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_10), float(x_11), float(x_12), float(x_13)); + *(tint_symbol_3) = float4(float(x_10), float(x_11), float(x_12), float(x_13)); float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el; a = (x_45 - (NAN * floor((x_45 / NAN)))); float const x_47 = a; float const x_49 = x_8.x_GLF_uniform_float_values.arr[0].el; if ((x_47 != x_49)) { float const x_54 = x_8.x_GLF_uniform_float_values.arr[0].el; - (*(tint_symbol_4)).y = x_54; + (*(tint_symbol_3)).y = x_54; } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_5, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.hlsl index 1372d60bd6..801f8900ee 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.hlsl @@ -35,9 +35,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.msl index 642bdda8cd..9f81578320 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.msl @@ -28,29 +28,35 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_3) { float a = 0.0f; int const x_10 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_11 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_12 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_13 = x_5.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_10), float(x_11), float(x_12), float(x_13)); + *(tint_symbol_3) = float4(float(x_10), float(x_11), float(x_12), float(x_13)); float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el; a = fmod(x_45, INFINITY); float const x_47 = a; float const x_49 = x_8.x_GLF_uniform_float_values.arr[0].el; if ((x_47 != x_49)) { float const x_54 = x_8.x_GLF_uniform_float_values.arr[0].el; - (*(tint_symbol_4)).y = x_54; + (*(tint_symbol_3)).y = x_54; } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_5, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.hlsl index f0a0bf5c37..9bd866b5f0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.hlsl @@ -35,9 +35,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.msl index 752e43d8c1..74ad660167 100755 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.msl @@ -28,29 +28,35 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_3) { float a = 0.0f; int const x_10 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_11 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_12 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_13 = x_5.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_10), float(x_11), float(x_12), float(x_13)); + *(tint_symbol_3) = float4(float(x_10), float(x_11), float(x_12), float(x_13)); float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el; a = (NAN - (x_45 * floor((NAN / x_45)))); float const x_47 = a; float const x_49 = x_8.x_GLF_uniform_float_values.arr[0].el; if ((x_47 != x_49)) { float const x_54 = x_8.x_GLF_uniform_float_values.arr[0].el; - (*(tint_symbol_4)).y = x_54; + (*(tint_symbol_3)).y = x_54; } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_5, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.hlsl index 2ee05e34d2..3d164f76b7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.hlsl @@ -35,9 +35,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.msl index b4fda60fc1..fcac993778 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.msl @@ -28,29 +28,35 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_3) { float a = 0.0f; int const x_10 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_11 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_12 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_13 = x_5.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_10), float(x_11), float(x_12), float(x_13)); + *(tint_symbol_3) = float4(float(x_10), float(x_11), float(x_12), float(x_13)); float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el; a = fmod(-INFINITY, x_45); float const x_47 = a; float const x_49 = x_8.x_GLF_uniform_float_values.arr[0].el; if ((x_47 != x_49)) { float const x_54 = x_8.x_GLF_uniform_float_values.arr[0].el; - (*(tint_symbol_4)).y = x_54; + (*(tint_symbol_3)).y = x_54; } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_5, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.hlsl index 633dded2ed..ce8790cb60 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.hlsl @@ -31,9 +31,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.msl index b7aac08cda..4ba5a96040 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.msl @@ -28,27 +28,33 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_3) { float const x_31 = x_5.x_GLF_uniform_float_values.arr[0].el; if ((sqrt(x_31) < -1.0f)) { int const x_10 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_38 = float(x_10); - *(tint_symbol_4) = float4(x_38, x_38, x_38, x_38); + *(tint_symbol_3) = float4(x_38, x_38, x_38, x_38); } else { int const x_11 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_41 = float(x_11); int const x_12 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_43 = float(x_12); - *(tint_symbol_4) = float4(x_41, x_43, x_43, x_41); + *(tint_symbol_3) = float4(x_41, x_43, x_43, x_41); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) { + main_1(x_5, x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.hlsl index 633dded2ed..ce8790cb60 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.hlsl @@ -31,9 +31,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.msl index b7aac08cda..4ba5a96040 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.msl @@ -28,27 +28,33 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_3) { float const x_31 = x_5.x_GLF_uniform_float_values.arr[0].el; if ((sqrt(x_31) < -1.0f)) { int const x_10 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_38 = float(x_10); - *(tint_symbol_4) = float4(x_38, x_38, x_38, x_38); + *(tint_symbol_3) = float4(x_38, x_38, x_38, x_38); } else { int const x_11 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_41 = float(x_11); int const x_12 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_43 = float(x_12); - *(tint_symbol_4) = float4(x_41, x_43, x_43, x_41); + *(tint_symbol_3) = float4(x_41, x_43, x_43, x_41); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) { + main_1(x_5, x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.hlsl index d405088efa..707aeadd5d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.hlsl @@ -138,9 +138,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.msl index 031445553a..38011e638c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.msl @@ -38,7 +38,7 @@ void func_struct_S_i11_(constant buf1& x_8, constant buf0& x_10, thread S* const return; } -void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_3) { int i = 0; tint_array_wrapper_1 arr = {}; int i_1 = 0; @@ -143,20 +143,26 @@ void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_s int const x_151 = x_10.x_GLF_uniform_int_values.arr[2].el; int const x_154 = x_10.x_GLF_uniform_int_values.arr[2].el; int const x_157 = x_10.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_4) = float4(float(x_148), float(x_151), float(x_154), float(x_157)); + *(tint_symbol_3) = float4(float(x_148), float(x_151), float(x_154), float(x_157)); } else { int const x_161 = x_10.x_GLF_uniform_int_values.arr[2].el; float const x_162 = float(x_161); - *(tint_symbol_4) = float4(x_162, x_162, x_162, x_162); + *(tint_symbol_3) = float4(x_162, x_162, x_162, x_162); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_10, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_10, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.hlsl index d405088efa..707aeadd5d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.hlsl @@ -138,9 +138,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.msl index 031445553a..38011e638c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.msl @@ -38,7 +38,7 @@ void func_struct_S_i11_(constant buf1& x_8, constant buf0& x_10, thread S* const return; } -void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_3) { int i = 0; tint_array_wrapper_1 arr = {}; int i_1 = 0; @@ -143,20 +143,26 @@ void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_s int const x_151 = x_10.x_GLF_uniform_int_values.arr[2].el; int const x_154 = x_10.x_GLF_uniform_int_values.arr[2].el; int const x_157 = x_10.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_4) = float4(float(x_148), float(x_151), float(x_154), float(x_157)); + *(tint_symbol_3) = float4(float(x_148), float(x_151), float(x_154), float(x_157)); } else { int const x_161 = x_10.x_GLF_uniform_int_values.arr[2].el; float const x_162 = float(x_161); - *(tint_symbol_4) = float4(x_162, x_162, x_162, x_162); + *(tint_symbol_3) = float4(x_162, x_162, x_162, x_162); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_10, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_10, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.hlsl index c4609c11b5..5f34521e3b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.hlsl @@ -46,9 +46,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl index e93e2b5e16..55192e766b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl @@ -28,11 +28,11 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_symbol_3) { int i = 0; int const x_29 = x_5.x_GLF_uniform_int_values.arr[0].el; float const x_30 = float(x_29); - *(tint_symbol_4) = float4(x_30, x_30, x_30, x_30); + *(tint_symbol_3) = float4(x_30, x_30, x_30, x_30); int const x_33 = x_5.x_GLF_uniform_int_values.arr[0].el; i = x_33; while (true) { @@ -49,8 +49,8 @@ void main_1(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_sy int const x_53 = i; int const x_55 = i; float const x_58 = x_8.x_GLF_uniform_float_values.arr[0].el; - float4 const x_60 = *(tint_symbol_4); - *(tint_symbol_4) = (x_60 + float4(x_52, float(x_53), float(x_55), x_58)); + float4 const x_60 = *(tint_symbol_3); + *(tint_symbol_3) = (x_60 + float4(x_52, float(x_53), float(x_55), x_58)); } { int const x_62 = i; @@ -60,11 +60,17 @@ void main_1(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_sy return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_5, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.hlsl index c4609c11b5..5f34521e3b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.hlsl @@ -46,9 +46,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl index e93e2b5e16..55192e766b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl @@ -28,11 +28,11 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_symbol_3) { int i = 0; int const x_29 = x_5.x_GLF_uniform_int_values.arr[0].el; float const x_30 = float(x_29); - *(tint_symbol_4) = float4(x_30, x_30, x_30, x_30); + *(tint_symbol_3) = float4(x_30, x_30, x_30, x_30); int const x_33 = x_5.x_GLF_uniform_int_values.arr[0].el; i = x_33; while (true) { @@ -49,8 +49,8 @@ void main_1(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_sy int const x_53 = i; int const x_55 = i; float const x_58 = x_8.x_GLF_uniform_float_values.arr[0].el; - float4 const x_60 = *(tint_symbol_4); - *(tint_symbol_4) = (x_60 + float4(x_52, float(x_53), float(x_55), x_58)); + float4 const x_60 = *(tint_symbol_3); + *(tint_symbol_3) = (x_60 + float4(x_52, float(x_53), float(x_55), x_58)); } { int const x_62 = i; @@ -60,11 +60,17 @@ void main_1(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_sy return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_5, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.hlsl index 092451a7c2..2d59334ecb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.hlsl @@ -35,9 +35,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.msl index d74fee4c22..ee8a0d1a7b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int const x_28 = x_6.x_GLF_uniform_int_values.arr[1].el; a = x_28; @@ -30,20 +30,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_46 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_49 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_52 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_43), float(x_46), float(x_49), float(x_52)); + *(tint_symbol_3) = float4(float(x_43), float(x_46), float(x_49), float(x_52)); } else { int const x_56 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_57 = float(x_56); - *(tint_symbol_4) = float4(x_57, x_57, x_57, x_57); + *(tint_symbol_3) = float4(x_57, x_57, x_57, x_57); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.hlsl index 092451a7c2..2d59334ecb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.hlsl @@ -35,9 +35,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.msl index d74fee4c22..ee8a0d1a7b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int const x_28 = x_6.x_GLF_uniform_int_values.arr[1].el; a = x_28; @@ -30,20 +30,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_46 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_49 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_52 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_43), float(x_46), float(x_49), float(x_52)); + *(tint_symbol_3) = float4(float(x_43), float(x_46), float(x_49), float(x_52)); } else { int const x_56 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_57 = float(x_56); - *(tint_symbol_4) = float4(x_57, x_57, x_57, x_57); + *(tint_symbol_3) = float4(x_57, x_57, x_57, x_57); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.hlsl index 42545afbe1..8801f2f32a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.hlsl @@ -42,11 +42,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.msl index 0ecda7c97c..b787f8fe1f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.msl @@ -14,14 +14,14 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int a = 0; int i = 0; - float const x_32 = (*(tint_symbol_5)).x; + float const x_32 = (*(tint_symbol_3)).x; int const x_35 = x_7.x_GLF_uniform_int_values.arr[1].el; a = select(-1, 0, (int(x_32) < x_35)); i = 0; @@ -44,22 +44,28 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float int const x_58 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_61 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_64 = x_7.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); + *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); } else { int const x_68 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_69 = float(x_68); - *(tint_symbol_6) = float4(x_69, x_69, x_69, x_69); + *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.hlsl index 42545afbe1..8801f2f32a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.hlsl @@ -42,11 +42,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.msl index 0ecda7c97c..b787f8fe1f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.msl @@ -14,14 +14,14 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int a = 0; int i = 0; - float const x_32 = (*(tint_symbol_5)).x; + float const x_32 = (*(tint_symbol_3)).x; int const x_35 = x_7.x_GLF_uniform_int_values.arr[1].el; a = select(-1, 0, (int(x_32) < x_35)); i = 0; @@ -44,22 +44,28 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float int const x_58 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_61 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_64 = x_7.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); + *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); } else { int const x_68 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_69 = float(x_68); - *(tint_symbol_6) = float4(x_69, x_69, x_69, x_69); + *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.hlsl index 374a386f37..8ede670bde 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.hlsl @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.msl index 573e4e9fc8..781dfbb8af 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int count = 0; int i = 0; int const x_27 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -50,20 +50,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_61 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_64 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_67 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_58), float(x_61), float(x_64), float(x_67)); + *(tint_symbol_3) = float4(float(x_58), float(x_61), float(x_64), float(x_67)); } else { int const x_71 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_72 = float(x_71); - *(tint_symbol_4) = float4(x_72, x_72, x_72, x_72); + *(tint_symbol_3) = float4(x_72, x_72, x_72, x_72); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.hlsl index 374a386f37..8ede670bde 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.hlsl @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.msl index 573e4e9fc8..781dfbb8af 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int count = 0; int i = 0; int const x_27 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -50,20 +50,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_61 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_64 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_67 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_58), float(x_61), float(x_64), float(x_67)); + *(tint_symbol_3) = float4(float(x_58), float(x_61), float(x_64), float(x_67)); } else { int const x_71 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_72 = float(x_71); - *(tint_symbol_4) = float4(x_72, x_72, x_72, x_72); + *(tint_symbol_3) = float4(x_72, x_72, x_72, x_72); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.hlsl index bbf845ad63..c2aee32be1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.hlsl @@ -70,9 +70,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.msl index 4c40186183..0451a90898 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.msl @@ -45,7 +45,7 @@ float3 func_() { return float3(0.0f, 0.0f, 0.0f); } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int j = 0; tint_array_wrapper data = {}; int j_1 = 0; @@ -91,18 +91,24 @@ void main_1(thread float4* const tint_symbol_4) { } bool const x_81 = x_81_phi; if (x_81) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.hlsl index bbf845ad63..c2aee32be1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.hlsl @@ -70,9 +70,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.msl index 4c40186183..0451a90898 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.msl @@ -45,7 +45,7 @@ float3 func_() { return float3(0.0f, 0.0f, 0.0f); } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int j = 0; tint_array_wrapper data = {}; int j_1 = 0; @@ -91,18 +91,24 @@ void main_1(thread float4* const tint_symbol_4) { } bool const x_81 = x_81_phi; if (x_81) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.hlsl index 1ce3a68ab7..36755d75ab 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.msl index 4b271a5b06..9da2ee9770 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float2 v1 = 0.0f; float const x_35 = x_6.x_GLF_uniform_float_values.arr[0].el; v1 = float2(x_35, x_35); @@ -40,20 +40,26 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy float const x_53 = float(x_38); int const x_55 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_56 = float(x_55); - *(tint_symbol_4) = float4(x_53, x_56, x_56, x_53); + *(tint_symbol_3) = float4(x_53, x_56, x_56, x_53); } else { int const x_59 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_60 = float(x_59); - *(tint_symbol_4) = float4(x_60, x_60, x_60, x_60); + *(tint_symbol_3) = float4(x_60, x_60, x_60, x_60); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.hlsl index 1ce3a68ab7..36755d75ab 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.msl index 4b271a5b06..9da2ee9770 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float2 v1 = 0.0f; float const x_35 = x_6.x_GLF_uniform_float_values.arr[0].el; v1 = float2(x_35, x_35); @@ -40,20 +40,26 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy float const x_53 = float(x_38); int const x_55 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_56 = float(x_55); - *(tint_symbol_4) = float4(x_53, x_56, x_56, x_53); + *(tint_symbol_3) = float4(x_53, x_56, x_56, x_53); } else { int const x_59 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_60 = float(x_59); - *(tint_symbol_4) = float4(x_60, x_60, x_60, x_60); + *(tint_symbol_3) = float4(x_60, x_60, x_60, x_60); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.hlsl index 3169db61f7..f6be289a2e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.hlsl @@ -17,8 +17,8 @@ void main_1() { const uint scalar_offset = ((16u * uint(0))) / 4; const int x_32 = asint(x_6[scalar_offset / 4][scalar_offset % 4]); const int x_34 = idx; - const tint_padded_array_element tint_symbol_3[2] = {{x_30}, {x_32}}; - indexable = tint_symbol_3; + const tint_padded_array_element tint_symbol_2[2] = {{x_30}, {x_32}}; + indexable = tint_symbol_2; const int x_36 = indexable[x_34].el; a = x_36; const int x_37 = a; @@ -47,9 +47,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl index 380f54837e..a81c92127f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_6, thread float4* const tint_symbol_4) { int idx = 0; int a = 0; tint_array_wrapper indexable = {}; @@ -27,8 +27,8 @@ void main_1(constant buf1& x_6, thread float4* const tint_symbol_5) { int const x_30 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_32 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_34 = idx; - tint_array_wrapper const tint_symbol_3 = {.arr={{.el=x_30}, {.el=x_32}}}; - indexable = tint_symbol_3; + tint_array_wrapper const tint_symbol_2 = {.arr={{.el=x_30}, {.el=x_32}}}; + indexable = tint_symbol_2; int const x_36 = indexable.arr[x_34].el; a = x_36; int const x_37 = a; @@ -38,20 +38,26 @@ void main_1(constant buf1& x_6, thread float4* const tint_symbol_5) { int const x_48 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_54 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); + *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); } else { int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_59 = float(x_58); - *(tint_symbol_5) = float4(x_59, x_59, x_59, x_59); + *(tint_symbol_4) = float4(x_59, x_59, x_59, x_59); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_6, thread float4* const tint_symbol_5) { + main_1(x_6, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.hlsl index 3169db61f7..f6be289a2e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.hlsl @@ -17,8 +17,8 @@ void main_1() { const uint scalar_offset = ((16u * uint(0))) / 4; const int x_32 = asint(x_6[scalar_offset / 4][scalar_offset % 4]); const int x_34 = idx; - const tint_padded_array_element tint_symbol_3[2] = {{x_30}, {x_32}}; - indexable = tint_symbol_3; + const tint_padded_array_element tint_symbol_2[2] = {{x_30}, {x_32}}; + indexable = tint_symbol_2; const int x_36 = indexable[x_34].el; a = x_36; const int x_37 = a; @@ -47,9 +47,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl index 380f54837e..a81c92127f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_6, thread float4* const tint_symbol_4) { int idx = 0; int a = 0; tint_array_wrapper indexable = {}; @@ -27,8 +27,8 @@ void main_1(constant buf1& x_6, thread float4* const tint_symbol_5) { int const x_30 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_32 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_34 = idx; - tint_array_wrapper const tint_symbol_3 = {.arr={{.el=x_30}, {.el=x_32}}}; - indexable = tint_symbol_3; + tint_array_wrapper const tint_symbol_2 = {.arr={{.el=x_30}, {.el=x_32}}}; + indexable = tint_symbol_2; int const x_36 = indexable.arr[x_34].el; a = x_36; int const x_37 = a; @@ -38,20 +38,26 @@ void main_1(constant buf1& x_6, thread float4* const tint_symbol_5) { int const x_48 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_54 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); + *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); } else { int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_59 = float(x_58); - *(tint_symbol_5) = float4(x_59, x_59, x_59, x_59); + *(tint_symbol_4) = float4(x_59, x_59, x_59, x_59); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_6, thread float4* const tint_symbol_5) { + main_1(x_6, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.hlsl index 9531ab8c53..9b581785e8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.hlsl @@ -40,9 +40,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.msl index ae8062404d..a75fb206c9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.msl @@ -18,11 +18,11 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int x_32_phi = 0; int const x_24 = x_5.x_GLF_uniform_int_values.arr[1].el; float const x_25 = float(x_24); - *(tint_symbol_4) = float4(x_25, x_25, x_25, x_25); + *(tint_symbol_3) = float4(x_25, x_25, x_25, x_25); int const x_28 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_30 = (as_type((as_type(x_28) << as_type(x_28))) >> as_type(1)); x_32_phi = x_24; @@ -37,7 +37,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { int const x_39 = x_5.x_GLF_uniform_int_values.arr[2].el; if ((x_33 == as_type(x_39))) { float const x_43 = float(x_28); - *(tint_symbol_4) = float4(x_43, x_25, x_25, x_43); + *(tint_symbol_3) = float4(x_43, x_25, x_25, x_43); break; } { @@ -47,11 +47,17 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.hlsl index 9531ab8c53..9b581785e8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.hlsl @@ -40,9 +40,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.msl index ae8062404d..a75fb206c9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.msl @@ -18,11 +18,11 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int x_32_phi = 0; int const x_24 = x_5.x_GLF_uniform_int_values.arr[1].el; float const x_25 = float(x_24); - *(tint_symbol_4) = float4(x_25, x_25, x_25, x_25); + *(tint_symbol_3) = float4(x_25, x_25, x_25, x_25); int const x_28 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_30 = (as_type((as_type(x_28) << as_type(x_28))) >> as_type(1)); x_32_phi = x_24; @@ -37,7 +37,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { int const x_39 = x_5.x_GLF_uniform_int_values.arr[2].el; if ((x_33 == as_type(x_39))) { float const x_43 = float(x_28); - *(tint_symbol_4) = float4(x_43, x_25, x_25, x_43); + *(tint_symbol_3) = float4(x_43, x_25, x_25, x_43); break; } { @@ -47,11 +47,17 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.hlsl index 2cde1cb4fe..3df8b25c78 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.hlsl @@ -57,9 +57,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.msl index ddde176fe3..9126868f0c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.msl @@ -45,7 +45,7 @@ float3 func_() { return float3(0.0f, 0.0f, 0.0f); } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int j = 0; tint_array_wrapper data = {}; int j_1 = 0; @@ -80,15 +80,21 @@ void main_1(thread float4* const tint_symbol_4) { } } float3 const x_69 = data.arr[0]; - *(tint_symbol_4) = float4(x_69.x, x_69.y, x_69.z, 1.0f); + *(tint_symbol_3) = float4(x_69.x, x_69.y, x_69.z, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.hlsl index 2cde1cb4fe..3df8b25c78 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.hlsl @@ -57,9 +57,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.msl index ddde176fe3..9126868f0c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.msl @@ -45,7 +45,7 @@ float3 func_() { return float3(0.0f, 0.0f, 0.0f); } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int j = 0; tint_array_wrapper data = {}; int j_1 = 0; @@ -80,15 +80,21 @@ void main_1(thread float4* const tint_symbol_4) { } } float3 const x_69 = data.arr[0]; - *(tint_symbol_4) = float4(x_69.x, x_69.y, x_69.z, 1.0f); + *(tint_symbol_3) = float4(x_69.x, x_69.y, x_69.z, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.hlsl index 98286fb198..d3f2cf54bb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.hlsl @@ -64,9 +64,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.msl index ab1a1a43a9..adb9724ae4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) { float f = 0.0f; int i = 0; bool x_66 = false; @@ -69,20 +69,26 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_75 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_78 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_81 = x_9.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); + *(tint_symbol_3) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); } else { int const x_85 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_86 = float(x_85); - *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86); + *(tint_symbol_3) = float4(x_86, x_86, x_86, x_86); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.hlsl index 98286fb198..d3f2cf54bb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.hlsl @@ -64,9 +64,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.msl index ab1a1a43a9..adb9724ae4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) { float f = 0.0f; int i = 0; bool x_66 = false; @@ -69,20 +69,26 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_75 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_78 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_81 = x_9.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); + *(tint_symbol_3) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); } else { int const x_85 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_86 = float(x_85); - *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86); + *(tint_symbol_3) = float4(x_86, x_86, x_86, x_86); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.hlsl index fc76837e8f..7437ab35a2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.hlsl @@ -35,9 +35,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.msl index 4836c63bc9..6af8723075 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int a = 0; int i = 0; a = 0; @@ -38,18 +38,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } int const x_49 = a; if ((x_49 == 5)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.hlsl index fc76837e8f..7437ab35a2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.hlsl @@ -35,9 +35,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.msl index 4836c63bc9..6af8723075 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int a = 0; int i = 0; a = 0; @@ -38,18 +38,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } int const x_49 = a; if ((x_49 == 5)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.hlsl index 58eeb4f0ad..ee7e98d944 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.hlsl @@ -59,9 +59,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.msl index e902978e40..ef140224c5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.msl @@ -28,10 +28,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { float f = 0.0f; int i = 0; - *(tint_symbol_4) = 0; + *(tint_symbol_3) = 0; float const x_36 = x_7.x_GLF_uniform_float_values.arr[1].el; f = x_36; int const x_38 = x_10.x_GLF_uniform_int_values.arr[1].el; @@ -64,21 +64,27 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb int const x_75 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_78 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_81 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); + *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); } else { int const x_85 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_86 = float(x_85); - *(tint_symbol_5) = float4(x_86, x_86, x_86, x_86); + *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_7, x_10, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_7, x_10, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.hlsl index 58eeb4f0ad..ee7e98d944 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.hlsl @@ -59,9 +59,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.msl index e902978e40..ef140224c5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.msl @@ -28,10 +28,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { float f = 0.0f; int i = 0; - *(tint_symbol_4) = 0; + *(tint_symbol_3) = 0; float const x_36 = x_7.x_GLF_uniform_float_values.arr[1].el; f = x_36; int const x_38 = x_10.x_GLF_uniform_int_values.arr[1].el; @@ -64,21 +64,27 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb int const x_75 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_78 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_81 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); + *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); } else { int const x_85 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_86 = float(x_85); - *(tint_symbol_5) = float4(x_86, x_86, x_86, x_86); + *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_7, x_10, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_7, x_10, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.hlsl index 32a0a50afb..143f2cd849 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.hlsl @@ -13,8 +13,8 @@ void main_1() { const int x_33 = asint(x_6[3].x); const int x_35 = asint(x_6[5].x); const int x_37 = asint(x_6[2].x); - const int tint_symbol_3[3] = {x_33, x_35, x_37}; - arr = tint_symbol_3; + const int tint_symbol_2[3] = {x_33, x_35, x_37}; + arr = tint_symbol_2; index = 1; while (true) { bool x_51 = false; @@ -80,9 +80,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl index 03f75a76e6..4a50161c27 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { tint_array_wrapper_1 arr = {}; int index = 0; bool x_76 = false; @@ -31,8 +31,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_33 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_35 = x_6.x_GLF_uniform_int_values.arr[5].el; int const x_37 = x_6.x_GLF_uniform_int_values.arr[2].el; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_33, x_35, x_37}}; - arr = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_33, x_35, x_37}}; + arr = tint_symbol_2; index = 1; while (true) { bool x_51 = false; @@ -83,20 +83,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_95 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_98 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_101 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_92), float(x_95), float(x_98), float(x_101)); + *(tint_symbol_4) = float4(float(x_92), float(x_95), float(x_98), float(x_101)); } else { int const x_105 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_106 = float(x_105); - *(tint_symbol_5) = float4(x_106, x_106, x_106, x_106); + *(tint_symbol_4) = float4(x_106, x_106, x_106, x_106); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) { + main_1(x_6, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.hlsl index b3077db9d8..5b410ac305 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.hlsl @@ -13,8 +13,8 @@ void main_1() { const int x_33 = asint(x_6[3].x); const int x_35 = asint(x_6[5].x); const int x_37 = asint(x_6[2].x); - const int tint_symbol_3[3] = {x_33, x_35, x_37}; - arr = tint_symbol_3; + const int tint_symbol_2[3] = {x_33, x_35, x_37}; + arr = tint_symbol_2; index = 1; while (true) { bool x_51 = false; @@ -84,9 +84,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.msl index f10a979d5c..e73edfa98a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { tint_array_wrapper_1 arr = {}; int index = 0; bool x_76 = false; @@ -31,8 +31,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_33 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_35 = x_6.x_GLF_uniform_int_values.arr[5].el; int const x_37 = x_6.x_GLF_uniform_int_values.arr[2].el; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_33, x_35, x_37}}; - arr = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_33, x_35, x_37}}; + arr = tint_symbol_2; index = 1; while (true) { bool x_51 = false; @@ -83,20 +83,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_95 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_98 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_101 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_92), float(x_95), float(x_98), float(x_101)); + *(tint_symbol_4) = float4(float(x_92), float(x_95), float(x_98), float(x_101)); } else { int const x_105 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_106 = float(x_105); - *(tint_symbol_5) = float4(x_106, x_106, x_106, x_106); + *(tint_symbol_4) = float4(x_106, x_106, x_106, x_106); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) { + main_1(x_6, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.hlsl index 9c06087533..de3dd108fd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.hlsl @@ -64,9 +64,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.msl index 10f8c7033e..8a69fc958f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_symbol_3) { float a = 0.0f; float b = 0.0f; float c = 0.0f; @@ -72,20 +72,26 @@ void main_1(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_s int const x_80 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_83 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_86 = x_11.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_77), float(x_80), float(x_83), float(x_86)); + *(tint_symbol_3) = float4(float(x_77), float(x_80), float(x_83), float(x_86)); } else { int const x_90 = x_11.x_GLF_uniform_int_values.arr[1].el; float const x_91 = float(x_90); - *(tint_symbol_4) = float4(x_91, x_91, x_91, x_91); + *(tint_symbol_3) = float4(x_91, x_91, x_91, x_91); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_11, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_symbol_4) { + main_1(x_6, x_11, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_11, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.hlsl index 9c06087533..de3dd108fd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.hlsl @@ -64,9 +64,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.msl index 10f8c7033e..8a69fc958f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_symbol_3) { float a = 0.0f; float b = 0.0f; float c = 0.0f; @@ -72,20 +72,26 @@ void main_1(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_s int const x_80 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_83 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_86 = x_11.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_77), float(x_80), float(x_83), float(x_86)); + *(tint_symbol_3) = float4(float(x_77), float(x_80), float(x_83), float(x_86)); } else { int const x_90 = x_11.x_GLF_uniform_int_values.arr[1].el; float const x_91 = float(x_90); - *(tint_symbol_4) = float4(x_91, x_91, x_91, x_91); + *(tint_symbol_3) = float4(x_91, x_91, x_91, x_91); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_11, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_symbol_4) { + main_1(x_6, x_11, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_11, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl index 1c8b0d4929..999c01ac01 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl @@ -24,11 +24,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_7, constant buf0& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2x3 m23 = float2x3(0.0f); int i = 0; float const x_46 = x_7.x_GLF_uniform_float_values.arr[1].el; @@ -48,13 +48,13 @@ void main_1(constant buf1& x_7, constant buf0& x_10, thread float4* const tint_s float const x_64 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_66 = m23[x_60][x_62]; m23[x_60][x_62] = (x_66 + x_64); - float const x_70 = (*(tint_symbol_5)).y; + float const x_70 = (*(tint_symbol_3)).y; float const x_72 = x_7.x_GLF_uniform_float_values.arr[0].el; if ((x_70 < x_72)) { } x_81_phi = true; if (true) { - float const x_79 = (*(tint_symbol_5)).x; + float const x_79 = (*(tint_symbol_3)).x; x_80 = (x_79 < 0.0f); x_81_phi = x_80; } @@ -80,22 +80,28 @@ void main_1(constant buf1& x_7, constant buf0& x_10, thread float4* const tint_s int const x_125 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_128 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_131 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_122), float(x_125), float(x_128), float(x_131)); + *(tint_symbol_4) = float4(float(x_122), float(x_125), float(x_128), float(x_131)); } else { int const x_135 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_136 = float(x_135); - *(tint_symbol_6) = float4(x_136, x_136, x_136, x_136); + *(tint_symbol_4) = float4(x_136, x_136, x_136, x_136); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_10, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl index a488355a59..0a7145b48a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl @@ -24,11 +24,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_7, constant buf0& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2x3 m23 = float2x3(0.0f); int i = 0; float const x_46 = x_7.x_GLF_uniform_float_values.arr[1].el; @@ -48,13 +48,13 @@ void main_1(constant buf1& x_7, constant buf0& x_10, thread float4* const tint_s float const x_64 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_66 = m23[x_60][x_62]; m23[x_60][x_62] = (x_66 + x_64); - float const x_70 = (*(tint_symbol_5)).y; + float const x_70 = (*(tint_symbol_3)).y; float const x_72 = x_7.x_GLF_uniform_float_values.arr[0].el; if ((x_70 < x_72)) { } x_81_phi = true; if (true) { - float const x_79 = (*(tint_symbol_5)).x; + float const x_79 = (*(tint_symbol_3)).x; x_80 = (x_79 < 0.0f); x_81_phi = x_80; } @@ -80,22 +80,28 @@ void main_1(constant buf1& x_7, constant buf0& x_10, thread float4* const tint_s int const x_125 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_128 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_131 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_122), float(x_125), float(x_128), float(x_131)); + *(tint_symbol_4) = float4(float(x_122), float(x_125), float(x_128), float(x_131)); } else { int const x_135 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_136 = float(x_135); - *(tint_symbol_6) = float4(x_136, x_136, x_136, x_136); + *(tint_symbol_4) = float4(x_136, x_136, x_136, x_136); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_10, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.spvasm.expected.msl index df166232f0..b3f557fcd4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int i = 0; int const x_27 = x_6.x_GLF_uniform_int_values.arr[3].el; @@ -52,20 +52,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_60 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_63 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_66 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_57), float(x_60), float(x_63), float(x_66)); + *(tint_symbol_3) = float4(float(x_57), float(x_60), float(x_63), float(x_66)); } else { int const x_70 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_71 = float(x_70); - *(tint_symbol_4) = float4(x_71, x_71, x_71, x_71); + *(tint_symbol_3) = float4(x_71, x_71, x_71, x_71); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl.expected.msl index df166232f0..b3f557fcd4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int i = 0; int const x_27 = x_6.x_GLF_uniform_int_values.arr[3].el; @@ -52,20 +52,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_60 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_63 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_66 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_57), float(x_60), float(x_63), float(x_66)); + *(tint_symbol_3) = float4(float(x_57), float(x_60), float(x_63), float(x_66)); } else { int const x_70 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_71 = float(x_70); - *(tint_symbol_4) = float4(x_71, x_71, x_71, x_71); + *(tint_symbol_3) = float4(x_71, x_71, x_71, x_71); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.hlsl index b595c465df..f96252357a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.hlsl @@ -40,9 +40,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.msl index 78ca106118..a3c7978bc6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.msl @@ -23,7 +23,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int const x_25 = x_6.x_GLF_uniform_int_values.arr[2].el; a = x_25; @@ -43,20 +43,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_48 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_54 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); + *(tint_symbol_3) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); } else { int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_59 = float(x_58); - *(tint_symbol_4) = float4(x_59, x_59, x_59, x_59); + *(tint_symbol_3) = float4(x_59, x_59, x_59, x_59); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.hlsl index b595c465df..f96252357a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.hlsl @@ -40,9 +40,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.msl index 78ca106118..a3c7978bc6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.msl @@ -23,7 +23,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int const x_25 = x_6.x_GLF_uniform_int_values.arr[2].el; a = x_25; @@ -43,20 +43,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_48 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_54 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); + *(tint_symbol_3) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); } else { int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_59 = float(x_58); - *(tint_symbol_4) = float4(x_59, x_59, x_59, x_59); + *(tint_symbol_3) = float4(x_59, x_59, x_59, x_59); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.hlsl index 31c1ef2b02..3986674a3d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.hlsl @@ -36,9 +36,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.msl index ca01da7561..76563fcff3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.msl @@ -18,13 +18,13 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int const x_26 = x_6.x_GLF_uniform_int_values.arr[0].el; a = x_26; int const x_28 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_29 = float(x_28); - *(tint_symbol_4) = float4(x_29, x_29, x_29, x_29); + *(tint_symbol_3) = float4(x_29, x_29, x_29, x_29); while (true) { int const x_36 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_37 = a; @@ -36,17 +36,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_45 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_48 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_51 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); + *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); break; } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.hlsl index 31c1ef2b02..3986674a3d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.hlsl @@ -36,9 +36,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.msl index ca01da7561..76563fcff3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.msl @@ -18,13 +18,13 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int const x_26 = x_6.x_GLF_uniform_int_values.arr[0].el; a = x_26; int const x_28 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_29 = float(x_28); - *(tint_symbol_4) = float4(x_29, x_29, x_29, x_29); + *(tint_symbol_3) = float4(x_29, x_29, x_29, x_29); while (true) { int const x_36 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_37 = a; @@ -36,17 +36,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_45 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_48 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_51 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); + *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51)); break; } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.hlsl index d153ad0e7d..3455e1c877 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.hlsl @@ -98,9 +98,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.msl index 87ab4e75ed..210ab9744e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.msl @@ -18,15 +18,15 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { - *(tint_symbol_4) = 0; +void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { + *(tint_symbol_3) = 0; int const x_27 = x_6.x_GLF_uniform_int_values.arr[0].el; switch(x_27) { case 0: { if (true) { int const x_34 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_35 = float(x_34); - *(tint_symbol_5) = float4(x_35, x_35, x_35, x_35); + *(tint_symbol_4) = float4(x_35, x_35, x_35, x_35); return; } /* fallthrough */ @@ -37,14 +37,14 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* int const x_43 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_49 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_40), float(x_43), float(x_46), float(x_49)); + *(tint_symbol_4) = float4(float(x_40), float(x_43), float(x_46), float(x_49)); if (false) { int const x_55 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_56 = float(x_55); - *(tint_symbol_5) = float4(x_56, x_56, x_56, x_56); + *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56); while (true) { - int const x_62 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_62) + as_type(1))); + int const x_62 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_62) + as_type(1))); if (false) { return; } @@ -52,7 +52,7 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* return; } { - int const x_68 = *(tint_symbol_4); + int const x_68 = *(tint_symbol_3); if ((x_68 < 100)) { } else { break; @@ -70,12 +70,18 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_6, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.hlsl index d153ad0e7d..3455e1c877 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.hlsl @@ -98,9 +98,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.msl index 87ab4e75ed..210ab9744e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.msl @@ -18,15 +18,15 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { - *(tint_symbol_4) = 0; +void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { + *(tint_symbol_3) = 0; int const x_27 = x_6.x_GLF_uniform_int_values.arr[0].el; switch(x_27) { case 0: { if (true) { int const x_34 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_35 = float(x_34); - *(tint_symbol_5) = float4(x_35, x_35, x_35, x_35); + *(tint_symbol_4) = float4(x_35, x_35, x_35, x_35); return; } /* fallthrough */ @@ -37,14 +37,14 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* int const x_43 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_49 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_40), float(x_43), float(x_46), float(x_49)); + *(tint_symbol_4) = float4(float(x_40), float(x_43), float(x_46), float(x_49)); if (false) { int const x_55 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_56 = float(x_55); - *(tint_symbol_5) = float4(x_56, x_56, x_56, x_56); + *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56); while (true) { - int const x_62 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_62) + as_type(1))); + int const x_62 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_62) + as_type(1))); if (false) { return; } @@ -52,7 +52,7 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* return; } { - int const x_68 = *(tint_symbol_4); + int const x_68 = *(tint_symbol_3); if ((x_68 < 100)) { } else { break; @@ -70,12 +70,18 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_6, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.hlsl index 073d5f23b4..3188e956d8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.hlsl @@ -20,8 +20,8 @@ void main_1() { const float x_44 = asfloat(x_6[scalar_offset_3 / 4][scalar_offset_3 % 4]); const uint scalar_offset_4 = ((16u * uint(0))) / 4; const float x_46 = asfloat(x_6[scalar_offset_4 / 4][scalar_offset_4 % 4]); - const float tint_symbol_4[5] = {x_38, x_40, x_42, x_44, x_46}; - arr = tint_symbol_4; + const float tint_symbol_3[5] = {x_38, x_40, x_42, x_44, x_46}; + arr = tint_symbol_3; const int x_49 = asint(x_9[1].x); i = x_49; j = 0; @@ -80,9 +80,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.msl index a8ea0d5542..cd368d944e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { tint_array_wrapper_2 arr = {}; int i = 0; int j = 0; @@ -40,8 +40,8 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy float const x_42 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_46 = x_6.x_GLF_uniform_float_values.arr[0].el; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_38, x_40, x_42, x_44, x_46}}; - arr = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_38, x_40, x_42, x_44, x_46}}; + arr = tint_symbol_2; int const x_49 = x_9.x_GLF_uniform_int_values.arr[1].el; i = x_49; j = 0; @@ -70,7 +70,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy float const x_75 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_77 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_79 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_5) = float4(x_73, x_75, x_77, x_79); + *(tint_symbol_4) = float4(x_73, x_75, x_77, x_79); int const x_82 = x_9.x_GLF_uniform_int_values.arr[1].el; i = x_82; while (true) { @@ -84,7 +84,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy float const x_94 = arr.arr[x_92]; if (!((x_94 == 2.0f))) { float const x_99 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_5) = float4(x_99, x_99, x_99, x_99); + *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99); } { int const x_101 = i; @@ -94,11 +94,17 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { + main_1(x_6, x_9, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.hlsl index 073d5f23b4..3188e956d8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.hlsl @@ -20,8 +20,8 @@ void main_1() { const float x_44 = asfloat(x_6[scalar_offset_3 / 4][scalar_offset_3 % 4]); const uint scalar_offset_4 = ((16u * uint(0))) / 4; const float x_46 = asfloat(x_6[scalar_offset_4 / 4][scalar_offset_4 % 4]); - const float tint_symbol_4[5] = {x_38, x_40, x_42, x_44, x_46}; - arr = tint_symbol_4; + const float tint_symbol_3[5] = {x_38, x_40, x_42, x_44, x_46}; + arr = tint_symbol_3; const int x_49 = asint(x_9[1].x); i = x_49; j = 0; @@ -80,9 +80,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.msl index a8ea0d5542..cd368d944e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { tint_array_wrapper_2 arr = {}; int i = 0; int j = 0; @@ -40,8 +40,8 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy float const x_42 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_46 = x_6.x_GLF_uniform_float_values.arr[0].el; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_38, x_40, x_42, x_44, x_46}}; - arr = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_38, x_40, x_42, x_44, x_46}}; + arr = tint_symbol_2; int const x_49 = x_9.x_GLF_uniform_int_values.arr[1].el; i = x_49; j = 0; @@ -70,7 +70,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy float const x_75 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_77 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_79 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_5) = float4(x_73, x_75, x_77, x_79); + *(tint_symbol_4) = float4(x_73, x_75, x_77, x_79); int const x_82 = x_9.x_GLF_uniform_int_values.arr[1].el; i = x_82; while (true) { @@ -84,7 +84,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy float const x_94 = arr.arr[x_92]; if (!((x_94 == 2.0f))) { float const x_99 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_5) = float4(x_99, x_99, x_99, x_99); + *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99); } { int const x_101 = i; @@ -94,11 +94,17 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { + main_1(x_6, x_9, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.hlsl index e91ca1c9c9..97bb65a143 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.hlsl @@ -26,8 +26,8 @@ void main_1() { const int x_64 = asint(x_6[4].x); const uint scalar_offset_2 = ((16u * uint(0))) / 4; const int x_66 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]); - const int tint_symbol_6[5] = {x_58, x_60, x_62, x_64, x_66}; - data = tint_symbol_6; + const int tint_symbol_5[5] = {x_58, x_60, x_62, x_64, x_66}; + data = tint_symbol_5; const int x_69 = asint(x_6[5].x); a = x_69; while (true) { @@ -113,11 +113,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl index cd059fcf07..1246289752 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl @@ -27,11 +27,11 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper_2 data = {}; int a = 0; int i = 0; @@ -41,14 +41,14 @@ void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_s int const x_48 = x_6.x_GLF_uniform_int_values.arr[5].el; int const x_51 = x_6.x_GLF_uniform_int_values.arr[5].el; int const x_54 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); + *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_60 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_62 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_64 = x_6.x_GLF_uniform_int_values.arr[4].el; int const x_66 = x_6.x_GLF_uniform_int_values.arr[0].el; - tint_array_wrapper_2 const tint_symbol_4 = {.arr={x_58, x_60, x_62, x_64, x_66}}; - data = tint_symbol_4; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_58, x_60, x_62, x_64, x_66}}; + data = tint_symbol_2; int const x_69 = x_6.x_GLF_uniform_int_values.arr[5].el; a = x_69; while (true) { @@ -83,7 +83,7 @@ void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_s if ((x_102 < x_105)) { int const x_110 = x_6.x_GLF_uniform_int_values.arr[5].el; float const x_111 = float(x_110); - *(tint_symbol_6) = float4(x_111, x_111, x_111, x_111); + *(tint_symbol_4) = float4(x_111, x_111, x_111, x_111); } { int const x_113 = j; @@ -101,7 +101,7 @@ void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_s } } while (true) { - float const x_124 = (*(tint_symbol_7)).x; + float const x_124 = (*(tint_symbol_5)).x; float const x_126 = x_12.x_GLF_uniform_float_values.arr[0].el; if ((x_124 < x_126)) { } else { @@ -118,7 +118,7 @@ void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_s } int const x_141 = x_6.x_GLF_uniform_int_values.arr[5].el; float const x_142 = float(x_141); - *(tint_symbol_6) = float4(x_142, x_142, x_142, x_142); + *(tint_symbol_4) = float4(x_142, x_142, x_142, x_142); { int const x_144 = i_1; i_1 = as_type((as_type(x_144) + as_type(1))); @@ -128,13 +128,19 @@ void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_s return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, x_12, &(tint_symbol_9), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, x_12, tint_symbol_7, tint_symbol_6); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_12, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.hlsl index e91ca1c9c9..97bb65a143 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.hlsl @@ -26,8 +26,8 @@ void main_1() { const int x_64 = asint(x_6[4].x); const uint scalar_offset_2 = ((16u * uint(0))) / 4; const int x_66 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]); - const int tint_symbol_6[5] = {x_58, x_60, x_62, x_64, x_66}; - data = tint_symbol_6; + const int tint_symbol_5[5] = {x_58, x_60, x_62, x_64, x_66}; + data = tint_symbol_5; const int x_69 = asint(x_6[5].x); a = x_69; while (true) { @@ -113,11 +113,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl index cd059fcf07..1246289752 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl @@ -27,11 +27,11 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper_2 data = {}; int a = 0; int i = 0; @@ -41,14 +41,14 @@ void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_s int const x_48 = x_6.x_GLF_uniform_int_values.arr[5].el; int const x_51 = x_6.x_GLF_uniform_int_values.arr[5].el; int const x_54 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); + *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54)); int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_60 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_62 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_64 = x_6.x_GLF_uniform_int_values.arr[4].el; int const x_66 = x_6.x_GLF_uniform_int_values.arr[0].el; - tint_array_wrapper_2 const tint_symbol_4 = {.arr={x_58, x_60, x_62, x_64, x_66}}; - data = tint_symbol_4; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_58, x_60, x_62, x_64, x_66}}; + data = tint_symbol_2; int const x_69 = x_6.x_GLF_uniform_int_values.arr[5].el; a = x_69; while (true) { @@ -83,7 +83,7 @@ void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_s if ((x_102 < x_105)) { int const x_110 = x_6.x_GLF_uniform_int_values.arr[5].el; float const x_111 = float(x_110); - *(tint_symbol_6) = float4(x_111, x_111, x_111, x_111); + *(tint_symbol_4) = float4(x_111, x_111, x_111, x_111); } { int const x_113 = j; @@ -101,7 +101,7 @@ void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_s } } while (true) { - float const x_124 = (*(tint_symbol_7)).x; + float const x_124 = (*(tint_symbol_5)).x; float const x_126 = x_12.x_GLF_uniform_float_values.arr[0].el; if ((x_124 < x_126)) { } else { @@ -118,7 +118,7 @@ void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_s } int const x_141 = x_6.x_GLF_uniform_int_values.arr[5].el; float const x_142 = float(x_141); - *(tint_symbol_6) = float4(x_142, x_142, x_142, x_142); + *(tint_symbol_4) = float4(x_142, x_142, x_142, x_142); { int const x_144 = i_1; i_1 = as_type((as_type(x_144) + as_type(1))); @@ -128,13 +128,19 @@ void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_s return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, x_12, &(tint_symbol_9), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, x_12, tint_symbol_7, tint_symbol_6); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_12, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.hlsl index 790ef732fd..1cc7fe8a85 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.hlsl @@ -82,11 +82,16 @@ struct tint_symbol_2 { float4 x_GLF_v1_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_v1}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_v1_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_v1}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl index 9ddedab51b..f4af9d19d7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl @@ -24,16 +24,16 @@ struct buf0 { struct main_out { float4 x_GLF_v1_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_v1_1 [[color(0)]]; }; -void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 uv = 0.0f; float4 v1 = 0.0f; float a = 0.0f; int i = 0; - float4 const x_49 = *(tint_symbol_5); + float4 const x_49 = *(tint_symbol_3); uv = float2(x_49.x, x_49.y); float const x_52 = x_8.x_GLF_uniform_float_values.arr[0].el; v1 = float4(x_52, x_52, x_52, x_52); @@ -80,22 +80,28 @@ void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_s float const x_106 = x_8.x_GLF_uniform_float_values.arr[1].el; if ((x_104 == x_106)) { float4 const x_111 = v1; - *(tint_symbol_6) = x_111; + *(tint_symbol_4) = x_111; } else { int const x_20 = x_12.x_GLF_uniform_int_values.arr[1].el; float const x_113 = float(x_20); - *(tint_symbol_6) = float4(x_113, x_113, x_113, x_113); + *(tint_symbol_4) = float4(x_113, x_113, x_113, x_113); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, x_12, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_v1_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_v1_1=tint_symbol_3.x_GLF_v1_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, x_12, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_v1_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_12, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.hlsl index 790ef732fd..1cc7fe8a85 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.hlsl @@ -82,11 +82,16 @@ struct tint_symbol_2 { float4 x_GLF_v1_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_v1}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_v1_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_v1}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl index 9ddedab51b..f4af9d19d7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl @@ -24,16 +24,16 @@ struct buf0 { struct main_out { float4 x_GLF_v1_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_v1_1 [[color(0)]]; }; -void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 uv = 0.0f; float4 v1 = 0.0f; float a = 0.0f; int i = 0; - float4 const x_49 = *(tint_symbol_5); + float4 const x_49 = *(tint_symbol_3); uv = float2(x_49.x, x_49.y); float const x_52 = x_8.x_GLF_uniform_float_values.arr[0].el; v1 = float4(x_52, x_52, x_52, x_52); @@ -80,22 +80,28 @@ void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_s float const x_106 = x_8.x_GLF_uniform_float_values.arr[1].el; if ((x_104 == x_106)) { float4 const x_111 = v1; - *(tint_symbol_6) = x_111; + *(tint_symbol_4) = x_111; } else { int const x_20 = x_12.x_GLF_uniform_int_values.arr[1].el; float const x_113 = float(x_20); - *(tint_symbol_6) = float4(x_113, x_113, x_113, x_113); + *(tint_symbol_4) = float4(x_113, x_113, x_113, x_113); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, x_12, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_v1_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_v1_1=tint_symbol_3.x_GLF_v1_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, x_12, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_v1_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_12, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.hlsl index 13e0966390..3a47377990 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.msl index 3afddf2f94..431dffd995 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int a = 0; int i = 0; a = 0; @@ -36,18 +36,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } int const x_50 = a; if ((x_50 == 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.hlsl index 13e0966390..3a47377990 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.msl index 3afddf2f94..431dffd995 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int a = 0; int i = 0; a = 0; @@ -36,18 +36,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } int const x_50 = a; if ((x_50 == 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.hlsl index f6e2d87667..e86627e767 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.hlsl @@ -64,11 +64,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.msl index 6c07995f4e..270bbcec7b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.msl @@ -14,22 +14,22 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; int const x_31 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_34 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_37 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_40 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_31), float(x_34), float(x_37), float(x_40)); - float const x_44 = (*(tint_symbol_6)).y; + *(tint_symbol_3) = float4(float(x_31), float(x_34), float(x_37), float(x_40)); + float const x_44 = (*(tint_symbol_4)).y; if ((x_44 < 0.0f)) { int const x_49 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_50 = float(x_49); - *(tint_symbol_5) = float4(x_50, x_50, x_50, x_50); + *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50); } int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el; i = x_53; @@ -40,23 +40,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } else { break; } - float const x_64 = (*(tint_symbol_6)).x; + float const x_64 = (*(tint_symbol_4)).x; if ((x_64 > 0.0f)) { - float const x_69 = (*(tint_symbol_6)).y; + float const x_69 = (*(tint_symbol_4)).y; if ((x_69 < 0.0f)) { int const x_74 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_75 = float(x_74); - *(tint_symbol_5) = float4(x_75, x_75, x_75, x_75); + *(tint_symbol_3) = float4(x_75, x_75, x_75, x_75); break; } } - float const x_78 = (*(tint_symbol_6)).x; + float const x_78 = (*(tint_symbol_4)).x; if ((x_78 > 0.0f)) { - float const x_83 = (*(tint_symbol_6)).y; + float const x_83 = (*(tint_symbol_4)).y; if ((x_83 < 0.0f)) { int const x_88 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_89 = float(x_88); - *(tint_symbol_5) = float4(x_89, x_89, x_89, x_89); + *(tint_symbol_3) = float4(x_89, x_89, x_89, x_89); } } { @@ -67,13 +67,19 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.hlsl index f6e2d87667..e86627e767 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.hlsl @@ -64,11 +64,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.msl index 6c07995f4e..270bbcec7b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.msl @@ -14,22 +14,22 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; int const x_31 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_34 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_37 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_40 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_31), float(x_34), float(x_37), float(x_40)); - float const x_44 = (*(tint_symbol_6)).y; + *(tint_symbol_3) = float4(float(x_31), float(x_34), float(x_37), float(x_40)); + float const x_44 = (*(tint_symbol_4)).y; if ((x_44 < 0.0f)) { int const x_49 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_50 = float(x_49); - *(tint_symbol_5) = float4(x_50, x_50, x_50, x_50); + *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50); } int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el; i = x_53; @@ -40,23 +40,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } else { break; } - float const x_64 = (*(tint_symbol_6)).x; + float const x_64 = (*(tint_symbol_4)).x; if ((x_64 > 0.0f)) { - float const x_69 = (*(tint_symbol_6)).y; + float const x_69 = (*(tint_symbol_4)).y; if ((x_69 < 0.0f)) { int const x_74 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_75 = float(x_74); - *(tint_symbol_5) = float4(x_75, x_75, x_75, x_75); + *(tint_symbol_3) = float4(x_75, x_75, x_75, x_75); break; } } - float const x_78 = (*(tint_symbol_6)).x; + float const x_78 = (*(tint_symbol_4)).x; if ((x_78 > 0.0f)) { - float const x_83 = (*(tint_symbol_6)).y; + float const x_83 = (*(tint_symbol_4)).y; if ((x_83 < 0.0f)) { int const x_88 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_89 = float(x_88); - *(tint_symbol_5) = float4(x_89, x_89, x_89, x_89); + *(tint_symbol_3) = float4(x_89, x_89, x_89, x_89); } } { @@ -67,13 +67,19 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.hlsl index cf463e7a64..7a53104826 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.hlsl @@ -25,8 +25,8 @@ int func_i1_(inout int x) { const int x_89 = asint(x_8[3].x); const int x_91 = asint(x_8[3].x); const int x_93 = a; - const int tint_symbol_3[4] = {x_85, x_87, x_89, x_91}; - indexable = tint_symbol_3; + const int tint_symbol_2[4] = {x_85, x_87, x_89, x_91}; + indexable = tint_symbol_2; const int x_95 = indexable[x_93]; const int x_96 = x; if ((x_95 > x_96)) { @@ -91,9 +91,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.msl index 19ebc96cec..9902d165e1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.msl @@ -41,8 +41,8 @@ int func_i1_(constant buf0& x_8, thread int* const x) { int const x_89 = x_8.x_GLF_uniform_int_values.arr[3].el; int const x_91 = x_8.x_GLF_uniform_int_values.arr[3].el; int const x_93 = a; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_85, x_87, x_89, x_91}}; - indexable = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_85, x_87, x_89, x_91}}; + indexable = tint_symbol_2; int const x_95 = indexable.arr[x_93]; int const x_96 = *(x); if ((x_95 > x_96)) { @@ -68,7 +68,7 @@ int func_i1_(constant buf0& x_8, thread int* const x) { return x_115; } -void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int a_1 = 0; int param = 0; int param_1 = 0; @@ -88,20 +88,26 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) { int const x_57 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_60 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_63 = x_8.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_5) = float4(float(x_54), float(x_57), float(x_60), float(x_63)); + *(tint_symbol_4) = float4(float(x_54), float(x_57), float(x_60), float(x_63)); } else { int const x_67 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_68 = float(x_67); - *(tint_symbol_5) = float4(x_68, x_68, x_68, x_68); + *(tint_symbol_4) = float4(x_68, x_68, x_68, x_68); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_8, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_5) { + main_1(x_8, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.hlsl index cf463e7a64..7a53104826 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.hlsl @@ -25,8 +25,8 @@ int func_i1_(inout int x) { const int x_89 = asint(x_8[3].x); const int x_91 = asint(x_8[3].x); const int x_93 = a; - const int tint_symbol_3[4] = {x_85, x_87, x_89, x_91}; - indexable = tint_symbol_3; + const int tint_symbol_2[4] = {x_85, x_87, x_89, x_91}; + indexable = tint_symbol_2; const int x_95 = indexable[x_93]; const int x_96 = x; if ((x_95 > x_96)) { @@ -91,9 +91,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.msl index 19ebc96cec..9902d165e1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.msl @@ -41,8 +41,8 @@ int func_i1_(constant buf0& x_8, thread int* const x) { int const x_89 = x_8.x_GLF_uniform_int_values.arr[3].el; int const x_91 = x_8.x_GLF_uniform_int_values.arr[3].el; int const x_93 = a; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_85, x_87, x_89, x_91}}; - indexable = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_85, x_87, x_89, x_91}}; + indexable = tint_symbol_2; int const x_95 = indexable.arr[x_93]; int const x_96 = *(x); if ((x_95 > x_96)) { @@ -68,7 +68,7 @@ int func_i1_(constant buf0& x_8, thread int* const x) { return x_115; } -void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int a_1 = 0; int param = 0; int param_1 = 0; @@ -88,20 +88,26 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) { int const x_57 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_60 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_63 = x_8.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_5) = float4(float(x_54), float(x_57), float(x_60), float(x_63)); + *(tint_symbol_4) = float4(float(x_54), float(x_57), float(x_60), float(x_63)); } else { int const x_67 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_68 = float(x_67); - *(tint_symbol_5) = float4(x_68, x_68, x_68, x_68); + *(tint_symbol_4) = float4(x_68, x_68, x_68, x_68); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_8, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_5) { + main_1(x_8, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.hlsl index 9d26f7bc6d..43e11b05f1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.hlsl @@ -37,9 +37,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.msl index 295a02486e..2b1c62ca32 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2x2 m = float2x2(0.0f); int const x_29 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_30 = float(x_29); @@ -32,20 +32,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_65 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_56), float(x_59), float(x_62), float(x_65)); + *(tint_symbol_3) = float4(float(x_56), float(x_59), float(x_62), float(x_65)); } else { int const x_69 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_70 = float(x_69); - *(tint_symbol_4) = float4(x_70, x_70, x_70, x_70); + *(tint_symbol_3) = float4(x_70, x_70, x_70, x_70); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.hlsl index 7362602477..ea6ee9a276 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.hlsl @@ -41,9 +41,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.msl index 4cfd1b7907..11f6276507 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2x2 m = float2x2(0.0f); int const x_29 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_30 = float(x_29); @@ -32,20 +32,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_65 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_56), float(x_59), float(x_62), float(x_65)); + *(tint_symbol_3) = float4(float(x_56), float(x_59), float(x_62), float(x_65)); } else { int const x_69 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_70 = float(x_69); - *(tint_symbol_4) = float4(x_70, x_70, x_70, x_70); + *(tint_symbol_3) = float4(x_70, x_70, x_70, x_70); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.hlsl index da225ef0df..3078d868d4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.hlsl @@ -41,9 +41,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.msl index ee86a7ce97..7c47c29fef 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2x2 m0 = float2x2(0.0f); float2x2 m1 = float2x2(0.0f); float2 v = 0.0f; @@ -38,19 +38,25 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_60 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_62 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_64 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_58, x_60, x_62, x_64); + *(tint_symbol_3) = float4(x_58, x_60, x_62, x_64); } else { float const x_67 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67); + *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.hlsl index da225ef0df..3078d868d4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.hlsl @@ -41,9 +41,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.msl index ee86a7ce97..7c47c29fef 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2x2 m0 = float2x2(0.0f); float2x2 m1 = float2x2(0.0f); float2 v = 0.0f; @@ -38,19 +38,25 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_60 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_62 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_64 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_58, x_60, x_62, x_64); + *(tint_symbol_3) = float4(x_58, x_60, x_62, x_64); } else { float const x_67 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67); + *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.hlsl index 60ded1e68d..3c120514a9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.msl index dba1366002..b0d9eb3f0c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.msl @@ -11,23 +11,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_23 = x_5.one; int const x_25 = x_5.one; int const x_27 = x_5.one; if ((max(x_23, clamp(x_25, x_27, 1)) == 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.hlsl index 60ded1e68d..3c120514a9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.msl index dba1366002..b0d9eb3f0c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.msl @@ -11,23 +11,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_23 = x_5.one; int const x_25 = x_5.one; int const x_27 = x_5.one; if ((max(x_23, clamp(x_25, x_27, 1)) == 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.hlsl index 3ad7117c5c..430302eeeb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.hlsl @@ -33,11 +33,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.msl index f106f7a5c0..9cfc85c350 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.msl @@ -14,35 +14,41 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int a = 0; - float const x_30 = (*(tint_symbol_5)).x; + float const x_30 = (*(tint_symbol_3)).x; a = max(1, min(1, int(x_30))); int const x_34 = a; if ((x_34 < 2)) { int const x_40 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_43 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_46 = x_7.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_6) = float4(1.0f, float(x_40), float(x_43), float(x_46)); + *(tint_symbol_4) = float4(1.0f, float(x_40), float(x_43), float(x_46)); } else { int const x_50 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_51 = float(x_50); - *(tint_symbol_6) = float4(x_51, x_51, x_51, x_51); + *(tint_symbol_4) = float4(x_51, x_51, x_51, x_51); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.hlsl index 3ad7117c5c..430302eeeb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.hlsl @@ -33,11 +33,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.msl index f106f7a5c0..9cfc85c350 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.msl @@ -14,35 +14,41 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int a = 0; - float const x_30 = (*(tint_symbol_5)).x; + float const x_30 = (*(tint_symbol_3)).x; a = max(1, min(1, int(x_30))); int const x_34 = a; if ((x_34 < 2)) { int const x_40 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_43 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_46 = x_7.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_6) = float4(1.0f, float(x_40), float(x_43), float(x_46)); + *(tint_symbol_4) = float4(1.0f, float(x_40), float(x_43), float(x_46)); } else { int const x_50 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_51 = float(x_50); - *(tint_symbol_6) = float4(x_51, x_51, x_51, x_51); + *(tint_symbol_4) = float4(x_51, x_51, x_51, x_51); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.hlsl index 9efb42d9f6..00146089fa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.hlsl @@ -70,11 +70,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int func_struct_S_i1_i1_i11_i1_(inout S s, inout int x) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.msl index b986b1eeb4..238c405ffc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.msl @@ -19,7 +19,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_10, thread float4* const tint_symbol_3) { int x_43 = 0; bool x_44 = false; tint_array_wrapper arr = {}; @@ -31,7 +31,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { arr.arr[x_50].a = 2; int const x_53 = arr.arr[1].a; if ((x_53 < 1)) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); x_44 = true; break; } else { @@ -78,9 +78,9 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { x_43 = as_type((as_type(as_type((as_type(x_89.a) + as_type(x_91.b)))) + as_type(x_94.c))); int const x_97 = x_43; if ((x_97 == 12)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } } x_44 = true; @@ -89,12 +89,18 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { return; } +main_out tint_symbol_inner(constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int func_struct_S_i1_i1_i11_i1_(thread S* const s, thread int* const x) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.hlsl index 9efb42d9f6..00146089fa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.hlsl @@ -70,11 +70,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int func_struct_S_i1_i1_i11_i1_(inout S s, inout int x) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.msl index b986b1eeb4..238c405ffc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.msl @@ -19,7 +19,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_10, thread float4* const tint_symbol_3) { int x_43 = 0; bool x_44 = false; tint_array_wrapper arr = {}; @@ -31,7 +31,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { arr.arr[x_50].a = 2; int const x_53 = arr.arr[1].a; if ((x_53 < 1)) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); x_44 = true; break; } else { @@ -78,9 +78,9 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { x_43 = as_type((as_type(as_type((as_type(x_89.a) + as_type(x_91.b)))) + as_type(x_94.c))); int const x_97 = x_43; if ((x_97 == 12)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } } x_44 = true; @@ -89,12 +89,18 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { return; } +main_out tint_symbol_inner(constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int func_struct_S_i1_i1_i11_i1_(thread S* const s, thread int* const x) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.hlsl index 52a5683629..109823c25e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.hlsl @@ -34,9 +34,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.msl index 84a3cf6f02..bdcbf97f17 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.msl @@ -21,7 +21,7 @@ float func_vf2_(constant buf0& x_7, thread float2* const v) { return 5.0f; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { float f = 0.0f; float2 param = 0.0f; param = float2(1.0f, 1.0f); @@ -29,18 +29,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { f = x_34; float const x_35 = f; if ((x_35 == 5.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.hlsl index 52a5683629..109823c25e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.hlsl @@ -34,9 +34,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.msl index 84a3cf6f02..bdcbf97f17 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.msl @@ -21,7 +21,7 @@ float func_vf2_(constant buf0& x_7, thread float2* const v) { return 5.0f; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { float f = 0.0f; float2 param = 0.0f; param = float2(1.0f, 1.0f); @@ -29,18 +29,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { f = x_34; float const x_35 = f; if ((x_35 == 5.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.hlsl index be4003a9e2..454f25d792 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.hlsl @@ -51,9 +51,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.msl index 8114c84f35..213388a146 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.msl @@ -43,21 +43,27 @@ float func_(constant buf0& x_7) { return x_48; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { float const x_27 = func_(x_7); if ((x_27 == 1.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.hlsl index be4003a9e2..454f25d792 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.hlsl @@ -51,9 +51,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.msl index 8114c84f35..213388a146 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.msl @@ -43,21 +43,27 @@ float func_(constant buf0& x_7) { return x_48; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { float const x_27 = func_(x_7); if ((x_27 == 1.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.hlsl index 3c49b30da1..07db7a7352 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.hlsl @@ -38,11 +38,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.msl index bae0285398..97da9e6269 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.msl @@ -24,35 +24,41 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float f = 0.0f; f = fmin(as_type(-1), 1.0f); - float const x_38 = (*(tint_symbol_5)).x; + float const x_38 = (*(tint_symbol_3)).x; float const x_40 = x_7.x_GLF_uniform_float_values.arr[0].el; if ((x_38 > x_40)) { int const x_46 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_49 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_52 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_55 = x_9.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_6) = float4(float(x_46), float(x_49), float(x_52), float(x_55)); + *(tint_symbol_4) = float4(float(x_46), float(x_49), float(x_52), float(x_55)); } else { float const x_58 = f; - *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_9, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_9, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.hlsl index 3c49b30da1..07db7a7352 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.hlsl @@ -38,11 +38,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.msl index bae0285398..97da9e6269 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.msl @@ -24,35 +24,41 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float f = 0.0f; f = fmin(as_type(-1), 1.0f); - float const x_38 = (*(tint_symbol_5)).x; + float const x_38 = (*(tint_symbol_3)).x; float const x_40 = x_7.x_GLF_uniform_float_values.arr[0].el; if ((x_38 > x_40)) { int const x_46 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_49 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_52 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_55 = x_9.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_6) = float4(float(x_46), float(x_49), float(x_52), float(x_55)); + *(tint_symbol_4) = float4(float(x_46), float(x_49), float(x_52), float(x_55)); } else { float const x_58 = f; - *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_9, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_9, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.hlsl index 5f95172bdf..fdf819fdb1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.hlsl @@ -20,11 +20,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.msl index 6aa5c6ad4b..da3439be16 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.msl @@ -4,26 +4,32 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - float const x_20 = (*(tint_symbol_5)).x; - float const x_23 = (*(tint_symbol_5)).x; - float const x_26 = (*(tint_symbol_5)).y; - float const x_32 = (*(tint_symbol_5)).y; - *(tint_symbol_6) = float4((x_20 * 0.00390625f), (float((int(x_23) ^ int(x_26))) * 0.00390625f), (x_32 * 0.00390625f), 1.0f); +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + float const x_20 = (*(tint_symbol_3)).x; + float const x_23 = (*(tint_symbol_3)).x; + float const x_26 = (*(tint_symbol_3)).y; + float const x_32 = (*(tint_symbol_3)).y; + *(tint_symbol_4) = float4((x_20 * 0.00390625f), (float((int(x_23) ^ int(x_26))) * 0.00390625f), (x_32 * 0.00390625f), 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.hlsl index 5f95172bdf..fdf819fdb1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.hlsl @@ -20,11 +20,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.msl index 6aa5c6ad4b..da3439be16 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.msl @@ -4,26 +4,32 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - float const x_20 = (*(tint_symbol_5)).x; - float const x_23 = (*(tint_symbol_5)).x; - float const x_26 = (*(tint_symbol_5)).y; - float const x_32 = (*(tint_symbol_5)).y; - *(tint_symbol_6) = float4((x_20 * 0.00390625f), (float((int(x_23) ^ int(x_26))) * 0.00390625f), (x_32 * 0.00390625f), 1.0f); +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + float const x_20 = (*(tint_symbol_3)).x; + float const x_23 = (*(tint_symbol_3)).x; + float const x_26 = (*(tint_symbol_3)).y; + float const x_32 = (*(tint_symbol_3)).y; + *(tint_symbol_4) = float4((x_20 * 0.00390625f), (float((int(x_23) ^ int(x_26))) * 0.00390625f), (x_32 * 0.00390625f), 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.hlsl index 94cc273cfe..371971be28 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.hlsl @@ -58,11 +58,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.msl index 421d745950..5709ee1342 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.msl @@ -17,7 +17,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -34,10 +34,10 @@ float func_() { return 0.0f; } -void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float4 v = 0.0f; v = float4(1.0f, 1.0f, 1.0f, 1.0f); - float const x_38 = (*(tint_symbol_5)).y; + float const x_38 = (*(tint_symbol_3)).y; if ((x_38 < 0.0f)) { float const x_42 = func_(); v = float4(x_42, x_42, x_42, x_42); @@ -48,22 +48,28 @@ void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_s } uint const x_50 = x_8.one; if (((1u << x_50) == 2u)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { int const x_57 = x_10.x_GLF_uniform_int_values.arr[0].el; float const x_58 = float(x_57); - *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, x_10, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, x_10, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.hlsl index 94cc273cfe..371971be28 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.hlsl @@ -58,11 +58,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.msl index 421d745950..5709ee1342 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.msl @@ -17,7 +17,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -34,10 +34,10 @@ float func_() { return 0.0f; } -void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float4 v = 0.0f; v = float4(1.0f, 1.0f, 1.0f, 1.0f); - float const x_38 = (*(tint_symbol_5)).y; + float const x_38 = (*(tint_symbol_3)).y; if ((x_38 < 0.0f)) { float const x_42 = func_(); v = float4(x_42, x_42, x_42, x_42); @@ -48,22 +48,28 @@ void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_s } uint const x_50 = x_8.one; if (((1u << x_50) == 2u)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { int const x_57 = x_10.x_GLF_uniform_int_values.arr[0].el; float const x_58 = float(x_57); - *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, x_10, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, x_10, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.hlsl index 0a42777a70..d11a25c236 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.hlsl @@ -29,9 +29,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.msl index a72ccb731a..dc64841955 100755 --- a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.msl @@ -18,11 +18,11 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float a = 0.0f; a = (as_type(1u) - (1.0f * floor((as_type(1u) / 1.0f)))); float const x_29 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_29, x_29, x_29, x_29); + *(tint_symbol_3) = float4(x_29, x_29, x_29, x_29); float const x_31 = a; float const x_33 = x_6.x_GLF_uniform_float_values.arr[2].el; if ((x_31 < x_33)) { @@ -30,16 +30,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_40 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_42 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_38, x_40, x_42, x_44); + *(tint_symbol_3) = float4(x_38, x_40, x_42, x_44); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.hlsl index 307332dcd0..6fea881487 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.hlsl @@ -29,9 +29,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.msl index d51d832175..c60e6c11a3 100755 --- a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.msl @@ -18,11 +18,11 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float a = 0.0f; a = fmod(as_type(1u), 1.0f); float const x_29 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_29, x_29, x_29, x_29); + *(tint_symbol_3) = float4(x_29, x_29, x_29, x_29); float const x_31 = a; float const x_33 = x_6.x_GLF_uniform_float_values.arr[2].el; if ((x_31 < x_33)) { @@ -30,16 +30,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_40 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_42 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_38, x_40, x_42, x_44); + *(tint_symbol_3) = float4(x_38, x_40, x_42, x_44); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.spvasm.expected.msl index 2639d33c31..4d230c59bb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.spvasm.expected.msl @@ -34,17 +34,17 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf2& x_8, constant buf0& x_10, constant buf1& x_12, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf2& x_8, constant buf0& x_10, constant buf1& x_12, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { uint a = 0u; int b = 0; a = 0u; int const x_41 = x_8.x_GLF_uniform_int_values.arr[1].el; b = x_41; - float const x_43 = (*(tint_symbol_5)).x; + float const x_43 = (*(tint_symbol_3)).x; float const x_45 = x_10.x_GLF_uniform_float_values.arr[0].el; if ((x_43 < x_45)) { uint const x_50 = x_12.x_GLF_uniform_uint_values.arr[0].el; @@ -58,22 +58,28 @@ void main_1(constant buf2& x_8, constant buf0& x_10, constant buf1& x_12, thread int const x_65 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_68 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_71 = x_8.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_6) = float4(float(x_62), float(x_65), float(x_68), float(x_71)); + *(tint_symbol_4) = float4(float(x_62), float(x_65), float(x_68), float(x_71)); } else { int const x_75 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_76 = float(x_75); - *(tint_symbol_6) = float4(x_76, x_76, x_76, x_76); + *(tint_symbol_4) = float4(x_76, x_76, x_76, x_76); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_12 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, x_10, x_12, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf2& x_8, constant buf0& x_10, constant buf1& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, x_10, x_12, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_12 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, x_12, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl.expected.msl index 2639d33c31..4d230c59bb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl.expected.msl @@ -34,17 +34,17 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf2& x_8, constant buf0& x_10, constant buf1& x_12, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf2& x_8, constant buf0& x_10, constant buf1& x_12, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { uint a = 0u; int b = 0; a = 0u; int const x_41 = x_8.x_GLF_uniform_int_values.arr[1].el; b = x_41; - float const x_43 = (*(tint_symbol_5)).x; + float const x_43 = (*(tint_symbol_3)).x; float const x_45 = x_10.x_GLF_uniform_float_values.arr[0].el; if ((x_43 < x_45)) { uint const x_50 = x_12.x_GLF_uniform_uint_values.arr[0].el; @@ -58,22 +58,28 @@ void main_1(constant buf2& x_8, constant buf0& x_10, constant buf1& x_12, thread int const x_65 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_68 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_71 = x_8.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_6) = float4(float(x_62), float(x_65), float(x_68), float(x_71)); + *(tint_symbol_4) = float4(float(x_62), float(x_65), float(x_68), float(x_71)); } else { int const x_75 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_76 = float(x_75); - *(tint_symbol_6) = float4(x_76, x_76, x_76, x_76); + *(tint_symbol_4) = float4(x_76, x_76, x_76, x_76); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_12 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, x_10, x_12, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf2& x_8, constant buf0& x_10, constant buf1& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, x_10, x_12, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_12 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, x_12, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.spvasm.expected.msl index 0b412c205c..93f927e5b7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { +void main_1(thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { float2x3 m23 = float2x3(0.0f); float2x4 m24 = float2x4(0.0f); float3x2 m32 = float3x2(0.0f); @@ -57,7 +57,7 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) int i_37 = 0; float sum = 0.0f; int r = 0; - *(tint_symbol_4) = 0; + *(tint_symbol_3) = 0; m23 = float2x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)); m24 = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)); m32 = float3x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f)); @@ -333,10 +333,10 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) break; } while (true) { - int const x_371 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_371) + as_type(1))); + int const x_371 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_371) + as_type(1))); { - int const x_373 = *(tint_symbol_4); + int const x_373 = *(tint_symbol_3); if ((x_373 < 98)) { } else { break; @@ -560,13 +560,13 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) sum = 0.0f; r = 0; while (true) { - int const x_479 = *(tint_symbol_4); + int const x_479 = *(tint_symbol_3); if ((x_479 < 100)) { } else { break; } - int const x_482 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_482) + as_type(1))); + int const x_482 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_482) + as_type(1))); int const x_484 = r; float const x_486 = m23[0][x_484]; float const x_487 = sum; @@ -606,19 +606,25 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) } float const x_526 = sum; if ((x_526 == 8.0f)) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl.expected.msl index 0b412c205c..93f927e5b7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { +void main_1(thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { float2x3 m23 = float2x3(0.0f); float2x4 m24 = float2x4(0.0f); float3x2 m32 = float3x2(0.0f); @@ -57,7 +57,7 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) int i_37 = 0; float sum = 0.0f; int r = 0; - *(tint_symbol_4) = 0; + *(tint_symbol_3) = 0; m23 = float2x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)); m24 = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)); m32 = float3x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f)); @@ -333,10 +333,10 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) break; } while (true) { - int const x_371 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_371) + as_type(1))); + int const x_371 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_371) + as_type(1))); { - int const x_373 = *(tint_symbol_4); + int const x_373 = *(tint_symbol_3); if ((x_373 < 98)) { } else { break; @@ -560,13 +560,13 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) sum = 0.0f; r = 0; while (true) { - int const x_479 = *(tint_symbol_4); + int const x_479 = *(tint_symbol_3); if ((x_479 < 100)) { } else { break; } - int const x_482 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_482) + as_type(1))); + int const x_482 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_482) + as_type(1))); int const x_484 = r; float const x_486 = m23[0][x_484]; float const x_487 = sum; @@ -606,19 +606,25 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) } float const x_526 = sum; if ((x_526 == 8.0f)) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.hlsl index 39c1dc1006..2f02d27579 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.hlsl @@ -124,11 +124,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl index 86c77f20db..996fea0393 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl @@ -27,11 +27,11 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, thread float4x2* const tint_symbol_5) { +void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, thread float4x2* const tint_symbol_3) { int i = 0; bool x_137 = false; bool x_138 = false; @@ -72,8 +72,8 @@ void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, th int const x_155 = clamp(x_154, 0, 3); int const x_156 = i; float const x_158 = x_12.x_GLF_uniform_float_values.arr[0].el; - float const x_160 = (*(tint_symbol_5))[x_155][x_156]; - (*(tint_symbol_5))[x_155][x_156] = (x_160 + x_158); + float const x_160 = (*(tint_symbol_3))[x_155][x_156]; + (*(tint_symbol_3))[x_155][x_156] = (x_160 + x_158); int const x_163 = i; i = as_type((as_type(x_163) + as_type(1))); } @@ -82,22 +82,22 @@ void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, th return; } -void func1_(constant buf2& x_10, constant buf0& x_12, thread float4* const tint_symbol_6, thread float4x2* const tint_symbol_7) { +void func1_(constant buf2& x_10, constant buf0& x_12, thread float4* const tint_symbol_4, thread float4x2* const tint_symbol_5) { int param = 0; - float const x_167 = (*(tint_symbol_6)).y; + float const x_167 = (*(tint_symbol_4)).y; if ((x_167 < 0.0f)) { return; } param = 1; - func0_i1_(x_10, x_12, &(param), tint_symbol_7); + func0_i1_(x_10, x_12, &(param), tint_symbol_5); return; } -void main_1(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, thread float4x2* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { - *(tint_symbol_8) = float4x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f)); - func1_(x_10, x_12, tint_symbol_9, tint_symbol_8); - func1_(x_10, x_12, tint_symbol_9, tint_symbol_8); - float4x2 const x_54 = *(tint_symbol_8); +void main_1(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, thread float4x2* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_6) = float4x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f)); + func1_(x_10, x_12, tint_symbol_7, tint_symbol_6); + func1_(x_10, x_12, tint_symbol_7, tint_symbol_6); + float4x2 const x_54 = *(tint_symbol_6); int const x_56 = x_16.x_GLF_uniform_int_values.arr[0].el; int const x_59 = x_16.x_GLF_uniform_int_values.arr[0].el; int const x_62 = x_16.x_GLF_uniform_int_values.arr[1].el; @@ -112,23 +112,29 @@ void main_1(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, threa int const x_110 = x_16.x_GLF_uniform_int_values.arr[0].el; int const x_113 = x_16.x_GLF_uniform_int_values.arr[0].el; int const x_116 = x_16.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_10) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); + *(tint_symbol_8) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); } else { int const x_120 = x_16.x_GLF_uniform_int_values.arr[0].el; float const x_121 = float(x_120); - *(tint_symbol_10) = float4(x_121, x_121, x_121, x_121); + *(tint_symbol_8) = float4(x_121, x_121, x_121, x_121); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4x2 tint_symbol_12 = float4x2(0.0f); - thread float4 tint_symbol_13 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_10, x_12, x_16, &(tint_symbol_12), &(tint_symbol_11), &(tint_symbol_13)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4x2* const tint_symbol_10, thread float4* const tint_symbol_11) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_10, x_12, x_16, tint_symbol_10, tint_symbol_9, tint_symbol_11); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) { + thread float4 tint_symbol_12 = 0.0f; + thread float4x2 tint_symbol_13 = float4x2(0.0f); + thread float4 tint_symbol_14 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, x_12, x_16, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.hlsl index 2327dda6de..381858444c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.hlsl @@ -136,11 +136,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl index cc84cc2d73..b0c0ae0d05 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl @@ -27,11 +27,11 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, thread float4x2* const tint_symbol_5) { +void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, thread float4x2* const tint_symbol_3) { int i = 0; bool x_137 = false; bool x_138 = false; @@ -72,8 +72,8 @@ void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, th int const x_155 = clamp(x_154, 0, 3); int const x_156 = i; float const x_158 = x_12.x_GLF_uniform_float_values.arr[0].el; - float const x_160 = (*(tint_symbol_5))[x_155][x_156]; - (*(tint_symbol_5))[x_155][x_156] = (x_160 + x_158); + float const x_160 = (*(tint_symbol_3))[x_155][x_156]; + (*(tint_symbol_3))[x_155][x_156] = (x_160 + x_158); int const x_163 = i; i = as_type((as_type(x_163) + as_type(1))); } @@ -82,22 +82,22 @@ void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, th return; } -void func1_(constant buf2& x_10, constant buf0& x_12, thread float4* const tint_symbol_6, thread float4x2* const tint_symbol_7) { +void func1_(constant buf2& x_10, constant buf0& x_12, thread float4* const tint_symbol_4, thread float4x2* const tint_symbol_5) { int param = 0; - float const x_167 = (*(tint_symbol_6)).y; + float const x_167 = (*(tint_symbol_4)).y; if ((x_167 < 0.0f)) { return; } param = 1; - func0_i1_(x_10, x_12, &(param), tint_symbol_7); + func0_i1_(x_10, x_12, &(param), tint_symbol_5); return; } -void main_1(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, thread float4x2* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { - *(tint_symbol_8) = float4x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f)); - func1_(x_10, x_12, tint_symbol_9, tint_symbol_8); - func1_(x_10, x_12, tint_symbol_9, tint_symbol_8); - float4x2 const x_54 = *(tint_symbol_8); +void main_1(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, thread float4x2* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_6) = float4x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f)); + func1_(x_10, x_12, tint_symbol_7, tint_symbol_6); + func1_(x_10, x_12, tint_symbol_7, tint_symbol_6); + float4x2 const x_54 = *(tint_symbol_6); int const x_56 = x_16.x_GLF_uniform_int_values.arr[0].el; int const x_59 = x_16.x_GLF_uniform_int_values.arr[0].el; int const x_62 = x_16.x_GLF_uniform_int_values.arr[1].el; @@ -112,23 +112,29 @@ void main_1(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, threa int const x_110 = x_16.x_GLF_uniform_int_values.arr[0].el; int const x_113 = x_16.x_GLF_uniform_int_values.arr[0].el; int const x_116 = x_16.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_10) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); + *(tint_symbol_8) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); } else { int const x_120 = x_16.x_GLF_uniform_int_values.arr[0].el; float const x_121 = float(x_120); - *(tint_symbol_10) = float4(x_121, x_121, x_121, x_121); + *(tint_symbol_8) = float4(x_121, x_121, x_121, x_121); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4x2 tint_symbol_12 = float4x2(0.0f); - thread float4 tint_symbol_13 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_10, x_12, x_16, &(tint_symbol_12), &(tint_symbol_11), &(tint_symbol_13)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4x2* const tint_symbol_10, thread float4* const tint_symbol_11) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_10, x_12, x_16, tint_symbol_10, tint_symbol_9, tint_symbol_11); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) { + thread float4 tint_symbol_12 = 0.0f; + thread float4x2 tint_symbol_13 = float4x2(0.0f); + thread float4 tint_symbol_14 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, x_12, x_16, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.hlsl index 5ae6c98063..8ab73a801d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.hlsl @@ -84,9 +84,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.msl index 70bd67b6f7..643912ad88 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) { float4 v0 = 0.0f; float4 v1 = 0.0f; int a = 0; @@ -88,20 +88,26 @@ void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_s int const x_112 = x_10.x_GLF_uniform_int_values.arr[3].el; int const x_115 = x_10.x_GLF_uniform_int_values.arr[3].el; int const x_118 = x_10.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_109), float(x_112), float(x_115), float(x_118)); + *(tint_symbol_3) = float4(float(x_109), float(x_112), float(x_115), float(x_118)); } else { int const x_122 = x_10.x_GLF_uniform_int_values.arr[3].el; float const x_123 = float(x_122); - *(tint_symbol_4) = float4(x_123, x_123, x_123, x_123); + *(tint_symbol_3) = float4(x_123, x_123, x_123, x_123); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.hlsl index 5ae6c98063..8ab73a801d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.hlsl @@ -84,9 +84,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.msl index 70bd67b6f7..643912ad88 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) { float4 v0 = 0.0f; float4 v1 = 0.0f; int a = 0; @@ -88,20 +88,26 @@ void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_s int const x_112 = x_10.x_GLF_uniform_int_values.arr[3].el; int const x_115 = x_10.x_GLF_uniform_int_values.arr[3].el; int const x_118 = x_10.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_109), float(x_112), float(x_115), float(x_118)); + *(tint_symbol_3) = float4(float(x_109), float(x_112), float(x_115), float(x_118)); } else { int const x_122 = x_10.x_GLF_uniform_int_values.arr[3].el; float const x_123 = float(x_122); - *(tint_symbol_4) = float4(x_123, x_123, x_123, x_123); + *(tint_symbol_3) = float4(x_123, x_123, x_123, x_123); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.spvasm.expected.msl index a1f4edb023..af64e5433b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { float f = 0.0f; int i = 0; int i_1 = 0; @@ -47,7 +47,7 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb int i_14 = 0; float sum = 0.0f; int r = 0; - *(tint_symbol_4) = 0; + *(tint_symbol_3) = 0; float const x_53 = x_7.x_GLF_uniform_float_values.arr[1].el; f = x_53; int const x_55 = x_10.x_GLF_uniform_int_values.arr[1].el; @@ -186,10 +186,10 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb break; } while (true) { - int const x_223 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_223) + as_type(1))); + int const x_223 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_223) + as_type(1))); { - int const x_225 = *(tint_symbol_4); + int const x_225 = *(tint_symbol_3); int const x_227 = x_10.x_GLF_uniform_int_values.arr[3].el; if ((x_225 < as_type((as_type(100) - as_type(x_227))))) { } else { @@ -280,13 +280,13 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb int const x_267 = x_10.x_GLF_uniform_int_values.arr[1].el; r = x_267; while (true) { - int const x_272 = *(tint_symbol_4); + int const x_272 = *(tint_symbol_3); if ((x_272 < 100)) { } else { break; } - int const x_275 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_275) + as_type(1))); + int const x_275 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_275) + as_type(1))); float const x_277 = f; float const x_278 = sum; sum = (x_278 + x_277); @@ -302,21 +302,27 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb int const x_293 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_296 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_299 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_290), float(x_293), float(x_296), float(x_299)); + *(tint_symbol_4) = float4(float(x_290), float(x_293), float(x_296), float(x_299)); } else { int const x_303 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_304 = float(x_303); - *(tint_symbol_5) = float4(x_304, x_304, x_304, x_304); + *(tint_symbol_4) = float4(x_304, x_304, x_304, x_304); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_7, x_10, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_7, x_10, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl.expected.msl index a1f4edb023..af64e5433b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { float f = 0.0f; int i = 0; int i_1 = 0; @@ -47,7 +47,7 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb int i_14 = 0; float sum = 0.0f; int r = 0; - *(tint_symbol_4) = 0; + *(tint_symbol_3) = 0; float const x_53 = x_7.x_GLF_uniform_float_values.arr[1].el; f = x_53; int const x_55 = x_10.x_GLF_uniform_int_values.arr[1].el; @@ -186,10 +186,10 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb break; } while (true) { - int const x_223 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_223) + as_type(1))); + int const x_223 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_223) + as_type(1))); { - int const x_225 = *(tint_symbol_4); + int const x_225 = *(tint_symbol_3); int const x_227 = x_10.x_GLF_uniform_int_values.arr[3].el; if ((x_225 < as_type((as_type(100) - as_type(x_227))))) { } else { @@ -280,13 +280,13 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb int const x_267 = x_10.x_GLF_uniform_int_values.arr[1].el; r = x_267; while (true) { - int const x_272 = *(tint_symbol_4); + int const x_272 = *(tint_symbol_3); if ((x_272 < 100)) { } else { break; } - int const x_275 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_275) + as_type(1))); + int const x_275 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_275) + as_type(1))); float const x_277 = f; float const x_278 = sum; sum = (x_278 + x_277); @@ -302,21 +302,27 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb int const x_293 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_296 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_299 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_290), float(x_293), float(x_296), float(x_299)); + *(tint_symbol_4) = float4(float(x_290), float(x_293), float(x_296), float(x_299)); } else { int const x_303 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_304 = float(x_303); - *(tint_symbol_5) = float4(x_304, x_304, x_304, x_304); + *(tint_symbol_4) = float4(x_304, x_304, x_304, x_304); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_7, x_10, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_7, x_10, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.hlsl index 9e560db651..59ce8f1b53 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.hlsl @@ -27,8 +27,8 @@ void main_1() { const int x_80 = asint(x_6[2].x); const int x_82 = asint(x_6[2].x); const int x_84 = asint(x_6[2].x); - const int tint_symbol_3[17] = {x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84}; - A = tint_symbol_3; + const int tint_symbol_2[17] = {x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84}; + A = tint_symbol_2; const int x_87 = asint(x_6[3].x); const int x_89 = asint(x_6[4].x); const int x_91 = asint(x_6[5].x); @@ -46,8 +46,8 @@ void main_1() { const int x_115 = asint(x_6[17].x); const int x_117 = asint(x_6[18].x); const int x_119 = asint(x_6[1].x); - const int tint_symbol_4[17] = {x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119}; - ref = tint_symbol_4; + const int tint_symbol_3[17] = {x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119}; + ref = tint_symbol_3; const int x_122 = asint(x_6[2].x); a = x_122; const int x_124 = asint(x_6[2].x); @@ -112,9 +112,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.msl index f1c678f068..7449600454 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { tint_array_wrapper_1 A = {}; tint_array_wrapper_1 ref = {}; int a = 0; @@ -45,8 +45,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) { int const x_80 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_82 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_84 = x_6.x_GLF_uniform_int_values.arr[2].el; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84}}; - A = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84}}; + A = tint_symbol_2; int const x_87 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_89 = x_6.x_GLF_uniform_int_values.arr[4].el; int const x_91 = x_6.x_GLF_uniform_int_values.arr[5].el; @@ -64,8 +64,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) { int const x_115 = x_6.x_GLF_uniform_int_values.arr[17].el; int const x_117 = x_6.x_GLF_uniform_int_values.arr[18].el; int const x_119 = x_6.x_GLF_uniform_int_values.arr[1].el; - tint_array_wrapper_1 const tint_symbol_4 = {.arr={x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119}}; - ref = tint_symbol_4; + tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119}}; + ref = tint_symbol_3; int const x_122 = x_6.x_GLF_uniform_int_values.arr[2].el; a = x_122; int const x_124 = x_6.x_GLF_uniform_int_values.arr[2].el; @@ -116,23 +116,29 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) { } int const x_174 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_175 = float(x_174); - *(tint_symbol_6) = float4(x_175, x_175, x_175, x_175); + *(tint_symbol_5) = float4(x_175, x_175, x_175, x_175); bool const x_177 = ok; if (x_177) { int const x_181 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_184 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_187 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_190 = x_6.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_6) = float4(float(x_181), float(x_184), float(x_187), float(x_190)); + *(tint_symbol_5) = float4(float(x_181), float(x_184), float(x_187), float(x_190)); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - main_1(x_6, &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_6) { + main_1(x_6, tint_symbol_6); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.hlsl index 9e560db651..59ce8f1b53 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.hlsl @@ -27,8 +27,8 @@ void main_1() { const int x_80 = asint(x_6[2].x); const int x_82 = asint(x_6[2].x); const int x_84 = asint(x_6[2].x); - const int tint_symbol_3[17] = {x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84}; - A = tint_symbol_3; + const int tint_symbol_2[17] = {x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84}; + A = tint_symbol_2; const int x_87 = asint(x_6[3].x); const int x_89 = asint(x_6[4].x); const int x_91 = asint(x_6[5].x); @@ -46,8 +46,8 @@ void main_1() { const int x_115 = asint(x_6[17].x); const int x_117 = asint(x_6[18].x); const int x_119 = asint(x_6[1].x); - const int tint_symbol_4[17] = {x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119}; - ref = tint_symbol_4; + const int tint_symbol_3[17] = {x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119}; + ref = tint_symbol_3; const int x_122 = asint(x_6[2].x); a = x_122; const int x_124 = asint(x_6[2].x); @@ -112,9 +112,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.msl index f1c678f068..7449600454 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { tint_array_wrapper_1 A = {}; tint_array_wrapper_1 ref = {}; int a = 0; @@ -45,8 +45,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) { int const x_80 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_82 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_84 = x_6.x_GLF_uniform_int_values.arr[2].el; - tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84}}; - A = tint_symbol_3; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84}}; + A = tint_symbol_2; int const x_87 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_89 = x_6.x_GLF_uniform_int_values.arr[4].el; int const x_91 = x_6.x_GLF_uniform_int_values.arr[5].el; @@ -64,8 +64,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) { int const x_115 = x_6.x_GLF_uniform_int_values.arr[17].el; int const x_117 = x_6.x_GLF_uniform_int_values.arr[18].el; int const x_119 = x_6.x_GLF_uniform_int_values.arr[1].el; - tint_array_wrapper_1 const tint_symbol_4 = {.arr={x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119}}; - ref = tint_symbol_4; + tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119}}; + ref = tint_symbol_3; int const x_122 = x_6.x_GLF_uniform_int_values.arr[2].el; a = x_122; int const x_124 = x_6.x_GLF_uniform_int_values.arr[2].el; @@ -116,23 +116,29 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) { } int const x_174 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_175 = float(x_174); - *(tint_symbol_6) = float4(x_175, x_175, x_175, x_175); + *(tint_symbol_5) = float4(x_175, x_175, x_175, x_175); bool const x_177 = ok; if (x_177) { int const x_181 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_184 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_187 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_190 = x_6.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_6) = float4(float(x_181), float(x_184), float(x_187), float(x_190)); + *(tint_symbol_5) = float4(float(x_181), float(x_184), float(x_187), float(x_190)); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - main_1(x_6, &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_6) { + main_1(x_6, tint_symbol_6); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.hlsl index d7b62c4b86..8b616d2921 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.hlsl @@ -28,8 +28,8 @@ void main_1() { const int x_58 = i; const int x_60 = asint(x_9[1].x); const int x_62 = asint(x_9[2].x); - const float4 tint_symbol_4[2] = {float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; - indexable = tint_symbol_4; + const float4 tint_symbol_3[2] = {float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; + indexable = tint_symbol_3; const float x_65 = indexable[clamp(x_58, x_60, x_62)].x; a = int(x_65); const uint scalar_offset_2 = ((16u * uint(0))) / 4; @@ -45,8 +45,8 @@ void main_1() { const float x_81 = asfloat(x_6[scalar_offset_5 / 4][scalar_offset_5 % 4]); const float x_83 = asfloat(x_6[1].x); const int x_86 = a; - const float4 tint_symbol_5[2] = {float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)}; - indexable_1 = tint_symbol_5; + const float4 tint_symbol_4[2] = {float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)}; + indexable_1 = tint_symbol_4; const float4 x_88 = indexable_1[x_86]; v1 = x_88; { @@ -64,9 +64,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_6 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.msl index 7cdef232fa..77ab09b1e8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { float4 v1 = 0.0f; int i = 0; int a = 0; @@ -51,8 +51,8 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_58 = i; int const x_60 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_62 = x_9.x_GLF_uniform_int_values.arr[2].el; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; - indexable = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; + indexable = tint_symbol_2; float const x_65 = indexable.arr[clamp(x_58, x_60, x_62)].x; a = int(x_65); float const x_68 = x_6.x_GLF_uniform_float_values.arr[0].el; @@ -64,8 +64,8 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy float const x_81 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_83 = x_6.x_GLF_uniform_float_values.arr[1].el; int const x_86 = a; - tint_array_wrapper_2 const tint_symbol_4 = {.arr={float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)}}; - indexable_1 = tint_symbol_4; + tint_array_wrapper_2 const tint_symbol_3 = {.arr={float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)}}; + indexable_1 = tint_symbol_3; float4 const x_88 = indexable_1.arr[x_86]; v1 = x_88; { @@ -74,15 +74,21 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy } } float4 const x_91 = v1; - *(tint_symbol_6) = x_91; + *(tint_symbol_5) = x_91; return; } +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_6) { + main_1(x_6, x_9, tint_symbol_6); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { thread float4 tint_symbol_7 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_5; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.hlsl index d7b62c4b86..8b616d2921 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.hlsl @@ -28,8 +28,8 @@ void main_1() { const int x_58 = i; const int x_60 = asint(x_9[1].x); const int x_62 = asint(x_9[2].x); - const float4 tint_symbol_4[2] = {float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; - indexable = tint_symbol_4; + const float4 tint_symbol_3[2] = {float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; + indexable = tint_symbol_3; const float x_65 = indexable[clamp(x_58, x_60, x_62)].x; a = int(x_65); const uint scalar_offset_2 = ((16u * uint(0))) / 4; @@ -45,8 +45,8 @@ void main_1() { const float x_81 = asfloat(x_6[scalar_offset_5 / 4][scalar_offset_5 % 4]); const float x_83 = asfloat(x_6[1].x); const int x_86 = a; - const float4 tint_symbol_5[2] = {float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)}; - indexable_1 = tint_symbol_5; + const float4 tint_symbol_4[2] = {float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)}; + indexable_1 = tint_symbol_4; const float4 x_88 = indexable_1[x_86]; v1 = x_88; { @@ -64,9 +64,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_6 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.msl index 7cdef232fa..77ab09b1e8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { float4 v1 = 0.0f; int i = 0; int a = 0; @@ -51,8 +51,8 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_58 = i; int const x_60 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_62 = x_9.x_GLF_uniform_int_values.arr[2].el; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; - indexable = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; + indexable = tint_symbol_2; float const x_65 = indexable.arr[clamp(x_58, x_60, x_62)].x; a = int(x_65); float const x_68 = x_6.x_GLF_uniform_float_values.arr[0].el; @@ -64,8 +64,8 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy float const x_81 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_83 = x_6.x_GLF_uniform_float_values.arr[1].el; int const x_86 = a; - tint_array_wrapper_2 const tint_symbol_4 = {.arr={float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)}}; - indexable_1 = tint_symbol_4; + tint_array_wrapper_2 const tint_symbol_3 = {.arr={float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)}}; + indexable_1 = tint_symbol_3; float4 const x_88 = indexable_1.arr[x_86]; v1 = x_88; { @@ -74,15 +74,21 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy } } float4 const x_91 = v1; - *(tint_symbol_6) = x_91; + *(tint_symbol_5) = x_91; return; } +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_6) { + main_1(x_6, x_9, tint_symbol_6); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { thread float4 tint_symbol_7 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_5; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.hlsl index ecfd0d5442..d21a8d607f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.hlsl @@ -68,9 +68,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.msl index e8baf09008..d8d68279b3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.msl @@ -28,10 +28,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_3) { float a = 0.0f; float const x_31 = x_5.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_31, x_31, x_31, x_31); + *(tint_symbol_3) = float4(x_31, x_31, x_31, x_31); float const x_34 = x_5.x_GLF_uniform_float_values.arr[0].el; a = x_34; while (true) { @@ -69,15 +69,21 @@ void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_sy int const x_78 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_81 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_84 = x_8.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_75), float(x_78), float(x_81), float(x_84)); + *(tint_symbol_3) = float4(float(x_75), float(x_78), float(x_81), float(x_84)); return; } +main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_5, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.hlsl index ecfd0d5442..d21a8d607f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.hlsl @@ -68,9 +68,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.msl index e8baf09008..d8d68279b3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.msl @@ -28,10 +28,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_3) { float a = 0.0f; float const x_31 = x_5.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_31, x_31, x_31, x_31); + *(tint_symbol_3) = float4(x_31, x_31, x_31, x_31); float const x_34 = x_5.x_GLF_uniform_float_values.arr[0].el; a = x_34; while (true) { @@ -69,15 +69,21 @@ void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_sy int const x_78 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_81 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_84 = x_8.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_75), float(x_78), float(x_81), float(x_84)); + *(tint_symbol_3) = float4(float(x_75), float(x_78), float(x_81), float(x_84)); return; } +main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_5, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.hlsl index e028935f35..8737c6c32d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.hlsl @@ -58,9 +58,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.msl index 856f1d979a..f0c07b4999 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) { float2x2 M1 = float2x2(0.0f); float a = 0.0f; int c = 0; @@ -65,20 +65,26 @@ void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_s int const x_86 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_89 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_92 = x_10.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_83), float(x_86), float(x_89), float(x_92)); + *(tint_symbol_3) = float4(float(x_83), float(x_86), float(x_89), float(x_92)); } else { int const x_96 = x_10.x_GLF_uniform_int_values.arr[2].el; float const x_97 = float(x_96); - *(tint_symbol_4) = float4(x_97, x_97, x_97, x_97); + *(tint_symbol_3) = float4(x_97, x_97, x_97, x_97); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.hlsl index e028935f35..8737c6c32d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.hlsl @@ -58,9 +58,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.msl index 856f1d979a..f0c07b4999 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) { float2x2 M1 = float2x2(0.0f); float a = 0.0f; int c = 0; @@ -65,20 +65,26 @@ void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_s int const x_86 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_89 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_92 = x_10.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_83), float(x_86), float(x_89), float(x_92)); + *(tint_symbol_3) = float4(float(x_83), float(x_86), float(x_89), float(x_92)); } else { int const x_96 = x_10.x_GLF_uniform_int_values.arr[2].el; float const x_97 = float(x_96); - *(tint_symbol_4) = float4(x_97, x_97, x_97, x_97); + *(tint_symbol_3) = float4(x_97, x_97, x_97, x_97); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.hlsl index 6710a76bd7..4815ef5117 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.hlsl @@ -33,9 +33,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.msl index 824e6dca64..f54d84e7f8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { float f = 0.0f; int a = 0; f = 2.0f; @@ -31,20 +31,26 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_45 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_48 = x_7.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_39), float(x_42), float(x_45), float(x_48)); + *(tint_symbol_3) = float4(float(x_39), float(x_42), float(x_45), float(x_48)); } else { int const x_52 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_53 = float(x_52); - *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53); + *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.hlsl index 6710a76bd7..4815ef5117 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.hlsl @@ -33,9 +33,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.msl index 824e6dca64..f54d84e7f8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { float f = 0.0f; int a = 0; f = 2.0f; @@ -31,20 +31,26 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_45 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_48 = x_7.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_39), float(x_42), float(x_45), float(x_48)); + *(tint_symbol_3) = float4(float(x_39), float(x_42), float(x_45), float(x_48)); } else { int const x_52 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_53 = float(x_52); - *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53); + *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.hlsl index 400789ea8a..8062a6b894 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.hlsl @@ -90,11 +90,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl index 589b4c6f87..69d8106274 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl @@ -24,11 +24,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int a = 0; int i = 0; int j = 0; @@ -55,7 +55,7 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s while (true) { int const x_64 = x_7.x_GLF_uniform_int_values.arr[1].el; a = x_64; - float const x_66 = (*(tint_symbol_5)).y; + float const x_66 = (*(tint_symbol_3)).y; float const x_68 = x_11.x_GLF_uniform_float_values.arr[0].el; if ((x_66 < x_68)) { discard_fragment(); @@ -69,7 +69,7 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s } } } - float const x_77 = (*(tint_symbol_5)).y; + float const x_77 = (*(tint_symbol_3)).y; float const x_79 = x_11.x_GLF_uniform_float_values.arr[0].el; if ((x_77 < x_79)) { break; @@ -91,22 +91,28 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s int const x_97 = x_7.x_GLF_uniform_int_values.arr[2].el; int const x_100 = x_7.x_GLF_uniform_int_values.arr[2].el; int const x_102 = a; - *(tint_symbol_6) = float4(float(x_94), float(x_97), float(x_100), float(x_102)); + *(tint_symbol_4) = float4(float(x_94), float(x_97), float(x_100), float(x_102)); } else { int const x_106 = x_7.x_GLF_uniform_int_values.arr[2].el; float const x_107 = float(x_106); - *(tint_symbol_6) = float4(x_107, x_107, x_107, x_107); + *(tint_symbol_4) = float4(x_107, x_107, x_107, x_107); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_11, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_11, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.hlsl index 400789ea8a..8062a6b894 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.hlsl @@ -90,11 +90,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl index 589b4c6f87..69d8106274 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl @@ -24,11 +24,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int a = 0; int i = 0; int j = 0; @@ -55,7 +55,7 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s while (true) { int const x_64 = x_7.x_GLF_uniform_int_values.arr[1].el; a = x_64; - float const x_66 = (*(tint_symbol_5)).y; + float const x_66 = (*(tint_symbol_3)).y; float const x_68 = x_11.x_GLF_uniform_float_values.arr[0].el; if ((x_66 < x_68)) { discard_fragment(); @@ -69,7 +69,7 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s } } } - float const x_77 = (*(tint_symbol_5)).y; + float const x_77 = (*(tint_symbol_3)).y; float const x_79 = x_11.x_GLF_uniform_float_values.arr[0].el; if ((x_77 < x_79)) { break; @@ -91,22 +91,28 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s int const x_97 = x_7.x_GLF_uniform_int_values.arr[2].el; int const x_100 = x_7.x_GLF_uniform_int_values.arr[2].el; int const x_102 = a; - *(tint_symbol_6) = float4(float(x_94), float(x_97), float(x_100), float(x_102)); + *(tint_symbol_4) = float4(float(x_94), float(x_97), float(x_100), float(x_102)); } else { int const x_106 = x_7.x_GLF_uniform_int_values.arr[2].el; float const x_107 = float(x_106); - *(tint_symbol_6) = float4(x_107, x_107, x_107, x_107); + *(tint_symbol_4) = float4(x_107, x_107, x_107, x_107); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_11, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_11, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.hlsl index 3345993992..e04095d8e1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.hlsl @@ -202,11 +202,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.msl index 15bee7e923..669df378b0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.msl @@ -24,11 +24,11 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float a = 0.0f; float b = 0.0f; int i = 0; @@ -147,7 +147,7 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s } float const x_196 = x_7.x_GLF_uniform_float_values.arr[1].el; a = x_196; - float const x_198 = (*(tint_symbol_5)).y; + float const x_198 = (*(tint_symbol_3)).y; float const x_200 = x_7.x_GLF_uniform_float_values.arr[1].el; if ((x_198 > x_200)) { break; @@ -213,17 +213,23 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s float const x_207 = a; float const x_208 = a; float const x_209 = b; - *(tint_symbol_6) = float4(x_206, x_207, x_208, x_209); + *(tint_symbol_4) = float4(x_206, x_207, x_208, x_209); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_11, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_11, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.hlsl index 3345993992..e04095d8e1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.hlsl @@ -202,11 +202,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.msl index 15bee7e923..669df378b0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.msl @@ -24,11 +24,11 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float a = 0.0f; float b = 0.0f; int i = 0; @@ -147,7 +147,7 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s } float const x_196 = x_7.x_GLF_uniform_float_values.arr[1].el; a = x_196; - float const x_198 = (*(tint_symbol_5)).y; + float const x_198 = (*(tint_symbol_3)).y; float const x_200 = x_7.x_GLF_uniform_float_values.arr[1].el; if ((x_198 > x_200)) { break; @@ -213,17 +213,23 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s float const x_207 = a; float const x_208 = a; float const x_209 = b; - *(tint_symbol_6) = float4(x_206, x_207, x_208, x_209); + *(tint_symbol_4) = float4(x_206, x_207, x_208, x_209); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_11, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_11, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.hlsl index f87712b04c..7b19951862 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.hlsl @@ -104,9 +104,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.msl index 8e6d935995..5e039e1687 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3) { uint a = 0u; float4 values = 0.0f; float4 ref = 0.0f; @@ -93,20 +93,26 @@ void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_s int const x_126 = x_10.x_GLF_uniform_int_values.arr[0].el; int const x_129 = x_10.x_GLF_uniform_int_values.arr[0].el; int const x_132 = x_10.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_123), float(x_126), float(x_129), float(x_132)); + *(tint_symbol_3) = float4(float(x_123), float(x_126), float(x_129), float(x_132)); } else { int const x_136 = x_10.x_GLF_uniform_int_values.arr[0].el; float const x_137 = float(x_136); - *(tint_symbol_4) = float4(x_137, x_137, x_137, x_137); + *(tint_symbol_3) = float4(x_137, x_137, x_137, x_137); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) { + main_1(x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.hlsl index f87712b04c..7b19951862 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.hlsl @@ -104,9 +104,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.msl index 8e6d935995..5e039e1687 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3) { uint a = 0u; float4 values = 0.0f; float4 ref = 0.0f; @@ -93,20 +93,26 @@ void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_s int const x_126 = x_10.x_GLF_uniform_int_values.arr[0].el; int const x_129 = x_10.x_GLF_uniform_int_values.arr[0].el; int const x_132 = x_10.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_123), float(x_126), float(x_129), float(x_132)); + *(tint_symbol_3) = float4(float(x_123), float(x_126), float(x_129), float(x_132)); } else { int const x_136 = x_10.x_GLF_uniform_int_values.arr[0].el; float const x_137 = float(x_136); - *(tint_symbol_4) = float4(x_137, x_137, x_137, x_137); + *(tint_symbol_3) = float4(x_137, x_137, x_137, x_137); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) { + main_1(x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.hlsl index e0e17996e4..6938693941 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.hlsl @@ -32,9 +32,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.msl index 4c29280286..6df2bc27ec 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.msl @@ -21,23 +21,29 @@ int func_i1_(constant buf0& x_7, thread int* const x) { return x_41; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int param = 0; param = -1; int const x_28 = func_i1_(x_7, &(param)); if ((x_28 <= 0)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.hlsl index e0e17996e4..6938693941 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.hlsl @@ -32,9 +32,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.msl index 4c29280286..6df2bc27ec 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.msl @@ -21,23 +21,29 @@ int func_i1_(constant buf0& x_7, thread int* const x) { return x_41; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int param = 0; param = -1; int const x_28 = func_i1_(x_7, &(param)); if ((x_28 <= 0)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.hlsl index 564a67a8cc..36a8a8697b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.msl index eab11e20bc..c3651d8761 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_25 = x_5.three; if (((10 / (2 & x_25)) == 5)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.hlsl index 564a67a8cc..36a8a8697b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.msl index eab11e20bc..c3651d8761 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.msl @@ -11,21 +11,27 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_25 = x_5.three; if (((10 / (2 & x_25)) == 5)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.hlsl index a06717cb25..5a59ebd912 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.hlsl @@ -73,11 +73,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.msl index abd41b56aa..fbc71407b5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.msl @@ -24,15 +24,15 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; int const x_37 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_38 = float(x_37); - *(tint_symbol_5) = float4(x_38, x_38, x_38, x_38); + *(tint_symbol_3) = float4(x_38, x_38, x_38, x_38); int const x_41 = x_6.x_GLF_uniform_int_values.arr[1].el; i = x_41; while (true) { @@ -42,10 +42,10 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy } else { break; } - float const x_52 = (*(tint_symbol_6)).y; + float const x_52 = (*(tint_symbol_4)).y; float const x_54 = x_9.x_GLF_uniform_float_values.arr[0].el; if ((x_52 < x_54)) { - float const x_59 = (*(tint_symbol_6)).x; + float const x_59 = (*(tint_symbol_4)).x; float const x_61 = x_9.x_GLF_uniform_float_values.arr[0].el; if ((x_59 < x_61)) { return; @@ -64,7 +64,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_83 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_86 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_89 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_80), float(x_83), float(x_86), float(x_89)); + *(tint_symbol_3) = float4(float(x_80), float(x_83), float(x_86), float(x_89)); break; } float const x_93 = x_9.x_GLF_uniform_float_values.arr[0].el; @@ -79,13 +79,19 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, x_9, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, x_9, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.hlsl index a06717cb25..5a59ebd912 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.hlsl @@ -73,11 +73,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.msl index abd41b56aa..fbc71407b5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.msl @@ -24,15 +24,15 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; int const x_37 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_38 = float(x_37); - *(tint_symbol_5) = float4(x_38, x_38, x_38, x_38); + *(tint_symbol_3) = float4(x_38, x_38, x_38, x_38); int const x_41 = x_6.x_GLF_uniform_int_values.arr[1].el; i = x_41; while (true) { @@ -42,10 +42,10 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy } else { break; } - float const x_52 = (*(tint_symbol_6)).y; + float const x_52 = (*(tint_symbol_4)).y; float const x_54 = x_9.x_GLF_uniform_float_values.arr[0].el; if ((x_52 < x_54)) { - float const x_59 = (*(tint_symbol_6)).x; + float const x_59 = (*(tint_symbol_4)).x; float const x_61 = x_9.x_GLF_uniform_float_values.arr[0].el; if ((x_59 < x_61)) { return; @@ -64,7 +64,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_83 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_86 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_89 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_80), float(x_83), float(x_86), float(x_89)); + *(tint_symbol_3) = float4(float(x_80), float(x_83), float(x_86), float(x_89)); break; } float const x_93 = x_9.x_GLF_uniform_float_values.arr[0].el; @@ -79,13 +79,19 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, x_9, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, x_9, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.hlsl index f0bc792c4e..7102617fd9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.hlsl @@ -51,9 +51,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.msl index 5e53c898c8..61d08270a5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf2& x_11, constant buf1& x_13, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf2& x_11, constant buf1& x_13, thread float4* const tint_symbol_3) { float f0 = 0.0f; float f1 = 0.0f; float f2 = 0.0f; @@ -56,20 +56,26 @@ void main_1(constant buf0& x_6, constant buf2& x_11, constant buf1& x_13, thread int const x_68 = x_13.x_GLF_uniform_int_values.arr[1].el; int const x_71 = x_13.x_GLF_uniform_int_values.arr[1].el; int const x_74 = x_13.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_65), float(x_68), float(x_71), float(x_74)); + *(tint_symbol_3) = float4(float(x_65), float(x_68), float(x_71), float(x_74)); } else { int const x_78 = x_13.x_GLF_uniform_int_values.arr[1].el; float const x_79 = float(x_78); - *(tint_symbol_4) = float4(x_79, x_79, x_79, x_79); + *(tint_symbol_3) = float4(x_79, x_79, x_79, x_79); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]], constant buf1& x_13 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_11, x_13, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf2& x_11, constant buf1& x_13, thread float4* const tint_symbol_4) { + main_1(x_6, x_11, x_13, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]], constant buf1& x_13 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_11, x_13, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.hlsl index f0bc792c4e..7102617fd9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.hlsl @@ -51,9 +51,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.msl index 5e53c898c8..61d08270a5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf2& x_11, constant buf1& x_13, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf2& x_11, constant buf1& x_13, thread float4* const tint_symbol_3) { float f0 = 0.0f; float f1 = 0.0f; float f2 = 0.0f; @@ -56,20 +56,26 @@ void main_1(constant buf0& x_6, constant buf2& x_11, constant buf1& x_13, thread int const x_68 = x_13.x_GLF_uniform_int_values.arr[1].el; int const x_71 = x_13.x_GLF_uniform_int_values.arr[1].el; int const x_74 = x_13.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_65), float(x_68), float(x_71), float(x_74)); + *(tint_symbol_3) = float4(float(x_65), float(x_68), float(x_71), float(x_74)); } else { int const x_78 = x_13.x_GLF_uniform_int_values.arr[1].el; float const x_79 = float(x_78); - *(tint_symbol_4) = float4(x_79, x_79, x_79, x_79); + *(tint_symbol_3) = float4(x_79, x_79, x_79, x_79); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]], constant buf1& x_13 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_11, x_13, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf2& x_11, constant buf1& x_13, thread float4* const tint_symbol_4) { + main_1(x_6, x_11, x_13, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]], constant buf1& x_13 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_11, x_13, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.hlsl index fd122cb606..038f2c2e74 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.hlsl @@ -51,9 +51,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.msl index 53c1f7d3f8..31ebccb9c5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) { float f = 0.0f; bool x_48 = false; bool x_49_phi = false; @@ -53,20 +53,26 @@ void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread int const x_57 = x_10.x_GLF_uniform_int_values.arr[0].el; int const x_60 = x_10.x_GLF_uniform_int_values.arr[0].el; int const x_63 = x_10.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_54), float(x_57), float(x_60), float(x_63)); + *(tint_symbol_3) = float4(float(x_54), float(x_57), float(x_60), float(x_63)); } else { int const x_67 = x_10.x_GLF_uniform_int_values.arr[0].el; float const x_68 = float(x_67); - *(tint_symbol_4) = float4(x_68, x_68, x_68, x_68); + *(tint_symbol_3) = float4(x_68, x_68, x_68, x_68); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.hlsl index fd122cb606..038f2c2e74 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.hlsl @@ -51,9 +51,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.msl index 53c1f7d3f8..31ebccb9c5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) { float f = 0.0f; bool x_48 = false; bool x_49_phi = false; @@ -53,20 +53,26 @@ void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread int const x_57 = x_10.x_GLF_uniform_int_values.arr[0].el; int const x_60 = x_10.x_GLF_uniform_int_values.arr[0].el; int const x_63 = x_10.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_54), float(x_57), float(x_60), float(x_63)); + *(tint_symbol_3) = float4(float(x_54), float(x_57), float(x_60), float(x_63)); } else { int const x_67 = x_10.x_GLF_uniform_int_values.arr[0].el; float const x_68 = float(x_67); - *(tint_symbol_4) = float4(x_68, x_68, x_68, x_68); + *(tint_symbol_3) = float4(x_68, x_68, x_68, x_68); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.hlsl index 223f8fab14..5ec6e57339 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.hlsl @@ -35,9 +35,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.msl index d5cbb31e60..24ac7ae968 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { float a = 0.0f; float b = 0.0f; float c = 0.0f; @@ -28,7 +28,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { float const x_28 = b; c = pow(x_27, x_28); float const x_30 = c; - *(tint_symbol_4) = float4(x_30, x_30, x_30, x_30); + *(tint_symbol_3) = float4(x_30, x_30, x_30, x_30); float const x_32 = a; float const x_34 = b; if (((x_32 == -1.0f) & (x_34 == 1.700000048f))) { @@ -36,19 +36,25 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { float const x_43 = x_8.x_GLF_uniform_float_values.arr[1].el; float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el; float const x_47 = x_8.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_41, x_43, x_45, x_47); + *(tint_symbol_3) = float4(x_41, x_43, x_45, x_47); } else { float const x_50 = x_8.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_50, x_50, x_50, x_50); + *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.hlsl index 132221e41e..f5dc7e10a3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.msl index 8000e84572..c102f6c775 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { float a = 0.0f; float b = 0.0f; float c = 0.0f; @@ -28,7 +28,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { float const x_28 = b; c = pow(x_27, x_28); float const x_30 = c; - *(tint_symbol_4) = float4(x_30, x_30, x_30, x_30); + *(tint_symbol_3) = float4(x_30, x_30, x_30, x_30); float const x_32 = a; float const x_34 = b; if (((x_32 == -1.0f) && (x_34 == 1.700000048f))) { @@ -36,19 +36,25 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { float const x_43 = x_8.x_GLF_uniform_float_values.arr[1].el; float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el; float const x_47 = x_8.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_41, x_43, x_45, x_47); + *(tint_symbol_3) = float4(x_41, x_43, x_45, x_47); } else { float const x_50 = x_8.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_50, x_50, x_50, x_50); + *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.hlsl index 89c814d635..53c03fc2d6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.hlsl @@ -34,9 +34,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.msl index d98099cc37..260e4cb70d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; a = -7563; int const x_25 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -29,20 +29,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_38 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_41 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_44 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_35), float(x_38), float(x_41), float(x_44)); + *(tint_symbol_3) = float4(float(x_35), float(x_38), float(x_41), float(x_44)); } else { int const x_48 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_49 = float(x_48); - *(tint_symbol_4) = float4(x_49, x_49, x_49, x_49); + *(tint_symbol_3) = float4(x_49, x_49, x_49, x_49); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.hlsl index 89c814d635..53c03fc2d6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.hlsl @@ -34,9 +34,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.msl index d98099cc37..260e4cb70d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; a = -7563; int const x_25 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -29,20 +29,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_38 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_41 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_44 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_35), float(x_38), float(x_41), float(x_44)); + *(tint_symbol_3) = float4(float(x_35), float(x_38), float(x_41), float(x_44)); } else { int const x_48 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_49 = float(x_48); - *(tint_symbol_4) = float4(x_49, x_49, x_49, x_49); + *(tint_symbol_3) = float4(x_49, x_49, x_49, x_49); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.hlsl index 979542d35b..4120e3c5bc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.hlsl @@ -33,9 +33,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.msl index 7130ddf842..5dad71d38a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; a = -1; int const x_25 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -29,20 +29,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_38 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_41 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_44 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_35), float(x_38), float(x_41), float(x_44)); + *(tint_symbol_3) = float4(float(x_35), float(x_38), float(x_41), float(x_44)); } else { int const x_48 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_49 = float(x_48); - *(tint_symbol_4) = float4(x_49, x_49, x_49, x_49); + *(tint_symbol_3) = float4(x_49, x_49, x_49, x_49); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.hlsl index 979542d35b..4120e3c5bc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.hlsl @@ -33,9 +33,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.msl index 7130ddf842..5dad71d38a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; a = -1; int const x_25 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -29,20 +29,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_38 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_41 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_44 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_35), float(x_38), float(x_41), float(x_44)); + *(tint_symbol_3) = float4(float(x_35), float(x_38), float(x_41), float(x_44)); } else { int const x_48 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_49 = float(x_48); - *(tint_symbol_4) = float4(x_49, x_49, x_49, x_49); + *(tint_symbol_3) = float4(x_49, x_49, x_49, x_49); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.hlsl index 883cfd21a5..9ef8ef44bb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.hlsl @@ -34,9 +34,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.msl index 3c3c805259..81cec69bed 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.msl @@ -14,13 +14,13 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { tint_array_wrapper x_9 = {}; int x_10_phi = 0; tint_array_wrapper const x_33 = x_9; int const x_6 = x_33.arr[0u]; while (true) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); int const x_7 = x_5.zero; int const x_8 = x_9.arr[x_7]; if ((x_8 == x_6)) { @@ -32,18 +32,24 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } int const x_10 = x_10_phi; if (((x_10 == 1) | (x_10 == 2))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.hlsl index 2c7bb9e268..76eb097807 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.hlsl @@ -38,9 +38,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.msl index fc24e78cd9..cb7da376f4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.msl @@ -14,13 +14,13 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { tint_array_wrapper x_9 = {}; int x_10_phi = 0; tint_array_wrapper const x_33 = x_9; int const x_6 = x_33.arr[0u]; while (true) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); int const x_7 = x_5.zero; int const x_8 = x_9.arr[x_7]; if ((x_8 == x_6)) { @@ -32,18 +32,24 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } int const x_10 = x_10_phi; if (((x_10 == 1) || (x_10 == 2))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.hlsl index 0adcd37916..32622e64d9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.hlsl @@ -57,9 +57,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.msl index a0d65d8387..acdf2d51c6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.msl @@ -23,7 +23,7 @@ void func_struct_S_i1_i11_(thread S* const arg) { return; } -void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_10, thread float4* const tint_symbol_3) { float a = 0.0f; tint_array_wrapper b = {}; S param = {}; @@ -55,18 +55,24 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { } float const x_63 = a; if ((x_63 == 5.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.hlsl index 0adcd37916..32622e64d9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.hlsl @@ -57,9 +57,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.msl index a0d65d8387..acdf2d51c6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.msl @@ -23,7 +23,7 @@ void func_struct_S_i1_i11_(thread S* const arg) { return; } -void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_10, thread float4* const tint_symbol_3) { float a = 0.0f; tint_array_wrapper b = {}; S param = {}; @@ -55,18 +55,24 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { } float const x_63 = a; if ((x_63 == 5.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.hlsl index 59e50ef564..26431be9f0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.hlsl @@ -68,11 +68,16 @@ struct tint_symbol_2 { float4 x_GLF_v1_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_v1}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_v1_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_v1}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl index f75a9115d3..1ccb594ea3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl @@ -24,11 +24,11 @@ struct buf0 { struct main_out { float4 x_GLF_v1_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_v1_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; int j = 0; int const x_36 = x_7.x_GLF_uniform_int_values.arr[1].el; @@ -54,7 +54,7 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy } else { break; } - float const x_65 = (*(tint_symbol_5)).x; + float const x_65 = (*(tint_symbol_3)).x; float const x_67 = x_9.x_GLF_uniform_float_values.arr[0].el; if ((x_65 < x_67)) { discard_fragment(); @@ -63,7 +63,7 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy int const x_75 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_78 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_81 = x_7.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_6) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); + *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); { int const x_84 = j; j = as_type((as_type(x_84) + as_type(1))); @@ -77,13 +77,19 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_9, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_v1_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_v1_1=tint_symbol_3.x_GLF_v1_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_9, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_v1_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.hlsl index 59e50ef564..26431be9f0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.hlsl @@ -68,11 +68,16 @@ struct tint_symbol_2 { float4 x_GLF_v1_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_v1}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_v1_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_v1}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl index f75a9115d3..1ccb594ea3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl @@ -24,11 +24,11 @@ struct buf0 { struct main_out { float4 x_GLF_v1_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_v1_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; int j = 0; int const x_36 = x_7.x_GLF_uniform_int_values.arr[1].el; @@ -54,7 +54,7 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy } else { break; } - float const x_65 = (*(tint_symbol_5)).x; + float const x_65 = (*(tint_symbol_3)).x; float const x_67 = x_9.x_GLF_uniform_float_values.arr[0].el; if ((x_65 < x_67)) { discard_fragment(); @@ -63,7 +63,7 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy int const x_75 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_78 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_81 = x_7.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_6) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); + *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); { int const x_84 = j; j = as_type((as_type(x_84) + as_type(1))); @@ -77,13 +77,19 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_9, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_v1_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_v1_1=tint_symbol_3.x_GLF_v1_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_9, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_v1_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl index e9afb939bd..dee41a7bf0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float2x2 m = float2x2(0.0f); float f = 0.0f; int i = 0; @@ -73,20 +73,26 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { int const x_112 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_115 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_118 = x_5.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_109), float(x_112), float(x_115), float(x_118)); + *(tint_symbol_3) = float4(float(x_109), float(x_112), float(x_115), float(x_118)); } else { int const x_122 = x_5.x_GLF_uniform_int_values.arr[1].el; float const x_123 = float(x_122); - *(tint_symbol_4) = float4(x_123, x_123, x_123, x_123); + *(tint_symbol_3) = float4(x_123, x_123, x_123, x_123); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl.expected.msl index c00aec3c1f..81fa027993 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float2x2 m = float2x2(0.0f); float f = 0.0f; int i = 0; @@ -73,20 +73,26 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { int const x_112 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_115 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_118 = x_5.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_109), float(x_112), float(x_115), float(x_118)); + *(tint_symbol_3) = float4(float(x_109), float(x_112), float(x_115), float(x_118)); } else { int const x_122 = x_5.x_GLF_uniform_int_values.arr[1].el; float const x_123 = float(x_122); - *(tint_symbol_4) = float4(x_123, x_123, x_123, x_123); + *(tint_symbol_3) = float4(x_123, x_123, x_123, x_123); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.hlsl index c2266079a5..e3bbf2aa1c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.hlsl @@ -73,9 +73,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.msl index b86c0c80cd..0376e599b8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.msl @@ -30,7 +30,7 @@ int func_struct_S_i11_i1_(thread S* const s, thread int* const x) { return 0; } -void main_1(constant buf0& x_11, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_11, thread float4* const tint_symbol_3) { int a = 0; tint_array_wrapper arr = {}; int i = 0; @@ -75,18 +75,24 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_4) { } int const x_33 = a; if ((x_33 == 6)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_11 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_11, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_11, thread float4* const tint_symbol_4) { + main_1(x_11, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_11 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_11, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.hlsl index c2266079a5..e3bbf2aa1c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.hlsl @@ -73,9 +73,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.msl index b86c0c80cd..0376e599b8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.msl @@ -30,7 +30,7 @@ int func_struct_S_i11_i1_(thread S* const s, thread int* const x) { return 0; } -void main_1(constant buf0& x_11, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_11, thread float4* const tint_symbol_3) { int a = 0; tint_array_wrapper arr = {}; int i = 0; @@ -75,18 +75,24 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_4) { } int const x_33 = a; if ((x_33 == 6)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_11 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_11, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_11, thread float4* const tint_symbol_4) { + main_1(x_11, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_11 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_11, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.spvasm.expected.msl index 1ade401eab..e4be6c8799 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.spvasm.expected.msl @@ -18,19 +18,19 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_5, thread float4* const tint_symbol_3) { int const x_22 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_25 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_28 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_31 = x_5.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_22), float(x_25), float(x_28), float(x_31)); + *(tint_symbol_3) = float4(float(x_22), float(x_25), float(x_28), float(x_31)); int const x_35 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_37 = x_5.x_GLF_uniform_int_values.arr[0].el; if ((x_35 > x_37)) { while (true) { int const x_46 = x_5.x_GLF_uniform_int_values.arr[0].el; float const x_47 = float(x_46); - *(tint_symbol_4) = float4(x_47, x_47, x_47, x_47); + *(tint_symbol_3) = float4(x_47, x_47, x_47, x_47); { int const x_50 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_52 = x_5.x_GLF_uniform_int_values.arr[0].el; @@ -45,11 +45,17 @@ void main_1(constant buf1& x_5, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.wgsl.expected.msl index 1ade401eab..e4be6c8799 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.wgsl.expected.msl @@ -18,19 +18,19 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_5, thread float4* const tint_symbol_3) { int const x_22 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_25 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_28 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_31 = x_5.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_22), float(x_25), float(x_28), float(x_31)); + *(tint_symbol_3) = float4(float(x_22), float(x_25), float(x_28), float(x_31)); int const x_35 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_37 = x_5.x_GLF_uniform_int_values.arr[0].el; if ((x_35 > x_37)) { while (true) { int const x_46 = x_5.x_GLF_uniform_int_values.arr[0].el; float const x_47 = float(x_46); - *(tint_symbol_4) = float4(x_47, x_47, x_47, x_47); + *(tint_symbol_3) = float4(x_47, x_47, x_47, x_47); { int const x_50 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_52 = x_5.x_GLF_uniform_int_values.arr[0].el; @@ -45,11 +45,17 @@ void main_1(constant buf1& x_5, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.hlsl index 02dc25f283..552bf5d814 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.hlsl @@ -53,11 +53,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl index ab191bdbaf..32fd0e58ce 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl @@ -27,13 +27,13 @@ struct buf2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el; i = x_42; while (true) { @@ -53,23 +53,29 @@ void main_1(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, thread i = as_type((as_type(x_58) + as_type(1))); } } - float const x_61 = (*(tint_symbol_6)).y; + float const x_61 = (*(tint_symbol_4)).y; float const x_63 = x_9.x_GLF_uniform_float_values.arr[0].el; if ((x_61 < x_63)) { return; } float const x_68 = x_11.injectionSwitch.y; - *(tint_symbol_5) = float4(float3(1.0f, 1.0f, 1.0f).x, float3(1.0f, 1.0f, 1.0f).y, float3(1.0f, 1.0f, 1.0f).z, x_68); + *(tint_symbol_3) = float4(float3(1.0f, 1.0f, 1.0f).x, float3(1.0f, 1.0f, 1.0f).y, float3(1.0f, 1.0f, 1.0f).z, x_68); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_9, x_11, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_9, x_11, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.hlsl index 02dc25f283..552bf5d814 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.hlsl @@ -53,11 +53,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl index ab191bdbaf..32fd0e58ce 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl @@ -27,13 +27,13 @@ struct buf2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el; i = x_42; while (true) { @@ -53,23 +53,29 @@ void main_1(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, thread i = as_type((as_type(x_58) + as_type(1))); } } - float const x_61 = (*(tint_symbol_6)).y; + float const x_61 = (*(tint_symbol_4)).y; float const x_63 = x_9.x_GLF_uniform_float_values.arr[0].el; if ((x_61 < x_63)) { return; } float const x_68 = x_11.injectionSwitch.y; - *(tint_symbol_5) = float4(float3(1.0f, 1.0f, 1.0f).x, float3(1.0f, 1.0f, 1.0f).y, float3(1.0f, 1.0f, 1.0f).z, x_68); + *(tint_symbol_3) = float4(float3(1.0f, 1.0f, 1.0f).x, float3(1.0f, 1.0f, 1.0f).y, float3(1.0f, 1.0f, 1.0f).z, x_68); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_9, x_11, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_9, x_11, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.hlsl index c33dd5cce6..aac269b930 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.hlsl @@ -17,8 +17,8 @@ float2 func_() { const float x_70 = asfloat(x_7[1].x); const float x_73 = asfloat(x_7[1].x); const int x_77 = a; - const float2 tint_symbol_4[3] = {float2(x_70, x_70), float2(x_73, x_73), v}; - indexable = tint_symbol_4; + const float2 tint_symbol_3[3] = {float2(x_70, x_70), float2(x_73, x_73), v}; + indexable = tint_symbol_3; const float2 x_79 = indexable[x_77]; return x_79; } @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.msl index d54821f844..e36fd590bb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.msl @@ -42,13 +42,13 @@ float2 func_(constant buf0& x_7) { float const x_73 = x_7.x_GLF_uniform_float_values.arr[1].el; float2 const x_75 = v; int const x_77 = a; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={float2(x_70, x_70), float2(x_73, x_73), x_75}}; - indexable = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={float2(x_70, x_70), float2(x_73, x_73), x_75}}; + indexable = tint_symbol_2; float2 const x_79 = indexable.arr[x_77]; return x_79; } -void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4) { float2 const x_40 = func_(x_7); float const x_43 = x_7.x_GLF_uniform_float_values.arr[0].el; if ((x_40.y == x_43)) { @@ -56,20 +56,26 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s int const x_52 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_55 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_58 = x_11.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_49), float(x_52), float(x_55), float(x_58)); + *(tint_symbol_4) = float4(float(x_49), float(x_52), float(x_55), float(x_58)); } else { int const x_62 = x_11.x_GLF_uniform_int_values.arr[1].el; float const x_63 = float(x_62); - *(tint_symbol_5) = float4(x_63, x_63, x_63, x_63); + *(tint_symbol_4) = float4(x_63, x_63, x_63, x_63); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_7, x_11, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_5) { + main_1(x_7, x_11, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_11, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.hlsl index c33dd5cce6..aac269b930 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.hlsl @@ -17,8 +17,8 @@ float2 func_() { const float x_70 = asfloat(x_7[1].x); const float x_73 = asfloat(x_7[1].x); const int x_77 = a; - const float2 tint_symbol_4[3] = {float2(x_70, x_70), float2(x_73, x_73), v}; - indexable = tint_symbol_4; + const float2 tint_symbol_3[3] = {float2(x_70, x_70), float2(x_73, x_73), v}; + indexable = tint_symbol_3; const float2 x_79 = indexable[x_77]; return x_79; } @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.msl index d54821f844..e36fd590bb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.msl @@ -42,13 +42,13 @@ float2 func_(constant buf0& x_7) { float const x_73 = x_7.x_GLF_uniform_float_values.arr[1].el; float2 const x_75 = v; int const x_77 = a; - tint_array_wrapper_2 const tint_symbol_3 = {.arr={float2(x_70, x_70), float2(x_73, x_73), x_75}}; - indexable = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={float2(x_70, x_70), float2(x_73, x_73), x_75}}; + indexable = tint_symbol_2; float2 const x_79 = indexable.arr[x_77]; return x_79; } -void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4) { float2 const x_40 = func_(x_7); float const x_43 = x_7.x_GLF_uniform_float_values.arr[0].el; if ((x_40.y == x_43)) { @@ -56,20 +56,26 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s int const x_52 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_55 = x_11.x_GLF_uniform_int_values.arr[1].el; int const x_58 = x_11.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_49), float(x_52), float(x_55), float(x_58)); + *(tint_symbol_4) = float4(float(x_49), float(x_52), float(x_55), float(x_58)); } else { int const x_62 = x_11.x_GLF_uniform_int_values.arr[1].el; float const x_63 = float(x_62); - *(tint_symbol_5) = float4(x_63, x_63, x_63, x_63); + *(tint_symbol_4) = float4(x_63, x_63, x_63, x_63); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_7, x_11, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_5) { + main_1(x_7, x_11, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_11, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.hlsl index 5d63b9b65c..027b703bd5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.hlsl @@ -200,9 +200,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.msl index c3f9b0065c..a2b94a3949 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { tint_array_wrapper_2 sums = {}; int a = 0; int b = 0; @@ -213,20 +213,26 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_77 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_78 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_79 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_76), float(x_77), float(x_78), float(x_79)); + *(tint_symbol_3) = float4(float(x_76), float(x_77), float(x_78), float(x_79)); } else { int const x_80 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_230 = float(x_80); - *(tint_symbol_4) = float4(x_230, x_230, x_230, x_230); + *(tint_symbol_3) = float4(x_230, x_230, x_230, x_230); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.hlsl index 5d63b9b65c..027b703bd5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.hlsl @@ -200,9 +200,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.msl index c3f9b0065c..a2b94a3949 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { tint_array_wrapper_2 sums = {}; int a = 0; int b = 0; @@ -213,20 +213,26 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_77 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_78 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_79 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_76), float(x_77), float(x_78), float(x_79)); + *(tint_symbol_3) = float4(float(x_76), float(x_77), float(x_78), float(x_79)); } else { int const x_80 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_230 = float(x_80); - *(tint_symbol_4) = float4(x_230, x_230, x_230, x_230); + *(tint_symbol_3) = float4(x_230, x_230, x_230, x_230); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.hlsl index 9982cdee30..794e8523e9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.hlsl @@ -160,9 +160,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.msl index 1ef23cb010..527bad133b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int a = 0; int i0 = 0; int i1 = 0; @@ -166,18 +166,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } int const x_157 = a; if ((x_157 == 3)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.hlsl index 9982cdee30..794e8523e9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.hlsl @@ -160,9 +160,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.msl index 1ef23cb010..527bad133b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int a = 0; int i0 = 0; int i1 = 0; @@ -166,18 +166,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } int const x_157 = a; if ((x_157 == 3)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.hlsl index 7fa995298f..291cdde86e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.hlsl @@ -44,9 +44,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.msl index b2905ce5dc..58f4554a4b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float a = 0.0f; float b = 0.0f; bool x_51 = false; @@ -31,7 +31,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_37 = a; b = cos(log(x_37)); float const x_40 = b; - *(tint_symbol_4) = float4(x_40, x_40, x_40, x_40); + *(tint_symbol_3) = float4(x_40, x_40, x_40, x_40); float const x_42 = b; float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el; bool const x_45 = (x_42 > x_44); @@ -48,16 +48,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_58 = x_6.x_GLF_uniform_float_values.arr[4].el; float const x_60 = x_6.x_GLF_uniform_float_values.arr[4].el; float const x_62 = x_6.x_GLF_uniform_float_values.arr[3].el; - *(tint_symbol_4) = float4(x_56, x_58, x_60, x_62); + *(tint_symbol_3) = float4(x_56, x_58, x_60, x_62); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.hlsl index 7fa995298f..291cdde86e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.hlsl @@ -44,9 +44,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.msl index b2905ce5dc..58f4554a4b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float a = 0.0f; float b = 0.0f; bool x_51 = false; @@ -31,7 +31,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_37 = a; b = cos(log(x_37)); float const x_40 = b; - *(tint_symbol_4) = float4(x_40, x_40, x_40, x_40); + *(tint_symbol_3) = float4(x_40, x_40, x_40, x_40); float const x_42 = b; float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el; bool const x_45 = (x_42 > x_44); @@ -48,16 +48,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { float const x_58 = x_6.x_GLF_uniform_float_values.arr[4].el; float const x_60 = x_6.x_GLF_uniform_float_values.arr[4].el; float const x_62 = x_6.x_GLF_uniform_float_values.arr[3].el; - *(tint_symbol_4) = float4(x_56, x_58, x_60, x_62); + *(tint_symbol_3) = float4(x_56, x_58, x_60, x_62); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.hlsl index 84a456702d..ef42aea472 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.hlsl @@ -25,9 +25,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.msl index b5f5cc9b60..19c1772f71 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.msl @@ -18,26 +18,32 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float4 v = 0.0f; int const x_25 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_28 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_31 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_34 = x_5.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_25), float(x_28), float(x_31), float(x_34)); - float4 const x_37 = *(tint_symbol_4); + *(tint_symbol_3) = float4(float(x_25), float(x_28), float(x_31), float(x_34)); + float4 const x_37 = *(tint_symbol_3); v = x_37; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); float4 const x_38 = v; - *(tint_symbol_4) = x_38; + *(tint_symbol_3) = x_38; return; } +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.hlsl index 84a456702d..ef42aea472 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.hlsl @@ -25,9 +25,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.msl index b5f5cc9b60..19c1772f71 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.msl @@ -18,26 +18,32 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float4 v = 0.0f; int const x_25 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_28 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_31 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_34 = x_5.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_25), float(x_28), float(x_31), float(x_34)); - float4 const x_37 = *(tint_symbol_4); + *(tint_symbol_3) = float4(float(x_25), float(x_28), float(x_31), float(x_34)); + float4 const x_37 = *(tint_symbol_3); v = x_37; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); float4 const x_38 = v; - *(tint_symbol_4) = x_38; + *(tint_symbol_3) = x_38; return; } +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.hlsl index 3011a24b54..b3334f3afc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.hlsl @@ -46,9 +46,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.msl index f3cbdcf643..2d3d142b02 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int c = 0; int i = 0; int const x_27 = x_6.x_GLF_uniform_int_values.arr[2].el; @@ -43,7 +43,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_47 = float(x_46); - *(tint_symbol_4) = float4(x_47, x_47, x_47, x_47); + *(tint_symbol_3) = float4(x_47, x_47, x_47, x_47); int const x_49 = c; int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el; if ((x_49 == x_51)) { @@ -51,16 +51,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_65 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_56), float(x_59), float(x_62), float(x_65)); + *(tint_symbol_3) = float4(float(x_56), float(x_59), float(x_62), float(x_65)); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.hlsl index 3011a24b54..b3334f3afc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.hlsl @@ -46,9 +46,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.msl index f3cbdcf643..2d3d142b02 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int c = 0; int i = 0; int const x_27 = x_6.x_GLF_uniform_int_values.arr[2].el; @@ -43,7 +43,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_47 = float(x_46); - *(tint_symbol_4) = float4(x_47, x_47, x_47, x_47); + *(tint_symbol_3) = float4(x_47, x_47, x_47, x_47); int const x_49 = c; int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el; if ((x_49 == x_51)) { @@ -51,16 +51,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_65 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_56), float(x_59), float(x_62), float(x_65)); + *(tint_symbol_3) = float4(float(x_56), float(x_59), float(x_62), float(x_65)); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.hlsl index 3739a71d68..89e0d813a0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.hlsl @@ -41,9 +41,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.msl index 762e4db4e6..e6328172d4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_5, constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_5, constant buf0& x_7, thread float4* const tint_symbol_3) { float const x_29 = x_5.v1.x; float const x_31 = x_5.v1.y; if ((x_29 < x_31)) { @@ -29,28 +29,34 @@ void main_1(constant buf1& x_5, constant buf0& x_7, thread float4* const tint_sy int const x_40 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_43 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_46 = x_7.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_37), float(x_40), float(x_43), float(x_46)); + *(tint_symbol_3) = float4(float(x_37), float(x_40), float(x_43), float(x_46)); float const x_50 = x_5.v1.x; float const x_52 = x_5.v1.y; if ((x_50 > x_52)) { int const x_57 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_58 = float(x_57); - *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58); } return; } else { int const x_61 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_62 = float(x_61); - *(tint_symbol_4) = float4(x_62, x_62, x_62, x_62); + *(tint_symbol_3) = float4(x_62, x_62, x_62, x_62); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_5, constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_5, x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.hlsl index 3739a71d68..89e0d813a0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.hlsl @@ -41,9 +41,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.msl index 762e4db4e6..e6328172d4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_5, constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_5, constant buf0& x_7, thread float4* const tint_symbol_3) { float const x_29 = x_5.v1.x; float const x_31 = x_5.v1.y; if ((x_29 < x_31)) { @@ -29,28 +29,34 @@ void main_1(constant buf1& x_5, constant buf0& x_7, thread float4* const tint_sy int const x_40 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_43 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_46 = x_7.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_37), float(x_40), float(x_43), float(x_46)); + *(tint_symbol_3) = float4(float(x_37), float(x_40), float(x_43), float(x_46)); float const x_50 = x_5.v1.x; float const x_52 = x_5.v1.y; if ((x_50 > x_52)) { int const x_57 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_58 = float(x_57); - *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58); } return; } else { int const x_61 = x_7.x_GLF_uniform_int_values.arr[1].el; float const x_62 = float(x_61); - *(tint_symbol_4) = float4(x_62, x_62, x_62, x_62); + *(tint_symbol_3) = float4(x_62, x_62, x_62, x_62); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_5, constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_5, x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.hlsl index 4208963773..fb3d5a7f29 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.hlsl @@ -30,9 +30,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.msl index 747b26797e..3586605696 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.msl @@ -11,10 +11,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { bool x_29 = false; bool x_30_phi = false; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); float const x_23 = x_5.one; bool const x_24 = (x_23 < 0.0f); x_30_phi = x_24; @@ -25,18 +25,24 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } bool const x_30 = x_30_phi; if (x_30) { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.hlsl index 4208963773..fb3d5a7f29 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.hlsl @@ -30,9 +30,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.msl index 747b26797e..3586605696 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.msl @@ -11,10 +11,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { bool x_29 = false; bool x_30_phi = false; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); float const x_23 = x_5.one; bool const x_24 = (x_23 < 0.0f); x_30_phi = x_24; @@ -25,18 +25,24 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } bool const x_30 = x_30_phi; if (x_30) { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); } else { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.hlsl index 1fcb766692..a5f3b7ae00 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.hlsl @@ -101,9 +101,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.msl index a1a1c5a0b2..ad2ebafb04 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int x_36 = 0; bool x_74 = false; float4 x_33_phi = 0.0f; @@ -72,7 +72,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { x_56_phi = x_57; } } - *(tint_symbol_4) = x_53; + *(tint_symbol_3) = x_53; x_34_phi = x_53; x_62_phi = x_31; break; @@ -87,7 +87,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { x_38_phi = x_39; } } - float4 const x_63 = *(tint_symbol_4); + float4 const x_63 = *(tint_symbol_3); int const x_65 = x_5.x_GLF_uniform_int_values.arr[2].el; float const x_66 = float(x_65); bool const x_69 = all((x_63 == float4(x_66, x_66, x_66, x_66))); @@ -101,19 +101,25 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { if (x_75) { float const x_79 = float(x_31); float const x_80 = float(x_29); - *(tint_symbol_4) = float4(x_79, x_80, x_80, x_79); + *(tint_symbol_3) = float4(x_79, x_80, x_80, x_79); } else { float const x_82 = float(x_29); - *(tint_symbol_4) = float4(x_82, x_82, x_82, x_82); + *(tint_symbol_3) = float4(x_82, x_82, x_82, x_82); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.hlsl index 1fcb766692..a5f3b7ae00 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.hlsl @@ -101,9 +101,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.msl index a1a1c5a0b2..ad2ebafb04 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int x_36 = 0; bool x_74 = false; float4 x_33_phi = 0.0f; @@ -72,7 +72,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { x_56_phi = x_57; } } - *(tint_symbol_4) = x_53; + *(tint_symbol_3) = x_53; x_34_phi = x_53; x_62_phi = x_31; break; @@ -87,7 +87,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { x_38_phi = x_39; } } - float4 const x_63 = *(tint_symbol_4); + float4 const x_63 = *(tint_symbol_3); int const x_65 = x_5.x_GLF_uniform_int_values.arr[2].el; float const x_66 = float(x_65); bool const x_69 = all((x_63 == float4(x_66, x_66, x_66, x_66))); @@ -101,19 +101,25 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { if (x_75) { float const x_79 = float(x_31); float const x_80 = float(x_29); - *(tint_symbol_4) = float4(x_79, x_80, x_80, x_79); + *(tint_symbol_3) = float4(x_79, x_80, x_80, x_79); } else { float const x_82 = float(x_29); - *(tint_symbol_4) = float4(x_82, x_82, x_82, x_82); + *(tint_symbol_3) = float4(x_82, x_82, x_82, x_82); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.hlsl index 2f55ee9683..aa307b7380 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.hlsl @@ -73,11 +73,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.msl index a68c333ca0..7a4ba5af6a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 a = 0.0f; float3 b = 0.0f; bool x_105 = false; @@ -20,26 +20,26 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float bool x_112_phi = false; a = float2(1.0f, 1.0f); b = float3(0.0f, 0.0f, 0.0f); - float const x_52 = (*(tint_symbol_5)).y; + float const x_52 = (*(tint_symbol_3)).y; if ((int(x_52) < 40)) { b = float3(0.100000001f, 0.100000001f, 0.100000001f); } else { - float const x_59 = (*(tint_symbol_5)).y; + float const x_59 = (*(tint_symbol_3)).y; if ((int(x_59) < 60)) { b = float3(0.200000003f, 0.200000003f, 0.200000003f); } else { - float const x_66 = (*(tint_symbol_5)).y; + float const x_66 = (*(tint_symbol_3)).y; if ((x_66 < 80.0f)) { float const x_72 = a.x; float const x_74 = x_8.one; b = (cos((float3(x_72, x_72, x_72) + float3(x_74, x_74, x_74))) + float3(0.01f, 0.01f, 0.01f)); } else { - float const x_82 = (*(tint_symbol_5)).y; + float const x_82 = (*(tint_symbol_3)).y; if ((int(x_82) < 100)) { float const x_89 = x_8.one; b = cos(float3(x_89, x_89, x_89)); } else { - float const x_93 = (*(tint_symbol_5)).y; + float const x_93 = (*(tint_symbol_3)).y; if ((int(x_93) < 500)) { b = float3(0.540302277f, 0.540302277f, -0.99996084f); } @@ -64,20 +64,26 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } bool const x_112 = x_112_phi; if (x_112) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.hlsl index 2f55ee9683..aa307b7380 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.hlsl @@ -73,11 +73,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.msl index a68c333ca0..7a4ba5af6a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 a = 0.0f; float3 b = 0.0f; bool x_105 = false; @@ -20,26 +20,26 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float bool x_112_phi = false; a = float2(1.0f, 1.0f); b = float3(0.0f, 0.0f, 0.0f); - float const x_52 = (*(tint_symbol_5)).y; + float const x_52 = (*(tint_symbol_3)).y; if ((int(x_52) < 40)) { b = float3(0.100000001f, 0.100000001f, 0.100000001f); } else { - float const x_59 = (*(tint_symbol_5)).y; + float const x_59 = (*(tint_symbol_3)).y; if ((int(x_59) < 60)) { b = float3(0.200000003f, 0.200000003f, 0.200000003f); } else { - float const x_66 = (*(tint_symbol_5)).y; + float const x_66 = (*(tint_symbol_3)).y; if ((x_66 < 80.0f)) { float const x_72 = a.x; float const x_74 = x_8.one; b = (cos((float3(x_72, x_72, x_72) + float3(x_74, x_74, x_74))) + float3(0.01f, 0.01f, 0.01f)); } else { - float const x_82 = (*(tint_symbol_5)).y; + float const x_82 = (*(tint_symbol_3)).y; if ((int(x_82) < 100)) { float const x_89 = x_8.one; b = cos(float3(x_89, x_89, x_89)); } else { - float const x_93 = (*(tint_symbol_5)).y; + float const x_93 = (*(tint_symbol_3)).y; if ((int(x_93) < 500)) { b = float3(0.540302277f, 0.540302277f, -0.99996084f); } @@ -64,20 +64,26 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } bool const x_112 = x_112_phi; if (x_112) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.hlsl index a739821490..78323724ff 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.hlsl @@ -73,9 +73,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.msl index 0163d7c7da..a35525edbe 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.msl @@ -30,7 +30,7 @@ int func_struct_S_i1_2_1_i1_(constant buf0& x_9, thread S* const s, thread int* return x_21; } -void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) { int a = 0; int i = 0; int j = 0; @@ -74,18 +74,24 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { } int const x_38 = a; if ((x_38 == 30)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.hlsl index a739821490..78323724ff 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.hlsl @@ -73,9 +73,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.msl index 0163d7c7da..a35525edbe 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.msl @@ -30,7 +30,7 @@ int func_struct_S_i1_2_1_i1_(constant buf0& x_9, thread S* const s, thread int* return x_21; } -void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) { int a = 0; int i = 0; int j = 0; @@ -74,18 +74,24 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { } int const x_38 = a; if ((x_38 == 30)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.hlsl index 3cc04e2a57..4dbce1c719 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.hlsl @@ -48,9 +48,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.msl index abf71b6c14..a9d7c8e5be 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.msl @@ -14,10 +14,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) { int i = 0; float4 v = 0.0f; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); i = 0; while (true) { int const x_38 = i; @@ -29,7 +29,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy while (true) { int const x_48 = x_6.one; if ((x_48 == 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } { if (false) { @@ -46,15 +46,21 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_55 = x_9.zero; v.y = float(x_55); float const x_59 = v.y; - (*(tint_symbol_4)).y = x_59; + (*(tint_symbol_3)).y = x_59; return; } +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.hlsl index 3cc04e2a57..4dbce1c719 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.hlsl @@ -48,9 +48,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.msl index abf71b6c14..a9d7c8e5be 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.msl @@ -14,10 +14,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) { int i = 0; float4 v = 0.0f; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); i = 0; while (true) { int const x_38 = i; @@ -29,7 +29,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy while (true) { int const x_48 = x_6.one; if ((x_48 == 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } { if (false) { @@ -46,15 +46,21 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy int const x_55 = x_9.zero; v.y = float(x_55); float const x_59 = v.y; - (*(tint_symbol_4)).y = x_59; + (*(tint_symbol_3)).y = x_59; return; } +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.hlsl index 2e58c08846..973b5deb7a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.hlsl @@ -53,9 +53,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.msl index 6e6d19827b..35fcbc7b53 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int4 a = 0; int i = 0; int sum = 0; @@ -48,18 +48,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { sum = as_type((as_type(as_type((as_type(as_type((as_type(x_65) + as_type(x_67)))) + as_type(x_70)))) + as_type(x_73))); int const x_75 = sum; if ((x_75 == 10)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.hlsl index 2e58c08846..973b5deb7a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.hlsl @@ -53,9 +53,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.msl index 6e6d19827b..35fcbc7b53 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int4 a = 0; int i = 0; int sum = 0; @@ -48,18 +48,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { sum = as_type((as_type(as_type((as_type(as_type((as_type(x_65) + as_type(x_67)))) + as_type(x_70)))) + as_type(x_73))); int const x_75 = sum; if ((x_75 == 10)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.hlsl index 0503ece41f..f8b9b38672 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.hlsl @@ -32,9 +32,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.msl index aedac0ac9f..de6f3d887b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int const x_24 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_26 = x_6.x_GLF_uniform_int_values.arr[0].el; @@ -30,20 +30,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_39 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_42 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_44 = a; - *(tint_symbol_4) = float4(float(x_36), float(x_39), float(x_42), float(x_44)); + *(tint_symbol_3) = float4(float(x_36), float(x_39), float(x_42), float(x_44)); } else { int const x_47 = a; float const x_48 = float(x_47); - *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48); + *(tint_symbol_3) = float4(x_48, x_48, x_48, x_48); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.hlsl index 0503ece41f..f8b9b38672 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.hlsl @@ -32,9 +32,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.msl index aedac0ac9f..de6f3d887b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int const x_24 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_26 = x_6.x_GLF_uniform_int_values.arr[0].el; @@ -30,20 +30,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_39 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_42 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_44 = a; - *(tint_symbol_4) = float4(float(x_36), float(x_39), float(x_42), float(x_44)); + *(tint_symbol_3) = float4(float(x_36), float(x_39), float(x_42), float(x_44)); } else { int const x_47 = a; float const x_48 = float(x_47); - *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48); + *(tint_symbol_3) = float4(x_48, x_48, x_48, x_48); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.hlsl index db9236beba..4343e5901b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.hlsl @@ -37,9 +37,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.msl index 79dbc241a3..11a33b152f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int i = 0; int r = 0; i = 0; @@ -34,18 +34,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } int const x_50 = i; if ((x_50 == 10)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.hlsl index db9236beba..4343e5901b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.hlsl @@ -37,9 +37,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.msl index 79dbc241a3..11a33b152f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int i = 0; int r = 0; i = 0; @@ -34,18 +34,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } int const x_50 = i; if ((x_50 == 10)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.hlsl index ad4b4c8c2d..d719788a13 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.msl index 34251dc0be..bd21fbd977 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.msl @@ -11,24 +11,30 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { uint a = 0u; uint const x_27 = x_6.two; a = (x_27 / 1u); uint const x_29 = a; if ((x_29 == 2u)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.hlsl index ad4b4c8c2d..d719788a13 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.msl index 34251dc0be..bd21fbd977 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.msl @@ -11,24 +11,30 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { uint a = 0u; uint const x_27 = x_6.two; a = (x_27 / 1u); uint const x_29 = a; if ((x_29 == 2u)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.hlsl index 910242d734..53970faa11 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.hlsl @@ -54,9 +54,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.msl index fdecb2318a..5a048cf346 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.msl @@ -23,7 +23,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int i = 0; int const x_25 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -53,20 +53,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_65 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_56), float(x_59), float(x_62), float(x_65)); + *(tint_symbol_3) = float4(float(x_56), float(x_59), float(x_62), float(x_65)); } else { int const x_68 = a; float const x_69 = float(x_68); - *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69); + *(tint_symbol_3) = float4(x_69, x_69, x_69, x_69); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.hlsl index 910242d734..53970faa11 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.hlsl @@ -54,9 +54,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.msl index fdecb2318a..5a048cf346 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.msl @@ -23,7 +23,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int i = 0; int const x_25 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -53,20 +53,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_65 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_56), float(x_59), float(x_62), float(x_65)); + *(tint_symbol_3) = float4(float(x_56), float(x_59), float(x_62), float(x_65)); } else { int const x_68 = a; float const x_69 = float(x_68); - *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69); + *(tint_symbol_3) = float4(x_69, x_69, x_69, x_69); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.hlsl index f886474fd8..283e0bc5c0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.msl index ab479ddd66..d84266e5bd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.msl @@ -11,24 +11,30 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; float const x_25 = x_6.three; f = ldexp(x_25, 0); float const x_27 = f; if ((x_27 == 3.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.hlsl index f886474fd8..283e0bc5c0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.msl index ab479ddd66..d84266e5bd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.msl @@ -11,24 +11,30 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float f = 0.0f; float const x_25 = x_6.three; f = ldexp(x_25, 0); float const x_27 = f; if ((x_27 == 3.0f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.hlsl index b79d8c035b..f1ff6f3467 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.hlsl @@ -90,9 +90,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.msl index fa512e1761..89bc2bfbe4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; tint_array_wrapper_1 A = {}; bool x_77 = false; @@ -90,18 +90,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_106 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_109 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_112 = x_6.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_4) = float4(float(x_103), float(x_106), float(x_109), float(x_112)); + *(tint_symbol_3) = float4(float(x_103), float(x_106), float(x_109), float(x_112)); } else { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.hlsl index b79d8c035b..f1ff6f3467 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.hlsl @@ -90,9 +90,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.msl index fa512e1761..89bc2bfbe4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; tint_array_wrapper_1 A = {}; bool x_77 = false; @@ -90,18 +90,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_106 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_109 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_112 = x_6.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_4) = float4(float(x_103), float(x_106), float(x_109), float(x_112)); + *(tint_symbol_3) = float4(float(x_103), float(x_106), float(x_109), float(x_112)); } else { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.hlsl index 29ab9774d9..40f49b4ceb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.hlsl @@ -36,9 +36,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.msl index d1276b9eaa..2abdef20c6 100755 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float a = 0.0f; float const x_30 = x_6.x_GLF_uniform_float_values.arr[0].el; a = (x_30 - (1.0f * floor((x_30 / 1.0f)))); @@ -39,19 +39,25 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy float const x_42 = a; float const x_43 = a; int const x_45 = x_8.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_40), x_42, x_43, float(x_45)); + *(tint_symbol_3) = float4(float(x_40), x_42, x_43, float(x_45)); } else { float const x_48 = a; - *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48); + *(tint_symbol_3) = float4(x_48, x_48, x_48, x_48); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.hlsl index 2ae1a6e158..9a99d6872d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.hlsl @@ -36,9 +36,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.msl index 7df3919879..e9fc53bef2 100755 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float a = 0.0f; float const x_30 = x_6.x_GLF_uniform_float_values.arr[0].el; a = fmod(x_30, 1.0f); @@ -39,19 +39,25 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy float const x_42 = a; float const x_43 = a; int const x_45 = x_8.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_40), x_42, x_43, float(x_45)); + *(tint_symbol_3) = float4(float(x_40), x_42, x_43, float(x_45)); } else { float const x_48 = a; - *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48); + *(tint_symbol_3) = float4(x_48, x_48, x_48, x_48); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.hlsl index 322962c840..1fc8aac6c7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.hlsl @@ -24,9 +24,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.msl index 6c24b25307..a496e4f9cb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { float4 v = 0.0f; float4 res = 0.0f; v = float4(8.399999619f, -864.664978027f, 945.41998291f, 1.0f); @@ -21,18 +21,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { float4 const x_39 = v; float4 const x_40 = res; if ((distance(x_39, x_40) < 0.01f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.hlsl index 322962c840..1fc8aac6c7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.hlsl @@ -24,9 +24,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.msl index 6c24b25307..a496e4f9cb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { float4 v = 0.0f; float4 res = 0.0f; v = float4(8.399999619f, -864.664978027f, 945.41998291f, 1.0f); @@ -21,18 +21,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { float4 const x_39 = v; float4 const x_40 = res; if ((distance(x_39, x_40) < 0.01f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.hlsl index 791abae0b7..7393f8534e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.hlsl @@ -33,11 +33,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.msl index 051b40ed0c..0b085d79da 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.msl @@ -7,37 +7,43 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { bool x_36 = false; bool x_37_phi = false; int const x_29 = x_6.three; bool const x_30 = (x_29 > 1); x_37_phi = x_30; if (x_30) { - float const x_34 = (*(tint_symbol_5)).y; + float const x_34 = (*(tint_symbol_3)).y; x_36 = !((x_34 < -5.0f)); x_37_phi = x_36; } bool const x_37 = x_37_phi; if (x_37) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.hlsl index 791abae0b7..7393f8534e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.hlsl @@ -33,11 +33,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.msl index 051b40ed0c..0b085d79da 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.msl @@ -7,37 +7,43 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { bool x_36 = false; bool x_37_phi = false; int const x_29 = x_6.three; bool const x_30 = (x_29 > 1); x_37_phi = x_30; if (x_30) { - float const x_34 = (*(tint_symbol_5)).y; + float const x_34 = (*(tint_symbol_3)).y; x_36 = !((x_34 < -5.0f)); x_37_phi = x_36; } bool const x_37 = x_37_phi; if (x_37) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.hlsl index cc1c58abab..4b3a28e1ee 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.hlsl @@ -30,9 +30,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.msl index 1905aabf14..3268ea1022 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.msl @@ -18,27 +18,33 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_22 = x_5.x_GLF_uniform_int_values.arr[0].el; if (((1 >> as_type(x_22)) > 0)) { int const x_29 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_32 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_35 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_38 = x_5.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_29), float(x_32), float(x_35), float(x_38)); + *(tint_symbol_3) = float4(float(x_29), float(x_32), float(x_35), float(x_38)); } else { int const x_42 = x_5.x_GLF_uniform_int_values.arr[0].el; float const x_43 = float(x_42); - *(tint_symbol_4) = float4(x_43, x_43, x_43, x_43); + *(tint_symbol_3) = float4(x_43, x_43, x_43, x_43); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.hlsl index cc1c58abab..4b3a28e1ee 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.hlsl @@ -30,9 +30,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.msl index 1905aabf14..3268ea1022 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.msl @@ -18,27 +18,33 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int const x_22 = x_5.x_GLF_uniform_int_values.arr[0].el; if (((1 >> as_type(x_22)) > 0)) { int const x_29 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_32 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_35 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_38 = x_5.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_29), float(x_32), float(x_35), float(x_38)); + *(tint_symbol_3) = float4(float(x_29), float(x_32), float(x_35), float(x_38)); } else { int const x_42 = x_5.x_GLF_uniform_int_values.arr[0].el; float const x_43 = float(x_42); - *(tint_symbol_4) = float4(x_43, x_43, x_43, x_43); + *(tint_symbol_3) = float4(x_43, x_43, x_43, x_43); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.hlsl index 30526ab799..4722a0c0be 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.hlsl @@ -28,9 +28,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.msl index 97f9005b2b..2f5f44500c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { bool x_31 = false; bool x_32_phi = false; bool const x_26 = (sign(cosh(709.0f)) == 1.0f); @@ -23,18 +23,24 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } bool const x_32 = x_32_phi; if (x_32) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.hlsl index 30526ab799..4722a0c0be 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.hlsl @@ -28,9 +28,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.msl index 97f9005b2b..2f5f44500c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { bool x_31 = false; bool x_32_phi = false; bool const x_26 = (sign(cosh(709.0f)) == 1.0f); @@ -23,18 +23,24 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } bool const x_32 = x_32_phi; if (x_32) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.hlsl index 25c78f5cfc..8eb85596a1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.hlsl @@ -43,11 +43,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.msl index b9e944931d..58e6224b36 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.msl @@ -7,15 +7,15 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float f = 0.0f; bool x_49 = false; bool x_50_phi = false; - float const x_31 = (*(tint_symbol_5)).x; + float const x_31 = (*(tint_symbol_3)).x; f = x_31; float const x_32 = f; f = (x_32 + NAN); @@ -39,20 +39,26 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } float const x_53 = f; if ((x_53 == 0.0f)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.hlsl index 1c644c9263..7731160277 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.hlsl @@ -43,11 +43,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.msl index 6940a257ed..c93b522f52 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.msl @@ -7,15 +7,15 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float f = 0.0f; bool x_49 = false; bool x_50_phi = false; - float const x_31 = (*(tint_symbol_5)).x; + float const x_31 = (*(tint_symbol_3)).x; f = x_31; float const x_32 = f; f = (x_32 + -INFINITY); @@ -39,20 +39,26 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } float const x_53 = f; if ((x_53 == 0.0f)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.hlsl index 96a4bf3cee..7eb174d66f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.hlsl @@ -73,9 +73,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.msl index 47967f74b3..6be68eaba0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.msl @@ -50,7 +50,7 @@ int f1_vf2_(constant buf0& x_7, constant buf1& x_9, thread float2* const v1) { return x_106; } -void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_3) { float2x2 m1 = float2x2(0.0f); float2x2 m2 = float2x2(0.0f); float2 v1_1 = 0.0f; @@ -78,20 +78,26 @@ void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_sy float const x_77 = x_7.x_GLF_uniform_float_values.arr[1].el; float const x_79 = x_7.x_GLF_uniform_float_values.arr[1].el; float const x_81 = x_7.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_75, x_77, x_79, x_81); + *(tint_symbol_3) = float4(x_75, x_77, x_79, x_81); } else { int const x_84 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_85 = float(x_84); - *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85); + *(tint_symbol_3) = float4(x_85, x_85, x_85, x_85); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_7, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.hlsl index 96a4bf3cee..7eb174d66f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.hlsl @@ -73,9 +73,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.msl index 47967f74b3..6be68eaba0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.msl @@ -50,7 +50,7 @@ int f1_vf2_(constant buf0& x_7, constant buf1& x_9, thread float2* const v1) { return x_106; } -void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_3) { float2x2 m1 = float2x2(0.0f); float2x2 m2 = float2x2(0.0f); float2 v1_1 = 0.0f; @@ -78,20 +78,26 @@ void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_sy float const x_77 = x_7.x_GLF_uniform_float_values.arr[1].el; float const x_79 = x_7.x_GLF_uniform_float_values.arr[1].el; float const x_81 = x_7.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_75, x_77, x_79, x_81); + *(tint_symbol_3) = float4(x_75, x_77, x_79, x_81); } else { int const x_84 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_85 = float(x_84); - *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85); + *(tint_symbol_3) = float4(x_85, x_85, x_85, x_85); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_4) { + main_1(x_7, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.hlsl index ca61b5224d..b0682f9795 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.hlsl @@ -42,9 +42,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.msl index d1fa98fa37..46ab0ae5e4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.msl @@ -11,48 +11,54 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { int a = 0; - *(tint_symbol_4) = 0; + *(tint_symbol_3) = 0; while (true) { - int const x_8 = *(tint_symbol_4); + int const x_8 = *(tint_symbol_3); float const x_46 = x_6.injectionSwitch.x; if ((x_8 < int((x_46 + 2.0f)))) { } else { break; } - int const x_9 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_9) + as_type(1))); + int const x_9 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_9) + as_type(1))); } - int const x_11 = *(tint_symbol_4); + int const x_11 = *(tint_symbol_3); a = x_11; while (true) { - int const x_12 = *(tint_symbol_4); + int const x_12 = *(tint_symbol_3); float const x_56 = x_6.injectionSwitch.y; if ((x_12 < int(x_56))) { } else { break; } - int const x_13 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_13) + as_type(1))); + int const x_13 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_13) + as_type(1))); } int const x_15 = a; a = x_15; int const x_16 = a; if ((x_16 == 2)) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_6, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.hlsl index ca61b5224d..b0682f9795 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.hlsl @@ -42,9 +42,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.msl index d1fa98fa37..46ab0ae5e4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.msl @@ -11,48 +11,54 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) { int a = 0; - *(tint_symbol_4) = 0; + *(tint_symbol_3) = 0; while (true) { - int const x_8 = *(tint_symbol_4); + int const x_8 = *(tint_symbol_3); float const x_46 = x_6.injectionSwitch.x; if ((x_8 < int((x_46 + 2.0f)))) { } else { break; } - int const x_9 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_9) + as_type(1))); + int const x_9 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_9) + as_type(1))); } - int const x_11 = *(tint_symbol_4); + int const x_11 = *(tint_symbol_3); a = x_11; while (true) { - int const x_12 = *(tint_symbol_4); + int const x_12 = *(tint_symbol_3); float const x_56 = x_6.injectionSwitch.y; if ((x_12 < int(x_56))) { } else { break; } - int const x_13 = *(tint_symbol_4); - *(tint_symbol_4) = as_type((as_type(x_13) + as_type(1))); + int const x_13 = *(tint_symbol_3); + *(tint_symbol_3) = as_type((as_type(x_13) + as_type(1))); } int const x_15 = a; a = x_15; int const x_16 = a; if ((x_16 == 2)) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread int tint_symbol_6 = 0; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_6, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread int tint_symbol_7 = 0; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.hlsl index 0c6ec66bb0..1b89527157 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.hlsl @@ -55,9 +55,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.msl index 0439234349..f019220a4a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) { float2 v1 = 0.0f; int2 v2 = 0; float2 v3 = 0.0f; @@ -43,7 +43,7 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int2 const x_50 = v2; v3 = ldexp(x_49, x_50); float const x_53 = v3.y; - *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53); + *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53); float const x_56 = v3.x; float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el; bool const x_59 = (x_56 > x_58); @@ -60,20 +60,26 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_75 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_78 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_81 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); + *(tint_symbol_3) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); } else { int const x_85 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_86 = float(x_85); - *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86); + *(tint_symbol_3) = float4(x_86, x_86, x_86, x_86); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.hlsl index 0c6ec66bb0..1b89527157 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.hlsl @@ -55,9 +55,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.msl index 0439234349..f019220a4a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) { float2 v1 = 0.0f; int2 v2 = 0; float2 v3 = 0.0f; @@ -43,7 +43,7 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int2 const x_50 = v2; v3 = ldexp(x_49, x_50); float const x_53 = v3.y; - *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53); + *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53); float const x_56 = v3.x; float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el; bool const x_59 = (x_56 > x_58); @@ -60,20 +60,26 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_75 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_78 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_81 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); + *(tint_symbol_3) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); } else { int const x_85 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_86 = float(x_85); - *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86); + *(tint_symbol_3) = float4(x_86, x_86, x_86, x_86); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.hlsl index 47c3b720c2..85ee4ed88c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.hlsl @@ -63,9 +63,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.msl index a9726f71e4..94aea4f6da 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.msl @@ -21,9 +21,9 @@ float4 func_(constant buf0& x_6) { return float4(0.0f, 0.0f, 0.0f, 0.0f); } -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); i = 0; while (true) { int const x_33 = i; @@ -36,14 +36,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { switch(x_38) { case 1: { float4 const x_43 = func_(x_6); - *(tint_symbol_4) = x_43; + *(tint_symbol_3) = x_43; /* fallthrough */ } default: { /* fallthrough */ } case 0: { - (*(tint_symbol_4)).y = 0.0f; + (*(tint_symbol_3)).y = 0.0f; break; } } @@ -55,11 +55,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.hlsl index 47c3b720c2..85ee4ed88c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.hlsl @@ -63,9 +63,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.msl index a9726f71e4..94aea4f6da 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.msl @@ -21,9 +21,9 @@ float4 func_(constant buf0& x_6) { return float4(0.0f, 0.0f, 0.0f, 0.0f); } -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); i = 0; while (true) { int const x_33 = i; @@ -36,14 +36,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { switch(x_38) { case 1: { float4 const x_43 = func_(x_6); - *(tint_symbol_4) = x_43; + *(tint_symbol_3) = x_43; /* fallthrough */ } default: { /* fallthrough */ } case 0: { - (*(tint_symbol_4)).y = 0.0f; + (*(tint_symbol_3)).y = 0.0f; break; } } @@ -55,11 +55,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.hlsl index 37bf795d15..56c09e083a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.msl index 57eb0c01e4..c006b50b8f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float2 v1 = 0.0f; float2 v2 = 0.0f; v1 = float2(1.0f, -1.0f); @@ -18,15 +18,21 @@ void main_1(thread float4* const tint_symbol_4) { float const x_29 = v2.y; float const x_31 = v2.y; float const x_33 = v2.x; - *(tint_symbol_4) = float4(x_27, x_29, x_31, x_33); + *(tint_symbol_3) = float4(x_27, x_29, x_31, x_33); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.hlsl index 37bf795d15..56c09e083a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.msl index 57eb0c01e4..c006b50b8f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float2 v1 = 0.0f; float2 v2 = 0.0f; v1 = float2(1.0f, -1.0f); @@ -18,15 +18,21 @@ void main_1(thread float4* const tint_symbol_4) { float const x_29 = v2.y; float const x_31 = v2.y; float const x_33 = v2.x; - *(tint_symbol_4) = float4(x_27, x_29, x_31, x_33); + *(tint_symbol_3) = float4(x_27, x_29, x_31, x_33); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.spvasm.expected.msl index 0e2f8aa739..9c92bd8af4 100755 --- a/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.spvasm.expected.msl @@ -40,7 +40,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constant buf0& x_15, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constant buf0& x_15, thread float4* const tint_symbol_5) { S obj = {}; float a = 0.0f; float2 x_49 = 0.0f; @@ -48,9 +48,9 @@ void main_1(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constan float const x_51 = x_7.x_GLF_uniform_float_values.arr[3].el; float const x_53 = x_7.x_GLF_uniform_float_values.arr[2].el; float const x_55 = x_7.x_GLF_uniform_float_values.arr[4].el; - tint_array_wrapper const tint_symbol_3 = {.arr={x_51, x_53, x_55}}; - S const tint_symbol_4 = {.numbers=tint_symbol_3}; - obj = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={x_51, x_53, x_55}}; + S const tint_symbol_3 = {.numbers=tint_symbol_2}; + obj = tint_symbol_3; float const x_59 = x_9.zeroVec.x; float const x_62 = x_7.x_GLF_uniform_float_values.arr[0].el; obj.numbers.arr[int(x_59)] = x_62; @@ -78,20 +78,26 @@ void main_1(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constan int const x_100 = x_15.x_GLF_uniform_int_values.arr[1].el; int const x_103 = x_15.x_GLF_uniform_int_values.arr[1].el; int const x_106 = x_15.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_97), float(x_100), float(x_103), float(x_106)); + *(tint_symbol_5) = float4(float(x_97), float(x_100), float(x_103), float(x_106)); } else { int const x_110 = x_15.x_GLF_uniform_int_values.arr[1].el; float const x_111 = float(x_110); - *(tint_symbol_6) = float4(x_111, x_111, x_111, x_111); + *(tint_symbol_5) = float4(x_111, x_111, x_111, x_111); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf2& x_9 [[buffer(2)]], constant buf3& x_12 [[buffer(3)]], constant buf0& x_15 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - main_1(x_7, x_9, x_12, x_15, &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constant buf0& x_15, thread float4* const tint_symbol_6) { + main_1(x_7, x_9, x_12, x_15, tint_symbol_6); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf2& x_9 [[buffer(2)]], constant buf3& x_12 [[buffer(3)]], constant buf0& x_15 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, x_12, x_15, &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl.expected.msl index 0e2f8aa739..9c92bd8af4 100755 --- a/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl.expected.msl @@ -40,7 +40,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constant buf0& x_15, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constant buf0& x_15, thread float4* const tint_symbol_5) { S obj = {}; float a = 0.0f; float2 x_49 = 0.0f; @@ -48,9 +48,9 @@ void main_1(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constan float const x_51 = x_7.x_GLF_uniform_float_values.arr[3].el; float const x_53 = x_7.x_GLF_uniform_float_values.arr[2].el; float const x_55 = x_7.x_GLF_uniform_float_values.arr[4].el; - tint_array_wrapper const tint_symbol_3 = {.arr={x_51, x_53, x_55}}; - S const tint_symbol_4 = {.numbers=tint_symbol_3}; - obj = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={x_51, x_53, x_55}}; + S const tint_symbol_3 = {.numbers=tint_symbol_2}; + obj = tint_symbol_3; float const x_59 = x_9.zeroVec.x; float const x_62 = x_7.x_GLF_uniform_float_values.arr[0].el; obj.numbers.arr[int(x_59)] = x_62; @@ -78,20 +78,26 @@ void main_1(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constan int const x_100 = x_15.x_GLF_uniform_int_values.arr[1].el; int const x_103 = x_15.x_GLF_uniform_int_values.arr[1].el; int const x_106 = x_15.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_97), float(x_100), float(x_103), float(x_106)); + *(tint_symbol_5) = float4(float(x_97), float(x_100), float(x_103), float(x_106)); } else { int const x_110 = x_15.x_GLF_uniform_int_values.arr[1].el; float const x_111 = float(x_110); - *(tint_symbol_6) = float4(x_111, x_111, x_111, x_111); + *(tint_symbol_5) = float4(x_111, x_111, x_111, x_111); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf2& x_9 [[buffer(2)]], constant buf3& x_12 [[buffer(3)]], constant buf0& x_15 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - main_1(x_7, x_9, x_12, x_15, &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constant buf0& x_15, thread float4* const tint_symbol_6) { + main_1(x_7, x_9, x_12, x_15, tint_symbol_6); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf2& x_9 [[buffer(2)]], constant buf3& x_12 [[buffer(3)]], constant buf0& x_15 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, x_12, x_15, &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.hlsl index 3d8d1c1622..16a9fa4b11 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.hlsl @@ -43,9 +43,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.msl index 16e16b0712..fa05b2ee66 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) { float f = 0.0f; float const x_37 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_39 = x_8.resolution.x; @@ -46,20 +46,26 @@ void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread int const x_62 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_65 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_68 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_59), float(x_62), float(x_65), float(x_68)); + *(tint_symbol_3) = float4(float(x_59), float(x_62), float(x_65), float(x_68)); } else { int const x_72 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_73 = float(x_72); - *(tint_symbol_4) = float4(x_73, x_73, x_73, x_73); + *(tint_symbol_3) = float4(x_73, x_73, x_73, x_73); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.hlsl index 3d8d1c1622..16a9fa4b11 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.hlsl @@ -43,9 +43,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.msl index 16e16b0712..fa05b2ee66 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) { float f = 0.0f; float const x_37 = x_6.x_GLF_uniform_float_values.arr[1].el; float const x_39 = x_8.resolution.x; @@ -46,20 +46,26 @@ void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread int const x_62 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_65 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_68 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_59), float(x_62), float(x_65), float(x_68)); + *(tint_symbol_3) = float4(float(x_59), float(x_62), float(x_65), float(x_68)); } else { int const x_72 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_73 = float(x_72); - *(tint_symbol_4) = float4(x_73, x_73, x_73, x_73); + *(tint_symbol_3) = float4(x_73, x_73, x_73, x_73); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.hlsl index 8dae79cb12..3a56778af5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.hlsl @@ -78,9 +78,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.msl index 5d1a17bb04..9ba72509bd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_3) { float4 color = 0.0f; int i = 0; int j = 0; @@ -98,15 +98,21 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s } } float4 const x_89 = color; - *(tint_symbol_4) = x_89; + *(tint_symbol_3) = x_89; return; } +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4) { + main_1(x_7, x_11, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, x_11, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_7, x_11, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.hlsl index 8dae79cb12..3a56778af5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.hlsl @@ -78,9 +78,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.msl index 5d1a17bb04..9ba72509bd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_3) { float4 color = 0.0f; int i = 0; int j = 0; @@ -98,15 +98,21 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s } } float4 const x_89 = color; - *(tint_symbol_4) = x_89; + *(tint_symbol_3) = x_89; return; } +main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4) { + main_1(x_7, x_11, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, x_11, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_7, x_11, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl index 3f6b2dca31..033e7cb172 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl @@ -31,16 +31,16 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread float4* const tint_symbol_3) { int i = 0; float const x_38 = x_5.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_38, x_38, x_38, x_38); + *(tint_symbol_3) = float4(x_38, x_38, x_38, x_38); float const x_41 = x_7.zero; float const x_43 = x_5.x_GLF_uniform_float_values.arr[0].el; if ((x_41 > x_43)) { while (true) { float const x_53 = x_5.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53); + *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53); { if (true) { } else { @@ -68,7 +68,7 @@ void main_1(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread float const x_75 = x_5.x_GLF_uniform_float_values.arr[0].el; float const x_77 = x_5.x_GLF_uniform_float_values.arr[0].el; float const x_79 = x_5.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_73, x_75, x_77, x_79); + *(tint_symbol_3) = float4(x_73, x_75, x_77, x_79); { int const x_16 = i; i = as_type((as_type(x_16) + as_type(1))); @@ -89,11 +89,17 @@ void main_1(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf2& x_7 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_7, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_5, x_7, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf2& x_7 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, x_7, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl index 3f6b2dca31..033e7cb172 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl @@ -31,16 +31,16 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread float4* const tint_symbol_3) { int i = 0; float const x_38 = x_5.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_38, x_38, x_38, x_38); + *(tint_symbol_3) = float4(x_38, x_38, x_38, x_38); float const x_41 = x_7.zero; float const x_43 = x_5.x_GLF_uniform_float_values.arr[0].el; if ((x_41 > x_43)) { while (true) { float const x_53 = x_5.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53); + *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53); { if (true) { } else { @@ -68,7 +68,7 @@ void main_1(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread float const x_75 = x_5.x_GLF_uniform_float_values.arr[0].el; float const x_77 = x_5.x_GLF_uniform_float_values.arr[0].el; float const x_79 = x_5.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_4) = float4(x_73, x_75, x_77, x_79); + *(tint_symbol_3) = float4(x_73, x_75, x_77, x_79); { int const x_16 = i; i = as_type((as_type(x_16) + as_type(1))); @@ -89,11 +89,17 @@ void main_1(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf2& x_7 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, x_7, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_5, x_7, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf2& x_7 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, x_7, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.hlsl index d7bfdccfff..7854e847ad 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.hlsl @@ -29,11 +29,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.msl index d8ea250022..59beca60cd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.msl @@ -7,14 +7,14 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float a = 0.0f; float b = 0.0f; - float const x_33 = (*(tint_symbol_5)).x; + float const x_33 = (*(tint_symbol_3)).x; a = dfdx(cos(x_33)); float const x_37 = x_8.two; float const x_38 = a; @@ -22,20 +22,26 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float float const x_40 = b; float const x_42 = b; if (((x_40 >= 1.899999976f) & (x_42 <= 2.099999905f))) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.hlsl index f5d4020ce1..65d213de83 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.hlsl @@ -33,11 +33,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.msl index 31f4571f93..9498210ef1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.msl @@ -7,14 +7,14 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float a = 0.0f; float b = 0.0f; - float const x_33 = (*(tint_symbol_5)).x; + float const x_33 = (*(tint_symbol_3)).x; a = dfdx(cos(x_33)); float const x_37 = x_8.two; float const x_38 = a; @@ -22,20 +22,26 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float float const x_40 = b; float const x_42 = b; if (((x_40 >= 1.899999976f) && (x_42 <= 2.099999905f))) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.hlsl index afea7c2e6c..01e8447be0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.hlsl @@ -145,9 +145,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.msl index a342ca8a32..d75527820f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.msl @@ -42,7 +42,7 @@ void func_struct_S_i11_(constant buf1& x_8, constant buf0& x_10, thread S* const return; } -void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_3) { int i = 0; tint_array_wrapper_1 arr = {}; int i_1 = 0; @@ -149,20 +149,26 @@ void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_s int const x_155 = x_10.x_GLF_uniform_int_values.arr[2].el; int const x_158 = x_10.x_GLF_uniform_int_values.arr[2].el; int const x_161 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_152), float(x_155), float(x_158), float(x_161)); + *(tint_symbol_3) = float4(float(x_152), float(x_155), float(x_158), float(x_161)); } else { int const x_165 = x_10.x_GLF_uniform_int_values.arr[2].el; float const x_166 = float(x_165); - *(tint_symbol_4) = float4(x_166, x_166, x_166, x_166); + *(tint_symbol_3) = float4(x_166, x_166, x_166, x_166); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_10, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_10, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.hlsl index afea7c2e6c..01e8447be0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.hlsl @@ -145,9 +145,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.msl index a342ca8a32..d75527820f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.msl @@ -42,7 +42,7 @@ void func_struct_S_i11_(constant buf1& x_8, constant buf0& x_10, thread S* const return; } -void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_3) { int i = 0; tint_array_wrapper_1 arr = {}; int i_1 = 0; @@ -149,20 +149,26 @@ void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_s int const x_155 = x_10.x_GLF_uniform_int_values.arr[2].el; int const x_158 = x_10.x_GLF_uniform_int_values.arr[2].el; int const x_161 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_152), float(x_155), float(x_158), float(x_161)); + *(tint_symbol_3) = float4(float(x_152), float(x_155), float(x_158), float(x_161)); } else { int const x_165 = x_10.x_GLF_uniform_int_values.arr[2].el; float const x_166 = float(x_165); - *(tint_symbol_4) = float4(x_166, x_166, x_166, x_166); + *(tint_symbol_3) = float4(x_166, x_166, x_166, x_166); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_10, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_10, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.hlsl index 1012c9adce..76252059eb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.msl index f8856db5af..c3b0818862 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float2x2 m = float2x2(0.0f); m = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)); float2x2 const x_26 = m; @@ -18,18 +18,24 @@ void main_1(thread float4* const tint_symbol_4) { float2x2 const x_32 = m; float2x2 const x_34 = transpose((x_31 * x_32)); if ((all((x_30[0u] == x_34[0u])) & all((x_30[1u] == x_34[1u])))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.hlsl index 256b8ea3fd..d587bd2483 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.hlsl @@ -24,9 +24,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.msl index 452c4cf577..604e881f76 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float2x2 m = float2x2(0.0f); m = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)); float2x2 const x_26 = m; @@ -18,18 +18,24 @@ void main_1(thread float4* const tint_symbol_4) { float2x2 const x_32 = m; float2x2 const x_34 = transpose((x_31 * x_32)); if ((all((x_30[0u] == x_34[0u])) && all((x_30[1u] == x_34[1u])))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.hlsl index 1f17f3de38..7ab118a52e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.hlsl @@ -41,11 +41,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.msl index 268f0ccb80..bebdfd6af2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.msl @@ -24,13 +24,13 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float f = 0.0f; - float const x_35 = (*(tint_symbol_5)).y; + float const x_35 = (*(tint_symbol_3)).y; float const x_37 = x_7.x_GLF_uniform_float_values.arr[1].el; f = fract(trunc(select(1.0f, 0.100000001f, (x_35 < x_37)))); float const x_42 = f; @@ -40,22 +40,28 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy int const x_53 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_56 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_59 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_50), float(x_53), float(x_56), float(x_59)); + *(tint_symbol_4) = float4(float(x_50), float(x_53), float(x_56), float(x_59)); } else { int const x_63 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_64 = float(x_63); - *(tint_symbol_6) = float4(x_64, x_64, x_64, x_64); + *(tint_symbol_4) = float4(x_64, x_64, x_64, x_64); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_9, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_9, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.hlsl index 1f17f3de38..7ab118a52e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.hlsl @@ -41,11 +41,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.msl index 268f0ccb80..bebdfd6af2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.msl @@ -24,13 +24,13 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float f = 0.0f; - float const x_35 = (*(tint_symbol_5)).y; + float const x_35 = (*(tint_symbol_3)).y; float const x_37 = x_7.x_GLF_uniform_float_values.arr[1].el; f = fract(trunc(select(1.0f, 0.100000001f, (x_35 < x_37)))); float const x_42 = f; @@ -40,22 +40,28 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy int const x_53 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_56 = x_9.x_GLF_uniform_int_values.arr[1].el; int const x_59 = x_9.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_50), float(x_53), float(x_56), float(x_59)); + *(tint_symbol_4) = float4(float(x_50), float(x_53), float(x_56), float(x_59)); } else { int const x_63 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_64 = float(x_63); - *(tint_symbol_6) = float4(x_64, x_64, x_64, x_64); + *(tint_symbol_4) = float4(x_64, x_64, x_64, x_64); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, x_9, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, x_9, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.hlsl index 325bac825a..30187e0099 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.hlsl @@ -22,11 +22,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } float4 func_() { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.msl index cf5d8b8390..1bc94edb5e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.msl @@ -11,24 +11,30 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float4 x_24 = 0.0f; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); int const x_26 = x_6.one; if ((x_26 == 0)) { return; } x_24 = float4(1.0f, 0.0f, 0.0f, 1.0f); - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } float4 func_() { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.hlsl index 325bac825a..30187e0099 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.hlsl @@ -22,11 +22,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } float4 func_() { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.msl index cf5d8b8390..1bc94edb5e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.msl @@ -11,24 +11,30 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float4 x_24 = 0.0f; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); int const x_26 = x_6.one; if ((x_26 == 0)) { return; } x_24 = float4(1.0f, 0.0f, 0.0f, 1.0f); - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } float4 func_() { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.hlsl index 3fb8095554..0670ecb5e3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.hlsl @@ -49,9 +49,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.msl index ec52a786c9..b75ca5d83d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float2x2 m24 = float2x2(0.0f); float a = 0.0f; float2 v2 = 0.0f; @@ -41,23 +41,29 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el; float2 const x_59 = v3; float const x_61 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_58, x_59.x, x_59.y, x_61); + *(tint_symbol_3) = float4(x_58, x_59.x, x_59.y, x_61); float const x_66 = x_8.v1.y; float const x_68 = x_6.x_GLF_uniform_float_values.arr[0].el; if ((x_66 == x_68)) { - float4 const x_73 = *(tint_symbol_4); - *(tint_symbol_4) = float4(x_73.x, float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).y, x_73.w); + float4 const x_73 = *(tint_symbol_3); + *(tint_symbol_3) = float4(x_73.x, float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).y, x_73.w); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.hlsl index 8705db8123..5513092b49 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.hlsl @@ -47,9 +47,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.msl index 0ca872c000..0f4d9f74bb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.msl @@ -21,7 +21,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float2x2 m24 = float2x2(0.0f); float a = 0.0f; float2 v2 = 0.0f; @@ -40,23 +40,29 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el; float2 const x_59 = v3; float const x_61 = x_6.x_GLF_uniform_float_values.arr[0].el; - *(tint_symbol_4) = float4(x_58, x_59.x, x_59.y, x_61); + *(tint_symbol_3) = float4(x_58, x_59.x, x_59.y, x_61); float const x_66 = x_8.v1.y; float const x_68 = x_6.x_GLF_uniform_float_values.arr[0].el; if ((x_66 == x_68)) { - float4 const x_73 = *(tint_symbol_4); - *(tint_symbol_4) = float4(x_73.x, float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).y, x_73.w); + float4 const x_73 = *(tint_symbol_3); + *(tint_symbol_3) = float4(x_73.x, float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).y, x_73.w); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.hlsl index ac091bde99..7b2449de47 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.hlsl @@ -81,9 +81,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.msl index 94156297e4..3bfed4f2b6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.msl @@ -35,7 +35,7 @@ void func_struct_S_i11_i1_(constant buf0& x_9, thread S* const s, thread int* co return; } -void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) { int i = 0; tint_array_wrapper_1 arr = {}; int index = 0; @@ -86,20 +86,26 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { int const x_88 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_91 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_94 = x_9.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_85), float(x_88), float(x_91), float(x_94)); + *(tint_symbol_3) = float4(float(x_85), float(x_88), float(x_91), float(x_94)); } else { int const x_98 = x_9.x_GLF_uniform_int_values.arr[0].el; float const x_99 = float(x_98); - *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99); + *(tint_symbol_3) = float4(x_99, x_99, x_99, x_99); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.hlsl index ac091bde99..7b2449de47 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.hlsl @@ -81,9 +81,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.msl index 94156297e4..3bfed4f2b6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.msl @@ -35,7 +35,7 @@ void func_struct_S_i11_i1_(constant buf0& x_9, thread S* const s, thread int* co return; } -void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) { int i = 0; tint_array_wrapper_1 arr = {}; int index = 0; @@ -86,20 +86,26 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { int const x_88 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_91 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_94 = x_9.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_85), float(x_88), float(x_91), float(x_94)); + *(tint_symbol_3) = float4(float(x_85), float(x_88), float(x_91), float(x_94)); } else { int const x_98 = x_9.x_GLF_uniform_int_values.arr[0].el; float const x_99 = float(x_98); - *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99); + *(tint_symbol_3) = float4(x_99, x_99, x_99, x_99); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.hlsl index 3a0af57b26..56b40df9c5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.hlsl @@ -57,9 +57,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.msl index 1f2929cce5..8dc6a5200f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.msl @@ -38,7 +38,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, constant buf2& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, constant buf2& x_10, thread float4* const tint_symbol_3) { float4 v = 0.0f; uint const x_39 = x_6.x_GLF_uniform_uint_values.arr[0].el; uint const x_41 = x_6.x_GLF_uniform_uint_values.arr[0].el; @@ -55,20 +55,26 @@ void main_1(constant buf0& x_6, constant buf1& x_8, constant buf2& x_10, thread int const x_72 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_75 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_78 = x_8.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_69), float(x_72), float(x_75), float(x_78)); + *(tint_symbol_3) = float4(float(x_69), float(x_72), float(x_75), float(x_78)); } else { int const x_82 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_83 = float(x_82); - *(tint_symbol_4) = float4(x_83, x_83, x_83, x_83); + *(tint_symbol_3) = float4(x_83, x_83, x_83, x_83); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, constant buf2& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.hlsl index 3a0af57b26..56b40df9c5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.hlsl @@ -57,9 +57,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.msl index 1f2929cce5..8dc6a5200f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.msl @@ -38,7 +38,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, constant buf2& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, constant buf2& x_10, thread float4* const tint_symbol_3) { float4 v = 0.0f; uint const x_39 = x_6.x_GLF_uniform_uint_values.arr[0].el; uint const x_41 = x_6.x_GLF_uniform_uint_values.arr[0].el; @@ -55,20 +55,26 @@ void main_1(constant buf0& x_6, constant buf1& x_8, constant buf2& x_10, thread int const x_72 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_75 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_78 = x_8.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_69), float(x_72), float(x_75), float(x_78)); + *(tint_symbol_3) = float4(float(x_69), float(x_72), float(x_75), float(x_78)); } else { int const x_82 = x_8.x_GLF_uniform_int_values.arr[0].el; float const x_83 = float(x_82); - *(tint_symbol_4) = float4(x_83, x_83, x_83, x_83); + *(tint_symbol_3) = float4(x_83, x_83, x_83, x_83); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, constant buf2& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl index 0aa7f65119..340627c8b8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { float4x3 m43 = float4x3(0.0f); tint_array_wrapper sums = {}; int i = 0; @@ -44,8 +44,8 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_60 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_62 = x_6.x_GLF_uniform_float_values.arr[0].el; - tint_array_wrapper const tint_symbol_3 = {.arr={{.el=x_58}, {.el=x_60}, {.el=x_62}}}; - sums = tint_symbol_3; + tint_array_wrapper const tint_symbol_2 = {.arr={{.el=x_58}, {.el=x_60}, {.el=x_62}}}; + sums = tint_symbol_2; int const x_65 = x_8.x_GLF_uniform_int_values.arr[0].el; i = x_65; x_67_phi = x_65; @@ -86,20 +86,26 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_120 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_123 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_126 = x_8.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_117), float(x_120), float(x_123), float(x_126)); + *(tint_symbol_4) = float4(float(x_117), float(x_120), float(x_123), float(x_126)); } else { int const x_130 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_131 = float(x_130); - *(tint_symbol_5) = float4(x_131, x_131, x_131, x_131); + *(tint_symbol_4) = float4(x_131, x_131, x_131, x_131); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) { + main_1(x_6, x_8, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl index 0aa7f65119..340627c8b8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { float4x3 m43 = float4x3(0.0f); tint_array_wrapper sums = {}; int i = 0; @@ -44,8 +44,8 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_60 = x_6.x_GLF_uniform_float_values.arr[0].el; float const x_62 = x_6.x_GLF_uniform_float_values.arr[0].el; - tint_array_wrapper const tint_symbol_3 = {.arr={{.el=x_58}, {.el=x_60}, {.el=x_62}}}; - sums = tint_symbol_3; + tint_array_wrapper const tint_symbol_2 = {.arr={{.el=x_58}, {.el=x_60}, {.el=x_62}}}; + sums = tint_symbol_2; int const x_65 = x_8.x_GLF_uniform_int_values.arr[0].el; i = x_65; x_67_phi = x_65; @@ -86,20 +86,26 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_120 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_123 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_126 = x_8.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_5) = float4(float(x_117), float(x_120), float(x_123), float(x_126)); + *(tint_symbol_4) = float4(float(x_117), float(x_120), float(x_123), float(x_126)); } else { int const x_130 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_131 = float(x_130); - *(tint_symbol_5) = float4(x_131, x_131, x_131, x_131); + *(tint_symbol_4) = float4(x_131, x_131, x_131, x_131); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) { + main_1(x_6, x_8, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl index d35b7e28fe..c1027b94ad 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) { float4x4 m0 = float4x4(0.0f); int c = 0; float4x4 m1 = float4x4(0.0f); @@ -84,20 +84,26 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s int const x_159 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_162 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_165 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_156), float(x_159), float(x_162), float(x_165)); + *(tint_symbol_3) = float4(float(x_156), float(x_159), float(x_162), float(x_165)); } else { int const x_169 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_170 = float(x_169); - *(tint_symbol_4) = float4(x_170, x_170, x_170, x_170); + *(tint_symbol_3) = float4(x_170, x_170, x_170, x_170); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl index 690351b9d1..06467ef0b0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) { float4x4 m0 = float4x4(0.0f); int c = 0; float4x4 m1 = float4x4(0.0f); @@ -84,20 +84,26 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s int const x_159 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_162 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_165 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_156), float(x_159), float(x_162), float(x_165)); + *(tint_symbol_3) = float4(float(x_156), float(x_159), float(x_162), float(x_165)); } else { int const x_169 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_170 = float(x_169); - *(tint_symbol_4) = float4(x_170, x_170, x_170, x_170); + *(tint_symbol_3) = float4(x_170, x_170, x_170, x_170); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.hlsl index 6b8df2b2a3..f30cc4597f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.msl index 4c04e10633..a8af80b7cd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; a = 0; int const x_26 = x_6.one; @@ -31,18 +31,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } int const x_31 = a; if ((x_31 == 2)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.hlsl index 6b8df2b2a3..f30cc4597f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.msl index 4c04e10633..a8af80b7cd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; a = 0; int const x_26 = x_6.one; @@ -31,18 +31,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } int const x_31 = a; if ((x_31 == 2)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.hlsl index b0be04f0a9..842d6e7d18 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.hlsl @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.msl index f471e20286..55b611b1e3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.msl @@ -26,7 +26,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; tint_array_wrapper_1 A = {}; int a = 0; @@ -54,7 +54,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { a = min(~(x_48), ~(x_53)); int const x_57 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_58 = float(x_57); - *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58); int const x_60 = a; int const x_62 = x_6.x_GLF_uniform_int_values.arr[0].el; if ((x_60 == tint_unary_minus(x_62))) { @@ -62,16 +62,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_71 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_74 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_77 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_68), float(x_71), float(x_74), float(x_77)); + *(tint_symbol_3) = float4(float(x_68), float(x_71), float(x_74), float(x_77)); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.hlsl index b0be04f0a9..842d6e7d18 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.hlsl @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.msl index f471e20286..55b611b1e3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.msl @@ -26,7 +26,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; tint_array_wrapper_1 A = {}; int a = 0; @@ -54,7 +54,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { a = min(~(x_48), ~(x_53)); int const x_57 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_58 = float(x_57); - *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); + *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58); int const x_60 = a; int const x_62 = x_6.x_GLF_uniform_int_values.arr[0].el; if ((x_60 == tint_unary_minus(x_62))) { @@ -62,16 +62,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_71 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_74 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_77 = x_6.x_GLF_uniform_int_values.arr[2].el; - *(tint_symbol_4) = float4(float(x_68), float(x_71), float(x_74), float(x_77)); + *(tint_symbol_3) = float4(float(x_68), float(x_71), float(x_74), float(x_77)); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.hlsl index ad949e0ef3..cd254df86a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.hlsl @@ -54,9 +54,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.msl index 7d21ec98f7..8da1242281 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int i = 0; int const x_27 = x_6.x_GLF_uniform_int_values.arr[2].el; @@ -55,20 +55,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_61 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_64 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_67 = x_6.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_4) = float4(float(x_58), float(x_61), float(x_64), float(x_67)); + *(tint_symbol_3) = float4(float(x_58), float(x_61), float(x_64), float(x_67)); } else { int const x_71 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_72 = float(x_71); - *(tint_symbol_4) = float4(x_72, x_72, x_72, x_72); + *(tint_symbol_3) = float4(x_72, x_72, x_72, x_72); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.hlsl index ad949e0ef3..cd254df86a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.hlsl @@ -54,9 +54,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.msl index 7d21ec98f7..8da1242281 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int a = 0; int i = 0; int const x_27 = x_6.x_GLF_uniform_int_values.arr[2].el; @@ -55,20 +55,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_61 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_64 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_67 = x_6.x_GLF_uniform_int_values.arr[3].el; - *(tint_symbol_4) = float4(float(x_58), float(x_61), float(x_64), float(x_67)); + *(tint_symbol_3) = float4(float(x_58), float(x_61), float(x_64), float(x_67)); } else { int const x_71 = x_6.x_GLF_uniform_int_values.arr[2].el; float const x_72 = float(x_71); - *(tint_symbol_4) = float4(x_72, x_72, x_72, x_72); + *(tint_symbol_3) = float4(x_72, x_72, x_72, x_72); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.hlsl index cf1aef6979..437221f983 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.hlsl @@ -28,9 +28,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.msl index b6bcce5b3e..5d64f57e82 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int a = 0; int i = 0; a = 0; @@ -31,18 +31,24 @@ void main_1(thread float4* const tint_symbol_4) { } int const x_38 = a; if ((x_38 == -2)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.hlsl index cf1aef6979..437221f983 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.hlsl @@ -28,9 +28,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.msl index b6bcce5b3e..5d64f57e82 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int a = 0; int i = 0; a = 0; @@ -31,18 +31,24 @@ void main_1(thread float4* const tint_symbol_4) { } int const x_38 = a; if ((x_38 == -2)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.hlsl index 08b57e06fa..ae4cdca032 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.hlsl @@ -53,9 +53,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.msl index 449f564cd7..70386d4667 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int a = 0; int sum = 0; int i = 0; @@ -54,20 +54,26 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { int const x_63 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_66 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_69 = x_7.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_60), float(x_63), float(x_66), float(x_69)); + *(tint_symbol_3) = float4(float(x_60), float(x_63), float(x_66), float(x_69)); } else { int const x_73 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_74 = float(x_73); - *(tint_symbol_4) = float4(x_74, x_74, x_74, x_74); + *(tint_symbol_3) = float4(x_74, x_74, x_74, x_74); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.hlsl index 08b57e06fa..ae4cdca032 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.hlsl @@ -53,9 +53,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.msl index 449f564cd7..70386d4667 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.msl @@ -18,7 +18,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int a = 0; int sum = 0; int i = 0; @@ -54,20 +54,26 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { int const x_63 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_66 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_69 = x_7.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_60), float(x_63), float(x_66), float(x_69)); + *(tint_symbol_3) = float4(float(x_60), float(x_63), float(x_66), float(x_69)); } else { int const x_73 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_74 = float(x_73); - *(tint_symbol_4) = float4(x_74, x_74, x_74, x_74); + *(tint_symbol_3) = float4(x_74, x_74, x_74, x_74); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.hlsl index d3a37e63b6..b7ce59e7bc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.hlsl @@ -40,9 +40,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.msl index 89ab95dace..e498cd3214 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.msl @@ -38,7 +38,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf2& x_6, constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf2& x_6, constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) { float f = 0.0f; uint const x_36 = x_6.x_GLF_uniform_uint_values.arr[0].el; f = as_type(max(100u, x_36)); @@ -49,20 +49,26 @@ void main_1(constant buf2& x_6, constant buf1& x_8, constant buf0& x_10, thread int const x_50 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_53 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_56 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_47), float(x_50), float(x_53), float(x_56)); + *(tint_symbol_3) = float4(float(x_47), float(x_50), float(x_53), float(x_56)); } else { int const x_60 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_61 = float(x_60); - *(tint_symbol_4) = float4(x_61, x_61, x_61, x_61); + *(tint_symbol_3) = float4(x_61, x_61, x_61, x_61); } return; } -fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf2& x_6, constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.hlsl index d3a37e63b6..b7ce59e7bc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.hlsl @@ -40,9 +40,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.msl index 89ab95dace..e498cd3214 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.msl @@ -38,7 +38,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf2& x_6, constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { +void main_1(constant buf2& x_6, constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) { float f = 0.0f; uint const x_36 = x_6.x_GLF_uniform_uint_values.arr[0].el; f = as_type(max(100u, x_36)); @@ -49,20 +49,26 @@ void main_1(constant buf2& x_6, constant buf1& x_8, constant buf0& x_10, thread int const x_50 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_53 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_56 = x_10.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_47), float(x_50), float(x_53), float(x_56)); + *(tint_symbol_3) = float4(float(x_47), float(x_50), float(x_53), float(x_56)); } else { int const x_60 = x_10.x_GLF_uniform_int_values.arr[1].el; float const x_61 = float(x_60); - *(tint_symbol_4) = float4(x_61, x_61, x_61, x_61); + *(tint_symbol_3) = float4(x_61, x_61, x_61, x_61); } return; } -fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, x_10, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf2& x_6, constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, x_10, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.hlsl index 8b5cb0745f..37bb0b3d63 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.hlsl @@ -142,9 +142,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.msl index 0846e48eca..0bd54174ca 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.msl @@ -26,7 +26,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { tint_array_wrapper_1 ref = {}; int i = 0; tint_array_wrapper_1 data = {}; @@ -146,7 +146,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { if ((x_201 != x_204)) { int const x_209 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_210 = float(x_209); - *(tint_symbol_4) = float4(x_210, x_210, x_210, x_210); + *(tint_symbol_3) = float4(x_210, x_210, x_210, x_210); return; } { @@ -158,15 +158,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_218 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_221 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_224 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_215), float(x_218), float(x_221), float(x_224)); + *(tint_symbol_3) = float4(float(x_215), float(x_218), float(x_221), float(x_224)); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.hlsl index 8b5cb0745f..37bb0b3d63 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.hlsl @@ -142,9 +142,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.msl index 0846e48eca..0bd54174ca 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.msl @@ -26,7 +26,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { tint_array_wrapper_1 ref = {}; int i = 0; tint_array_wrapper_1 data = {}; @@ -146,7 +146,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { if ((x_201 != x_204)) { int const x_209 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_210 = float(x_209); - *(tint_symbol_4) = float4(x_210, x_210, x_210, x_210); + *(tint_symbol_3) = float4(x_210, x_210, x_210, x_210); return; } { @@ -158,15 +158,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_218 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_221 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_224 = x_6.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_215), float(x_218), float(x_221), float(x_224)); + *(tint_symbol_3) = float4(float(x_215), float(x_218), float(x_221), float(x_224)); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.hlsl index 11fb504acc..a7a240a928 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.hlsl @@ -28,9 +28,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.msl index 0c883ed02d..189151f9f1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { float4 N = 0.0f; float4 I = 0.0f; float4 Nref = 0.0f; @@ -26,18 +26,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { v = faceforward(x_46, x_47, x_48); float4 const x_50 = v; if (all((x_50 == float4(-1.0f, -2.0f, -3.0f, -4.0f)))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.hlsl index 11fb504acc..a7a240a928 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.hlsl @@ -28,9 +28,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.msl index 0c883ed02d..189151f9f1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { float4 N = 0.0f; float4 I = 0.0f; float4 Nref = 0.0f; @@ -26,18 +26,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { v = faceforward(x_46, x_47, x_48); float4 const x_50 = v; if (all((x_50 == float4(-1.0f, -2.0f, -3.0f, -4.0f)))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.hlsl index d6dd5f85b7..2f6405b939 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.hlsl @@ -29,9 +29,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.msl index 9bf6ea8839..742b628ee4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2 a = 0.0f; float2 b = 0.0f; a = float2(1.0f, 1.0f); @@ -24,18 +24,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { b = (float2(x_47, x_47) + float2(2.0f, 3.0f)); float2 const x_50 = b; if (all((x_50 == float2(3.0f, 4.0f)))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.hlsl index d6dd5f85b7..2f6405b939 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.hlsl @@ -29,9 +29,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.msl index 9bf6ea8839..742b628ee4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float2 a = 0.0f; float2 b = 0.0f; a = float2(1.0f, 1.0f); @@ -24,18 +24,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { b = (float2(x_47, x_47) + float2(2.0f, 3.0f)); float2 const x_50 = b; if (all((x_50 == float2(3.0f, 4.0f)))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.hlsl index b0f9a87a01..c06a97e7f6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.hlsl @@ -23,9 +23,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.msl index f64ba57679..bb4f4e673d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float2 a = 0.0f; float2 b = 0.0f; a = float2(1.0f, 1.0f); @@ -18,18 +18,24 @@ void main_1(thread float4* const tint_symbol_4) { b = fract(x_28); float const x_31 = b.x; if ((x_31 == 0.5f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.hlsl index b0f9a87a01..c06a97e7f6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.hlsl @@ -23,9 +23,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.msl index f64ba57679..bb4f4e673d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float2 a = 0.0f; float2 b = 0.0f; a = float2(1.0f, 1.0f); @@ -18,18 +18,24 @@ void main_1(thread float4* const tint_symbol_4) { b = fract(x_28); float const x_31 = b.x; if ((x_31 == 0.5f)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.hlsl index c513660e0d..4edd4ff29a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.msl index d1585b5e07..6eb510bbcd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.msl @@ -8,24 +8,30 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float2 v = 0.0f; v = log2(cosh(float2(1.0f, 100.0f))); float const x_27 = v.x; float const x_29 = v.y; if ((x_27 < x_29)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.hlsl index c513660e0d..4edd4ff29a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.hlsl @@ -20,9 +20,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.msl index d1585b5e07..6eb510bbcd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.msl @@ -8,24 +8,30 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float2 v = 0.0f; v = log2(cosh(float2(1.0f, 100.0f))); float const x_27 = v.x; float const x_29 = v.y; if ((x_27 < x_29)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.hlsl index e223102301..e66c0d6622 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.hlsl @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.msl index 6605a4f606..b5e6e03633 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void func_i1_(constant buf0& x_7, thread int* const x, thread float4* const tint_symbol_4) { +void func_i1_(constant buf0& x_7, thread int* const x, thread float4* const tint_symbol_3) { int const x_41 = *(x); int const x_43 = x_7.zero; if ((x_41 < x_43)) { @@ -19,18 +19,18 @@ void func_i1_(constant buf0& x_7, thread int* const x, thread float4* const tint } int const x_47 = *(x); if ((x_47 > 8)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { int i = 0; int param = 0; int x_31_phi = 0; - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); i = 0; x_31_phi = 0; while (true) { @@ -42,7 +42,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { } { param = x_31; - func_i1_(x_7, &(param), tint_symbol_5); + func_i1_(x_7, &(param), tint_symbol_4); int const x_32 = as_type((as_type(x_31) + as_type(1))); i = x_32; x_31_phi = x_32; @@ -51,11 +51,17 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_7, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) { + main_1(x_7, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.hlsl index e223102301..e66c0d6622 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.hlsl @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.msl index 6605a4f606..b5e6e03633 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void func_i1_(constant buf0& x_7, thread int* const x, thread float4* const tint_symbol_4) { +void func_i1_(constant buf0& x_7, thread int* const x, thread float4* const tint_symbol_3) { int const x_41 = *(x); int const x_43 = x_7.zero; if ((x_41 < x_43)) { @@ -19,18 +19,18 @@ void func_i1_(constant buf0& x_7, thread int* const x, thread float4* const tint } int const x_47 = *(x); if ((x_47 > 8)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { int i = 0; int param = 0; int x_31_phi = 0; - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); i = 0; x_31_phi = 0; while (true) { @@ -42,7 +42,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { } { param = x_31; - func_i1_(x_7, &(param), tint_symbol_5); + func_i1_(x_7, &(param), tint_symbol_4); int const x_32 = as_type((as_type(x_31) + as_type(1))); i = x_32; x_31_phi = x_32; @@ -51,11 +51,17 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - main_1(x_7, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) { + main_1(x_7, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_6 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.spvasm.expected.msl index 15e5fa377a..fcf1e30a2e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.spvasm.expected.msl @@ -7,18 +7,18 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_f1_(thread float* const x, thread float4* const tint_symbol_5) { +float func_f1_(thread float* const x, thread float4* const tint_symbol_3) { float const x_56 = *(x); if ((x_56 > 5.0f)) { - float const x_61 = (*(tint_symbol_5)).x; + float const x_61 = (*(tint_symbol_3)).x; if ((x_61 < 0.5f)) { discard_fragment(); } else { - float const x_67 = (*(tint_symbol_5)).y; + float const x_67 = (*(tint_symbol_3)).y; if ((x_67 < 0.5f)) { discard_fragment(); } @@ -28,7 +28,7 @@ float func_f1_(thread float* const x, thread float4* const tint_symbol_5) { return (x_71 + 1.0f); } -void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { float f = 0.0f; int i = 0; float param = 0.0f; @@ -44,7 +44,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa { int const x_45 = i; param = float(x_45); - float const x_47 = func_f1_(&(param), tint_symbol_6); + float const x_47 = func_f1_(&(param), tint_symbol_4); f = x_47; int const x_48 = i; i = as_type((as_type(x_48) + as_type(1))); @@ -52,20 +52,26 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa } float const x_50 = f; if ((x_50 == 5.0f)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_10, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_10, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.wgsl.expected.msl index 15e5fa377a..fcf1e30a2e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.wgsl.expected.msl @@ -7,18 +7,18 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_f1_(thread float* const x, thread float4* const tint_symbol_5) { +float func_f1_(thread float* const x, thread float4* const tint_symbol_3) { float const x_56 = *(x); if ((x_56 > 5.0f)) { - float const x_61 = (*(tint_symbol_5)).x; + float const x_61 = (*(tint_symbol_3)).x; if ((x_61 < 0.5f)) { discard_fragment(); } else { - float const x_67 = (*(tint_symbol_5)).y; + float const x_67 = (*(tint_symbol_3)).y; if ((x_67 < 0.5f)) { discard_fragment(); } @@ -28,7 +28,7 @@ float func_f1_(thread float* const x, thread float4* const tint_symbol_5) { return (x_71 + 1.0f); } -void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { float f = 0.0f; int i = 0; float param = 0.0f; @@ -44,7 +44,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa { int const x_45 = i; param = float(x_45); - float const x_47 = func_f1_(&(param), tint_symbol_6); + float const x_47 = func_f1_(&(param), tint_symbol_4); f = x_47; int const x_48 = i; i = as_type((as_type(x_48) + as_type(1))); @@ -52,20 +52,26 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa } float const x_50 = f; if ((x_50 == 5.0f)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_10, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_10, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl index 844f4c9864..ae37da296d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { float3x2 m32 = float3x2(0.0f); tint_array_wrapper_2 sums = {}; int x_52_phi = 0; @@ -41,8 +41,8 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy if ((x_45 == 1)) { m32[3][x_45] = x_40; } - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_40, x_40, x_40}}; - sums = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_40, x_40, x_40}}; + sums = tint_symbol_2; x_52_phi = x_45; while (true) { int x_53 = 0; @@ -65,15 +65,21 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy float const x_67 = x_6.x_GLF_uniform_float_values.arr[1].el; int const x_69 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_71 = sums.arr[x_69]; - *(tint_symbol_5) = float4(x_65, x_67, x_67, x_71); + *(tint_symbol_4) = float4(x_65, x_67, x_67, x_71); return; } +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) { + main_1(x_6, x_8, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl index 844f4c9864..ae37da296d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) { +void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) { float3x2 m32 = float3x2(0.0f); tint_array_wrapper_2 sums = {}; int x_52_phi = 0; @@ -41,8 +41,8 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy if ((x_45 == 1)) { m32[3][x_45] = x_40; } - tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_40, x_40, x_40}}; - sums = tint_symbol_3; + tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_40, x_40, x_40}}; + sums = tint_symbol_2; x_52_phi = x_45; while (true) { int x_53 = 0; @@ -65,15 +65,21 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy float const x_67 = x_6.x_GLF_uniform_float_values.arr[1].el; int const x_69 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_71 = sums.arr[x_69]; - *(tint_symbol_5) = float4(x_65, x_67, x_67, x_71); + *(tint_symbol_4) = float4(x_65, x_67, x_67, x_71); return; } +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) { + main_1(x_6, x_8, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) { thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.hlsl index b527637ca1..e0d4c6b724 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.hlsl @@ -49,9 +49,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.msl index 4ef589fb12..04da6c9489 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.msl @@ -28,14 +28,14 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float2 v1 = 0.0f; bool x_54 = false; bool x_55_phi = false; int const x_35 = x_6.x_GLF_uniform_int_values.arr[0].el; v1 = cos(cos(as_type(int2(-1, x_35)))); float const x_41 = v1.x; - *(tint_symbol_4) = float4(x_41, x_41, x_41, x_41); + *(tint_symbol_3) = float4(x_41, x_41, x_41, x_41); float const x_44 = v1.y; float const x_46 = x_8.x_GLF_uniform_float_values.arr[0].el; bool const x_47 = (x_44 > x_46); @@ -52,20 +52,26 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_63 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_66 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_69 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_60), float(x_63), float(x_66), float(x_69)); + *(tint_symbol_3) = float4(float(x_60), float(x_63), float(x_66), float(x_69)); } else { int const x_73 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_74 = float(x_73); - *(tint_symbol_4) = float4(x_74, x_74, x_74, x_74); + *(tint_symbol_3) = float4(x_74, x_74, x_74, x_74); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.hlsl index b527637ca1..e0d4c6b724 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.hlsl @@ -49,9 +49,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.msl index 4ef589fb12..04da6c9489 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.msl @@ -28,14 +28,14 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) { float2 v1 = 0.0f; bool x_54 = false; bool x_55_phi = false; int const x_35 = x_6.x_GLF_uniform_int_values.arr[0].el; v1 = cos(cos(as_type(int2(-1, x_35)))); float const x_41 = v1.x; - *(tint_symbol_4) = float4(x_41, x_41, x_41, x_41); + *(tint_symbol_3) = float4(x_41, x_41, x_41, x_41); float const x_44 = v1.y; float const x_46 = x_8.x_GLF_uniform_float_values.arr[0].el; bool const x_47 = (x_44 > x_46); @@ -52,20 +52,26 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_63 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_66 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_69 = x_6.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_60), float(x_63), float(x_66), float(x_69)); + *(tint_symbol_3) = float4(float(x_60), float(x_63), float(x_66), float(x_69)); } else { int const x_73 = x_6.x_GLF_uniform_int_values.arr[1].el; float const x_74 = float(x_73); - *(tint_symbol_4) = float4(x_74, x_74, x_74, x_74); + *(tint_symbol_3) = float4(x_74, x_74, x_74, x_74); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.hlsl index a94b9b70d5..350b119a8b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.hlsl @@ -45,9 +45,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.msl index d120e270d6..85dcc7c738 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.msl @@ -38,7 +38,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_12, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_12, thread float4* const tint_symbol_3) { uint a = 0u; float b = 0.0f; uint c = 0u; @@ -56,19 +56,25 @@ void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_12, thread int const x_58 = x_12.x_GLF_uniform_int_values.arr[1].el; int const x_61 = x_12.x_GLF_uniform_int_values.arr[1].el; int const x_64 = x_12.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); + *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); } else { float const x_67 = b; - *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67); + *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, x_12, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf2& x_8, constant buf0& x_12, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, x_12, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, x_12, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.hlsl index a94b9b70d5..350b119a8b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.hlsl @@ -45,9 +45,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.msl index d120e270d6..85dcc7c738 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.msl @@ -38,7 +38,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_12, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_12, thread float4* const tint_symbol_3) { uint a = 0u; float b = 0.0f; uint c = 0u; @@ -56,19 +56,25 @@ void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_12, thread int const x_58 = x_12.x_GLF_uniform_int_values.arr[1].el; int const x_61 = x_12.x_GLF_uniform_int_values.arr[1].el; int const x_64 = x_12.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); + *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64)); } else { float const x_67 = b; - *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67); + *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_8, x_12, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf2& x_8, constant buf0& x_12, thread float4* const tint_symbol_4) { + main_1(x_6, x_8, x_12, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_8, x_12, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl index 70dcbca418..18d3471802 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) { tint_array_wrapper_2 A = {}; int i = 0; int j = 0; @@ -113,20 +113,26 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_110 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_113 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_116 = x_9.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); + *(tint_symbol_3) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); } else { int const x_120 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_121 = float(x_120); - *(tint_symbol_4) = float4(x_121, x_121, x_121, x_121); + *(tint_symbol_3) = float4(x_121, x_121, x_121, x_121); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl index 70dcbca418..18d3471802 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) { tint_array_wrapper_2 A = {}; int i = 0; int j = 0; @@ -113,20 +113,26 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_110 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_113 = x_9.x_GLF_uniform_int_values.arr[0].el; int const x_116 = x_9.x_GLF_uniform_int_values.arr[1].el; - *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); + *(tint_symbol_3) = float4(float(x_107), float(x_110), float(x_113), float(x_116)); } else { int const x_120 = x_9.x_GLF_uniform_int_values.arr[1].el; float const x_121 = float(x_120); - *(tint_symbol_4) = float4(x_121, x_121, x_121, x_121); + *(tint_symbol_3) = float4(x_121, x_121, x_121, x_121); } return; } -fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_6, x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.hlsl index 9591e381d5..7e9bce9966 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.hlsl @@ -15,15 +15,15 @@ void main_1() { const int x_31 = asint(x_7[1].x); const int x_33 = asint(x_7[1].x); const int x_35 = asint(x_7[1].x); - const S tint_symbol_3 = {x_31, x_33, x_35}; - A[x_29] = tint_symbol_3; + const S tint_symbol_2 = {x_31, x_33, x_35}; + A[x_29] = tint_symbol_2; const uint scalar_offset = ((16u * uint(0))) / 4; const int x_39 = asint(x_7[scalar_offset / 4][scalar_offset % 4]); const int x_41 = asint(x_7[1].x); const int x_43 = asint(x_7[1].x); const int x_45 = asint(x_7[1].x); - const S tint_symbol_4 = {x_41, x_43, x_45}; - A[x_39] = tint_symbol_4; + const S tint_symbol_3 = {x_41, x_43, x_45}; + A[x_39] = tint_symbol_3; const int x_49 = asint(x_7[1].x); const int x_51 = A[x_49].b; const int x_53 = asint(x_7[1].x); @@ -62,9 +62,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.msl index 69de413b40..921e8685de 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.msl @@ -26,20 +26,20 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { tint_array_wrapper_1 A = {}; int const x_29 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_31 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_33 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_35 = x_7.x_GLF_uniform_int_values.arr[1].el; - S const tint_symbol_3 = {.a=x_31, .b=x_33, .c=x_35}; - A.arr[x_29] = tint_symbol_3; + S const tint_symbol_2 = {.a=x_31, .b=x_33, .c=x_35}; + A.arr[x_29] = tint_symbol_2; int const x_39 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_41 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_43 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_45 = x_7.x_GLF_uniform_int_values.arr[1].el; - S const tint_symbol_4 = {.a=x_41, .b=x_43, .c=x_45}; - A.arr[x_39] = tint_symbol_4; + S const tint_symbol_3 = {.a=x_41, .b=x_43, .c=x_45}; + A.arr[x_39] = tint_symbol_3; int const x_49 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_51 = A.arr[x_49].b; int const x_53 = x_7.x_GLF_uniform_int_values.arr[1].el; @@ -56,20 +56,26 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6) { int const x_77 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_80 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_83 = x_7.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_74), float(x_77), float(x_80), float(x_83)); + *(tint_symbol_5) = float4(float(x_74), float(x_77), float(x_80), float(x_83)); } else { int const x_87 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_88 = float(x_87); - *(tint_symbol_6) = float4(x_88, x_88, x_88, x_88); + *(tint_symbol_5) = float4(x_88, x_88, x_88, x_88); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - main_1(x_7, &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_6) { + main_1(x_7, tint_symbol_6); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.hlsl index 9591e381d5..7e9bce9966 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.hlsl @@ -15,15 +15,15 @@ void main_1() { const int x_31 = asint(x_7[1].x); const int x_33 = asint(x_7[1].x); const int x_35 = asint(x_7[1].x); - const S tint_symbol_3 = {x_31, x_33, x_35}; - A[x_29] = tint_symbol_3; + const S tint_symbol_2 = {x_31, x_33, x_35}; + A[x_29] = tint_symbol_2; const uint scalar_offset = ((16u * uint(0))) / 4; const int x_39 = asint(x_7[scalar_offset / 4][scalar_offset % 4]); const int x_41 = asint(x_7[1].x); const int x_43 = asint(x_7[1].x); const int x_45 = asint(x_7[1].x); - const S tint_symbol_4 = {x_41, x_43, x_45}; - A[x_39] = tint_symbol_4; + const S tint_symbol_3 = {x_41, x_43, x_45}; + A[x_39] = tint_symbol_3; const int x_49 = asint(x_7[1].x); const int x_51 = A[x_49].b; const int x_53 = asint(x_7[1].x); @@ -62,9 +62,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.msl index 69de413b40..921e8685de 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.msl @@ -26,20 +26,20 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { tint_array_wrapper_1 A = {}; int const x_29 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_31 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_33 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_35 = x_7.x_GLF_uniform_int_values.arr[1].el; - S const tint_symbol_3 = {.a=x_31, .b=x_33, .c=x_35}; - A.arr[x_29] = tint_symbol_3; + S const tint_symbol_2 = {.a=x_31, .b=x_33, .c=x_35}; + A.arr[x_29] = tint_symbol_2; int const x_39 = x_7.x_GLF_uniform_int_values.arr[0].el; int const x_41 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_43 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_45 = x_7.x_GLF_uniform_int_values.arr[1].el; - S const tint_symbol_4 = {.a=x_41, .b=x_43, .c=x_45}; - A.arr[x_39] = tint_symbol_4; + S const tint_symbol_3 = {.a=x_41, .b=x_43, .c=x_45}; + A.arr[x_39] = tint_symbol_3; int const x_49 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_51 = A.arr[x_49].b; int const x_53 = x_7.x_GLF_uniform_int_values.arr[1].el; @@ -56,20 +56,26 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6) { int const x_77 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_80 = x_7.x_GLF_uniform_int_values.arr[1].el; int const x_83 = x_7.x_GLF_uniform_int_values.arr[0].el; - *(tint_symbol_6) = float4(float(x_74), float(x_77), float(x_80), float(x_83)); + *(tint_symbol_5) = float4(float(x_74), float(x_77), float(x_80), float(x_83)); } else { int const x_87 = x_7.x_GLF_uniform_int_values.arr[0].el; float const x_88 = float(x_87); - *(tint_symbol_6) = float4(x_88, x_88, x_88, x_88); + *(tint_symbol_5) = float4(x_88, x_88, x_88, x_88); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - main_1(x_7, &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_6) { + main_1(x_7, tint_symbol_6); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_4; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_7)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.hlsl index 6f9a2b722e..8c431f0ecf 100644 --- a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.hlsl @@ -79,11 +79,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.msl index 348e88d3d3..4e1e472f5d 100644 --- a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 v = 0.0f; tint_array_wrapper floats = {}; int one = 0; @@ -42,7 +42,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float if (!(x_69)) { int const x_73 = one; floats.arr[x_73] = 1.0f; - *(tint_symbol_5) = float4(1.0f, 1.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 0.0f, 1.0f); } int const x_75 = one; v[x_75] = 1.0f; @@ -52,7 +52,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float } float const x_81 = x_9.injectionSwitch.y; if ((x_81 < 0.0f)) { - *(tint_symbol_5) = float4(0.0f, 1.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(0.0f, 1.0f, 0.0f, 1.0f); } } { @@ -70,7 +70,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float } bool x_102 = false; bool x_103_phi = false; - float const x_90 = (*(tint_symbol_6)).y; + float const x_90 = (*(tint_symbol_4)).y; if ((x_90 >= 0.0f)) { float const x_96 = v.y; bool const x_97 = (x_96 == 1.0f); @@ -82,21 +82,27 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float } bool const x_103 = x_103_phi; if (x_103) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } } else { - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_9, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_9, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.hlsl index 6f9a2b722e..8c431f0ecf 100644 --- a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.hlsl @@ -79,11 +79,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.msl index 348e88d3d3..4e1e472f5d 100644 --- a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 v = 0.0f; tint_array_wrapper floats = {}; int one = 0; @@ -42,7 +42,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float if (!(x_69)) { int const x_73 = one; floats.arr[x_73] = 1.0f; - *(tint_symbol_5) = float4(1.0f, 1.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 0.0f, 1.0f); } int const x_75 = one; v[x_75] = 1.0f; @@ -52,7 +52,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float } float const x_81 = x_9.injectionSwitch.y; if ((x_81 < 0.0f)) { - *(tint_symbol_5) = float4(0.0f, 1.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(0.0f, 1.0f, 0.0f, 1.0f); } } { @@ -70,7 +70,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float } bool x_102 = false; bool x_103_phi = false; - float const x_90 = (*(tint_symbol_6)).y; + float const x_90 = (*(tint_symbol_4)).y; if ((x_90 >= 0.0f)) { float const x_96 = v.y; bool const x_97 = (x_96 == 1.0f); @@ -82,21 +82,27 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float } bool const x_103 = x_103_phi; if (x_103) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } } else { - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_9, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_9, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.hlsl index 43d7f1d537..fad5d975f7 100644 --- a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.hlsl @@ -69,9 +69,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.msl index 41639ebaf1..3978f97a75 100644 --- a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.msl @@ -15,7 +15,7 @@ void x_51() { discard_fragment(); } -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { while (true) { bool x_31 = false; bool x_30_phi = false; @@ -46,7 +46,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { break; } float4 const x_55 = x_55_phi; - *(tint_symbol_4) = x_55; + *(tint_symbol_3) = x_55; x_31_phi = true; break; } @@ -71,11 +71,17 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.hlsl index 43d7f1d537..fad5d975f7 100644 --- a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.hlsl @@ -69,9 +69,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.msl index 41639ebaf1..3978f97a75 100644 --- a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.msl @@ -15,7 +15,7 @@ void x_51() { discard_fragment(); } -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { while (true) { bool x_31 = false; bool x_30_phi = false; @@ -46,7 +46,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { break; } float4 const x_55 = x_55_phi; - *(tint_symbol_4) = x_55; + *(tint_symbol_3) = x_55; x_31_phi = true; break; } @@ -71,11 +71,17 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.hlsl index 4dda860d4b..70e4a5b1fe 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.hlsl @@ -61,11 +61,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.msl index 28d4e206da..7196372c31 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.msl @@ -7,15 +7,15 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { while (true) { bool x_46_phi = false; while (true) { - float const x_37 = (*(tint_symbol_5)).x; + float const x_37 = (*(tint_symbol_3)).x; if ((x_37 < 0.0f)) { float const x_42 = x_6.injectionSwitch.y; if ((1.0f > x_42)) { @@ -55,17 +55,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } break; } - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.hlsl index 4dda860d4b..70e4a5b1fe 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.hlsl @@ -61,11 +61,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.msl index 28d4e206da..7196372c31 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.msl @@ -7,15 +7,15 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { while (true) { bool x_46_phi = false; while (true) { - float const x_37 = (*(tint_symbol_5)).x; + float const x_37 = (*(tint_symbol_3)).x; if ((x_37 < 0.0f)) { float const x_42 = x_6.injectionSwitch.y; if ((1.0f > x_42)) { @@ -55,17 +55,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } break; } - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.hlsl index 669e1a238d..3164b11481 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.hlsl @@ -4,8 +4,8 @@ static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); void main_1() { float data[10] = (float[10])0; int i = 0; - const float tint_symbol_4[10] = {0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f}; - data = tint_symbol_4; + const float tint_symbol_3[10] = {0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f}; + data = tint_symbol_3; i = 0; { for(; (i < 10); i = (i + 1)) { @@ -32,11 +32,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.msl index 74506560cd..b4738d2ba1 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.msl @@ -7,15 +7,15 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper data = {}; int i = 0; - tint_array_wrapper const tint_symbol_4 = {.arr={0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f}}; - data = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f}}; + data = tint_symbol_2; i = 0; while (true) { int const x_7 = i; @@ -23,7 +23,7 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol } else { break; } - float const x_50 = (*(tint_symbol_6)).x; + float const x_50 = (*(tint_symbol_4)).x; if ((x_50 < 0.0f)) { discard_fragment(); } @@ -36,17 +36,23 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol } } float const x_58 = data.arr[0]; - *(tint_symbol_7) = float4(x_58, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(x_58, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.hlsl index 669e1a238d..3164b11481 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.hlsl @@ -4,8 +4,8 @@ static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); void main_1() { float data[10] = (float[10])0; int i = 0; - const float tint_symbol_4[10] = {0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f}; - data = tint_symbol_4; + const float tint_symbol_3[10] = {0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f}; + data = tint_symbol_3; i = 0; { for(; (i < 10); i = (i + 1)) { @@ -32,11 +32,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.msl index 74506560cd..b4738d2ba1 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.msl @@ -7,15 +7,15 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper data = {}; int i = 0; - tint_array_wrapper const tint_symbol_4 = {.arr={0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f}}; - data = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f}}; + data = tint_symbol_2; i = 0; while (true) { int const x_7 = i; @@ -23,7 +23,7 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol } else { break; } - float const x_50 = (*(tint_symbol_6)).x; + float const x_50 = (*(tint_symbol_4)).x; if ((x_50 < 0.0f)) { discard_fragment(); } @@ -36,17 +36,23 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol } } float const x_58 = data.arr[0]; - *(tint_symbol_7) = float4(x_58, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(x_58, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.hlsl index bc52353dc7..f2fbccae69 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.hlsl @@ -61,11 +61,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.msl index d61e94e8aa..5e753cf7cf 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.msl @@ -7,15 +7,15 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void f_(constant buf0& x_7, thread float4* const tint_symbol_5) { +void f_(constant buf0& x_7, thread float4* const tint_symbol_3) { while (true) { float const x_35 = x_7.injectionSwitch.y; if ((1.0f > x_35)) { - float const x_40 = (*(tint_symbol_5)).y; + float const x_40 = (*(tint_symbol_3)).y; if ((x_40 < 0.0f)) { { if (false) { @@ -52,19 +52,25 @@ void f_(constant buf0& x_7, thread float4* const tint_symbol_5) { return; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - f_(x_7, tint_symbol_6); - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); +void main_1(constant buf0& x_7, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { + f_(x_7, tint_symbol_4); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_7, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.hlsl index bc52353dc7..f2fbccae69 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.hlsl @@ -61,11 +61,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.msl index d61e94e8aa..5e753cf7cf 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.msl @@ -7,15 +7,15 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void f_(constant buf0& x_7, thread float4* const tint_symbol_5) { +void f_(constant buf0& x_7, thread float4* const tint_symbol_3) { while (true) { float const x_35 = x_7.injectionSwitch.y; if ((1.0f > x_35)) { - float const x_40 = (*(tint_symbol_5)).y; + float const x_40 = (*(tint_symbol_3)).y; if ((x_40 < 0.0f)) { { if (false) { @@ -52,19 +52,25 @@ void f_(constant buf0& x_7, thread float4* const tint_symbol_5) { return; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - f_(x_7, tint_symbol_6); - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); +void main_1(constant buf0& x_7, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { + f_(x_7, tint_symbol_4); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_7, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.hlsl index a01424a8dd..7a092eaeae 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.hlsl @@ -64,11 +64,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.msl index a7924517aa..17aa77300f 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.msl @@ -4,7 +4,7 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -12,7 +12,7 @@ void x_47() { discard_fragment(); } -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { while (true) { int x_30_phi = 0; bool x_48_phi = false; @@ -25,9 +25,9 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } else { break; } - float const x_37 = (*(tint_symbol_5)).y; + float const x_37 = (*(tint_symbol_3)).y; if ((x_37 < 0.0f)) { - float const x_42 = (*(tint_symbol_5)).x; + float const x_42 = (*(tint_symbol_3)).x; if ((x_42 < 0.0f)) { x_48_phi = false; break; @@ -56,19 +56,25 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol if (x_48) { break; } - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); break; } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.hlsl index a01424a8dd..7a092eaeae 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.hlsl @@ -64,11 +64,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.msl index a7924517aa..17aa77300f 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -12,7 +12,7 @@ void x_47() { discard_fragment(); } -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { while (true) { int x_30_phi = 0; bool x_48_phi = false; @@ -25,9 +25,9 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } else { break; } - float const x_37 = (*(tint_symbol_5)).y; + float const x_37 = (*(tint_symbol_3)).y; if ((x_37 < 0.0f)) { - float const x_42 = (*(tint_symbol_5)).x; + float const x_42 = (*(tint_symbol_3)).x; if ((x_42 < 0.0f)) { x_48_phi = false; break; @@ -56,19 +56,25 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol if (x_48) { break; } - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); break; } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.hlsl index 7a88372cf3..aa9c06c5c0 100644 --- a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.hlsl @@ -38,11 +38,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.msl index badaebb878..2d28755b02 100644 --- a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.msl @@ -4,19 +4,19 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int ll = 0; - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); - float const x_30 = (*(tint_symbol_6)).x; + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); + float const x_30 = (*(tint_symbol_4)).x; if ((int(x_30) < 2000)) { } else { ll = 0; while (true) { - float const x_41 = (*(tint_symbol_6)).x; + float const x_41 = (*(tint_symbol_4)).x; if ((x_41 < 0.0f)) { discard_fragment(); } @@ -29,7 +29,7 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol ll = as_type((as_type(x_7) + as_type(1))); } } - float const x_49 = (*(tint_symbol_6)).x; + float const x_49 = (*(tint_symbol_4)).x; if ((int(x_49) >= 2000)) { discard_fragment(); } @@ -37,13 +37,19 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.hlsl index 7a88372cf3..aa9c06c5c0 100644 --- a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.hlsl @@ -38,11 +38,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.msl index badaebb878..2d28755b02 100644 --- a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.msl @@ -4,19 +4,19 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int ll = 0; - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); - float const x_30 = (*(tint_symbol_6)).x; + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); + float const x_30 = (*(tint_symbol_4)).x; if ((int(x_30) < 2000)) { } else { ll = 0; while (true) { - float const x_41 = (*(tint_symbol_6)).x; + float const x_41 = (*(tint_symbol_4)).x; if ((x_41 < 0.0f)) { discard_fragment(); } @@ -29,7 +29,7 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol ll = as_type((as_type(x_7) + as_type(1))); } } - float const x_49 = (*(tint_symbol_6)).x; + float const x_49 = (*(tint_symbol_4)).x; if ((int(x_49) >= 2000)) { discard_fragment(); } @@ -37,13 +37,19 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.hlsl index f128d4c786..47691f05cb 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.hlsl @@ -37,9 +37,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.msl index a6d951d8b5..b333a221ad 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.msl @@ -43,17 +43,23 @@ float3 f_() { return float3(0.0f, 0.0f, 0.0f); } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float3 const x_35 = f_(); - *(tint_symbol_4) = float4(x_35.x, x_35.y, x_35.z, 1.0f); + *(tint_symbol_3) = float4(x_35.x, x_35.y, x_35.z, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.hlsl index f128d4c786..47691f05cb 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.hlsl @@ -37,9 +37,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.msl index a6d951d8b5..b333a221ad 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.msl @@ -43,17 +43,23 @@ float3 f_() { return float3(0.0f, 0.0f, 0.0f); } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float3 const x_35 = f_(); - *(tint_symbol_4) = float4(x_35.x, x_35.y, x_35.z, 1.0f); + *(tint_symbol_3) = float4(x_35.x, x_35.y, x_35.z, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.hlsl index db404f6b1a..610bfdca59 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.hlsl @@ -63,9 +63,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.msl index f983be3211..85e982d290 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.msl @@ -56,21 +56,27 @@ int func_(constant buf0& x_7) { return 0; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int const x_31 = func_(x_7); if ((x_31 == 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.hlsl index db404f6b1a..610bfdca59 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.hlsl @@ -63,9 +63,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.msl index f983be3211..85e982d290 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.msl @@ -56,21 +56,27 @@ int func_(constant buf0& x_7) { return 0; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int const x_31 = func_(x_7); if ((x_31 == 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.hlsl index d23c22a69e..75839bc649 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.hlsl @@ -31,11 +31,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.msl index 84c6e5e751..3c12e001ce 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.msl @@ -4,19 +4,19 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); if (true) { - float const x_23 = (*(tint_symbol_6)).x; + float const x_23 = (*(tint_symbol_4)).x; if ((x_23 < 0.0f)) { while (true) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); { - float const x_32 = (*(tint_symbol_6)).x; + float const x_32 = (*(tint_symbol_4)).x; if ((x_32 < 0.0f)) { } else { break; @@ -28,13 +28,19 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.hlsl index d23c22a69e..75839bc649 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.hlsl @@ -31,11 +31,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.msl index 84c6e5e751..3c12e001ce 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.msl @@ -4,19 +4,19 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); if (true) { - float const x_23 = (*(tint_symbol_6)).x; + float const x_23 = (*(tint_symbol_4)).x; if ((x_23 < 0.0f)) { while (true) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); { - float const x_32 = (*(tint_symbol_6)).x; + float const x_32 = (*(tint_symbol_4)).x; if ((x_32 < 0.0f)) { } else { break; @@ -28,13 +28,19 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.hlsl index 6da05031d1..a0fb19daf3 100644 --- a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.hlsl @@ -61,11 +61,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.msl index ce03716998..49c3e8cef1 100644 --- a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int loop_count = 0; loop_count = 0; float const x_33 = x_7.injectionSwitch.x; @@ -20,7 +20,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float if (x_36) { return; } - float const x_40 = (*(tint_symbol_5)).x; + float const x_40 = (*(tint_symbol_3)).x; bool const x_41 = (x_40 < 0.0f); while (true) { int const x_43 = loop_count; @@ -32,16 +32,16 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float break; } if (x_36) { - *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); } else { if (x_41) { return; } } if (x_36) { - *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); } else { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } if (x_36) { return; @@ -66,20 +66,26 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } int const x_71 = loop_count; if ((x_71 >= 100)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.hlsl index 6da05031d1..a0fb19daf3 100644 --- a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.hlsl @@ -61,11 +61,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.msl index ce03716998..49c3e8cef1 100644 --- a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int loop_count = 0; loop_count = 0; float const x_33 = x_7.injectionSwitch.x; @@ -20,7 +20,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float if (x_36) { return; } - float const x_40 = (*(tint_symbol_5)).x; + float const x_40 = (*(tint_symbol_3)).x; bool const x_41 = (x_40 < 0.0f); while (true) { int const x_43 = loop_count; @@ -32,16 +32,16 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float break; } if (x_36) { - *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); } else { if (x_41) { return; } } if (x_36) { - *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); } else { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } if (x_36) { return; @@ -66,20 +66,26 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } int const x_71 = loop_count; if ((x_71 >= 100)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.hlsl index f3f906136c..2fa2417ccf 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.hlsl @@ -30,9 +30,15 @@ struct tint_symbol { float4 color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.color_1 = inner_result.color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.msl index 876f990a70..dbe923b683 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.msl @@ -29,19 +29,25 @@ float3 drawShape_vf2_(thread float2* const pos) { return float3(1.0f, 1.0f, 1.0f); } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float2 param = 0.0f; param = float2(1.0f, 1.0f); float3 const x_29 = drawShape_vf2_(&(param)); - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.color_1=tint_symbol_2.color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.color_1 = inner_result.color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.hlsl index f3f906136c..2fa2417ccf 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.hlsl @@ -30,9 +30,15 @@ struct tint_symbol { float4 color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.color_1 = inner_result.color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.msl index 876f990a70..dbe923b683 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.msl @@ -29,19 +29,25 @@ float3 drawShape_vf2_(thread float2* const pos) { return float3(1.0f, 1.0f, 1.0f); } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float2 param = 0.0f; param = float2(1.0f, 1.0f); float3 const x_29 = drawShape_vf2_(&(param)); - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.color_1=tint_symbol_2.color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.color_1 = inner_result.color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.hlsl index 71965c18ef..ce7a543075 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.hlsl @@ -23,9 +23,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.msl index 5b8b71891c..ff30036fe4 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.msl @@ -15,20 +15,26 @@ float3 mand_() { return float3(0.0f, 0.0f, 0.0f); } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float3 const x_17 = mand_(); while (true) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.hlsl index 71965c18ef..ce7a543075 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.hlsl @@ -23,9 +23,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.msl index 5b8b71891c..ff30036fe4 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.msl @@ -15,20 +15,26 @@ float3 mand_() { return float3(0.0f, 0.0f, 0.0f); } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float3 const x_17 = mand_(); while (true) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.hlsl index 2d3183d477..b4a4b07bec 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.hlsl @@ -31,11 +31,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.msl index 7ba8d10001..47c8827cbf 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.msl @@ -4,13 +4,13 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); i = 1; while (true) { int const x_6 = i; @@ -18,11 +18,11 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } else { break; } - float const x_37 = (*(tint_symbol_6)).y; + float const x_37 = (*(tint_symbol_4)).y; if ((x_37 < 0.0f)) { - float const x_42 = (*(tint_symbol_6)).x; + float const x_42 = (*(tint_symbol_4)).x; if ((x_42 < 0.0f)) { - *(tint_symbol_5) = float4(226.695999146f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(226.695999146f, 1.0f, 1.0f, 1.0f); } { int const x_7 = i; @@ -39,13 +39,19 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.hlsl index 2d3183d477..b4a4b07bec 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.hlsl @@ -31,11 +31,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.msl index 7ba8d10001..47c8827cbf 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.msl @@ -4,13 +4,13 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); i = 1; while (true) { int const x_6 = i; @@ -18,11 +18,11 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } else { break; } - float const x_37 = (*(tint_symbol_6)).y; + float const x_37 = (*(tint_symbol_4)).y; if ((x_37 < 0.0f)) { - float const x_42 = (*(tint_symbol_6)).x; + float const x_42 = (*(tint_symbol_4)).x; if ((x_42 < 0.0f)) { - *(tint_symbol_5) = float4(226.695999146f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(226.695999146f, 1.0f, 1.0f, 1.0f); } { int const x_7 = i; @@ -39,13 +39,19 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.hlsl index 3bb430f9a1..c89a64b90c 100644 --- a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.hlsl @@ -81,13 +81,18 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int alwaysZero_vf2_(inout float2 coord) { diff --git a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.msl index 01561c4427..e370e6e070 100644 --- a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float x_43 = 0.0f; float x_44 = 0.0f; float x_45 = 0.0f; @@ -19,7 +19,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float int zero = 0; float2 param = 0.0f; float2 temp = 0.0f; - float4 const x_47 = *(tint_symbol_5); + float4 const x_47 = *(tint_symbol_3); param = float2(x_47.x, x_47.y); while (true) { float const x_54 = param.y; @@ -31,7 +31,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float } float const x_61 = x_44; x_43 = x_61; - float const x_63 = (*(tint_symbol_5)).y; + float const x_63 = (*(tint_symbol_3)).y; float const x_65 = select(0.0f, 1.0f, (x_63 < 50.0f)); x_45 = x_65; if (((x_61 - x_65) < 1.0f)) { @@ -52,40 +52,46 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float if ((x_70 == 1)) { return; } - *(tint_symbol_6) = float4(0.0f, 1.0f, 1.0f, 1.0f); - float const x_75 = (*(tint_symbol_5)).x; + *(tint_symbol_4) = float4(0.0f, 1.0f, 1.0f, 1.0f); + float const x_75 = (*(tint_symbol_3)).x; float const x_77 = x_9.injectionSwitch.x; if ((x_75 >= x_77)) { - float const x_82 = (*(tint_symbol_5)).y; + float const x_82 = (*(tint_symbol_3)).y; if ((x_82 >= 0.0f)) { float const x_87 = x_9.injectionSwitch.y; - (*(tint_symbol_6)).x = x_87; + (*(tint_symbol_4)).x = x_87; } } - float const x_90 = (*(tint_symbol_5)).y; + float const x_90 = (*(tint_symbol_3)).y; if ((x_90 >= 0.0f)) { float const x_95 = x_9.injectionSwitch.x; - (*(tint_symbol_6)).y = x_95; + (*(tint_symbol_4)).y = x_95; } - float4 const x_97 = *(tint_symbol_5); + float4 const x_97 = *(tint_symbol_3); float2 const x_98 = float2(x_97.x, x_97.y); float2 const x_101 = float2(x_98.x, x_98.y); temp = x_101; if ((x_101.y >= 0.0f)) { float const x_107 = x_9.injectionSwitch.x; - (*(tint_symbol_6)).z = x_107; + (*(tint_symbol_4)).z = x_107; } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) { +main_out tint_symbol_inner(constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_9, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) { thread float4 tint_symbol_7 = 0.0f; thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_9, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + main_out const inner_result = tint_symbol_inner(x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int alwaysZero_vf2_(constant buf0& x_9, thread float2* const coord, thread float4* const tint_symbol_9) { diff --git a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.hlsl index 3bb430f9a1..c89a64b90c 100644 --- a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.hlsl @@ -81,13 +81,18 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int alwaysZero_vf2_(inout float2 coord) { diff --git a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.msl index 01561c4427..e370e6e070 100644 --- a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float x_43 = 0.0f; float x_44 = 0.0f; float x_45 = 0.0f; @@ -19,7 +19,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float int zero = 0; float2 param = 0.0f; float2 temp = 0.0f; - float4 const x_47 = *(tint_symbol_5); + float4 const x_47 = *(tint_symbol_3); param = float2(x_47.x, x_47.y); while (true) { float const x_54 = param.y; @@ -31,7 +31,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float } float const x_61 = x_44; x_43 = x_61; - float const x_63 = (*(tint_symbol_5)).y; + float const x_63 = (*(tint_symbol_3)).y; float const x_65 = select(0.0f, 1.0f, (x_63 < 50.0f)); x_45 = x_65; if (((x_61 - x_65) < 1.0f)) { @@ -52,40 +52,46 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float if ((x_70 == 1)) { return; } - *(tint_symbol_6) = float4(0.0f, 1.0f, 1.0f, 1.0f); - float const x_75 = (*(tint_symbol_5)).x; + *(tint_symbol_4) = float4(0.0f, 1.0f, 1.0f, 1.0f); + float const x_75 = (*(tint_symbol_3)).x; float const x_77 = x_9.injectionSwitch.x; if ((x_75 >= x_77)) { - float const x_82 = (*(tint_symbol_5)).y; + float const x_82 = (*(tint_symbol_3)).y; if ((x_82 >= 0.0f)) { float const x_87 = x_9.injectionSwitch.y; - (*(tint_symbol_6)).x = x_87; + (*(tint_symbol_4)).x = x_87; } } - float const x_90 = (*(tint_symbol_5)).y; + float const x_90 = (*(tint_symbol_3)).y; if ((x_90 >= 0.0f)) { float const x_95 = x_9.injectionSwitch.x; - (*(tint_symbol_6)).y = x_95; + (*(tint_symbol_4)).y = x_95; } - float4 const x_97 = *(tint_symbol_5); + float4 const x_97 = *(tint_symbol_3); float2 const x_98 = float2(x_97.x, x_97.y); float2 const x_101 = float2(x_98.x, x_98.y); temp = x_101; if ((x_101.y >= 0.0f)) { float const x_107 = x_9.injectionSwitch.x; - (*(tint_symbol_6)).z = x_107; + (*(tint_symbol_4)).z = x_107; } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) { +main_out tint_symbol_inner(constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_9, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) { thread float4 tint_symbol_7 = 0.0f; thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_9, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + main_out const inner_result = tint_symbol_inner(x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int alwaysZero_vf2_(constant buf0& x_9, thread float2* const coord, thread float4* const tint_symbol_9) { diff --git a/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.spvasm.expected.msl index 53d236b1ab..5fc5f85c51 100644 --- a/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.spvasm.expected.msl @@ -7,12 +7,12 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float fx_(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - float const x_50 = (*(tint_symbol_5)).y; +float fx_(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + float const x_50 = (*(tint_symbol_3)).y; if ((x_50 >= 0.0f)) { float const x_55 = x_7.injectionSwitch.y; return x_55; @@ -22,27 +22,27 @@ float fx_(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* } else { break; } - *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); } return 0.0f; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { float x2 = 0.0f; float B = 0.0f; float k0 = 0.0f; x2 = 1.0f; B = 1.0f; - float const x_34 = fx_(x_7, tint_symbol_7, tint_symbol_8); - *(tint_symbol_8) = float4(x_34, 0.0f, 0.0f, 1.0f); + float const x_34 = fx_(x_7, tint_symbol_5, tint_symbol_6); + *(tint_symbol_6) = float4(x_34, 0.0f, 0.0f, 1.0f); while (true) { float const x_40 = x2; if ((x_40 > 2.0f)) { } else { break; } - float const x_43 = fx_(x_7, tint_symbol_7, tint_symbol_8); - float const x_44 = fx_(x_7, tint_symbol_7, tint_symbol_8); + float const x_43 = fx_(x_7, tint_symbol_5, tint_symbol_6); + float const x_44 = fx_(x_7, tint_symbol_5, tint_symbol_6); k0 = (x_43 - x_44); float const x_46 = k0; B = x_46; @@ -52,13 +52,19 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread float return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(x_7, tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.wgsl.expected.msl index 53d236b1ab..5fc5f85c51 100644 --- a/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.wgsl.expected.msl @@ -7,12 +7,12 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float fx_(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - float const x_50 = (*(tint_symbol_5)).y; +float fx_(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + float const x_50 = (*(tint_symbol_3)).y; if ((x_50 >= 0.0f)) { float const x_55 = x_7.injectionSwitch.y; return x_55; @@ -22,27 +22,27 @@ float fx_(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* } else { break; } - *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); } return 0.0f; } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { float x2 = 0.0f; float B = 0.0f; float k0 = 0.0f; x2 = 1.0f; B = 1.0f; - float const x_34 = fx_(x_7, tint_symbol_7, tint_symbol_8); - *(tint_symbol_8) = float4(x_34, 0.0f, 0.0f, 1.0f); + float const x_34 = fx_(x_7, tint_symbol_5, tint_symbol_6); + *(tint_symbol_6) = float4(x_34, 0.0f, 0.0f, 1.0f); while (true) { float const x_40 = x2; if ((x_40 > 2.0f)) { } else { break; } - float const x_43 = fx_(x_7, tint_symbol_7, tint_symbol_8); - float const x_44 = fx_(x_7, tint_symbol_7, tint_symbol_8); + float const x_43 = fx_(x_7, tint_symbol_5, tint_symbol_6); + float const x_44 = fx_(x_7, tint_symbol_5, tint_symbol_6); k0 = (x_43 - x_44); float const x_46 = k0; B = x_46; @@ -52,13 +52,19 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread float return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(x_7, tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.hlsl index adb4b1357c..34cea08f4f 100644 --- a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.hlsl @@ -135,11 +135,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int yieldsZero_() { diff --git a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.msl index 87ba14b6de..c30e197ee6 100644 --- a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.msl @@ -17,7 +17,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { bool x_68 = false; int x_29 = 0; int x_30 = 0; @@ -137,19 +137,25 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { } } if ((x_24 == as_type(4))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int yieldsZero_(constant buf0& x_8) { diff --git a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.hlsl index adb4b1357c..34cea08f4f 100644 --- a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.hlsl @@ -135,11 +135,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int yieldsZero_() { diff --git a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.msl index 87ba14b6de..c30e197ee6 100644 --- a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.msl @@ -17,7 +17,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { bool x_68 = false; int x_29 = 0; int x_30 = 0; @@ -137,19 +137,25 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { } } if ((x_24 == as_type(4))) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } int yieldsZero_(constant buf0& x_8) { diff --git a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.hlsl index 9cdb063260..9f2aaaa523 100644 --- a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.hlsl @@ -45,9 +45,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.msl index b4c618f954..b11e929ce6 100644 --- a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.msl @@ -14,13 +14,13 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { tint_array_wrapper data = {}; float x_32 = 0.0f; x_32 = x_6.injectionSwitch.x; data.arr[0] = x_32; data.arr[1] = x_32; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); float const x_35 = data.arr[1]; if ((x_35 > 1.0f)) { float x_43_phi = 0.0f; @@ -34,7 +34,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { case 1: { float const x_43 = x_43_phi; data.arr[x_39] = x_43; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); break; } default: { @@ -45,11 +45,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.hlsl index 9cdb063260..9f2aaaa523 100644 --- a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.hlsl @@ -45,9 +45,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.msl index b4c618f954..b11e929ce6 100644 --- a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.msl @@ -14,13 +14,13 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { tint_array_wrapper data = {}; float x_32 = 0.0f; x_32 = x_6.injectionSwitch.x; data.arr[0] = x_32; data.arr[1] = x_32; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); float const x_35 = data.arr[1]; if ((x_35 > 1.0f)) { float x_43_phi = 0.0f; @@ -34,7 +34,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { case 1: { float const x_43 = x_43_phi; data.arr[x_39] = x_43; - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); break; } default: { @@ -45,11 +45,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.spvasm.expected.msl index 0ab13c59f2..6e8c035852 100644 --- a/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.spvasm.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { while (true) { bool x_45 = false; int x_48 = 0; @@ -51,7 +51,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float x_48 = x_48_phi; int const x_50 = x_50_phi; int const x_52 = x_52_phi; - float const x_55 = (*(tint_symbol_5)).y; + float const x_55 = (*(tint_symbol_3)).y; x_111_phi = x_48; x_112_phi = x_45; if ((x_52 < select(100, 10, (x_55 > -1.0f)))) { @@ -80,7 +80,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float int x_86_phi = 0; int x_97_phi = 0; bool x_98_phi = false; - float const x_77 = (*(tint_symbol_5)).x; + float const x_77 = (*(tint_symbol_3)).x; x_78 = (x_77 < -1.0f); if (!((x_40 < 0.0f))) { if (x_78) { @@ -134,7 +134,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } { float const x_105 = float(x_52); - *(tint_symbol_6) = float4(x_105, x_105, x_105, x_105); + *(tint_symbol_4) = float4(x_105, x_105, x_105, x_105); } } x_51_phi = x_66; @@ -196,7 +196,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float int x_143_phi = 0; int x_154_phi = 0; bool x_155_phi = false; - float const x_134 = (*(tint_symbol_5)).x; + float const x_134 = (*(tint_symbol_3)).x; x_135 = (x_134 < -1.0f); if (!((x_40 < 0.0f))) { if (x_135) { @@ -256,22 +256,28 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } int const x_161 = x_161_phi; if ((x_161 == 4)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } break; } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl.expected.msl index 0ab13c59f2..6e8c035852 100644 --- a/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { while (true) { bool x_45 = false; int x_48 = 0; @@ -51,7 +51,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float x_48 = x_48_phi; int const x_50 = x_50_phi; int const x_52 = x_52_phi; - float const x_55 = (*(tint_symbol_5)).y; + float const x_55 = (*(tint_symbol_3)).y; x_111_phi = x_48; x_112_phi = x_45; if ((x_52 < select(100, 10, (x_55 > -1.0f)))) { @@ -80,7 +80,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float int x_86_phi = 0; int x_97_phi = 0; bool x_98_phi = false; - float const x_77 = (*(tint_symbol_5)).x; + float const x_77 = (*(tint_symbol_3)).x; x_78 = (x_77 < -1.0f); if (!((x_40 < 0.0f))) { if (x_78) { @@ -134,7 +134,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } { float const x_105 = float(x_52); - *(tint_symbol_6) = float4(x_105, x_105, x_105, x_105); + *(tint_symbol_4) = float4(x_105, x_105, x_105, x_105); } } x_51_phi = x_66; @@ -196,7 +196,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float int x_143_phi = 0; int x_154_phi = 0; bool x_155_phi = false; - float const x_134 = (*(tint_symbol_5)).x; + float const x_134 = (*(tint_symbol_3)).x; x_135 = (x_134 < -1.0f); if (!((x_40 < 0.0f))) { if (x_135) { @@ -256,22 +256,28 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } int const x_161 = x_161_phi; if ((x_161 == 4)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); } break; } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.hlsl index 569cc6aea8..f1f19725cd 100644 --- a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.hlsl @@ -100,9 +100,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.msl index af005b69bc..13701d9648 100644 --- a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.msl @@ -96,17 +96,23 @@ float makeFrame_(constant buf0& x_6) { return x_63; } -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float const x_34 = makeFrame_(x_6); - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.hlsl index 569cc6aea8..f1f19725cd 100644 --- a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.hlsl @@ -100,9 +100,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.msl index af005b69bc..13701d9648 100644 --- a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.msl @@ -96,17 +96,23 @@ float makeFrame_(constant buf0& x_6) { return x_63; } -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float const x_34 = makeFrame_(x_6); - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.hlsl index c0d5468a3a..10694aeae8 100644 --- a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.hlsl @@ -40,11 +40,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.msl index 256e64b85c..4e836be9dc 100644 --- a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.msl @@ -8,16 +8,16 @@ struct S { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2x2 x_41 = float2x2(0.0f); int x_6 = 0; float2x2 x_42 = float2x2(0.0f); float2x2 x_49_phi = float2x2(0.0f); - float const x_44 = (*(tint_symbol_5)).x; + float const x_44 = (*(tint_symbol_3)).x; if ((x_44 < 0.0f)) { x_42 = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)); x_49_phi = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)); @@ -34,17 +34,23 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol float2x2 const x_59 = x_41; float2x2 const x_63 = x_41; float2x2 const x_66 = x_41; - *(tint_symbol_6) = float4(float(x_52), (x_56[0u].x + x_59[1u].x), (x_63[0u].y + x_66[1u].y), float(x_52)); + *(tint_symbol_4) = float4(float(x_52), (x_56[0u].x + x_59[1u].x), (x_63[0u].y + x_66[1u].y), float(x_52)); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.hlsl index c0d5468a3a..10694aeae8 100644 --- a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.hlsl @@ -40,11 +40,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.msl index 256e64b85c..4e836be9dc 100644 --- a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.msl @@ -8,16 +8,16 @@ struct S { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2x2 x_41 = float2x2(0.0f); int x_6 = 0; float2x2 x_42 = float2x2(0.0f); float2x2 x_49_phi = float2x2(0.0f); - float const x_44 = (*(tint_symbol_5)).x; + float const x_44 = (*(tint_symbol_3)).x; if ((x_44 < 0.0f)) { x_42 = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)); x_49_phi = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)); @@ -34,17 +34,23 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol float2x2 const x_59 = x_41; float2x2 const x_63 = x_41; float2x2 const x_66 = x_41; - *(tint_symbol_6) = float4(float(x_52), (x_56[0u].x + x_59[1u].x), (x_63[0u].y + x_66[1u].y), float(x_52)); + *(tint_symbol_4) = float4(float(x_52), (x_56[0u].x + x_59[1u].x), (x_63[0u].y + x_66[1u].y), float(x_52)); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.hlsl index 6c3f3f426f..7106574812 100644 --- a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.hlsl @@ -59,9 +59,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl index 8aad500344..03ffdab520 100644 --- a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int k = 0; int GLF_dead0j = 0; tint_array_wrapper donor_replacementGLF_dead0stack = {}; @@ -74,15 +74,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { k = as_type((as_type(x_24) + as_type(1))); } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.hlsl index f1268b0bd8..2783b462bd 100644 --- a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.hlsl @@ -63,9 +63,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.msl index a41081a534..34b68d4790 100644 --- a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int k = 0; int GLF_dead0j = 0; tint_array_wrapper donor_replacementGLF_dead0stack = {}; @@ -74,15 +74,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { k = as_type((as_type(x_24) + as_type(1))); } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.hlsl index 9862ea70e8..edb5018be2 100644 --- a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.hlsl @@ -31,9 +31,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.msl index b378883e62..b956542fce 100644 --- a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int j = 0; float a = 0.0f; j = 0; @@ -20,7 +20,7 @@ void main_1(thread float4* const tint_symbol_4) { } int const x_7 = j; if ((x_7 < 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } int const x_8 = j; if ((x_8 != 3)) { @@ -28,10 +28,10 @@ void main_1(thread float4* const tint_symbol_4) { if ((x_9 != 4)) { int const x_10 = j; if ((x_10 == 5)) { - (*(tint_symbol_4)).x = ldexp(1.0f, 2); + (*(tint_symbol_3)).x = ldexp(1.0f, 2); } else { a = ldexp(1.0f, 2); - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } } } @@ -43,11 +43,17 @@ void main_1(thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.hlsl index 9862ea70e8..edb5018be2 100644 --- a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.hlsl @@ -31,9 +31,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.msl index b378883e62..b956542fce 100644 --- a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int j = 0; float a = 0.0f; j = 0; @@ -20,7 +20,7 @@ void main_1(thread float4* const tint_symbol_4) { } int const x_7 = j; if ((x_7 < 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } int const x_8 = j; if ((x_8 != 3)) { @@ -28,10 +28,10 @@ void main_1(thread float4* const tint_symbol_4) { if ((x_9 != 4)) { int const x_10 = j; if ((x_10 == 5)) { - (*(tint_symbol_4)).x = ldexp(1.0f, 2); + (*(tint_symbol_3)).x = ldexp(1.0f, 2); } else { a = ldexp(1.0f, 2); - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } } } @@ -43,11 +43,17 @@ void main_1(thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.hlsl index 4ca646f789..52bc359702 100644 --- a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.hlsl @@ -68,9 +68,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.msl index 86dc88599b..76d1e33b31 100644 --- a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.msl @@ -36,7 +36,7 @@ int binarySearch_struct_BinarySearchObject_i1_10_1_(constant buf0& x_8, thread B return 1; } -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { int i = 0; BinarySearchObject obj_1 = {}; BinarySearchObject param = {}; @@ -84,15 +84,21 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { BinarySearchObject const x_84 = obj_1; param = x_84; int const x_26 = binarySearch_struct_BinarySearchObject_i1_10_1_(x_8, &(param)); - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.hlsl index 4ca646f789..52bc359702 100644 --- a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.hlsl @@ -68,9 +68,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.msl index 86dc88599b..76d1e33b31 100644 --- a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.msl @@ -36,7 +36,7 @@ int binarySearch_struct_BinarySearchObject_i1_10_1_(constant buf0& x_8, thread B return 1; } -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { int i = 0; BinarySearchObject obj_1 = {}; BinarySearchObject param = {}; @@ -84,15 +84,21 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { BinarySearchObject const x_84 = obj_1; param = x_84; int const x_26 = binarySearch_struct_BinarySearchObject_i1_10_1_(x_8, &(param)); - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.hlsl index 91e6f7c71d..1620108764 100644 --- a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.hlsl @@ -33,11 +33,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.msl index 6ff0d168e8..4b851a4897 100644 --- a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.msl @@ -4,7 +4,7 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -15,10 +15,10 @@ float3 f_mf22_(thread float2x2* const m) { return float3(0.0f, 0.0f, 0.0f); } -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2x2 param = float2x2(0.0f); float2x2 x_38_phi = float2x2(0.0f); - float const x_34 = (*(tint_symbol_5)).x; + float const x_34 = (*(tint_symbol_3)).x; x_38_phi = float2x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f)); if ((x_34 >= 0.0f)) { x_38_phi = float2x2(float2(1.0f, 0.0f), float2(0.0f, 1.0f)); @@ -26,17 +26,23 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol float2x2 const x_38 = x_38_phi; param = (x_38 * x_38); float3 const x_40 = f_mf22_(&(param)); - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.hlsl index 91e6f7c71d..1620108764 100644 --- a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.hlsl @@ -33,11 +33,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.msl index 6ff0d168e8..4b851a4897 100644 --- a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -15,10 +15,10 @@ float3 f_mf22_(thread float2x2* const m) { return float3(0.0f, 0.0f, 0.0f); } -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2x2 param = float2x2(0.0f); float2x2 x_38_phi = float2x2(0.0f); - float const x_34 = (*(tint_symbol_5)).x; + float const x_34 = (*(tint_symbol_3)).x; x_38_phi = float2x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f)); if ((x_34 >= 0.0f)) { x_38_phi = float2x2(float2(1.0f, 0.0f), float2(0.0f, 1.0f)); @@ -26,17 +26,23 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol float2x2 const x_38 = x_38_phi; param = (x_38 * x_38); float3 const x_40 = f_mf22_(&(param)); - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.hlsl index 0628a80ff6..b2ec2930ef 100644 --- a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.hlsl @@ -27,9 +27,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.msl index 388fcc68d4..7edfb52835 100644 --- a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.msl @@ -11,11 +11,11 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int temp = 0; float const x_39 = x_5.injectionSwitch.x; if ((x_39 > 2.0f)) { - float4 const x_8 = *(tint_symbol_4); + float4 const x_8 = *(tint_symbol_3); temp = int(fmax(mix(float4(1.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), x_8), float4(8.600000381f, 8.600000381f, 8.600000381f, 8.600000381f)).y); int const x_44 = temp; if ((x_44 < 150)) { @@ -26,16 +26,22 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4, thread float discard_fragment(); } } - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_5, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_5, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.hlsl index 0628a80ff6..b2ec2930ef 100644 --- a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.hlsl @@ -27,9 +27,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.msl index 388fcc68d4..7edfb52835 100644 --- a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.msl @@ -11,11 +11,11 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int temp = 0; float const x_39 = x_5.injectionSwitch.x; if ((x_39 > 2.0f)) { - float4 const x_8 = *(tint_symbol_4); + float4 const x_8 = *(tint_symbol_3); temp = int(fmax(mix(float4(1.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), x_8), float4(8.600000381f, 8.600000381f, 8.600000381f, 8.600000381f)).y); int const x_44 = temp; if ((x_44 < 150)) { @@ -26,16 +26,22 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4, thread float discard_fragment(); } } - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_6 = 0.0f; - thread float4 tint_symbol_7 = 0.0f; - main_1(x_5, &(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + main_1(x_5, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.hlsl index 54b15eb096..1924e2cd83 100644 --- a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.hlsl @@ -17,9 +17,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.msl index 46dbf20336..2417abe656 100644 --- a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.msl @@ -12,17 +12,23 @@ float3 GLF_live6mand_() { return mix(as_type(uint3(38730u, 63193u, 63173u)), float3(463.0f, 4.0f, 0.0f), float3(2.0f, 2.0f, 2.0f)); } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float3 const x_27 = GLF_live6mand_(); - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.hlsl index 54b15eb096..1924e2cd83 100644 --- a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.hlsl @@ -17,9 +17,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.msl index 46dbf20336..2417abe656 100644 --- a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.msl @@ -12,17 +12,23 @@ float3 GLF_live6mand_() { return mix(as_type(uint3(38730u, 63193u, 63173u)), float3(463.0f, 4.0f, 0.0f), float3(2.0f, 2.0f, 2.0f)); } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float3 const x_27 = GLF_live6mand_(); - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.spvasm.expected.msl index 394db173a6..63be284947 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.spvasm.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float4x4 m44 = float4x4(0.0f); int x_10_phi = 0; m44 = float4x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f), float4(9.0f, 10.0f, 11.0f, 12.0f), float4(13.0f, 14.0f, 15.0f, 16.0f)); @@ -24,7 +24,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } else { break; } - float const x_63 = (*(tint_symbol_5)).y; + float const x_63 = (*(tint_symbol_3)).y; if ((x_63 < 0.0f)) { break; } @@ -59,17 +59,23 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float float4 x_83_1 = x_79; x_83_1.w = (x_81 - 11.0f); float4 const x_83 = x_83_1; - *(tint_symbol_6) = x_83; + *(tint_symbol_4) = x_83; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl.expected.msl index 394db173a6..63be284947 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float4x4 m44 = float4x4(0.0f); int x_10_phi = 0; m44 = float4x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f), float4(9.0f, 10.0f, 11.0f, 12.0f), float4(13.0f, 14.0f, 15.0f, 16.0f)); @@ -24,7 +24,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } else { break; } - float const x_63 = (*(tint_symbol_5)).y; + float const x_63 = (*(tint_symbol_3)).y; if ((x_63 < 0.0f)) { break; } @@ -59,17 +59,23 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float float4 x_83_1 = x_79; x_83_1.w = (x_81 - 11.0f); float4 const x_83 = x_83_1; - *(tint_symbol_6) = x_83; + *(tint_symbol_4) = x_83; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.hlsl index 861538a7aa..77e3171edb 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.hlsl @@ -39,11 +39,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.msl index 24551288d9..c2c4c60e06 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.msl @@ -4,7 +4,7 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -27,22 +27,28 @@ float nb_mod_f1_(thread float* const limit) { return 0.0f; } -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float param = 0.0f; - float const x_34 = (*(tint_symbol_5)).x; + float const x_34 = (*(tint_symbol_3)).x; param = x_34; float const x_35 = nb_mod_f1_(&(param)); - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.hlsl index 861538a7aa..77e3171edb 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.hlsl @@ -39,11 +39,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.msl index 24551288d9..c2c4c60e06 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -27,22 +27,28 @@ float nb_mod_f1_(thread float* const limit) { return 0.0f; } -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float param = 0.0f; - float const x_34 = (*(tint_symbol_5)).x; + float const x_34 = (*(tint_symbol_3)).x; param = x_34; float const x_35 = nb_mod_f1_(&(param)); - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.hlsl index d41e23b581..3fc97c41a4 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.hlsl @@ -29,9 +29,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.msl index 68b02b15ed..8a6f6de110 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.msl @@ -11,9 +11,9 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); i = 0; while (true) { int const x_7 = i; @@ -21,10 +21,10 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } else { break; } - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); float const x_39 = x_6.injectionSwitch.y; if ((1.0f > x_39)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); if (true) { return; } @@ -37,11 +37,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.hlsl index d41e23b581..3fc97c41a4 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.hlsl @@ -29,9 +29,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.msl index 68b02b15ed..8a6f6de110 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.msl @@ -11,9 +11,9 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); i = 0; while (true) { int const x_7 = i; @@ -21,10 +21,10 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } else { break; } - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); float const x_39 = x_6.injectionSwitch.y; if ((1.0f > x_39)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); if (true) { return; } @@ -37,11 +37,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.hlsl index f41b00d0b6..b6078ceacf 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.hlsl @@ -73,9 +73,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl index c22cdd3ed5..3b5c8210e8 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; int GLF_dead5cols = 0; int GLF_dead5rows = 0; @@ -110,15 +110,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.hlsl index 938e5639f9..bf551d736f 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.hlsl @@ -77,9 +77,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.msl index 0a2d6a4846..bd4986a4d1 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; int GLF_dead5cols = 0; int GLF_dead5rows = 0; @@ -110,15 +110,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.hlsl index 17a9f12954..3bd8cb6659 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.hlsl @@ -48,11 +48,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.msl index 4f27a35f95..11785658b1 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.msl @@ -7,20 +7,20 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f); +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f); float const x_30 = x_6.injectionSwitch.x; switch(int(x_30)) { case 0: { switch(1) { case 1: { - float const x_38 = (*(tint_symbol_6)).y; + float const x_38 = (*(tint_symbol_4)).y; if ((x_38 >= 0.0f)) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); break; } discard_fragment(); @@ -42,13 +42,19 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.hlsl index 17a9f12954..3bd8cb6659 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.hlsl @@ -48,11 +48,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.msl index 4f27a35f95..11785658b1 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.msl @@ -7,20 +7,20 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f); +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f); float const x_30 = x_6.injectionSwitch.x; switch(int(x_30)) { case 0: { switch(1) { case 1: { - float const x_38 = (*(tint_symbol_6)).y; + float const x_38 = (*(tint_symbol_4)).y; if ((x_38 >= 0.0f)) { - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); break; } discard_fragment(); @@ -42,13 +42,19 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.hlsl index b530d09c38..4d40d341fe 100644 --- a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.msl index 7e85bb9fe6..d0d0597c70 100644 --- a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { tint_array_wrapper x_10 = {}; tint_array_wrapper x_9 = {}; int x_7 = 0; @@ -26,7 +26,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { x_7 = x_9.arr[0]; switch(0u) { default: { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); int const x_8 = x_10.arr[0]; if ((x_8 == as_type(x_7))) { x_11_phi = 1; @@ -38,18 +38,24 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } int const x_11 = x_11_phi; if ((x_11 == 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.hlsl index b530d09c38..4d40d341fe 100644 --- a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.hlsl @@ -39,9 +39,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.msl index 7e85bb9fe6..d0d0597c70 100644 --- a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { tint_array_wrapper x_10 = {}; tint_array_wrapper x_9 = {}; int x_7 = 0; @@ -26,7 +26,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { x_7 = x_9.arr[0]; switch(0u) { default: { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); int const x_8 = x_10.arr[0]; if ((x_8 == as_type(x_7))) { x_11_phi = 1; @@ -38,18 +38,24 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } int const x_11 = x_11_phi; if ((x_11 == 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.hlsl index abeefe6b41..1268a9f8ba 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.hlsl @@ -47,11 +47,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.msl index cd6a1094a9..04a9ce21aa 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { bool x_30 = false; float x_47 = 0.0f; float const x_29 = x_6.injectionSwitch.x; @@ -20,7 +20,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float while (true) { float x_47_phi = 0.0f; while (true) { - float const x_41 = (*(tint_symbol_5)).x; + float const x_41 = (*(tint_symbol_3)).x; if ((x_41 < 0.0f)) { if (x_30) { x_47_phi = 1.0f; @@ -39,19 +39,25 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float float4 x_48_1 = float4(0.0f, 0.0f, 0.0f, 0.0f); x_48_1.y = x_47; float4 const x_48 = x_48_1; - *(tint_symbol_6) = x_48; + *(tint_symbol_4) = x_48; } - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.hlsl index abeefe6b41..1268a9f8ba 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.hlsl @@ -47,11 +47,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.msl index cd6a1094a9..04a9ce21aa 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { bool x_30 = false; float x_47 = 0.0f; float const x_29 = x_6.injectionSwitch.x; @@ -20,7 +20,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float while (true) { float x_47_phi = 0.0f; while (true) { - float const x_41 = (*(tint_symbol_5)).x; + float const x_41 = (*(tint_symbol_3)).x; if ((x_41 < 0.0f)) { if (x_30) { x_47_phi = 1.0f; @@ -39,19 +39,25 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float float4 x_48_1 = float4(0.0f, 0.0f, 0.0f, 0.0f); x_48_1.y = x_47; float4 const x_48 = x_48_1; - *(tint_symbol_6) = x_48; + *(tint_symbol_4) = x_48; } - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.hlsl index 6ebe635f05..16f0423b86 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.hlsl @@ -42,9 +42,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.msl index 15cae52e16..082e268155 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.msl @@ -35,7 +35,7 @@ float f_() { return 1.0f; } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float4 c = 0.0f; int i_1 = 0; c = float4(1.0f, 0.0f, 0.0f, 1.0f); @@ -54,15 +54,21 @@ void main_1(thread float4* const tint_symbol_4) { } } float4 const x_41 = c; - *(tint_symbol_4) = x_41; + *(tint_symbol_3) = x_41; return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.hlsl index 6ebe635f05..16f0423b86 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.hlsl @@ -42,9 +42,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.msl index 15cae52e16..082e268155 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.msl @@ -35,7 +35,7 @@ float f_() { return 1.0f; } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float4 c = 0.0f; int i_1 = 0; c = float4(1.0f, 0.0f, 0.0f, 1.0f); @@ -54,15 +54,21 @@ void main_1(thread float4* const tint_symbol_4) { } } float4 const x_41 = c; - *(tint_symbol_4) = x_41; + *(tint_symbol_3) = x_41; return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.hlsl index 3c94412150..9393324d12 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.hlsl @@ -66,11 +66,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } float3 GLF_live4drawShape_() { diff --git a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.msl index 75d8b9b1ae..8752d55b1e 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { bool x_36 = false; float3 x_37 = 0.0f; int x_6 = 0; @@ -17,7 +17,7 @@ void main_1(thread float4* const tint_symbol_4) { float3 x_54 = 0.0f; bool x_40_phi = false; float3 x_55_phi = 0.0f; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); x_36 = false; x_40_phi = false; while (true) { @@ -68,12 +68,18 @@ void main_1(thread float4* const tint_symbol_4) { return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } float3 GLF_live4drawShape_() { diff --git a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.hlsl index 3c94412150..9393324d12 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.hlsl @@ -66,11 +66,17 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } float3 GLF_live4drawShape_() { diff --git a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.msl index 75d8b9b1ae..8752d55b1e 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { bool x_36 = false; float3 x_37 = 0.0f; int x_6 = 0; @@ -17,7 +17,7 @@ void main_1(thread float4* const tint_symbol_4) { float3 x_54 = 0.0f; bool x_40_phi = false; float3 x_55_phi = 0.0f; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); x_36 = false; x_40_phi = false; while (true) { @@ -68,12 +68,18 @@ void main_1(thread float4* const tint_symbol_4) { return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } float3 GLF_live4drawShape_() { diff --git a/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.spvasm.expected.msl index 99464727fa..c439da6a26 100644 --- a/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { bool x_36 = false; bool x_37 = false; int x_7 = 0; @@ -97,16 +97,22 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } x_38 = true; float const x_73 = select(0.0f, 1.0f, true); - *(tint_symbol_4) = (float4(x_43.x, x_43.y, x_43.z, 1.0f) + float4(x_73, x_73, x_73, x_73)); - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = (float4(x_43.x, x_43.y, x_43.z, 1.0f) + float4(x_73, x_73, x_73, x_73)); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.wgsl.expected.msl index 99464727fa..c439da6a26 100644 --- a/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { bool x_36 = false; bool x_37 = false; int x_7 = 0; @@ -97,16 +97,22 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } x_38 = true; float const x_73 = select(0.0f, 1.0f, true); - *(tint_symbol_4) = (float4(x_43.x, x_43.y, x_43.z, 1.0f) + float4(x_73, x_73, x_73, x_73)); - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = (float4(x_43.x, x_43.y, x_43.z, 1.0f) + float4(x_73, x_73, x_73, x_73)); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.hlsl index a6f8c4be0b..efb270b063 100644 --- a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.hlsl @@ -91,11 +91,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.msl index 1288d26b9f..bb35e66841 100644 --- a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.msl @@ -7,19 +7,19 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { while (true) { float4 x_42 = 0.0f; bool x_39 = false; bool x_38_phi = false; float4 x_41_phi = 0.0f; - float const x_32 = (*(tint_symbol_5)).x; + float const x_32 = (*(tint_symbol_3)).x; int const x_34 = int(clamp(x_32, 0.0f, 1.0f)); - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); x_38_phi = false; x_41_phi = float4(0.0f, 0.0f, 0.0f, 0.0f); while (true) { @@ -83,19 +83,25 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float if (x_39) { break; } - *(tint_symbol_6) = x_42; + *(tint_symbol_4) = x_42; break; } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.hlsl index a6f8c4be0b..efb270b063 100644 --- a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.hlsl @@ -91,11 +91,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.msl index 1288d26b9f..bb35e66841 100644 --- a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.msl @@ -7,19 +7,19 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { while (true) { float4 x_42 = 0.0f; bool x_39 = false; bool x_38_phi = false; float4 x_41_phi = 0.0f; - float const x_32 = (*(tint_symbol_5)).x; + float const x_32 = (*(tint_symbol_3)).x; int const x_34 = int(clamp(x_32, 0.0f, 1.0f)); - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); x_38_phi = false; x_41_phi = float4(0.0f, 0.0f, 0.0f, 0.0f); while (true) { @@ -83,19 +83,25 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float if (x_39) { break; } - *(tint_symbol_6) = x_42; + *(tint_symbol_4) = x_42; break; } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.hlsl index 2b57a30d7a..c7bc1688cf 100644 --- a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.hlsl @@ -61,11 +61,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.msl index 985ef75dbe..a56ad4ca48 100644 --- a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.msl @@ -7,18 +7,18 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_7, thread float* const tint_symbol_3, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { float lv = 0.0f; float x_43 = 0.0f; int GLF_live5r = 0; int GLF_live5_looplimiter6 = 0; float const x_45 = x_7.injectionSwitch.y; if ((1.0f > x_45)) { - float const x_50 = *(tint_symbol_5); + float const x_50 = *(tint_symbol_3); x_43 = fabs(x_50); } else { x_43 = 260.0f; @@ -32,7 +32,7 @@ void main_1(constant buf0& x_7, thread float* const tint_symbol_5, thread float4 float const x_64 = lv; float const x_65 = clamp(x_64, 1.0f, 1.0f); } else { - float const x_67 = (*(tint_symbol_6)).y; + float const x_67 = (*(tint_symbol_4)).y; if ((x_67 < 0.0f)) { float const x_71 = lv; if ((int(x_71) < 210)) { @@ -61,18 +61,24 @@ void main_1(constant buf0& x_7, thread float* const tint_symbol_5, thread float4 } } } - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_9), &(tint_symbol_8), &(tint_symbol_10)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_7, tint_symbol_7, tint_symbol_6, tint_symbol_8); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float tint_symbol_10 = 0.0f; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.hlsl index 2b57a30d7a..c7bc1688cf 100644 --- a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.hlsl @@ -61,11 +61,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.msl index 985ef75dbe..a56ad4ca48 100644 --- a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.msl @@ -7,18 +7,18 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_7, thread float* const tint_symbol_3, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { float lv = 0.0f; float x_43 = 0.0f; int GLF_live5r = 0; int GLF_live5_looplimiter6 = 0; float const x_45 = x_7.injectionSwitch.y; if ((1.0f > x_45)) { - float const x_50 = *(tint_symbol_5); + float const x_50 = *(tint_symbol_3); x_43 = fabs(x_50); } else { x_43 = 260.0f; @@ -32,7 +32,7 @@ void main_1(constant buf0& x_7, thread float* const tint_symbol_5, thread float4 float const x_64 = lv; float const x_65 = clamp(x_64, 1.0f, 1.0f); } else { - float const x_67 = (*(tint_symbol_6)).y; + float const x_67 = (*(tint_symbol_4)).y; if ((x_67 < 0.0f)) { float const x_71 = lv; if ((int(x_71) < 210)) { @@ -61,18 +61,24 @@ void main_1(constant buf0& x_7, thread float* const tint_symbol_5, thread float4 } } } - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_9), &(tint_symbol_8), &(tint_symbol_10)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_7, tint_symbol_7, tint_symbol_6, tint_symbol_8); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float tint_symbol_10 = 0.0f; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.hlsl index bbaed1e529..65fb69312d 100644 --- a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.hlsl @@ -25,9 +25,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.msl index f97960211e..079142bcca 100644 --- a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int GLF_live9r = 0; float g = 0.0f; while (true) { @@ -24,15 +24,21 @@ void main_1(thread float4* const tint_symbol_4) { } g = 3.0f; float const x_33 = g; - *(tint_symbol_4) = float4(smoothstep(0.0f, 1.0f, x_33), 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(smoothstep(0.0f, 1.0f, x_33), 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.hlsl index bbaed1e529..65fb69312d 100644 --- a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.hlsl @@ -25,9 +25,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.msl index f97960211e..079142bcca 100644 --- a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int GLF_live9r = 0; float g = 0.0f; while (true) { @@ -24,15 +24,21 @@ void main_1(thread float4* const tint_symbol_4) { } g = 3.0f; float const x_33 = g; - *(tint_symbol_4) = float4(smoothstep(0.0f, 1.0f, x_33), 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(smoothstep(0.0f, 1.0f, x_33), 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.hlsl index a5177e1007..a922b72f32 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.hlsl @@ -282,11 +282,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.msl index 0bff46416d..98a5d7f385 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, thread float4* const tint_symbol_5) { float2 pos = 0.0f; int2 ipos = 0; int i = 0; @@ -24,7 +24,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ int directions = 0; int j = 0; int d = 0; - float4 const x_57 = *(tint_symbol_5); + float4 const x_57 = *(tint_symbol_3); float2 const x_60 = x_7.resolution; pos = (float2(x_57.x, x_57.y) / x_60); float const x_63 = pos.x; @@ -38,7 +38,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ break; } int const x_78 = i; - (*(tint_symbol_6)).arr[x_78] = 0; + (*(tint_symbol_4)).arr[x_78] = 0; { int const x_80 = i; i = as_type((as_type(x_80) + as_type(1))); @@ -65,7 +65,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_90) { int const x_94 = p.x; int const x_97 = p.y; - int const x_101 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_94) - as_type(2)))) + as_type(as_type((as_type(x_97) * as_type(16))))))]; + int const x_101 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_94) - as_type(2)))) + as_type(as_type((as_type(x_97) * as_type(16))))))]; x_102 = (x_101 == 0); x_103_phi = x_102; } @@ -80,7 +80,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_110) { int const x_114 = p.x; int const x_116 = p.y; - int const x_121 = (*(tint_symbol_6)).arr[as_type((as_type(x_114) + as_type(as_type((as_type(as_type((as_type(x_116) - as_type(2)))) * as_type(16))))))]; + int const x_121 = (*(tint_symbol_4)).arr[as_type((as_type(x_114) + as_type(as_type((as_type(as_type((as_type(x_116) - as_type(2)))) * as_type(16))))))]; x_122 = (x_121 == 0); x_123_phi = x_122; } @@ -95,7 +95,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_130) { int const x_134 = p.x; int const x_137 = p.y; - int const x_141 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_134) + as_type(2)))) + as_type(as_type((as_type(x_137) * as_type(16))))))]; + int const x_141 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_134) + as_type(2)))) + as_type(as_type((as_type(x_137) * as_type(16))))))]; x_142 = (x_141 == 0); x_143_phi = x_142; } @@ -110,7 +110,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_150) { int const x_154 = p.x; int const x_156 = p.y; - int const x_161 = (*(tint_symbol_6)).arr[as_type((as_type(x_154) + as_type(as_type((as_type(as_type((as_type(x_156) + as_type(2)))) * as_type(16))))))]; + int const x_161 = (*(tint_symbol_4)).arr[as_type((as_type(x_154) + as_type(as_type((as_type(as_type((as_type(x_156) + as_type(2)))) * as_type(16))))))]; x_162 = (x_161 == 0); x_163_phi = x_162; } @@ -154,7 +154,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } int const x_187 = j; int const x_189 = i; - int const x_194 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_187) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_189) * as_type(2)))) * as_type(16))))))]; + int const x_194 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_187) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_189) * as_type(2)))) * as_type(16))))))]; if ((x_194 == 0)) { int const x_198 = j; p.x = as_type((as_type(x_198) * as_type(2))); @@ -174,7 +174,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } int const x_209 = p.x; int const x_211 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_209) + as_type(as_type((as_type(x_211) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_209) + as_type(as_type((as_type(x_211) * as_type(16))))))] = 1; } else { int const x_215 = v; int const x_216 = directions; @@ -195,7 +195,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_228) { int const x_232 = p.x; int const x_235 = p.y; - int const x_239 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_232) - as_type(2)))) + as_type(as_type((as_type(x_235) * as_type(16))))))]; + int const x_239 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_232) - as_type(2)))) + as_type(as_type((as_type(x_235) * as_type(16))))))]; x_240 = (x_239 == 0); x_241_phi = x_240; } @@ -205,13 +205,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_244) - as_type(1))); int const x_247 = p.x; int const x_249 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_247) + as_type(as_type((as_type(x_249) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_247) + as_type(as_type((as_type(x_249) * as_type(16))))))] = 1; int const x_254 = p.x; int const x_257 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_254) - as_type(1)))) + as_type(as_type((as_type(x_257) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_254) - as_type(1)))) + as_type(as_type((as_type(x_257) * as_type(16))))))] = 1; int const x_262 = p.x; int const x_265 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_262) - as_type(2)))) + as_type(as_type((as_type(x_265) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_262) - as_type(2)))) + as_type(as_type((as_type(x_265) * as_type(16))))))] = 1; int const x_270 = p.x; p.x = as_type((as_type(x_270) - as_type(2))); } @@ -228,7 +228,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_280) { int const x_284 = p.x; int const x_286 = p.y; - int const x_291 = (*(tint_symbol_6)).arr[as_type((as_type(x_284) + as_type(as_type((as_type(as_type((as_type(x_286) - as_type(2)))) * as_type(16))))))]; + int const x_291 = (*(tint_symbol_4)).arr[as_type((as_type(x_284) + as_type(as_type((as_type(as_type((as_type(x_286) - as_type(2)))) * as_type(16))))))]; x_292 = (x_291 == 0); x_293_phi = x_292; } @@ -238,13 +238,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_296) - as_type(1))); int const x_299 = p.x; int const x_301 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_299) + as_type(as_type((as_type(x_301) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_299) + as_type(as_type((as_type(x_301) * as_type(16))))))] = 1; int const x_306 = p.x; int const x_308 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_306) + as_type(as_type((as_type(as_type((as_type(x_308) - as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_306) + as_type(as_type((as_type(as_type((as_type(x_308) - as_type(1)))) * as_type(16))))))] = 1; int const x_314 = p.x; int const x_316 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_314) + as_type(as_type((as_type(as_type((as_type(x_316) - as_type(2)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_314) + as_type(as_type((as_type(as_type((as_type(x_316) - as_type(2)))) * as_type(16))))))] = 1; int const x_322 = p.y; p.y = as_type((as_type(x_322) - as_type(2))); } @@ -261,7 +261,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_332) { int const x_336 = p.x; int const x_339 = p.y; - int const x_343 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_336) + as_type(2)))) + as_type(as_type((as_type(x_339) * as_type(16))))))]; + int const x_343 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_336) + as_type(2)))) + as_type(as_type((as_type(x_339) * as_type(16))))))]; x_344 = (x_343 == 0); x_345_phi = x_344; } @@ -271,13 +271,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_348) - as_type(1))); int const x_351 = p.x; int const x_353 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_351) + as_type(as_type((as_type(x_353) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_351) + as_type(as_type((as_type(x_353) * as_type(16))))))] = 1; int const x_358 = p.x; int const x_361 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_358) + as_type(1)))) + as_type(as_type((as_type(x_361) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_358) + as_type(1)))) + as_type(as_type((as_type(x_361) * as_type(16))))))] = 1; int const x_366 = p.x; int const x_369 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_366) + as_type(2)))) + as_type(as_type((as_type(x_369) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_366) + as_type(2)))) + as_type(as_type((as_type(x_369) * as_type(16))))))] = 1; int const x_374 = p.x; p.x = as_type((as_type(x_374) + as_type(2))); } @@ -294,7 +294,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_384) { int const x_388 = p.x; int const x_390 = p.y; - int const x_395 = (*(tint_symbol_6)).arr[as_type((as_type(x_388) + as_type(as_type((as_type(as_type((as_type(x_390) + as_type(2)))) * as_type(16))))))]; + int const x_395 = (*(tint_symbol_4)).arr[as_type((as_type(x_388) + as_type(as_type((as_type(as_type((as_type(x_390) + as_type(2)))) * as_type(16))))))]; x_396 = (x_395 == 0); x_397_phi = x_396; } @@ -304,22 +304,22 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_400) - as_type(1))); int const x_403 = p.x; int const x_405 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_403) + as_type(as_type((as_type(x_405) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_403) + as_type(as_type((as_type(x_405) * as_type(16))))))] = 1; int const x_410 = p.x; int const x_412 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_410) + as_type(as_type((as_type(as_type((as_type(x_412) + as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_410) + as_type(as_type((as_type(as_type((as_type(x_412) + as_type(1)))) * as_type(16))))))] = 1; int const x_418 = p.x; int const x_420 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_418) + as_type(as_type((as_type(as_type((as_type(x_420) + as_type(2)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_418) + as_type(as_type((as_type(as_type((as_type(x_420) + as_type(2)))) * as_type(16))))))] = 1; int const x_426 = p.y; p.y = as_type((as_type(x_426) + as_type(2))); } } int const x_430 = ipos.y; int const x_433 = ipos.x; - int const x_436 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_430) * as_type(16)))) + as_type(x_433)))]; + int const x_436 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_430) * as_type(16)))) + as_type(x_433)))]; if ((x_436 == 1)) { - *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; } { @@ -330,18 +330,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } } } - *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread tint_array_wrapper tint_symbol_9 = {}; - thread float4 tint_symbol_10 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_8), &(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_7, tint_symbol_6, tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + thread tint_array_wrapper tint_symbol_10 = {}; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.hlsl index a5177e1007..a922b72f32 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.hlsl @@ -282,11 +282,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.msl index 0bff46416d..98a5d7f385 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, thread float4* const tint_symbol_5) { float2 pos = 0.0f; int2 ipos = 0; int i = 0; @@ -24,7 +24,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ int directions = 0; int j = 0; int d = 0; - float4 const x_57 = *(tint_symbol_5); + float4 const x_57 = *(tint_symbol_3); float2 const x_60 = x_7.resolution; pos = (float2(x_57.x, x_57.y) / x_60); float const x_63 = pos.x; @@ -38,7 +38,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ break; } int const x_78 = i; - (*(tint_symbol_6)).arr[x_78] = 0; + (*(tint_symbol_4)).arr[x_78] = 0; { int const x_80 = i; i = as_type((as_type(x_80) + as_type(1))); @@ -65,7 +65,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_90) { int const x_94 = p.x; int const x_97 = p.y; - int const x_101 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_94) - as_type(2)))) + as_type(as_type((as_type(x_97) * as_type(16))))))]; + int const x_101 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_94) - as_type(2)))) + as_type(as_type((as_type(x_97) * as_type(16))))))]; x_102 = (x_101 == 0); x_103_phi = x_102; } @@ -80,7 +80,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_110) { int const x_114 = p.x; int const x_116 = p.y; - int const x_121 = (*(tint_symbol_6)).arr[as_type((as_type(x_114) + as_type(as_type((as_type(as_type((as_type(x_116) - as_type(2)))) * as_type(16))))))]; + int const x_121 = (*(tint_symbol_4)).arr[as_type((as_type(x_114) + as_type(as_type((as_type(as_type((as_type(x_116) - as_type(2)))) * as_type(16))))))]; x_122 = (x_121 == 0); x_123_phi = x_122; } @@ -95,7 +95,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_130) { int const x_134 = p.x; int const x_137 = p.y; - int const x_141 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_134) + as_type(2)))) + as_type(as_type((as_type(x_137) * as_type(16))))))]; + int const x_141 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_134) + as_type(2)))) + as_type(as_type((as_type(x_137) * as_type(16))))))]; x_142 = (x_141 == 0); x_143_phi = x_142; } @@ -110,7 +110,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_150) { int const x_154 = p.x; int const x_156 = p.y; - int const x_161 = (*(tint_symbol_6)).arr[as_type((as_type(x_154) + as_type(as_type((as_type(as_type((as_type(x_156) + as_type(2)))) * as_type(16))))))]; + int const x_161 = (*(tint_symbol_4)).arr[as_type((as_type(x_154) + as_type(as_type((as_type(as_type((as_type(x_156) + as_type(2)))) * as_type(16))))))]; x_162 = (x_161 == 0); x_163_phi = x_162; } @@ -154,7 +154,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } int const x_187 = j; int const x_189 = i; - int const x_194 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_187) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_189) * as_type(2)))) * as_type(16))))))]; + int const x_194 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_187) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_189) * as_type(2)))) * as_type(16))))))]; if ((x_194 == 0)) { int const x_198 = j; p.x = as_type((as_type(x_198) * as_type(2))); @@ -174,7 +174,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } int const x_209 = p.x; int const x_211 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_209) + as_type(as_type((as_type(x_211) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_209) + as_type(as_type((as_type(x_211) * as_type(16))))))] = 1; } else { int const x_215 = v; int const x_216 = directions; @@ -195,7 +195,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_228) { int const x_232 = p.x; int const x_235 = p.y; - int const x_239 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_232) - as_type(2)))) + as_type(as_type((as_type(x_235) * as_type(16))))))]; + int const x_239 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_232) - as_type(2)))) + as_type(as_type((as_type(x_235) * as_type(16))))))]; x_240 = (x_239 == 0); x_241_phi = x_240; } @@ -205,13 +205,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_244) - as_type(1))); int const x_247 = p.x; int const x_249 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_247) + as_type(as_type((as_type(x_249) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_247) + as_type(as_type((as_type(x_249) * as_type(16))))))] = 1; int const x_254 = p.x; int const x_257 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_254) - as_type(1)))) + as_type(as_type((as_type(x_257) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_254) - as_type(1)))) + as_type(as_type((as_type(x_257) * as_type(16))))))] = 1; int const x_262 = p.x; int const x_265 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_262) - as_type(2)))) + as_type(as_type((as_type(x_265) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_262) - as_type(2)))) + as_type(as_type((as_type(x_265) * as_type(16))))))] = 1; int const x_270 = p.x; p.x = as_type((as_type(x_270) - as_type(2))); } @@ -228,7 +228,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_280) { int const x_284 = p.x; int const x_286 = p.y; - int const x_291 = (*(tint_symbol_6)).arr[as_type((as_type(x_284) + as_type(as_type((as_type(as_type((as_type(x_286) - as_type(2)))) * as_type(16))))))]; + int const x_291 = (*(tint_symbol_4)).arr[as_type((as_type(x_284) + as_type(as_type((as_type(as_type((as_type(x_286) - as_type(2)))) * as_type(16))))))]; x_292 = (x_291 == 0); x_293_phi = x_292; } @@ -238,13 +238,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_296) - as_type(1))); int const x_299 = p.x; int const x_301 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_299) + as_type(as_type((as_type(x_301) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_299) + as_type(as_type((as_type(x_301) * as_type(16))))))] = 1; int const x_306 = p.x; int const x_308 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_306) + as_type(as_type((as_type(as_type((as_type(x_308) - as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_306) + as_type(as_type((as_type(as_type((as_type(x_308) - as_type(1)))) * as_type(16))))))] = 1; int const x_314 = p.x; int const x_316 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_314) + as_type(as_type((as_type(as_type((as_type(x_316) - as_type(2)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_314) + as_type(as_type((as_type(as_type((as_type(x_316) - as_type(2)))) * as_type(16))))))] = 1; int const x_322 = p.y; p.y = as_type((as_type(x_322) - as_type(2))); } @@ -261,7 +261,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_332) { int const x_336 = p.x; int const x_339 = p.y; - int const x_343 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_336) + as_type(2)))) + as_type(as_type((as_type(x_339) * as_type(16))))))]; + int const x_343 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_336) + as_type(2)))) + as_type(as_type((as_type(x_339) * as_type(16))))))]; x_344 = (x_343 == 0); x_345_phi = x_344; } @@ -271,13 +271,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_348) - as_type(1))); int const x_351 = p.x; int const x_353 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_351) + as_type(as_type((as_type(x_353) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_351) + as_type(as_type((as_type(x_353) * as_type(16))))))] = 1; int const x_358 = p.x; int const x_361 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_358) + as_type(1)))) + as_type(as_type((as_type(x_361) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_358) + as_type(1)))) + as_type(as_type((as_type(x_361) * as_type(16))))))] = 1; int const x_366 = p.x; int const x_369 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_366) + as_type(2)))) + as_type(as_type((as_type(x_369) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_366) + as_type(2)))) + as_type(as_type((as_type(x_369) * as_type(16))))))] = 1; int const x_374 = p.x; p.x = as_type((as_type(x_374) + as_type(2))); } @@ -294,7 +294,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_384) { int const x_388 = p.x; int const x_390 = p.y; - int const x_395 = (*(tint_symbol_6)).arr[as_type((as_type(x_388) + as_type(as_type((as_type(as_type((as_type(x_390) + as_type(2)))) * as_type(16))))))]; + int const x_395 = (*(tint_symbol_4)).arr[as_type((as_type(x_388) + as_type(as_type((as_type(as_type((as_type(x_390) + as_type(2)))) * as_type(16))))))]; x_396 = (x_395 == 0); x_397_phi = x_396; } @@ -304,22 +304,22 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_400) - as_type(1))); int const x_403 = p.x; int const x_405 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_403) + as_type(as_type((as_type(x_405) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_403) + as_type(as_type((as_type(x_405) * as_type(16))))))] = 1; int const x_410 = p.x; int const x_412 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_410) + as_type(as_type((as_type(as_type((as_type(x_412) + as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_410) + as_type(as_type((as_type(as_type((as_type(x_412) + as_type(1)))) * as_type(16))))))] = 1; int const x_418 = p.x; int const x_420 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_418) + as_type(as_type((as_type(as_type((as_type(x_420) + as_type(2)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_418) + as_type(as_type((as_type(as_type((as_type(x_420) + as_type(2)))) * as_type(16))))))] = 1; int const x_426 = p.y; p.y = as_type((as_type(x_426) + as_type(2))); } } int const x_430 = ipos.y; int const x_433 = ipos.x; - int const x_436 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_430) * as_type(16)))) + as_type(x_433)))]; + int const x_436 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_430) * as_type(16)))) + as_type(x_433)))]; if ((x_436 == 1)) { - *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; } { @@ -330,18 +330,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } } } - *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread tint_array_wrapper tint_symbol_9 = {}; - thread float4 tint_symbol_10 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_8), &(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_7, tint_symbol_6, tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + thread tint_array_wrapper tint_symbol_10 = {}; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.hlsl index 206d78bd7b..bcc4048831 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.hlsl @@ -192,11 +192,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.msl index 50fbd98889..c60e9073f0 100755 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float x_51 = 0.0f; float x_55 = 0.0f; @@ -31,7 +31,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float c = float3(7.0f, 8.0f, 9.0f); float const x_47 = x_7.resolution.x; float const x_49 = rint((x_47 * 0.125f)); - x_51 = (*(tint_symbol_5)).x; + x_51 = (*(tint_symbol_3)).x; switch(0u) { default: { x_55_phi = -0.5f; @@ -98,7 +98,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float bool x_120_phi = false; float const x_85 = x_85_phi; c.x = x_85; - x_88 = (*(tint_symbol_5)).y; + x_88 = (*(tint_symbol_3)).y; switch(0u) { default: { x_92_phi = -0.5f; @@ -182,17 +182,23 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } float3 const x_143 = c; float3 const x_145 = normalize(fabs(x_143)); - *(tint_symbol_6) = float4(x_145.x, x_145.y, x_145.z, 1.0f); + *(tint_symbol_4) = float4(x_145.x, x_145.y, x_145.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.hlsl index 8d53961c48..8311f18a75 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.hlsl @@ -192,11 +192,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.msl index e525067f34..a1989fca9c 100755 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float x_51 = 0.0f; float x_55 = 0.0f; @@ -31,7 +31,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float c = float3(7.0f, 8.0f, 9.0f); float const x_47 = x_7.resolution.x; float const x_49 = rint((x_47 * 0.125f)); - x_51 = (*(tint_symbol_5)).x; + x_51 = (*(tint_symbol_3)).x; switch(0u) { default: { x_55_phi = -0.5f; @@ -98,7 +98,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float bool x_120_phi = false; float const x_85 = x_85_phi; c.x = x_85; - x_88 = (*(tint_symbol_5)).y; + x_88 = (*(tint_symbol_3)).y; switch(0u) { default: { x_92_phi = -0.5f; @@ -182,17 +182,23 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } float3 const x_143 = c; float3 const x_145 = normalize(fabs(x_143)); - *(tint_symbol_6) = float4(x_145.x, x_145.y, x_145.z, 1.0f); + *(tint_symbol_4) = float4(x_145.x, x_145.y, x_145.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.hlsl index c78548a49e..d2184a14a9 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.hlsl @@ -197,11 +197,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.msl index b21c6f8c8a..4b52877563 100755 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float x_53 = 0.0f; float x_57 = 0.0f; @@ -33,7 +33,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float float2 const x_48 = float2(1.0f, x_47); float const x_50 = rint((x_47 * 0.125f)); float2 const x_51 = float2(0.0f, -0.5f); - x_53 = (*(tint_symbol_5)).x; + x_53 = (*(tint_symbol_3)).x; switch(0u) { default: { x_57_phi = -0.5f; @@ -101,7 +101,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float float const x_87 = x_87_phi; float4 const x_89 = float4(x_84, 0.400000006f, x_83, 0.400000006f); c.x = x_87; - x_92 = (*(tint_symbol_5)).y; + x_92 = (*(tint_symbol_3)).y; switch(0u) { default: { float4 const x_95 = float4(x_51, 0.0f, x_57); @@ -187,17 +187,23 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } float3 const x_149 = c; float3 const x_151 = normalize(fabs(x_149)); - *(tint_symbol_6) = float4(x_151.x, x_151.y, x_151.z, 1.0f); + *(tint_symbol_4) = float4(x_151.x, x_151.y, x_151.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.hlsl index f5c9fb04f1..24247b1696 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.hlsl @@ -197,11 +197,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.msl index 2aea05b188..f77b86b9e0 100755 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float x_53 = 0.0f; float x_57 = 0.0f; @@ -33,7 +33,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float float2 const x_48 = float2(1.0f, x_47); float const x_50 = rint((x_47 * 0.125f)); float2 const x_51 = float2(0.0f, -0.5f); - x_53 = (*(tint_symbol_5)).x; + x_53 = (*(tint_symbol_3)).x; switch(0u) { default: { x_57_phi = -0.5f; @@ -101,7 +101,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float float const x_87 = x_87_phi; float4 const x_89 = float4(x_84, 0.400000006f, x_83, 0.400000006f); c.x = x_87; - x_92 = (*(tint_symbol_5)).y; + x_92 = (*(tint_symbol_3)).y; switch(0u) { default: { float4 const x_95 = float4(x_51, 0.0f, x_57); @@ -187,17 +187,23 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } float3 const x_149 = c; float3 const x_151 = normalize(fabs(x_149)); - *(tint_symbol_6) = float4(x_151.x, x_151.y, x_151.z, 1.0f); + *(tint_symbol_4) = float4(x_151.x, x_151.y, x_151.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.hlsl index 14cc0b58aa..8e5a341bdb 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.hlsl @@ -31,8 +31,8 @@ void main_1() { x_69_phi = x_70; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_78 = indexable[asint((x_66 % 16))]; x_GLF_color = x_78; return; @@ -48,11 +48,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.msl index bc1b29b483..203fef6865 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.msl @@ -10,16 +10,16 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; int x_66 = 0; int x_66_phi = 0; int x_69_phi = 0; - float4 const x_52 = *(tint_symbol_6); + float4 const x_52 = *(tint_symbol_4); float2 const x_55 = x_6.resolution; float2 const x_56 = (float2(x_52.x, x_52.y) / x_55); int const x_64 = as_type((as_type(int((x_56.x * 10.0f))) + as_type(as_type((as_type(int((x_56.y * 10.0f))) * as_type(10)))))); @@ -41,20 +41,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_69_phi = x_70; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float4 const x_78 = indexable.arr[as_type((x_66 % 16))]; - *(tint_symbol_7) = x_78; + *(tint_symbol_5) = x_78; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.hlsl index 14cc0b58aa..8e5a341bdb 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.hlsl @@ -31,8 +31,8 @@ void main_1() { x_69_phi = x_70; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_78 = indexable[asint((x_66 % 16))]; x_GLF_color = x_78; return; @@ -48,11 +48,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.msl index bc1b29b483..203fef6865 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.msl @@ -10,16 +10,16 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; int x_66 = 0; int x_66_phi = 0; int x_69_phi = 0; - float4 const x_52 = *(tint_symbol_6); + float4 const x_52 = *(tint_symbol_4); float2 const x_55 = x_6.resolution; float2 const x_56 = (float2(x_52.x, x_52.y) / x_55); int const x_64 = as_type((as_type(int((x_56.x * 10.0f))) + as_type(as_type((as_type(int((x_56.y * 10.0f))) * as_type(10)))))); @@ -41,20 +41,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_69_phi = x_70; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float4 const x_78 = indexable.arr[as_type((x_66 % 16))]; - *(tint_symbol_7) = x_78; + *(tint_symbol_5) = x_78; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.hlsl index ca6080371a..0f0037f224 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.hlsl @@ -32,8 +32,8 @@ void main_1() { x_75_phi = x_76; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_84 = indexable[asint((x_72 % 16))]; x_GLF_color = x_84; return; @@ -49,11 +49,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.msl index 0aeb0f5b81..ce529ef8a4 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.msl @@ -10,16 +10,16 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; int x_72 = 0; int x_72_phi = 0; int x_75_phi = 0; - float4 const x_54 = *(tint_symbol_6); + float4 const x_54 = *(tint_symbol_4); float2 const x_55 = float2(x_54.x, x_54.y); float2 const x_58 = x_6.resolution; float2 const x_59 = (x_55 / x_58); @@ -42,20 +42,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_75_phi = x_76; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float4 const x_84 = indexable.arr[as_type((x_72 % 16))]; - *(tint_symbol_7) = x_84; + *(tint_symbol_5) = x_84; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.hlsl index ca6080371a..0f0037f224 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.hlsl @@ -32,8 +32,8 @@ void main_1() { x_75_phi = x_76; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_84 = indexable[asint((x_72 % 16))]; x_GLF_color = x_84; return; @@ -49,11 +49,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.msl index 0aeb0f5b81..ce529ef8a4 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.msl @@ -10,16 +10,16 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; int x_72 = 0; int x_72_phi = 0; int x_75_phi = 0; - float4 const x_54 = *(tint_symbol_6); + float4 const x_54 = *(tint_symbol_4); float2 const x_55 = float2(x_54.x, x_54.y); float2 const x_58 = x_6.resolution; float2 const x_59 = (x_55 / x_58); @@ -42,20 +42,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_75_phi = x_76; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float4 const x_84 = indexable.arr[as_type((x_72 % 16))]; - *(tint_symbol_7) = x_84; + *(tint_symbol_5) = x_84; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.hlsl index cd5825d506..d1165c524d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.hlsl @@ -34,21 +34,21 @@ void main_1() { break; } const int x_220 = x_213.x; - const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_195 = tint_symbol_5; + const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_195 = tint_symbol_4; const int x_222 = x_195[x_216]; const bool x_224 = (x_220 < (x_222 + 15)); x_231_phi = x_224; if (x_224) { - const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_196 = tint_symbol_6; + const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_196 = tint_symbol_5; const int x_228 = x_196[x_216]; x_230 = (x_220 > (x_228 - 15)); x_231_phi = x_230; } if (x_231_phi) { - const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_197 = tint_symbol_7; + const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_197 = tint_symbol_6; const int x_235 = x_197[x_216]; const float x_240 = ((15.0f - abs(float((x_220 - x_235)))) * 0.06666667f); x_241 = float4(x_240, x_240, x_240, 1.0f); @@ -87,11 +87,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; + const main_out tint_symbol_7 = {x_GLF_color}; + return tint_symbol_7; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.msl index f4067083ed..d343b1c58d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { tint_array_wrapper x_195 = {}; tint_array_wrapper x_196 = {}; tint_array_wrapper x_197 = {}; @@ -25,7 +25,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float float4 x_243_phi = 0.0f; bool x_244_phi = false; float4 x_246_phi = 0.0f; - float4 const x_198 = *(tint_symbol_8); + float4 const x_198 = *(tint_symbol_6); float2 const x_201 = x_6.resolution; float2 const x_202 = (float2(x_198.x, x_198.y) / x_201); x_209 = int2(int((x_202.x * 256.0f)), int((x_202.y * 256.0f))); @@ -44,22 +44,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float break; } int const x_220 = x_213.x; - tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_195 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_195 = tint_symbol_2; int const x_222 = x_195.arr[x_216]; bool const x_224 = (x_220 < as_type((as_type(x_222) + as_type(15)))); x_231_phi = x_224; if (x_224) { - tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_196 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_196 = tint_symbol_3; int const x_228 = x_196.arr[x_216]; x_230 = (x_220 > as_type((as_type(x_228) - as_type(15)))); x_231_phi = x_230; } bool const x_231 = x_231_phi; if (x_231) { - tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_197 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_197 = tint_symbol_4; int const x_235 = x_197.arr[x_216]; float const x_240 = ((15.0f - fabs(float(as_type((as_type(x_220) - as_type(x_235)))))) * 0.06666667f); x_241 = float4(x_240, x_240, x_240, 1.0f); @@ -85,17 +85,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float } } float4 const x_246 = x_246_phi; - *(tint_symbol_9) = x_246; + *(tint_symbol_7) = x_246; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_10 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - tint_symbol_10 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11}; - tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { + *(tint_symbol_8) = gl_FragCoord_param; + main_1(x_6, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)}; + return tint_symbol_5; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_10 = 0.0f; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.hlsl index cd5825d506..d1165c524d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.hlsl @@ -34,21 +34,21 @@ void main_1() { break; } const int x_220 = x_213.x; - const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_195 = tint_symbol_5; + const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_195 = tint_symbol_4; const int x_222 = x_195[x_216]; const bool x_224 = (x_220 < (x_222 + 15)); x_231_phi = x_224; if (x_224) { - const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_196 = tint_symbol_6; + const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_196 = tint_symbol_5; const int x_228 = x_196[x_216]; x_230 = (x_220 > (x_228 - 15)); x_231_phi = x_230; } if (x_231_phi) { - const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_197 = tint_symbol_7; + const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_197 = tint_symbol_6; const int x_235 = x_197[x_216]; const float x_240 = ((15.0f - abs(float((x_220 - x_235)))) * 0.06666667f); x_241 = float4(x_240, x_240, x_240, 1.0f); @@ -87,11 +87,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; + const main_out tint_symbol_7 = {x_GLF_color}; + return tint_symbol_7; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.msl index f4067083ed..d343b1c58d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { tint_array_wrapper x_195 = {}; tint_array_wrapper x_196 = {}; tint_array_wrapper x_197 = {}; @@ -25,7 +25,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float float4 x_243_phi = 0.0f; bool x_244_phi = false; float4 x_246_phi = 0.0f; - float4 const x_198 = *(tint_symbol_8); + float4 const x_198 = *(tint_symbol_6); float2 const x_201 = x_6.resolution; float2 const x_202 = (float2(x_198.x, x_198.y) / x_201); x_209 = int2(int((x_202.x * 256.0f)), int((x_202.y * 256.0f))); @@ -44,22 +44,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float break; } int const x_220 = x_213.x; - tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_195 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_195 = tint_symbol_2; int const x_222 = x_195.arr[x_216]; bool const x_224 = (x_220 < as_type((as_type(x_222) + as_type(15)))); x_231_phi = x_224; if (x_224) { - tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_196 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_196 = tint_symbol_3; int const x_228 = x_196.arr[x_216]; x_230 = (x_220 > as_type((as_type(x_228) - as_type(15)))); x_231_phi = x_230; } bool const x_231 = x_231_phi; if (x_231) { - tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_197 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_197 = tint_symbol_4; int const x_235 = x_197.arr[x_216]; float const x_240 = ((15.0f - fabs(float(as_type((as_type(x_220) - as_type(x_235)))))) * 0.06666667f); x_241 = float4(x_240, x_240, x_240, 1.0f); @@ -85,17 +85,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float } } float4 const x_246 = x_246_phi; - *(tint_symbol_9) = x_246; + *(tint_symbol_7) = x_246; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_10 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - tint_symbol_10 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11}; - tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { + *(tint_symbol_8) = gl_FragCoord_param; + main_1(x_6, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)}; + return tint_symbol_5; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_10 = 0.0f; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.hlsl index 0e4020b9e8..e2eab22c01 100755 --- a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.hlsl @@ -42,25 +42,25 @@ void main_1() { break; } const int x_225 = x_218.x; - const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_195 = tint_symbol_5; + const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_195 = tint_symbol_4; const int x_227 = x_195[x_221]; const bool x_229 = (x_225 < (x_227 + 15)); x_236_phi = x_229; if (x_229) { - const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_196 = tint_symbol_6; + const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_196 = tint_symbol_5; const int x_233 = x_196[x_221]; x_235 = (x_225 > (x_233 - 15)); x_236_phi = x_235; } if (x_236_phi) { - const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_197 = tint_symbol_7; + const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_197 = tint_symbol_6; const int x_240 = x_197[x_221]; const int x_244 = (91 + 244); - const buf0 tint_symbol_8 = {x_208}; - const float x_248 = ((tint_symbol_8.resolution.y - abs(float((x_225 - x_240)))) * 0.06666667f); + const buf0 tint_symbol_7 = {x_208}; + const float x_248 = ((tint_symbol_7.resolution.y - abs(float((x_225 - x_240)))) * 0.06666667f); x_249 = float4(x_248, x_248, x_248, 1.0f); x_251_phi = x_249; x_252_phi = true; @@ -97,11 +97,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; + const main_out tint_symbol_8 = {x_GLF_color}; + return tint_symbol_8; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.msl index 6c9b126752..fb55e831bd 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { tint_array_wrapper x_195 = {}; tint_array_wrapper x_196 = {}; tint_array_wrapper x_197 = {}; @@ -31,7 +31,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float float4 x_251_phi = 0.0f; bool x_252_phi = false; float4 x_254_phi = 0.0f; - float4 const x_198 = *(tint_symbol_9); + float4 const x_198 = *(tint_symbol_7); float2 const x_201 = x_6.resolution; float2 const x_202 = (float2(x_198.x, x_198.y) / x_201); int const x_204 = tint_unary_minus(82); @@ -53,26 +53,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float break; } int const x_225 = x_218.x; - tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_195 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_195 = tint_symbol_2; int const x_227 = x_195.arr[x_221]; bool const x_229 = (x_225 < as_type((as_type(x_227) + as_type(15)))); x_236_phi = x_229; if (x_229) { - tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_196 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_196 = tint_symbol_3; int const x_233 = x_196.arr[x_221]; x_235 = (x_225 > as_type((as_type(x_233) - as_type(15)))); x_236_phi = x_235; } bool const x_236 = x_236_phi; if (x_236) { - tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_197 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_197 = tint_symbol_4; int const x_240 = x_197.arr[x_221]; int const x_244 = as_type((as_type(91) + as_type(244))); - buf0 const tint_symbol_7 = {.resolution=x_208}; - float const x_248 = ((tint_symbol_7.resolution.y - fabs(float(as_type((as_type(x_225) - as_type(x_240)))))) * 0.06666667f); + buf0 const tint_symbol_5 = {.resolution=x_208}; + float const x_248 = ((tint_symbol_5.resolution.y - fabs(float(as_type((as_type(x_225) - as_type(x_240)))))) * 0.06666667f); x_249 = float4(x_248, x_248, x_248, 1.0f); x_251_phi = x_249; x_252_phi = true; @@ -96,17 +96,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float } } float4 const x_254 = x_254_phi; - *(tint_symbol_10) = x_254; + *(tint_symbol_8) = x_254; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_6, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.hlsl index 0e4020b9e8..e2eab22c01 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.hlsl @@ -42,25 +42,25 @@ void main_1() { break; } const int x_225 = x_218.x; - const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_195 = tint_symbol_5; + const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_195 = tint_symbol_4; const int x_227 = x_195[x_221]; const bool x_229 = (x_225 < (x_227 + 15)); x_236_phi = x_229; if (x_229) { - const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_196 = tint_symbol_6; + const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_196 = tint_symbol_5; const int x_233 = x_196[x_221]; x_235 = (x_225 > (x_233 - 15)); x_236_phi = x_235; } if (x_236_phi) { - const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_197 = tint_symbol_7; + const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_197 = tint_symbol_6; const int x_240 = x_197[x_221]; const int x_244 = (91 + 244); - const buf0 tint_symbol_8 = {x_208}; - const float x_248 = ((tint_symbol_8.resolution.y - abs(float((x_225 - x_240)))) * 0.06666667f); + const buf0 tint_symbol_7 = {x_208}; + const float x_248 = ((tint_symbol_7.resolution.y - abs(float((x_225 - x_240)))) * 0.06666667f); x_249 = float4(x_248, x_248, x_248, 1.0f); x_251_phi = x_249; x_252_phi = true; @@ -97,11 +97,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; + const main_out tint_symbol_8 = {x_GLF_color}; + return tint_symbol_8; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.msl index 6c9b126752..fb55e831bd 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { tint_array_wrapper x_195 = {}; tint_array_wrapper x_196 = {}; tint_array_wrapper x_197 = {}; @@ -31,7 +31,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float float4 x_251_phi = 0.0f; bool x_252_phi = false; float4 x_254_phi = 0.0f; - float4 const x_198 = *(tint_symbol_9); + float4 const x_198 = *(tint_symbol_7); float2 const x_201 = x_6.resolution; float2 const x_202 = (float2(x_198.x, x_198.y) / x_201); int const x_204 = tint_unary_minus(82); @@ -53,26 +53,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float break; } int const x_225 = x_218.x; - tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_195 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_195 = tint_symbol_2; int const x_227 = x_195.arr[x_221]; bool const x_229 = (x_225 < as_type((as_type(x_227) + as_type(15)))); x_236_phi = x_229; if (x_229) { - tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_196 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_196 = tint_symbol_3; int const x_233 = x_196.arr[x_221]; x_235 = (x_225 > as_type((as_type(x_233) - as_type(15)))); x_236_phi = x_235; } bool const x_236 = x_236_phi; if (x_236) { - tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_197 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_197 = tint_symbol_4; int const x_240 = x_197.arr[x_221]; int const x_244 = as_type((as_type(91) + as_type(244))); - buf0 const tint_symbol_7 = {.resolution=x_208}; - float const x_248 = ((tint_symbol_7.resolution.y - fabs(float(as_type((as_type(x_225) - as_type(x_240)))))) * 0.06666667f); + buf0 const tint_symbol_5 = {.resolution=x_208}; + float const x_248 = ((tint_symbol_5.resolution.y - fabs(float(as_type((as_type(x_225) - as_type(x_240)))))) * 0.06666667f); x_249 = float4(x_248, x_248, x_248, 1.0f); x_251_phi = x_249; x_252_phi = true; @@ -96,17 +96,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float } } float4 const x_254 = x_254_phi; - *(tint_symbol_10) = x_254; + *(tint_symbol_8) = x_254; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_6, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.hlsl index d8420f8fb4..bf9483eca1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.hlsl @@ -299,11 +299,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.msl index 147da65973..a43e94d0b9 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float2x4* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, thread float2x4* const tint_symbol_5, thread float4* const tint_symbol_6) { float2 pos = 0.0f; int2 ipos = 0; int i = 0; @@ -29,7 +29,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ int directions = 0; int j = 0; int d = 0; - float4 const x_63 = *(tint_symbol_5); + float4 const x_63 = *(tint_symbol_3); float2 const x_67 = x_7.resolution; int const x_68 = tint_unary_minus(as_type((as_type(256) - as_type(14)))); pos = (float2(x_63.x, x_63.y) / x_67); @@ -44,7 +44,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ break; } int const x_86 = i; - (*(tint_symbol_6)).arr[x_86] = 0; + (*(tint_symbol_4)).arr[x_86] = 0; { int const x_88 = i; i = as_type((as_type(x_88) + as_type(1))); @@ -71,7 +71,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_98) { int const x_102 = p.x; int const x_105 = p.y; - int const x_109 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_102) - as_type(2)))) + as_type(as_type((as_type(x_105) * as_type(16))))))]; + int const x_109 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_102) - as_type(2)))) + as_type(as_type((as_type(x_105) * as_type(16))))))]; x_110 = (x_109 == 0); x_111_phi = x_110; } @@ -86,7 +86,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_118) { int const x_122 = p.x; int const x_124 = p.y; - int const x_129 = (*(tint_symbol_6)).arr[as_type((as_type(x_122) + as_type(as_type((as_type(as_type((as_type(x_124) - as_type(2)))) * as_type(16))))))]; + int const x_129 = (*(tint_symbol_4)).arr[as_type((as_type(x_122) + as_type(as_type((as_type(as_type((as_type(x_124) - as_type(2)))) * as_type(16))))))]; x_130 = (x_129 == 0); x_131_phi = x_130; } @@ -101,7 +101,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_138) { int const x_142 = p.x; int const x_145 = p.y; - int const x_149 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_142) + as_type(2)))) + as_type(as_type((as_type(x_145) * as_type(16))))))]; + int const x_149 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_142) + as_type(2)))) + as_type(as_type((as_type(x_145) * as_type(16))))))]; x_150 = (x_149 == 0); x_151_phi = x_150; } @@ -117,7 +117,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_159) { int const x_163 = p.x; int const x_165 = p.y; - int const x_170 = (*(tint_symbol_6)).arr[as_type((as_type(x_163) + as_type(as_type((as_type(as_type((as_type(x_165) + as_type(2)))) * as_type(16))))))]; + int const x_170 = (*(tint_symbol_4)).arr[as_type((as_type(x_163) + as_type(as_type((as_type(as_type((as_type(x_165) + as_type(2)))) * as_type(16))))))]; x_171 = (x_170 == 0); x_172_phi = x_171; } @@ -154,7 +154,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } j = 0; int const x_189 = as_type((as_type(x_156) - as_type(x_186))); - *(tint_symbol_7) = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)); + *(tint_symbol_5) = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)); if (false) { { int const x_216 = i; @@ -170,7 +170,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } int const x_197 = j; int const x_199 = i; - int const x_204 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_197) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_199) * as_type(2)))) * as_type(16))))))]; + int const x_204 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_197) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_199) * as_type(2)))) * as_type(16))))))]; if ((x_204 == 0)) { int const x_208 = j; p.x = as_type((as_type(x_208) * as_type(2))); @@ -190,7 +190,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } int const x_219 = p.x; int const x_221 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_219) + as_type(as_type((as_type(x_221) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_219) + as_type(as_type((as_type(x_221) * as_type(16))))))] = 1; } else { int const x_225 = v; int const x_226 = directions; @@ -211,7 +211,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_238) { int const x_242 = p.x; int const x_245 = p.y; - int const x_249 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_242) - as_type(2)))) + as_type(as_type((as_type(x_245) * as_type(16))))))]; + int const x_249 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_242) - as_type(2)))) + as_type(as_type((as_type(x_245) * as_type(16))))))]; x_250 = (x_249 == 0); x_251_phi = x_250; } @@ -221,13 +221,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_254) - as_type(1))); int const x_257 = p.x; int const x_259 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_257) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_257) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; int const x_264 = p.x; int const x_267 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(1)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(1)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; int const x_272 = p.x; int const x_275 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_272) - as_type(2)))) + as_type(as_type((as_type(x_275) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_272) - as_type(2)))) + as_type(as_type((as_type(x_275) * as_type(16))))))] = 1; int const x_280 = p.x; p.x = as_type((as_type(x_280) - as_type(2))); } @@ -244,7 +244,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_290) { int const x_294 = p.x; int const x_296 = p.y; - int const x_301 = (*(tint_symbol_6)).arr[as_type((as_type(x_294) + as_type(as_type((as_type(as_type((as_type(x_296) - as_type(2)))) * as_type(16))))))]; + int const x_301 = (*(tint_symbol_4)).arr[as_type((as_type(x_294) + as_type(as_type((as_type(as_type((as_type(x_296) - as_type(2)))) * as_type(16))))))]; x_302 = (x_301 == 0); x_303_phi = x_302; } @@ -254,13 +254,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_306) - as_type(1))); int const x_309 = p.x; int const x_311 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_309) + as_type(as_type((as_type(x_311) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_309) + as_type(as_type((as_type(x_311) * as_type(16))))))] = 1; int const x_316 = p.x; int const x_318 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_316) + as_type(as_type((as_type(as_type((as_type(x_318) - as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_316) + as_type(as_type((as_type(as_type((as_type(x_318) - as_type(1)))) * as_type(16))))))] = 1; int const x_324 = p.x; int const x_326 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_324) + as_type(as_type((as_type(as_type((as_type(x_326) - as_type(2)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_324) + as_type(as_type((as_type(as_type((as_type(x_326) - as_type(2)))) * as_type(16))))))] = 1; int const x_332 = p.y; p.y = as_type((as_type(x_332) - as_type(2))); } @@ -277,7 +277,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_342) { int const x_346 = p.x; int const x_349 = p.y; - int const x_353 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_346) + as_type(2)))) + as_type(as_type((as_type(x_349) * as_type(16))))))]; + int const x_353 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_346) + as_type(2)))) + as_type(as_type((as_type(x_349) * as_type(16))))))]; x_354 = (x_353 == 0); x_355_phi = x_354; } @@ -287,13 +287,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_358) - as_type(1))); int const x_361 = p.x; int const x_363 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_361) + as_type(as_type((as_type(x_363) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_361) + as_type(as_type((as_type(x_363) * as_type(16))))))] = 1; int const x_368 = p.x; int const x_371 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_368) + as_type(1)))) + as_type(as_type((as_type(x_371) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_368) + as_type(1)))) + as_type(as_type((as_type(x_371) * as_type(16))))))] = 1; int const x_376 = p.x; int const x_379 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_376) + as_type(2)))) + as_type(as_type((as_type(x_379) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_376) + as_type(2)))) + as_type(as_type((as_type(x_379) * as_type(16))))))] = 1; int const x_384 = p.x; p.x = as_type((as_type(x_384) + as_type(2))); } @@ -310,7 +310,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_394) { int const x_398 = p.x; int const x_400 = p.y; - int const x_405 = (*(tint_symbol_6)).arr[as_type((as_type(x_398) + as_type(as_type((as_type(as_type((as_type(x_400) + as_type(2)))) * as_type(16))))))]; + int const x_405 = (*(tint_symbol_4)).arr[as_type((as_type(x_398) + as_type(as_type((as_type(as_type((as_type(x_400) + as_type(2)))) * as_type(16))))))]; x_406 = (x_405 == 0); x_407_phi = x_406; } @@ -320,22 +320,22 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_410) - as_type(1))); int const x_413 = p.x; int const x_415 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_413) + as_type(as_type((as_type(x_415) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_413) + as_type(as_type((as_type(x_415) * as_type(16))))))] = 1; int const x_420 = p.x; int const x_422 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_420) + as_type(as_type((as_type(as_type((as_type(x_422) + as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_420) + as_type(as_type((as_type(as_type((as_type(x_422) + as_type(1)))) * as_type(16))))))] = 1; int const x_428 = p.x; int const x_430 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_428) + as_type(as_type((as_type(as_type((as_type(x_430) + as_type(2)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_428) + as_type(as_type((as_type(as_type((as_type(x_430) + as_type(2)))) * as_type(16))))))] = 1; int const x_436 = p.y; p.y = as_type((as_type(x_436) + as_type(2))); } } int const x_440 = ipos.y; int const x_443 = ipos.x; - int const x_446 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_440) * as_type(16)))) + as_type(x_443)))]; + int const x_446 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_440) * as_type(16)))) + as_type(x_443)))]; if ((x_446 == 1)) { - *(tint_symbol_8) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; } { @@ -346,19 +346,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } } } - *(tint_symbol_8) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread tint_array_wrapper tint_symbol_10 = {}; - thread float2x4 tint_symbol_11 = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)); - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float2x4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(x_7, tint_symbol_7, tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread tint_array_wrapper tint_symbol_12 = {}; + thread float2x4 tint_symbol_13 = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)); + thread float4 tint_symbol_14 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.hlsl index d8420f8fb4..bf9483eca1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.hlsl @@ -299,11 +299,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.msl index 147da65973..a43e94d0b9 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float2x4* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, thread float2x4* const tint_symbol_5, thread float4* const tint_symbol_6) { float2 pos = 0.0f; int2 ipos = 0; int i = 0; @@ -29,7 +29,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ int directions = 0; int j = 0; int d = 0; - float4 const x_63 = *(tint_symbol_5); + float4 const x_63 = *(tint_symbol_3); float2 const x_67 = x_7.resolution; int const x_68 = tint_unary_minus(as_type((as_type(256) - as_type(14)))); pos = (float2(x_63.x, x_63.y) / x_67); @@ -44,7 +44,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ break; } int const x_86 = i; - (*(tint_symbol_6)).arr[x_86] = 0; + (*(tint_symbol_4)).arr[x_86] = 0; { int const x_88 = i; i = as_type((as_type(x_88) + as_type(1))); @@ -71,7 +71,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_98) { int const x_102 = p.x; int const x_105 = p.y; - int const x_109 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_102) - as_type(2)))) + as_type(as_type((as_type(x_105) * as_type(16))))))]; + int const x_109 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_102) - as_type(2)))) + as_type(as_type((as_type(x_105) * as_type(16))))))]; x_110 = (x_109 == 0); x_111_phi = x_110; } @@ -86,7 +86,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_118) { int const x_122 = p.x; int const x_124 = p.y; - int const x_129 = (*(tint_symbol_6)).arr[as_type((as_type(x_122) + as_type(as_type((as_type(as_type((as_type(x_124) - as_type(2)))) * as_type(16))))))]; + int const x_129 = (*(tint_symbol_4)).arr[as_type((as_type(x_122) + as_type(as_type((as_type(as_type((as_type(x_124) - as_type(2)))) * as_type(16))))))]; x_130 = (x_129 == 0); x_131_phi = x_130; } @@ -101,7 +101,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_138) { int const x_142 = p.x; int const x_145 = p.y; - int const x_149 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_142) + as_type(2)))) + as_type(as_type((as_type(x_145) * as_type(16))))))]; + int const x_149 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_142) + as_type(2)))) + as_type(as_type((as_type(x_145) * as_type(16))))))]; x_150 = (x_149 == 0); x_151_phi = x_150; } @@ -117,7 +117,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_159) { int const x_163 = p.x; int const x_165 = p.y; - int const x_170 = (*(tint_symbol_6)).arr[as_type((as_type(x_163) + as_type(as_type((as_type(as_type((as_type(x_165) + as_type(2)))) * as_type(16))))))]; + int const x_170 = (*(tint_symbol_4)).arr[as_type((as_type(x_163) + as_type(as_type((as_type(as_type((as_type(x_165) + as_type(2)))) * as_type(16))))))]; x_171 = (x_170 == 0); x_172_phi = x_171; } @@ -154,7 +154,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } j = 0; int const x_189 = as_type((as_type(x_156) - as_type(x_186))); - *(tint_symbol_7) = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)); + *(tint_symbol_5) = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)); if (false) { { int const x_216 = i; @@ -170,7 +170,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } int const x_197 = j; int const x_199 = i; - int const x_204 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_197) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_199) * as_type(2)))) * as_type(16))))))]; + int const x_204 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_197) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_199) * as_type(2)))) * as_type(16))))))]; if ((x_204 == 0)) { int const x_208 = j; p.x = as_type((as_type(x_208) * as_type(2))); @@ -190,7 +190,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } int const x_219 = p.x; int const x_221 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_219) + as_type(as_type((as_type(x_221) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_219) + as_type(as_type((as_type(x_221) * as_type(16))))))] = 1; } else { int const x_225 = v; int const x_226 = directions; @@ -211,7 +211,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_238) { int const x_242 = p.x; int const x_245 = p.y; - int const x_249 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_242) - as_type(2)))) + as_type(as_type((as_type(x_245) * as_type(16))))))]; + int const x_249 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_242) - as_type(2)))) + as_type(as_type((as_type(x_245) * as_type(16))))))]; x_250 = (x_249 == 0); x_251_phi = x_250; } @@ -221,13 +221,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_254) - as_type(1))); int const x_257 = p.x; int const x_259 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_257) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_257) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; int const x_264 = p.x; int const x_267 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(1)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(1)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; int const x_272 = p.x; int const x_275 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_272) - as_type(2)))) + as_type(as_type((as_type(x_275) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_272) - as_type(2)))) + as_type(as_type((as_type(x_275) * as_type(16))))))] = 1; int const x_280 = p.x; p.x = as_type((as_type(x_280) - as_type(2))); } @@ -244,7 +244,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_290) { int const x_294 = p.x; int const x_296 = p.y; - int const x_301 = (*(tint_symbol_6)).arr[as_type((as_type(x_294) + as_type(as_type((as_type(as_type((as_type(x_296) - as_type(2)))) * as_type(16))))))]; + int const x_301 = (*(tint_symbol_4)).arr[as_type((as_type(x_294) + as_type(as_type((as_type(as_type((as_type(x_296) - as_type(2)))) * as_type(16))))))]; x_302 = (x_301 == 0); x_303_phi = x_302; } @@ -254,13 +254,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_306) - as_type(1))); int const x_309 = p.x; int const x_311 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_309) + as_type(as_type((as_type(x_311) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_309) + as_type(as_type((as_type(x_311) * as_type(16))))))] = 1; int const x_316 = p.x; int const x_318 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_316) + as_type(as_type((as_type(as_type((as_type(x_318) - as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_316) + as_type(as_type((as_type(as_type((as_type(x_318) - as_type(1)))) * as_type(16))))))] = 1; int const x_324 = p.x; int const x_326 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_324) + as_type(as_type((as_type(as_type((as_type(x_326) - as_type(2)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_324) + as_type(as_type((as_type(as_type((as_type(x_326) - as_type(2)))) * as_type(16))))))] = 1; int const x_332 = p.y; p.y = as_type((as_type(x_332) - as_type(2))); } @@ -277,7 +277,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_342) { int const x_346 = p.x; int const x_349 = p.y; - int const x_353 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_346) + as_type(2)))) + as_type(as_type((as_type(x_349) * as_type(16))))))]; + int const x_353 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_346) + as_type(2)))) + as_type(as_type((as_type(x_349) * as_type(16))))))]; x_354 = (x_353 == 0); x_355_phi = x_354; } @@ -287,13 +287,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_358) - as_type(1))); int const x_361 = p.x; int const x_363 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_361) + as_type(as_type((as_type(x_363) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_361) + as_type(as_type((as_type(x_363) * as_type(16))))))] = 1; int const x_368 = p.x; int const x_371 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_368) + as_type(1)))) + as_type(as_type((as_type(x_371) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_368) + as_type(1)))) + as_type(as_type((as_type(x_371) * as_type(16))))))] = 1; int const x_376 = p.x; int const x_379 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_376) + as_type(2)))) + as_type(as_type((as_type(x_379) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_376) + as_type(2)))) + as_type(as_type((as_type(x_379) * as_type(16))))))] = 1; int const x_384 = p.x; p.x = as_type((as_type(x_384) + as_type(2))); } @@ -310,7 +310,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_394) { int const x_398 = p.x; int const x_400 = p.y; - int const x_405 = (*(tint_symbol_6)).arr[as_type((as_type(x_398) + as_type(as_type((as_type(as_type((as_type(x_400) + as_type(2)))) * as_type(16))))))]; + int const x_405 = (*(tint_symbol_4)).arr[as_type((as_type(x_398) + as_type(as_type((as_type(as_type((as_type(x_400) + as_type(2)))) * as_type(16))))))]; x_406 = (x_405 == 0); x_407_phi = x_406; } @@ -320,22 +320,22 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ d = as_type((as_type(x_410) - as_type(1))); int const x_413 = p.x; int const x_415 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_413) + as_type(as_type((as_type(x_415) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_413) + as_type(as_type((as_type(x_415) * as_type(16))))))] = 1; int const x_420 = p.x; int const x_422 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_420) + as_type(as_type((as_type(as_type((as_type(x_422) + as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_420) + as_type(as_type((as_type(as_type((as_type(x_422) + as_type(1)))) * as_type(16))))))] = 1; int const x_428 = p.x; int const x_430 = p.y; - (*(tint_symbol_6)).arr[as_type((as_type(x_428) + as_type(as_type((as_type(as_type((as_type(x_430) + as_type(2)))) * as_type(16))))))] = 1; + (*(tint_symbol_4)).arr[as_type((as_type(x_428) + as_type(as_type((as_type(as_type((as_type(x_430) + as_type(2)))) * as_type(16))))))] = 1; int const x_436 = p.y; p.y = as_type((as_type(x_436) + as_type(2))); } } int const x_440 = ipos.y; int const x_443 = ipos.x; - int const x_446 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_440) * as_type(16)))) + as_type(x_443)))]; + int const x_446 = (*(tint_symbol_4)).arr[as_type((as_type(as_type((as_type(x_440) * as_type(16)))) + as_type(x_443)))]; if ((x_446 == 1)) { - *(tint_symbol_8) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; } { @@ -346,19 +346,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } } } - *(tint_symbol_8) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread tint_array_wrapper tint_symbol_10 = {}; - thread float2x4 tint_symbol_11 = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)); - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float2x4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(x_7, tint_symbol_7, tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread tint_array_wrapper tint_symbol_12 = {}; + thread float2x4 tint_symbol_13 = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)); + thread float4 tint_symbol_14 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.hlsl index 3588689955..400866d935 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.hlsl @@ -48,23 +48,23 @@ float4 match_vf2_(inout float2 pos_1) { const int x_155 = i; const float2 x_156 = pos_1; param = x_156; - const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable = tint_symbol_4; const float4 x_158 = indexable[x_155]; param_1 = x_158; const bool x_159 = collision_vf2_vf4_(param, param_1); if (x_159) { const int x_162 = i; - const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable_1 = tint_symbol_6; + const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable_1 = tint_symbol_5; const float x_164 = indexable_1[x_162].x; const int x_166 = i; - const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable_2 = tint_symbol_7; + const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable_2 = tint_symbol_6; const float x_168 = indexable_2[x_166].y; const int x_171 = i; - const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable_3 = tint_symbol_8; + const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable_3 = tint_symbol_7; const float4 x_177 = indexable_3[((((int(x_164) * int(x_168)) + (x_171 * 9)) + 11) % 16)]; res = x_177; } @@ -96,11 +96,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; + const main_out tint_symbol_8 = {x_GLF_color}; + return tint_symbol_8; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.msl index d0724914fb..1624fe2140 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.msl @@ -16,7 +16,7 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -66,23 +66,23 @@ float4 match_vf2_(thread float2* const pos_1) { int const x_155 = i; float2 const x_156 = *(pos_1); param = x_156; - tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable = tint_symbol_2; float4 const x_158 = indexable.arr[x_155]; param_1 = x_158; bool const x_159 = collision_vf2_vf4_(&(param), &(param_1)); if (x_159) { int const x_162 = i; - tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable_1 = tint_symbol_5; + tint_array_wrapper_1 const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable_1 = tint_symbol_3; float const x_164 = indexable_1.arr[x_162].x; int const x_166 = i; - tint_array_wrapper_1 const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable_2 = tint_symbol_6; + tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable_2 = tint_symbol_4; float const x_168 = indexable_2.arr[x_166].y; int const x_171 = i; - tint_array_wrapper_2 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable_3 = tint_symbol_7; + tint_array_wrapper_2 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable_3 = tint_symbol_5; float4 const x_177 = indexable_3.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_164)) * as_type(int(x_168))))) + as_type(as_type((as_type(x_171) * as_type(9))))))) + as_type(11))) % 16)]; res = x_177; } @@ -95,10 +95,10 @@ float4 match_vf2_(thread float2* const pos_1) { return x_180; } -void main_1(constant buf0& x_20, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_20, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { float2 lin = 0.0f; float2 param_2 = 0.0f; - float4 const x_102 = *(tint_symbol_9); + float4 const x_102 = *(tint_symbol_7); float2 const x_105 = x_20.resolution; lin = (float2(x_102.x, x_102.y) / x_105); float2 const x_107 = lin; @@ -106,17 +106,23 @@ void main_1(constant buf0& x_20, thread float4* const tint_symbol_9, thread floa float2 const x_110 = lin; param_2 = x_110; float4 const x_111 = match_vf2_(&(param_2)); - *(tint_symbol_10) = x_111; + *(tint_symbol_8) = x_111; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_20, &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; +main_out tint_symbol_inner(constant buf0& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_20, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_20, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.hlsl index 3588689955..400866d935 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.hlsl @@ -48,23 +48,23 @@ float4 match_vf2_(inout float2 pos_1) { const int x_155 = i; const float2 x_156 = pos_1; param = x_156; - const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable = tint_symbol_4; const float4 x_158 = indexable[x_155]; param_1 = x_158; const bool x_159 = collision_vf2_vf4_(param, param_1); if (x_159) { const int x_162 = i; - const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable_1 = tint_symbol_6; + const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable_1 = tint_symbol_5; const float x_164 = indexable_1[x_162].x; const int x_166 = i; - const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable_2 = tint_symbol_7; + const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable_2 = tint_symbol_6; const float x_168 = indexable_2[x_166].y; const int x_171 = i; - const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable_3 = tint_symbol_8; + const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable_3 = tint_symbol_7; const float4 x_177 = indexable_3[((((int(x_164) * int(x_168)) + (x_171 * 9)) + 11) % 16)]; res = x_177; } @@ -96,11 +96,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; + const main_out tint_symbol_8 = {x_GLF_color}; + return tint_symbol_8; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.msl index d0724914fb..1624fe2140 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.msl @@ -16,7 +16,7 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -66,23 +66,23 @@ float4 match_vf2_(thread float2* const pos_1) { int const x_155 = i; float2 const x_156 = *(pos_1); param = x_156; - tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable = tint_symbol_2; float4 const x_158 = indexable.arr[x_155]; param_1 = x_158; bool const x_159 = collision_vf2_vf4_(&(param), &(param_1)); if (x_159) { int const x_162 = i; - tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable_1 = tint_symbol_5; + tint_array_wrapper_1 const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable_1 = tint_symbol_3; float const x_164 = indexable_1.arr[x_162].x; int const x_166 = i; - tint_array_wrapper_1 const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable_2 = tint_symbol_6; + tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable_2 = tint_symbol_4; float const x_168 = indexable_2.arr[x_166].y; int const x_171 = i; - tint_array_wrapper_2 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable_3 = tint_symbol_7; + tint_array_wrapper_2 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable_3 = tint_symbol_5; float4 const x_177 = indexable_3.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_164)) * as_type(int(x_168))))) + as_type(as_type((as_type(x_171) * as_type(9))))))) + as_type(11))) % 16)]; res = x_177; } @@ -95,10 +95,10 @@ float4 match_vf2_(thread float2* const pos_1) { return x_180; } -void main_1(constant buf0& x_20, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_20, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { float2 lin = 0.0f; float2 param_2 = 0.0f; - float4 const x_102 = *(tint_symbol_9); + float4 const x_102 = *(tint_symbol_7); float2 const x_105 = x_20.resolution; lin = (float2(x_102.x, x_102.y) / x_105); float2 const x_107 = lin; @@ -106,17 +106,23 @@ void main_1(constant buf0& x_20, thread float4* const tint_symbol_9, thread floa float2 const x_110 = lin; param_2 = x_110; float4 const x_111 = match_vf2_(&(param_2)); - *(tint_symbol_10) = x_111; + *(tint_symbol_8) = x_111; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_20, &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; +main_out tint_symbol_inner(constant buf0& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_20, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_20, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.hlsl index fb1988545b..8c6fe1a54a 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.hlsl @@ -49,23 +49,23 @@ float4 match_vf2_(inout float2 pos_1) { const int x_159 = i; const float2 x_160 = pos_1; param = x_160; - const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable = tint_symbol_4; const float4 x_162 = indexable[x_159]; param_1 = x_162; const bool x_163 = collision_vf2_vf4_(param, param_1); if (x_163) { const int x_166 = i; - const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable_1 = tint_symbol_6; + const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable_1 = tint_symbol_5; const float x_168 = indexable_1[x_166].x; const int x_170 = i; - const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable_2 = tint_symbol_7; + const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable_2 = tint_symbol_6; const float x_172 = indexable_2[x_170].y; const int x_175 = i; - const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable_3 = tint_symbol_8; + const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable_3 = tint_symbol_7; const float4 x_181 = indexable_3[((((int(x_168) * int(x_172)) + (x_175 * 9)) + 11) % 16)]; res = x_181; } @@ -97,11 +97,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; + const main_out tint_symbol_8 = {x_GLF_color}; + return tint_symbol_8; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.msl index d8c43f8ff4..da51ebcc23 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.msl @@ -16,7 +16,7 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -67,23 +67,23 @@ float4 match_vf2_(thread float2* const pos_1) { int const x_159 = i; float2 const x_160 = *(pos_1); param = x_160; - tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable = tint_symbol_2; float4 const x_162 = indexable.arr[x_159]; param_1 = x_162; bool const x_163 = collision_vf2_vf4_(&(param), &(param_1)); if (x_163) { int const x_166 = i; - tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable_1 = tint_symbol_5; + tint_array_wrapper_1 const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable_1 = tint_symbol_3; float const x_168 = indexable_1.arr[x_166].x; int const x_170 = i; - tint_array_wrapper_1 const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable_2 = tint_symbol_6; + tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable_2 = tint_symbol_4; float const x_172 = indexable_2.arr[x_170].y; int const x_175 = i; - tint_array_wrapper_2 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable_3 = tint_symbol_7; + tint_array_wrapper_2 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable_3 = tint_symbol_5; float4 const x_181 = indexable_3.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_168)) * as_type(int(x_172))))) + as_type(as_type((as_type(x_175) * as_type(9))))))) + as_type(11))) % 16)]; res = x_181; } @@ -96,10 +96,10 @@ float4 match_vf2_(thread float2* const pos_1) { return x_184; } -void main_1(constant buf0& x_20, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_20, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { float2 lin = 0.0f; float2 param_2 = 0.0f; - float4 const x_105 = *(tint_symbol_9); + float4 const x_105 = *(tint_symbol_7); float2 const x_108 = x_20.resolution; lin = (float2(x_105.x, x_105.y) / x_108); float2 const x_110 = lin; @@ -107,17 +107,23 @@ void main_1(constant buf0& x_20, thread float4* const tint_symbol_9, thread floa float2 const x_113 = lin; param_2 = x_113; float4 const x_114 = match_vf2_(&(param_2)); - *(tint_symbol_10) = x_114; + *(tint_symbol_8) = x_114; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_20, &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; +main_out tint_symbol_inner(constant buf0& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_20, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_20, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.hlsl index fb1988545b..8c6fe1a54a 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.hlsl @@ -49,23 +49,23 @@ float4 match_vf2_(inout float2 pos_1) { const int x_159 = i; const float2 x_160 = pos_1; param = x_160; - const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable = tint_symbol_4; const float4 x_162 = indexable[x_159]; param_1 = x_162; const bool x_163 = collision_vf2_vf4_(param, param_1); if (x_163) { const int x_166 = i; - const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable_1 = tint_symbol_6; + const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable_1 = tint_symbol_5; const float x_168 = indexable_1[x_166].x; const int x_170 = i; - const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable_2 = tint_symbol_7; + const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable_2 = tint_symbol_6; const float x_172 = indexable_2[x_170].y; const int x_175 = i; - const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable_3 = tint_symbol_8; + const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable_3 = tint_symbol_7; const float4 x_181 = indexable_3[((((int(x_168) * int(x_172)) + (x_175 * 9)) + 11) % 16)]; res = x_181; } @@ -97,11 +97,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; + const main_out tint_symbol_8 = {x_GLF_color}; + return tint_symbol_8; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.msl index d8c43f8ff4..da51ebcc23 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.msl @@ -16,7 +16,7 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -67,23 +67,23 @@ float4 match_vf2_(thread float2* const pos_1) { int const x_159 = i; float2 const x_160 = *(pos_1); param = x_160; - tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper_1 const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable = tint_symbol_2; float4 const x_162 = indexable.arr[x_159]; param_1 = x_162; bool const x_163 = collision_vf2_vf4_(&(param), &(param_1)); if (x_163) { int const x_166 = i; - tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable_1 = tint_symbol_5; + tint_array_wrapper_1 const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable_1 = tint_symbol_3; float const x_168 = indexable_1.arr[x_166].x; int const x_170 = i; - tint_array_wrapper_1 const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable_2 = tint_symbol_6; + tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable_2 = tint_symbol_4; float const x_172 = indexable_2.arr[x_170].y; int const x_175 = i; - tint_array_wrapper_2 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable_3 = tint_symbol_7; + tint_array_wrapper_2 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable_3 = tint_symbol_5; float4 const x_181 = indexable_3.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_168)) * as_type(int(x_172))))) + as_type(as_type((as_type(x_175) * as_type(9))))))) + as_type(11))) % 16)]; res = x_181; } @@ -96,10 +96,10 @@ float4 match_vf2_(thread float2* const pos_1) { return x_184; } -void main_1(constant buf0& x_20, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_20, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { float2 lin = 0.0f; float2 param_2 = 0.0f; - float4 const x_105 = *(tint_symbol_9); + float4 const x_105 = *(tint_symbol_7); float2 const x_108 = x_20.resolution; lin = (float2(x_105.x, x_105.y) / x_108); float2 const x_110 = lin; @@ -107,17 +107,23 @@ void main_1(constant buf0& x_20, thread float4* const tint_symbol_9, thread floa float2 const x_113 = lin; param_2 = x_113; float4 const x_114 = match_vf2_(&(param_2)); - *(tint_symbol_10) = x_114; + *(tint_symbol_8) = x_114; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_20, &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; +main_out tint_symbol_inner(constant buf0& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_20, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_20, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.hlsl index 9aaf73d5e3..a06e8113a1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.hlsl @@ -253,11 +253,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl index 40421fe99b..554121d769 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -38,23 +38,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_270 = i; - int const x_272 = (*(tint_symbol_5)).arr[x_270]; + int const x_272 = (*(tint_symbol_3)).arr[x_270]; int const x_273 = j; - int const x_275 = (*(tint_symbol_5)).arr[x_273]; + int const x_275 = (*(tint_symbol_3)).arr[x_273]; if ((x_272 < x_275)) { int const x_280 = k; k = as_type((as_type(x_280) + as_type(1))); int const x_282 = i; i = as_type((as_type(x_282) + as_type(1))); - int const x_285 = (*(tint_symbol_5)).arr[x_282]; - (*(tint_symbol_6)).arr[x_280] = x_285; + int const x_285 = (*(tint_symbol_3)).arr[x_282]; + (*(tint_symbol_4)).arr[x_280] = x_285; } else { int const x_287 = k; k = as_type((as_type(x_287) + as_type(1))); int const x_289 = j; j = as_type((as_type(x_289) + as_type(1))); - int const x_292 = (*(tint_symbol_5)).arr[x_289]; - (*(tint_symbol_6)).arr[x_287] = x_292; + int const x_292 = (*(tint_symbol_3)).arr[x_289]; + (*(tint_symbol_4)).arr[x_287] = x_292; } } while (true) { @@ -69,8 +69,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_305) + as_type(1))); int const x_307 = i; i = as_type((as_type(x_307) + as_type(1))); - int const x_310 = (*(tint_symbol_5)).arr[x_307]; - (*(tint_symbol_6)).arr[x_305] = x_310; + int const x_310 = (*(tint_symbol_3)).arr[x_307]; + (*(tint_symbol_4)).arr[x_305] = x_310; } int const x_312 = *(from); i_1 = x_312; @@ -83,8 +83,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_321 = i_1; int const x_322 = i_1; - int const x_324 = (*(tint_symbol_6)).arr[x_322]; - (*(tint_symbol_5)).arr[x_321] = x_324; + int const x_324 = (*(tint_symbol_4)).arr[x_322]; + (*(tint_symbol_3)).arr[x_321] = x_324; { int const x_326 = i_1; i_1 = as_type((as_type(x_326) + as_type(1))); @@ -93,7 +93,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -138,7 +138,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra param_1 = x_359; int const x_360 = to_1; param_2 = x_360; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_362 = m; int const x_364 = i_2; @@ -153,7 +153,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -164,52 +164,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_93) { case 9: { int const x_123 = i_3; - (*(tint_symbol_9)).arr[x_123] = -5; + (*(tint_symbol_7)).arr[x_123] = -5; break; } case 8: { int const x_121 = i_3; - (*(tint_symbol_9)).arr[x_121] = -4; + (*(tint_symbol_7)).arr[x_121] = -4; break; } case 7: { int const x_119 = i_3; - (*(tint_symbol_9)).arr[x_119] = -3; + (*(tint_symbol_7)).arr[x_119] = -3; break; } case 6: { int const x_117 = i_3; - (*(tint_symbol_9)).arr[x_117] = -2; + (*(tint_symbol_7)).arr[x_117] = -2; break; } case 5: { int const x_115 = i_3; - (*(tint_symbol_9)).arr[x_115] = -1; + (*(tint_symbol_7)).arr[x_115] = -1; break; } case 4: { int const x_113 = i_3; - (*(tint_symbol_9)).arr[x_113] = 0; + (*(tint_symbol_7)).arr[x_113] = 0; break; } case 3: { int const x_111 = i_3; - (*(tint_symbol_9)).arr[x_111] = 1; + (*(tint_symbol_7)).arr[x_111] = 1; break; } case 2: { int const x_109 = i_3; - (*(tint_symbol_9)).arr[x_109] = 2; + (*(tint_symbol_7)).arr[x_109] = 2; break; } case 1: { int const x_107 = i_3; - (*(tint_symbol_9)).arr[x_107] = 3; + (*(tint_symbol_7)).arr[x_107] = 3; break; } case 0: { int const x_105 = i_3; - (*(tint_symbol_9)).arr[x_105] = 4; + (*(tint_symbol_7)).arr[x_105] = 4; break; } default: { @@ -235,56 +235,56 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_136 = j_1; int const x_137 = j_1; - int const x_139 = (*(tint_symbol_9)).arr[x_137]; - (*(tint_symbol_10)).arr[x_136] = x_139; + int const x_139 = (*(tint_symbol_7)).arr[x_137]; + (*(tint_symbol_8)).arr[x_136] = x_139; { int const x_141 = j_1; j_1 = as_type((as_type(x_141) + as_type(1))); } } - mergeSort_(tint_symbol_9, tint_symbol_10); - float const x_145 = (*(tint_symbol_11)).y; + mergeSort_(tint_symbol_7, tint_symbol_8); + float const x_145 = (*(tint_symbol_9)).y; if ((int(x_145) < 30)) { - int const x_152 = (*(tint_symbol_9)).arr[0]; + int const x_152 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_152) / 10.0f)); } else { - float const x_157 = (*(tint_symbol_11)).y; + float const x_157 = (*(tint_symbol_9)).y; if ((int(x_157) < 60)) { - int const x_164 = (*(tint_symbol_9)).arr[1]; + int const x_164 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_164) / 10.0f)); } else { - float const x_169 = (*(tint_symbol_11)).y; + float const x_169 = (*(tint_symbol_9)).y; if ((int(x_169) < 90)) { - int const x_176 = (*(tint_symbol_9)).arr[2]; + int const x_176 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_176) / 10.0f)); } else { - float const x_181 = (*(tint_symbol_11)).y; + float const x_181 = (*(tint_symbol_9)).y; if ((int(x_181) < 120)) { - int const x_188 = (*(tint_symbol_9)).arr[3]; + int const x_188 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_188) / 10.0f)); } else { - float const x_193 = (*(tint_symbol_11)).y; + float const x_193 = (*(tint_symbol_9)).y; if ((int(x_193) < 150)) { discard_fragment(); } else { - float const x_200 = (*(tint_symbol_11)).y; + float const x_200 = (*(tint_symbol_9)).y; if ((int(x_200) < 180)) { - int const x_207 = (*(tint_symbol_9)).arr[5]; + int const x_207 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_207) / 10.0f)); } else { - float const x_212 = (*(tint_symbol_11)).y; + float const x_212 = (*(tint_symbol_9)).y; if ((int(x_212) < 210)) { - int const x_219 = (*(tint_symbol_9)).arr[6]; + int const x_219 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_219) / 10.0f)); } else { - float const x_224 = (*(tint_symbol_11)).y; + float const x_224 = (*(tint_symbol_9)).y; if ((int(x_224) < 240)) { - int const x_231 = (*(tint_symbol_9)).arr[7]; + int const x_231 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_231) / 10.0f)); } else { - float const x_236 = (*(tint_symbol_11)).y; + float const x_236 = (*(tint_symbol_9)).y; if ((int(x_236) < 270)) { - int const x_243 = (*(tint_symbol_9)).arr[8]; + int const x_243 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_243) / 10.0f)); } else { discard_fragment(); @@ -299,19 +299,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_247 = grey; float3 const x_248 = float3(x_247, x_247, x_247); - *(tint_symbol_12) = float4(x_248.x, x_248.y, x_248.z, 1.0f); + *(tint_symbol_10) = float4(x_248.x, x_248.y, x_248.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.hlsl index be184c8dcf..fa6bb30365 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.hlsl @@ -261,11 +261,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.msl index aff7c99b52..e9497fe98d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -38,23 +38,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_270 = i; - int const x_272 = (*(tint_symbol_5)).arr[x_270]; + int const x_272 = (*(tint_symbol_3)).arr[x_270]; int const x_273 = j; - int const x_275 = (*(tint_symbol_5)).arr[x_273]; + int const x_275 = (*(tint_symbol_3)).arr[x_273]; if ((x_272 < x_275)) { int const x_280 = k; k = as_type((as_type(x_280) + as_type(1))); int const x_282 = i; i = as_type((as_type(x_282) + as_type(1))); - int const x_285 = (*(tint_symbol_5)).arr[x_282]; - (*(tint_symbol_6)).arr[x_280] = x_285; + int const x_285 = (*(tint_symbol_3)).arr[x_282]; + (*(tint_symbol_4)).arr[x_280] = x_285; } else { int const x_287 = k; k = as_type((as_type(x_287) + as_type(1))); int const x_289 = j; j = as_type((as_type(x_289) + as_type(1))); - int const x_292 = (*(tint_symbol_5)).arr[x_289]; - (*(tint_symbol_6)).arr[x_287] = x_292; + int const x_292 = (*(tint_symbol_3)).arr[x_289]; + (*(tint_symbol_4)).arr[x_287] = x_292; } } while (true) { @@ -69,8 +69,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_305) + as_type(1))); int const x_307 = i; i = as_type((as_type(x_307) + as_type(1))); - int const x_310 = (*(tint_symbol_5)).arr[x_307]; - (*(tint_symbol_6)).arr[x_305] = x_310; + int const x_310 = (*(tint_symbol_3)).arr[x_307]; + (*(tint_symbol_4)).arr[x_305] = x_310; } int const x_312 = *(from); i_1 = x_312; @@ -83,8 +83,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_321 = i_1; int const x_322 = i_1; - int const x_324 = (*(tint_symbol_6)).arr[x_322]; - (*(tint_symbol_5)).arr[x_321] = x_324; + int const x_324 = (*(tint_symbol_4)).arr[x_322]; + (*(tint_symbol_3)).arr[x_321] = x_324; { int const x_326 = i_1; i_1 = as_type((as_type(x_326) + as_type(1))); @@ -93,7 +93,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -138,7 +138,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra param_1 = x_359; int const x_360 = to_1; param_2 = x_360; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_362 = m; int const x_364 = i_2; @@ -153,7 +153,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -164,52 +164,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_93) { case 9: { int const x_123 = i_3; - (*(tint_symbol_9)).arr[x_123] = -5; + (*(tint_symbol_7)).arr[x_123] = -5; break; } case 8: { int const x_121 = i_3; - (*(tint_symbol_9)).arr[x_121] = -4; + (*(tint_symbol_7)).arr[x_121] = -4; break; } case 7: { int const x_119 = i_3; - (*(tint_symbol_9)).arr[x_119] = -3; + (*(tint_symbol_7)).arr[x_119] = -3; break; } case 6: { int const x_117 = i_3; - (*(tint_symbol_9)).arr[x_117] = -2; + (*(tint_symbol_7)).arr[x_117] = -2; break; } case 5: { int const x_115 = i_3; - (*(tint_symbol_9)).arr[x_115] = -1; + (*(tint_symbol_7)).arr[x_115] = -1; break; } case 4: { int const x_113 = i_3; - (*(tint_symbol_9)).arr[x_113] = 0; + (*(tint_symbol_7)).arr[x_113] = 0; break; } case 3: { int const x_111 = i_3; - (*(tint_symbol_9)).arr[x_111] = 1; + (*(tint_symbol_7)).arr[x_111] = 1; break; } case 2: { int const x_109 = i_3; - (*(tint_symbol_9)).arr[x_109] = 2; + (*(tint_symbol_7)).arr[x_109] = 2; break; } case 1: { int const x_107 = i_3; - (*(tint_symbol_9)).arr[x_107] = 3; + (*(tint_symbol_7)).arr[x_107] = 3; break; } case 0: { int const x_105 = i_3; - (*(tint_symbol_9)).arr[x_105] = 4; + (*(tint_symbol_7)).arr[x_105] = 4; break; } default: { @@ -235,56 +235,56 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_136 = j_1; int const x_137 = j_1; - int const x_139 = (*(tint_symbol_9)).arr[x_137]; - (*(tint_symbol_10)).arr[x_136] = x_139; + int const x_139 = (*(tint_symbol_7)).arr[x_137]; + (*(tint_symbol_8)).arr[x_136] = x_139; { int const x_141 = j_1; j_1 = as_type((as_type(x_141) + as_type(1))); } } - mergeSort_(tint_symbol_9, tint_symbol_10); - float const x_145 = (*(tint_symbol_11)).y; + mergeSort_(tint_symbol_7, tint_symbol_8); + float const x_145 = (*(tint_symbol_9)).y; if ((int(x_145) < 30)) { - int const x_152 = (*(tint_symbol_9)).arr[0]; + int const x_152 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_152) / 10.0f)); } else { - float const x_157 = (*(tint_symbol_11)).y; + float const x_157 = (*(tint_symbol_9)).y; if ((int(x_157) < 60)) { - int const x_164 = (*(tint_symbol_9)).arr[1]; + int const x_164 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_164) / 10.0f)); } else { - float const x_169 = (*(tint_symbol_11)).y; + float const x_169 = (*(tint_symbol_9)).y; if ((int(x_169) < 90)) { - int const x_176 = (*(tint_symbol_9)).arr[2]; + int const x_176 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_176) / 10.0f)); } else { - float const x_181 = (*(tint_symbol_11)).y; + float const x_181 = (*(tint_symbol_9)).y; if ((int(x_181) < 120)) { - int const x_188 = (*(tint_symbol_9)).arr[3]; + int const x_188 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_188) / 10.0f)); } else { - float const x_193 = (*(tint_symbol_11)).y; + float const x_193 = (*(tint_symbol_9)).y; if ((int(x_193) < 150)) { discard_fragment(); } else { - float const x_200 = (*(tint_symbol_11)).y; + float const x_200 = (*(tint_symbol_9)).y; if ((int(x_200) < 180)) { - int const x_207 = (*(tint_symbol_9)).arr[5]; + int const x_207 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_207) / 10.0f)); } else { - float const x_212 = (*(tint_symbol_11)).y; + float const x_212 = (*(tint_symbol_9)).y; if ((int(x_212) < 210)) { - int const x_219 = (*(tint_symbol_9)).arr[6]; + int const x_219 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_219) / 10.0f)); } else { - float const x_224 = (*(tint_symbol_11)).y; + float const x_224 = (*(tint_symbol_9)).y; if ((int(x_224) < 240)) { - int const x_231 = (*(tint_symbol_9)).arr[7]; + int const x_231 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_231) / 10.0f)); } else { - float const x_236 = (*(tint_symbol_11)).y; + float const x_236 = (*(tint_symbol_9)).y; if ((int(x_236) < 270)) { - int const x_243 = (*(tint_symbol_9)).arr[8]; + int const x_243 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_243) / 10.0f)); } else { discard_fragment(); @@ -299,19 +299,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_247 = grey; float3 const x_248 = float3(x_247, x_247, x_247); - *(tint_symbol_12) = float4(x_248.x, x_248.y, x_248.z, 1.0f); + *(tint_symbol_10) = float4(x_248.x, x_248.y, x_248.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.hlsl index e78af8528e..d3f0772bb2 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.hlsl @@ -263,11 +263,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl index 39c99c466a..c904072e69 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -38,23 +38,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_271 = i; - int const x_273 = (*(tint_symbol_5)).arr[x_271]; + int const x_273 = (*(tint_symbol_3)).arr[x_271]; int const x_274 = j; - int const x_276 = (*(tint_symbol_5)).arr[x_274]; + int const x_276 = (*(tint_symbol_3)).arr[x_274]; if ((x_273 < x_276)) { int const x_281 = k; k = as_type((as_type(x_281) + as_type(1))); int const x_283 = i; i = as_type((as_type(x_283) + as_type(1))); - int const x_286 = (*(tint_symbol_5)).arr[x_283]; - (*(tint_symbol_6)).arr[x_281] = x_286; + int const x_286 = (*(tint_symbol_3)).arr[x_283]; + (*(tint_symbol_4)).arr[x_281] = x_286; } else { int const x_288 = k; k = as_type((as_type(x_288) + as_type(1))); int const x_290 = j; j = as_type((as_type(x_290) + as_type(1))); - int const x_293 = (*(tint_symbol_5)).arr[x_290]; - (*(tint_symbol_6)).arr[x_288] = x_293; + int const x_293 = (*(tint_symbol_3)).arr[x_290]; + (*(tint_symbol_4)).arr[x_288] = x_293; } } while (true) { @@ -69,8 +69,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_306) + as_type(1))); int const x_308 = i; i = as_type((as_type(x_308) + as_type(1))); - int const x_311 = (*(tint_symbol_5)).arr[x_308]; - (*(tint_symbol_6)).arr[x_306] = x_311; + int const x_311 = (*(tint_symbol_3)).arr[x_308]; + (*(tint_symbol_4)).arr[x_306] = x_311; } int const x_313 = *(from); i_1 = x_313; @@ -83,8 +83,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_322 = i_1; int const x_323 = i_1; - int const x_325 = (*(tint_symbol_6)).arr[x_323]; - (*(tint_symbol_5)).arr[x_322] = x_325; + int const x_325 = (*(tint_symbol_4)).arr[x_323]; + (*(tint_symbol_3)).arr[x_322] = x_325; { int const x_327 = i_1; i_1 = as_type((as_type(x_327) + as_type(1))); @@ -93,7 +93,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -138,7 +138,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra param_1 = x_360; int const x_361 = to_1; param_2 = x_361; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_363 = m; int const x_365 = i_2; @@ -153,7 +153,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -164,7 +164,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_94) { case 9: { int const x_124 = i_3; - (*(tint_symbol_9)).arr[x_124] = -5; + (*(tint_symbol_7)).arr[x_124] = -5; if (true) { } else { { @@ -180,47 +180,47 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } case 8: { int const x_122 = i_3; - (*(tint_symbol_9)).arr[x_122] = -4; + (*(tint_symbol_7)).arr[x_122] = -4; break; } case 7: { int const x_120 = i_3; - (*(tint_symbol_9)).arr[x_120] = -3; + (*(tint_symbol_7)).arr[x_120] = -3; break; } case 6: { int const x_118 = i_3; - (*(tint_symbol_9)).arr[x_118] = -2; + (*(tint_symbol_7)).arr[x_118] = -2; break; } case 5: { int const x_116 = i_3; - (*(tint_symbol_9)).arr[x_116] = -1; + (*(tint_symbol_7)).arr[x_116] = -1; break; } case 4: { int const x_114 = i_3; - (*(tint_symbol_9)).arr[x_114] = 0; + (*(tint_symbol_7)).arr[x_114] = 0; break; } case 3: { int const x_112 = i_3; - (*(tint_symbol_9)).arr[x_112] = 1; + (*(tint_symbol_7)).arr[x_112] = 1; break; } case 2: { int const x_110 = i_3; - (*(tint_symbol_9)).arr[x_110] = 2; + (*(tint_symbol_7)).arr[x_110] = 2; break; } case 1: { int const x_108 = i_3; - (*(tint_symbol_9)).arr[x_108] = 3; + (*(tint_symbol_7)).arr[x_108] = 3; break; } case 0: { int const x_106 = i_3; - (*(tint_symbol_9)).arr[x_106] = 4; + (*(tint_symbol_7)).arr[x_106] = 4; break; } default: { @@ -246,56 +246,56 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_137 = j_1; int const x_138 = j_1; - int const x_140 = (*(tint_symbol_9)).arr[x_138]; - (*(tint_symbol_10)).arr[x_137] = x_140; + int const x_140 = (*(tint_symbol_7)).arr[x_138]; + (*(tint_symbol_8)).arr[x_137] = x_140; { int const x_142 = j_1; j_1 = as_type((as_type(x_142) + as_type(1))); } } - mergeSort_(tint_symbol_9, tint_symbol_10); - float const x_146 = (*(tint_symbol_11)).y; + mergeSort_(tint_symbol_7, tint_symbol_8); + float const x_146 = (*(tint_symbol_9)).y; if ((int(x_146) < 30)) { - int const x_153 = (*(tint_symbol_9)).arr[0]; + int const x_153 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_153) / 10.0f)); } else { - float const x_158 = (*(tint_symbol_11)).y; + float const x_158 = (*(tint_symbol_9)).y; if ((int(x_158) < 60)) { - int const x_165 = (*(tint_symbol_9)).arr[1]; + int const x_165 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_165) / 10.0f)); } else { - float const x_170 = (*(tint_symbol_11)).y; + float const x_170 = (*(tint_symbol_9)).y; if ((int(x_170) < 90)) { - int const x_177 = (*(tint_symbol_9)).arr[2]; + int const x_177 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_177) / 10.0f)); } else { - float const x_182 = (*(tint_symbol_11)).y; + float const x_182 = (*(tint_symbol_9)).y; if ((int(x_182) < 120)) { - int const x_189 = (*(tint_symbol_9)).arr[3]; + int const x_189 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_189) / 10.0f)); } else { - float const x_194 = (*(tint_symbol_11)).y; + float const x_194 = (*(tint_symbol_9)).y; if ((int(x_194) < 150)) { discard_fragment(); } else { - float const x_201 = (*(tint_symbol_11)).y; + float const x_201 = (*(tint_symbol_9)).y; if ((int(x_201) < 180)) { - int const x_208 = (*(tint_symbol_9)).arr[5]; + int const x_208 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_208) / 10.0f)); } else { - float const x_213 = (*(tint_symbol_11)).y; + float const x_213 = (*(tint_symbol_9)).y; if ((int(x_213) < 210)) { - int const x_220 = (*(tint_symbol_9)).arr[6]; + int const x_220 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_220) / 10.0f)); } else { - float const x_225 = (*(tint_symbol_11)).y; + float const x_225 = (*(tint_symbol_9)).y; if ((int(x_225) < 240)) { - int const x_232 = (*(tint_symbol_9)).arr[7]; + int const x_232 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_232) / 10.0f)); } else { - float const x_237 = (*(tint_symbol_11)).y; + float const x_237 = (*(tint_symbol_9)).y; if ((int(x_237) < 270)) { - int const x_244 = (*(tint_symbol_9)).arr[8]; + int const x_244 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_244) / 10.0f)); } else { discard_fragment(); @@ -310,19 +310,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_248 = grey; float3 const x_249 = float3(x_248, x_248, x_248); - *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f); + *(tint_symbol_10) = float4(x_249.x, x_249.y, x_249.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.hlsl index b6f582eb3f..c469d3add7 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.hlsl @@ -271,11 +271,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.msl index d17e4665fb..be25e9114f 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -38,23 +38,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_271 = i; - int const x_273 = (*(tint_symbol_5)).arr[x_271]; + int const x_273 = (*(tint_symbol_3)).arr[x_271]; int const x_274 = j; - int const x_276 = (*(tint_symbol_5)).arr[x_274]; + int const x_276 = (*(tint_symbol_3)).arr[x_274]; if ((x_273 < x_276)) { int const x_281 = k; k = as_type((as_type(x_281) + as_type(1))); int const x_283 = i; i = as_type((as_type(x_283) + as_type(1))); - int const x_286 = (*(tint_symbol_5)).arr[x_283]; - (*(tint_symbol_6)).arr[x_281] = x_286; + int const x_286 = (*(tint_symbol_3)).arr[x_283]; + (*(tint_symbol_4)).arr[x_281] = x_286; } else { int const x_288 = k; k = as_type((as_type(x_288) + as_type(1))); int const x_290 = j; j = as_type((as_type(x_290) + as_type(1))); - int const x_293 = (*(tint_symbol_5)).arr[x_290]; - (*(tint_symbol_6)).arr[x_288] = x_293; + int const x_293 = (*(tint_symbol_3)).arr[x_290]; + (*(tint_symbol_4)).arr[x_288] = x_293; } } while (true) { @@ -69,8 +69,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_306) + as_type(1))); int const x_308 = i; i = as_type((as_type(x_308) + as_type(1))); - int const x_311 = (*(tint_symbol_5)).arr[x_308]; - (*(tint_symbol_6)).arr[x_306] = x_311; + int const x_311 = (*(tint_symbol_3)).arr[x_308]; + (*(tint_symbol_4)).arr[x_306] = x_311; } int const x_313 = *(from); i_1 = x_313; @@ -83,8 +83,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_322 = i_1; int const x_323 = i_1; - int const x_325 = (*(tint_symbol_6)).arr[x_323]; - (*(tint_symbol_5)).arr[x_322] = x_325; + int const x_325 = (*(tint_symbol_4)).arr[x_323]; + (*(tint_symbol_3)).arr[x_322] = x_325; { int const x_327 = i_1; i_1 = as_type((as_type(x_327) + as_type(1))); @@ -93,7 +93,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -138,7 +138,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra param_1 = x_360; int const x_361 = to_1; param_2 = x_361; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_363 = m; int const x_365 = i_2; @@ -153,7 +153,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -164,7 +164,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_94) { case 9: { int const x_124 = i_3; - (*(tint_symbol_9)).arr[x_124] = -5; + (*(tint_symbol_7)).arr[x_124] = -5; if (true) { } else { { @@ -180,47 +180,47 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } case 8: { int const x_122 = i_3; - (*(tint_symbol_9)).arr[x_122] = -4; + (*(tint_symbol_7)).arr[x_122] = -4; break; } case 7: { int const x_120 = i_3; - (*(tint_symbol_9)).arr[x_120] = -3; + (*(tint_symbol_7)).arr[x_120] = -3; break; } case 6: { int const x_118 = i_3; - (*(tint_symbol_9)).arr[x_118] = -2; + (*(tint_symbol_7)).arr[x_118] = -2; break; } case 5: { int const x_116 = i_3; - (*(tint_symbol_9)).arr[x_116] = -1; + (*(tint_symbol_7)).arr[x_116] = -1; break; } case 4: { int const x_114 = i_3; - (*(tint_symbol_9)).arr[x_114] = 0; + (*(tint_symbol_7)).arr[x_114] = 0; break; } case 3: { int const x_112 = i_3; - (*(tint_symbol_9)).arr[x_112] = 1; + (*(tint_symbol_7)).arr[x_112] = 1; break; } case 2: { int const x_110 = i_3; - (*(tint_symbol_9)).arr[x_110] = 2; + (*(tint_symbol_7)).arr[x_110] = 2; break; } case 1: { int const x_108 = i_3; - (*(tint_symbol_9)).arr[x_108] = 3; + (*(tint_symbol_7)).arr[x_108] = 3; break; } case 0: { int const x_106 = i_3; - (*(tint_symbol_9)).arr[x_106] = 4; + (*(tint_symbol_7)).arr[x_106] = 4; break; } default: { @@ -246,56 +246,56 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_137 = j_1; int const x_138 = j_1; - int const x_140 = (*(tint_symbol_9)).arr[x_138]; - (*(tint_symbol_10)).arr[x_137] = x_140; + int const x_140 = (*(tint_symbol_7)).arr[x_138]; + (*(tint_symbol_8)).arr[x_137] = x_140; { int const x_142 = j_1; j_1 = as_type((as_type(x_142) + as_type(1))); } } - mergeSort_(tint_symbol_9, tint_symbol_10); - float const x_146 = (*(tint_symbol_11)).y; + mergeSort_(tint_symbol_7, tint_symbol_8); + float const x_146 = (*(tint_symbol_9)).y; if ((int(x_146) < 30)) { - int const x_153 = (*(tint_symbol_9)).arr[0]; + int const x_153 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_153) / 10.0f)); } else { - float const x_158 = (*(tint_symbol_11)).y; + float const x_158 = (*(tint_symbol_9)).y; if ((int(x_158) < 60)) { - int const x_165 = (*(tint_symbol_9)).arr[1]; + int const x_165 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_165) / 10.0f)); } else { - float const x_170 = (*(tint_symbol_11)).y; + float const x_170 = (*(tint_symbol_9)).y; if ((int(x_170) < 90)) { - int const x_177 = (*(tint_symbol_9)).arr[2]; + int const x_177 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_177) / 10.0f)); } else { - float const x_182 = (*(tint_symbol_11)).y; + float const x_182 = (*(tint_symbol_9)).y; if ((int(x_182) < 120)) { - int const x_189 = (*(tint_symbol_9)).arr[3]; + int const x_189 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_189) / 10.0f)); } else { - float const x_194 = (*(tint_symbol_11)).y; + float const x_194 = (*(tint_symbol_9)).y; if ((int(x_194) < 150)) { discard_fragment(); } else { - float const x_201 = (*(tint_symbol_11)).y; + float const x_201 = (*(tint_symbol_9)).y; if ((int(x_201) < 180)) { - int const x_208 = (*(tint_symbol_9)).arr[5]; + int const x_208 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_208) / 10.0f)); } else { - float const x_213 = (*(tint_symbol_11)).y; + float const x_213 = (*(tint_symbol_9)).y; if ((int(x_213) < 210)) { - int const x_220 = (*(tint_symbol_9)).arr[6]; + int const x_220 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_220) / 10.0f)); } else { - float const x_225 = (*(tint_symbol_11)).y; + float const x_225 = (*(tint_symbol_9)).y; if ((int(x_225) < 240)) { - int const x_232 = (*(tint_symbol_9)).arr[7]; + int const x_232 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_232) / 10.0f)); } else { - float const x_237 = (*(tint_symbol_11)).y; + float const x_237 = (*(tint_symbol_9)).y; if ((int(x_237) < 270)) { - int const x_244 = (*(tint_symbol_9)).arr[8]; + int const x_244 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_244) / 10.0f)); } else { discard_fragment(); @@ -310,19 +310,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_248 = grey; float3 const x_249 = float3(x_248, x_248, x_248); - *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f); + *(tint_symbol_10) = float4(x_249.x, x_249.y, x_249.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.hlsl index 059390e488..28e9f1aff6 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.hlsl @@ -108,11 +108,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.msl index e54d7794f8..97e447b44c 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { tint_array_wrapper data = {}; int x_40_phi = 0; int x_52_phi = 0; @@ -67,7 +67,7 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy float const x_70 = data.arr[x_69_save]; int const x_71_save = x_59; float const x_72 = data.arr[x_71_save]; - float const x_74 = (*(tint_symbol_5)).y; + float const x_74 = (*(tint_symbol_3)).y; float const x_76 = x_6.resolution.y; if ((x_74 < (x_76 * 0.5f))) { x_82 = (x_70 > x_72); @@ -93,29 +93,35 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy x_52_phi = x_53; } } - float const x_90 = (*(tint_symbol_5)).x; + float const x_90 = (*(tint_symbol_3)).x; float const x_92 = x_6.resolution.x; if ((x_90 < (x_92 * 0.5f))) { float const x_99 = data.arr[0]; float const x_102 = data.arr[5]; float const x_105 = data.arr[9]; - *(tint_symbol_6) = float4((x_99 * 0.100000001f), (x_102 * 0.100000001f), (x_105 * 0.100000001f), 1.0f); + *(tint_symbol_4) = float4((x_99 * 0.100000001f), (x_102 * 0.100000001f), (x_105 * 0.100000001f), 1.0f); } else { float const x_109 = data.arr[5]; float const x_112 = data.arr[9]; float const x_115 = data.arr[0]; - *(tint_symbol_6) = float4((x_109 * 0.100000001f), (x_112 * 0.100000001f), (x_115 * 0.100000001f), 1.0f); + *(tint_symbol_4) = float4((x_109 * 0.100000001f), (x_112 * 0.100000001f), (x_115 * 0.100000001f), 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_9, x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_9, x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.hlsl index 059390e488..28e9f1aff6 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.hlsl @@ -108,11 +108,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.msl index e54d7794f8..97e447b44c 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { tint_array_wrapper data = {}; int x_40_phi = 0; int x_52_phi = 0; @@ -67,7 +67,7 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy float const x_70 = data.arr[x_69_save]; int const x_71_save = x_59; float const x_72 = data.arr[x_71_save]; - float const x_74 = (*(tint_symbol_5)).y; + float const x_74 = (*(tint_symbol_3)).y; float const x_76 = x_6.resolution.y; if ((x_74 < (x_76 * 0.5f))) { x_82 = (x_70 > x_72); @@ -93,29 +93,35 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy x_52_phi = x_53; } } - float const x_90 = (*(tint_symbol_5)).x; + float const x_90 = (*(tint_symbol_3)).x; float const x_92 = x_6.resolution.x; if ((x_90 < (x_92 * 0.5f))) { float const x_99 = data.arr[0]; float const x_102 = data.arr[5]; float const x_105 = data.arr[9]; - *(tint_symbol_6) = float4((x_99 * 0.100000001f), (x_102 * 0.100000001f), (x_105 * 0.100000001f), 1.0f); + *(tint_symbol_4) = float4((x_99 * 0.100000001f), (x_102 * 0.100000001f), (x_105 * 0.100000001f), 1.0f); } else { float const x_109 = data.arr[5]; float const x_112 = data.arr[9]; float const x_115 = data.arr[0]; - *(tint_symbol_6) = float4((x_109 * 0.100000001f), (x_112 * 0.100000001f), (x_115 * 0.100000001f), 1.0f); + *(tint_symbol_4) = float4((x_109 * 0.100000001f), (x_112 * 0.100000001f), (x_115 * 0.100000001f), 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_9, x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_9, x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.hlsl index 9792c8f4ff..4efca132dc 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.hlsl @@ -108,11 +108,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.msl index 4539194636..a5e1be210e 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { tint_array_wrapper data = {}; int x_41_phi = 0; int x_53_phi = 0; @@ -67,7 +67,7 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy float const x_71 = data.arr[x_70_save]; int const x_72_save = x_60; float const x_73 = data.arr[x_72_save]; - float const x_75 = (*(tint_symbol_5)).y; + float const x_75 = (*(tint_symbol_3)).y; float const x_77 = x_6.resolution.y; if ((x_75 < (x_77 * 0.5f))) { x_83 = (x_71 > x_73); @@ -93,29 +93,35 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy x_53_phi = x_54; } } - float const x_91 = (*(tint_symbol_5)).x; + float const x_91 = (*(tint_symbol_3)).x; float const x_93 = x_6.resolution.x; if ((x_91 < (x_93 * 0.5f))) { float const x_100 = data.arr[0]; float const x_103 = data.arr[5]; float const x_106 = data.arr[9]; - *(tint_symbol_6) = float4((x_100 * 0.100000001f), (x_103 * 0.100000001f), (x_106 * 0.100000001f), 1.0f); + *(tint_symbol_4) = float4((x_100 * 0.100000001f), (x_103 * 0.100000001f), (x_106 * 0.100000001f), 1.0f); } else { float const x_110 = data.arr[5]; float const x_113 = data.arr[9]; float const x_116 = data.arr[0]; - *(tint_symbol_6) = float4((x_110 * 0.100000001f), (x_113 * 0.100000001f), (x_116 * 0.100000001f), 1.0f); + *(tint_symbol_4) = float4((x_110 * 0.100000001f), (x_113 * 0.100000001f), (x_116 * 0.100000001f), 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_9, x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_9, x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.hlsl index 9792c8f4ff..4efca132dc 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.hlsl @@ -108,11 +108,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.msl index 4539194636..a5e1be210e 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { tint_array_wrapper data = {}; int x_41_phi = 0; int x_53_phi = 0; @@ -67,7 +67,7 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy float const x_71 = data.arr[x_70_save]; int const x_72_save = x_60; float const x_73 = data.arr[x_72_save]; - float const x_75 = (*(tint_symbol_5)).y; + float const x_75 = (*(tint_symbol_3)).y; float const x_77 = x_6.resolution.y; if ((x_75 < (x_77 * 0.5f))) { x_83 = (x_71 > x_73); @@ -93,29 +93,35 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy x_53_phi = x_54; } } - float const x_91 = (*(tint_symbol_5)).x; + float const x_91 = (*(tint_symbol_3)).x; float const x_93 = x_6.resolution.x; if ((x_91 < (x_93 * 0.5f))) { float const x_100 = data.arr[0]; float const x_103 = data.arr[5]; float const x_106 = data.arr[9]; - *(tint_symbol_6) = float4((x_100 * 0.100000001f), (x_103 * 0.100000001f), (x_106 * 0.100000001f), 1.0f); + *(tint_symbol_4) = float4((x_100 * 0.100000001f), (x_103 * 0.100000001f), (x_106 * 0.100000001f), 1.0f); } else { float const x_110 = data.arr[5]; float const x_113 = data.arr[9]; float const x_116 = data.arr[0]; - *(tint_symbol_6) = float4((x_110 * 0.100000001f), (x_113 * 0.100000001f), (x_116 * 0.100000001f), 1.0f); + *(tint_symbol_4) = float4((x_110 * 0.100000001f), (x_113 * 0.100000001f), (x_116 * 0.100000001f), 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_9, x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_9, x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.hlsl index cebe08668e..088c51ff9e 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.hlsl @@ -257,11 +257,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl index eefc29704f..c5e09f755e 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -38,23 +38,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_272 = i; - int const x_274 = (*(tint_symbol_5)).arr[x_272]; + int const x_274 = (*(tint_symbol_3)).arr[x_272]; int const x_275 = j; - int const x_277 = (*(tint_symbol_5)).arr[x_275]; + int const x_277 = (*(tint_symbol_3)).arr[x_275]; if ((x_274 < x_277)) { int const x_282 = k; k = as_type((as_type(x_282) + as_type(1))); int const x_284 = i; i = as_type((as_type(x_284) + as_type(1))); - int const x_287 = (*(tint_symbol_5)).arr[x_284]; - (*(tint_symbol_6)).arr[x_282] = x_287; + int const x_287 = (*(tint_symbol_3)).arr[x_284]; + (*(tint_symbol_4)).arr[x_282] = x_287; } else { int const x_289 = k; k = as_type((as_type(x_289) + as_type(1))); int const x_291 = j; j = as_type((as_type(x_291) + as_type(1))); - int const x_294 = (*(tint_symbol_5)).arr[x_291]; - (*(tint_symbol_6)).arr[x_289] = x_294; + int const x_294 = (*(tint_symbol_3)).arr[x_291]; + (*(tint_symbol_4)).arr[x_289] = x_294; } } while (true) { @@ -73,8 +73,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_309) + as_type(1))); int const x_311 = i; i = as_type((as_type(x_311) + as_type(1))); - int const x_314 = (*(tint_symbol_5)).arr[x_311]; - (*(tint_symbol_6)).arr[x_309] = x_314; + int const x_314 = (*(tint_symbol_3)).arr[x_311]; + (*(tint_symbol_4)).arr[x_309] = x_314; } int const x_316 = *(from); i_1 = x_316; @@ -87,8 +87,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_325 = i_1; int const x_326 = i_1; - int const x_328 = (*(tint_symbol_6)).arr[x_326]; - (*(tint_symbol_5)).arr[x_325] = x_328; + int const x_328 = (*(tint_symbol_4)).arr[x_326]; + (*(tint_symbol_3)).arr[x_325] = x_328; { int const x_330 = i_1; i_1 = as_type((as_type(x_330) + as_type(1))); @@ -97,7 +97,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -142,7 +142,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra param_1 = x_363; int const x_364 = to_1; param_2 = x_364; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_366 = m; int const x_368 = i_2; @@ -157,7 +157,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -168,52 +168,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_95) { case 9: { int const x_125 = i_3; - (*(tint_symbol_9)).arr[x_125] = -5; + (*(tint_symbol_7)).arr[x_125] = -5; break; } case 8: { int const x_123 = i_3; - (*(tint_symbol_9)).arr[x_123] = -4; + (*(tint_symbol_7)).arr[x_123] = -4; break; } case 7: { int const x_121 = i_3; - (*(tint_symbol_9)).arr[x_121] = -3; + (*(tint_symbol_7)).arr[x_121] = -3; break; } case 6: { int const x_119 = i_3; - (*(tint_symbol_9)).arr[x_119] = -2; + (*(tint_symbol_7)).arr[x_119] = -2; break; } case 5: { int const x_117 = i_3; - (*(tint_symbol_9)).arr[x_117] = -1; + (*(tint_symbol_7)).arr[x_117] = -1; break; } case 4: { int const x_115 = i_3; - (*(tint_symbol_9)).arr[x_115] = 0; + (*(tint_symbol_7)).arr[x_115] = 0; break; } case 3: { int const x_113 = i_3; - (*(tint_symbol_9)).arr[x_113] = 1; + (*(tint_symbol_7)).arr[x_113] = 1; break; } case 2: { int const x_111 = i_3; - (*(tint_symbol_9)).arr[x_111] = 2; + (*(tint_symbol_7)).arr[x_111] = 2; break; } case 1: { int const x_109 = i_3; - (*(tint_symbol_9)).arr[x_109] = 3; + (*(tint_symbol_7)).arr[x_109] = 3; break; } case 0: { int const x_107 = i_3; - (*(tint_symbol_9)).arr[x_107] = 4; + (*(tint_symbol_7)).arr[x_107] = 4; break; } default: { @@ -239,56 +239,56 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_138 = j_1; int const x_139 = j_1; - int const x_141 = (*(tint_symbol_9)).arr[x_139]; - (*(tint_symbol_10)).arr[x_138] = x_141; + int const x_141 = (*(tint_symbol_7)).arr[x_139]; + (*(tint_symbol_8)).arr[x_138] = x_141; { int const x_143 = j_1; j_1 = as_type((as_type(x_143) + as_type(1))); } } - mergeSort_(tint_symbol_9, tint_symbol_10); - float const x_147 = (*(tint_symbol_11)).y; + mergeSort_(tint_symbol_7, tint_symbol_8); + float const x_147 = (*(tint_symbol_9)).y; if ((int(x_147) < 30)) { - int const x_154 = (*(tint_symbol_9)).arr[0]; + int const x_154 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_154) / 10.0f)); } else { - float const x_159 = (*(tint_symbol_11)).y; + float const x_159 = (*(tint_symbol_9)).y; if ((int(x_159) < 60)) { - int const x_166 = (*(tint_symbol_9)).arr[1]; + int const x_166 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_166) / 10.0f)); } else { - float const x_171 = (*(tint_symbol_11)).y; + float const x_171 = (*(tint_symbol_9)).y; if ((int(x_171) < 90)) { - int const x_178 = (*(tint_symbol_9)).arr[2]; + int const x_178 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_178) / 10.0f)); } else { - float const x_183 = (*(tint_symbol_11)).y; + float const x_183 = (*(tint_symbol_9)).y; if ((int(x_183) < 120)) { - int const x_190 = (*(tint_symbol_9)).arr[3]; + int const x_190 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_190) / 10.0f)); } else { - float const x_195 = (*(tint_symbol_11)).y; + float const x_195 = (*(tint_symbol_9)).y; if ((int(x_195) < 150)) { discard_fragment(); } else { - float const x_202 = (*(tint_symbol_11)).y; + float const x_202 = (*(tint_symbol_9)).y; if ((int(x_202) < 180)) { - int const x_209 = (*(tint_symbol_9)).arr[5]; + int const x_209 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_209) / 10.0f)); } else { - float const x_214 = (*(tint_symbol_11)).y; + float const x_214 = (*(tint_symbol_9)).y; if ((int(x_214) < 210)) { - int const x_221 = (*(tint_symbol_9)).arr[6]; + int const x_221 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_221) / 10.0f)); } else { - float const x_226 = (*(tint_symbol_11)).y; + float const x_226 = (*(tint_symbol_9)).y; if ((int(x_226) < 240)) { - int const x_233 = (*(tint_symbol_9)).arr[7]; + int const x_233 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_233) / 10.0f)); } else { - float const x_238 = (*(tint_symbol_11)).y; + float const x_238 = (*(tint_symbol_9)).y; if ((int(x_238) < 270)) { - int const x_245 = (*(tint_symbol_9)).arr[8]; + int const x_245 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_245) / 10.0f)); } else { discard_fragment(); @@ -303,19 +303,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_249 = grey; float3 const x_250 = float3(x_249, x_249, x_249); - *(tint_symbol_12) = float4(x_250.x, x_250.y, x_250.z, 1.0f); + *(tint_symbol_10) = float4(x_250.x, x_250.y, x_250.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.hlsl index 61539cb6d1..30a24e17c0 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.hlsl @@ -265,11 +265,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.msl index 7455bc821f..6e261fd596 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -38,23 +38,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_272 = i; - int const x_274 = (*(tint_symbol_5)).arr[x_272]; + int const x_274 = (*(tint_symbol_3)).arr[x_272]; int const x_275 = j; - int const x_277 = (*(tint_symbol_5)).arr[x_275]; + int const x_277 = (*(tint_symbol_3)).arr[x_275]; if ((x_274 < x_277)) { int const x_282 = k; k = as_type((as_type(x_282) + as_type(1))); int const x_284 = i; i = as_type((as_type(x_284) + as_type(1))); - int const x_287 = (*(tint_symbol_5)).arr[x_284]; - (*(tint_symbol_6)).arr[x_282] = x_287; + int const x_287 = (*(tint_symbol_3)).arr[x_284]; + (*(tint_symbol_4)).arr[x_282] = x_287; } else { int const x_289 = k; k = as_type((as_type(x_289) + as_type(1))); int const x_291 = j; j = as_type((as_type(x_291) + as_type(1))); - int const x_294 = (*(tint_symbol_5)).arr[x_291]; - (*(tint_symbol_6)).arr[x_289] = x_294; + int const x_294 = (*(tint_symbol_3)).arr[x_291]; + (*(tint_symbol_4)).arr[x_289] = x_294; } } while (true) { @@ -73,8 +73,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_309) + as_type(1))); int const x_311 = i; i = as_type((as_type(x_311) + as_type(1))); - int const x_314 = (*(tint_symbol_5)).arr[x_311]; - (*(tint_symbol_6)).arr[x_309] = x_314; + int const x_314 = (*(tint_symbol_3)).arr[x_311]; + (*(tint_symbol_4)).arr[x_309] = x_314; } int const x_316 = *(from); i_1 = x_316; @@ -87,8 +87,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_325 = i_1; int const x_326 = i_1; - int const x_328 = (*(tint_symbol_6)).arr[x_326]; - (*(tint_symbol_5)).arr[x_325] = x_328; + int const x_328 = (*(tint_symbol_4)).arr[x_326]; + (*(tint_symbol_3)).arr[x_325] = x_328; { int const x_330 = i_1; i_1 = as_type((as_type(x_330) + as_type(1))); @@ -97,7 +97,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -142,7 +142,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra param_1 = x_363; int const x_364 = to_1; param_2 = x_364; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_366 = m; int const x_368 = i_2; @@ -157,7 +157,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -168,52 +168,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_95) { case 9: { int const x_125 = i_3; - (*(tint_symbol_9)).arr[x_125] = -5; + (*(tint_symbol_7)).arr[x_125] = -5; break; } case 8: { int const x_123 = i_3; - (*(tint_symbol_9)).arr[x_123] = -4; + (*(tint_symbol_7)).arr[x_123] = -4; break; } case 7: { int const x_121 = i_3; - (*(tint_symbol_9)).arr[x_121] = -3; + (*(tint_symbol_7)).arr[x_121] = -3; break; } case 6: { int const x_119 = i_3; - (*(tint_symbol_9)).arr[x_119] = -2; + (*(tint_symbol_7)).arr[x_119] = -2; break; } case 5: { int const x_117 = i_3; - (*(tint_symbol_9)).arr[x_117] = -1; + (*(tint_symbol_7)).arr[x_117] = -1; break; } case 4: { int const x_115 = i_3; - (*(tint_symbol_9)).arr[x_115] = 0; + (*(tint_symbol_7)).arr[x_115] = 0; break; } case 3: { int const x_113 = i_3; - (*(tint_symbol_9)).arr[x_113] = 1; + (*(tint_symbol_7)).arr[x_113] = 1; break; } case 2: { int const x_111 = i_3; - (*(tint_symbol_9)).arr[x_111] = 2; + (*(tint_symbol_7)).arr[x_111] = 2; break; } case 1: { int const x_109 = i_3; - (*(tint_symbol_9)).arr[x_109] = 3; + (*(tint_symbol_7)).arr[x_109] = 3; break; } case 0: { int const x_107 = i_3; - (*(tint_symbol_9)).arr[x_107] = 4; + (*(tint_symbol_7)).arr[x_107] = 4; break; } default: { @@ -239,56 +239,56 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_138 = j_1; int const x_139 = j_1; - int const x_141 = (*(tint_symbol_9)).arr[x_139]; - (*(tint_symbol_10)).arr[x_138] = x_141; + int const x_141 = (*(tint_symbol_7)).arr[x_139]; + (*(tint_symbol_8)).arr[x_138] = x_141; { int const x_143 = j_1; j_1 = as_type((as_type(x_143) + as_type(1))); } } - mergeSort_(tint_symbol_9, tint_symbol_10); - float const x_147 = (*(tint_symbol_11)).y; + mergeSort_(tint_symbol_7, tint_symbol_8); + float const x_147 = (*(tint_symbol_9)).y; if ((int(x_147) < 30)) { - int const x_154 = (*(tint_symbol_9)).arr[0]; + int const x_154 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_154) / 10.0f)); } else { - float const x_159 = (*(tint_symbol_11)).y; + float const x_159 = (*(tint_symbol_9)).y; if ((int(x_159) < 60)) { - int const x_166 = (*(tint_symbol_9)).arr[1]; + int const x_166 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_166) / 10.0f)); } else { - float const x_171 = (*(tint_symbol_11)).y; + float const x_171 = (*(tint_symbol_9)).y; if ((int(x_171) < 90)) { - int const x_178 = (*(tint_symbol_9)).arr[2]; + int const x_178 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_178) / 10.0f)); } else { - float const x_183 = (*(tint_symbol_11)).y; + float const x_183 = (*(tint_symbol_9)).y; if ((int(x_183) < 120)) { - int const x_190 = (*(tint_symbol_9)).arr[3]; + int const x_190 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_190) / 10.0f)); } else { - float const x_195 = (*(tint_symbol_11)).y; + float const x_195 = (*(tint_symbol_9)).y; if ((int(x_195) < 150)) { discard_fragment(); } else { - float const x_202 = (*(tint_symbol_11)).y; + float const x_202 = (*(tint_symbol_9)).y; if ((int(x_202) < 180)) { - int const x_209 = (*(tint_symbol_9)).arr[5]; + int const x_209 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_209) / 10.0f)); } else { - float const x_214 = (*(tint_symbol_11)).y; + float const x_214 = (*(tint_symbol_9)).y; if ((int(x_214) < 210)) { - int const x_221 = (*(tint_symbol_9)).arr[6]; + int const x_221 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_221) / 10.0f)); } else { - float const x_226 = (*(tint_symbol_11)).y; + float const x_226 = (*(tint_symbol_9)).y; if ((int(x_226) < 240)) { - int const x_233 = (*(tint_symbol_9)).arr[7]; + int const x_233 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_233) / 10.0f)); } else { - float const x_238 = (*(tint_symbol_11)).y; + float const x_238 = (*(tint_symbol_9)).y; if ((int(x_238) < 270)) { - int const x_245 = (*(tint_symbol_9)).arr[8]; + int const x_245 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_245) / 10.0f)); } else { discard_fragment(); @@ -303,19 +303,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_249 = grey; float3 const x_250 = float3(x_249, x_249, x_249); - *(tint_symbol_12) = float4(x_250.x, x_250.y, x_250.z, 1.0f); + *(tint_symbol_10) = float4(x_250.x, x_250.y, x_250.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.hlsl index 6b3b61f5d5..0d62f20839 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.hlsl @@ -14,8 +14,8 @@ void main_1() { int x_357_phi = 0; int x_360_phi = 0; int x_362_phi = 0; - const BST tint_symbol_2 = {9, -1, -1}; - tree[0] = tint_symbol_2; + const BST tint_symbol_1 = {9, -1, -1}; + tree[0] = tint_symbol_1; switch(0u) { default: { x_62_phi = 0; @@ -36,8 +36,8 @@ void main_1() { const int x_83 = tree[x_82_save].leftIndex; if ((x_83 == -1)) { tree[x_82_save].leftIndex = 1; - const BST tint_symbol_3 = {5, -1, -1}; - tree[1] = tint_symbol_3; + const BST tint_symbol_2 = {5, -1, -1}; + tree[1] = tint_symbol_2; x_90_phi = true; break; } else { @@ -55,8 +55,8 @@ void main_1() { const int x_75 = tree[x_74_save].rightIndex; if ((x_75 == -1)) { tree[x_74_save].rightIndex = 1; - const BST tint_symbol_4 = {5, -1, -1}; - tree[1] = tint_symbol_4; + const BST tint_symbol_3 = {5, -1, -1}; + tree[1] = tint_symbol_3; x_90_phi = true; break; } else { @@ -104,8 +104,8 @@ void main_1() { const int x_116 = tree[x_115_save].leftIndex; if ((x_116 == -1)) { tree[x_115_save].leftIndex = 2; - const BST tint_symbol_5 = {12, -1, -1}; - tree[2] = tint_symbol_5; + const BST tint_symbol_4 = {12, -1, -1}; + tree[2] = tint_symbol_4; x_123_phi = true; break; } else { @@ -123,8 +123,8 @@ void main_1() { const int x_108 = tree[x_107_save].rightIndex; if ((x_108 == -1)) { tree[x_107_save].rightIndex = 2; - const BST tint_symbol_6 = {12, -1, -1}; - tree[2] = tint_symbol_6; + const BST tint_symbol_5 = {12, -1, -1}; + tree[2] = tint_symbol_5; x_123_phi = true; break; } else { @@ -172,8 +172,8 @@ void main_1() { const int x_149 = tree[x_148_save].leftIndex; if ((x_149 == -1)) { tree[x_148_save].leftIndex = 3; - const BST tint_symbol_7 = {15, -1, -1}; - tree[3] = tint_symbol_7; + const BST tint_symbol_6 = {15, -1, -1}; + tree[3] = tint_symbol_6; x_156_phi = true; break; } else { @@ -191,8 +191,8 @@ void main_1() { const int x_141 = tree[x_140_save].rightIndex; if ((x_141 == -1)) { tree[x_140_save].rightIndex = 3; - const BST tint_symbol_8 = {15, -1, -1}; - tree[3] = tint_symbol_8; + const BST tint_symbol_7 = {15, -1, -1}; + tree[3] = tint_symbol_7; x_156_phi = true; break; } else { @@ -240,8 +240,8 @@ void main_1() { const int x_182 = tree[x_181_save].leftIndex; if ((x_182 == -1)) { tree[x_181_save].leftIndex = 4; - const BST tint_symbol_9 = {7, -1, -1}; - tree[4] = tint_symbol_9; + const BST tint_symbol_8 = {7, -1, -1}; + tree[4] = tint_symbol_8; x_189_phi = true; break; } else { @@ -259,8 +259,8 @@ void main_1() { const int x_174 = tree[x_173_save].rightIndex; if ((x_174 == -1)) { tree[x_173_save].rightIndex = 4; - const BST tint_symbol_10 = {7, -1, -1}; - tree[4] = tint_symbol_10; + const BST tint_symbol_9 = {7, -1, -1}; + tree[4] = tint_symbol_9; x_189_phi = true; break; } else { @@ -308,8 +308,8 @@ void main_1() { const int x_215 = tree[x_214_save].leftIndex; if ((x_215 == -1)) { tree[x_214_save].leftIndex = 5; - const BST tint_symbol_11 = {8, -1, -1}; - tree[5] = tint_symbol_11; + const BST tint_symbol_10 = {8, -1, -1}; + tree[5] = tint_symbol_10; x_222_phi = true; break; } else { @@ -327,8 +327,8 @@ void main_1() { const int x_207 = tree[x_206_save].rightIndex; if ((x_207 == -1)) { tree[x_206_save].rightIndex = 5; - const BST tint_symbol_12 = {8, -1, -1}; - tree[5] = tint_symbol_12; + const BST tint_symbol_11 = {8, -1, -1}; + tree[5] = tint_symbol_11; x_222_phi = true; break; } else { @@ -376,8 +376,8 @@ void main_1() { const int x_248 = tree[x_247_save].leftIndex; if ((x_248 == -1)) { tree[x_247_save].leftIndex = 6; - const BST tint_symbol_13 = {2, -1, -1}; - tree[6] = tint_symbol_13; + const BST tint_symbol_12 = {2, -1, -1}; + tree[6] = tint_symbol_12; x_255_phi = true; break; } else { @@ -395,8 +395,8 @@ void main_1() { const int x_240 = tree[x_239_save].rightIndex; if ((x_240 == -1)) { tree[x_239_save].rightIndex = 6; - const BST tint_symbol_14 = {2, -1, -1}; - tree[6] = tint_symbol_14; + const BST tint_symbol_13 = {2, -1, -1}; + tree[6] = tint_symbol_13; x_255_phi = true; break; } else { @@ -444,8 +444,8 @@ void main_1() { const int x_281 = tree[x_280_save].leftIndex; if ((x_281 == -1)) { tree[x_280_save].leftIndex = 7; - const BST tint_symbol_15 = {6, -1, -1}; - tree[7] = tint_symbol_15; + const BST tint_symbol_14 = {6, -1, -1}; + tree[7] = tint_symbol_14; x_288_phi = true; break; } else { @@ -463,8 +463,8 @@ void main_1() { const int x_273 = tree[x_272_save].rightIndex; if ((x_273 == -1)) { tree[x_272_save].rightIndex = 7; - const BST tint_symbol_16 = {6, -1, -1}; - tree[7] = tint_symbol_16; + const BST tint_symbol_15 = {6, -1, -1}; + tree[7] = tint_symbol_15; x_288_phi = true; break; } else { @@ -512,8 +512,8 @@ void main_1() { const int x_314 = tree[x_313_save].leftIndex; if ((x_314 == -1)) { tree[x_313_save].leftIndex = 8; - const BST tint_symbol_17 = {17, -1, -1}; - tree[8] = tint_symbol_17; + const BST tint_symbol_16 = {17, -1, -1}; + tree[8] = tint_symbol_16; x_321_phi = true; break; } else { @@ -531,8 +531,8 @@ void main_1() { const int x_306 = tree[x_305_save].rightIndex; if ((x_306 == -1)) { tree[x_305_save].rightIndex = 8; - const BST tint_symbol_18 = {17, -1, -1}; - tree[8] = tint_symbol_18; + const BST tint_symbol_17 = {17, -1, -1}; + tree[8] = tint_symbol_17; x_321_phi = true; break; } else { @@ -580,8 +580,8 @@ void main_1() { const int x_347 = tree[x_346_save].leftIndex; if ((x_347 == -1)) { tree[x_346_save].leftIndex = 9; - const BST tint_symbol_19 = {13, -1, -1}; - tree[9] = tint_symbol_19; + const BST tint_symbol_18 = {13, -1, -1}; + tree[9] = tint_symbol_18; x_354_phi = true; break; } else { @@ -599,8 +599,8 @@ void main_1() { const int x_339 = tree[x_338_save].rightIndex; if ((x_339 == -1)) { tree[x_338_save].rightIndex = 9; - const BST tint_symbol_20 = {13, -1, -1}; - tree[9] = tint_symbol_20; + const BST tint_symbol_19 = {13, -1, -1}; + tree[9] = tint_symbol_19; x_354_phi = true; break; } else { @@ -742,9 +742,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_21 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_21; + const main_out tint_symbol_20 = {x_GLF_color}; + return tint_symbol_20; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.msl index 320cbdbea3..bb781cd863 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.msl @@ -16,7 +16,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_23) { +void main_1(thread float4* const tint_symbol_22) { tint_array_wrapper tree = {}; int x_360 = 0; int x_62_phi = 0; @@ -24,8 +24,8 @@ void main_1(thread float4* const tint_symbol_23) { int x_357_phi = 0; int x_360_phi = 0; int x_362_phi = 0; - BST const tint_symbol_3 = {.data=9, .leftIndex=-1, .rightIndex=-1}; - tree.arr[0] = tint_symbol_3; + BST const tint_symbol_2 = {.data=9, .leftIndex=-1, .rightIndex=-1}; + tree.arr[0] = tint_symbol_2; switch(0u) { default: { x_62_phi = 0; @@ -46,8 +46,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_83 = tree.arr[x_82_save].leftIndex; if ((x_83 == -1)) { tree.arr[x_82_save].leftIndex = 1; - BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1}; - tree.arr[1] = tint_symbol_4; + BST const tint_symbol_3 = {.data=5, .leftIndex=-1, .rightIndex=-1}; + tree.arr[1] = tint_symbol_3; x_90_phi = true; break; } else { @@ -65,8 +65,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_75 = tree.arr[x_74_save].rightIndex; if ((x_75 == -1)) { tree.arr[x_74_save].rightIndex = 1; - BST const tint_symbol_5 = {.data=5, .leftIndex=-1, .rightIndex=-1}; - tree.arr[1] = tint_symbol_5; + BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1}; + tree.arr[1] = tint_symbol_4; x_90_phi = true; break; } else { @@ -115,8 +115,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_116 = tree.arr[x_115_save].leftIndex; if ((x_116 == -1)) { tree.arr[x_115_save].leftIndex = 2; - BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1}; - tree.arr[2] = tint_symbol_6; + BST const tint_symbol_5 = {.data=12, .leftIndex=-1, .rightIndex=-1}; + tree.arr[2] = tint_symbol_5; x_123_phi = true; break; } else { @@ -134,8 +134,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_108 = tree.arr[x_107_save].rightIndex; if ((x_108 == -1)) { tree.arr[x_107_save].rightIndex = 2; - BST const tint_symbol_7 = {.data=12, .leftIndex=-1, .rightIndex=-1}; - tree.arr[2] = tint_symbol_7; + BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1}; + tree.arr[2] = tint_symbol_6; x_123_phi = true; break; } else { @@ -184,8 +184,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_149 = tree.arr[x_148_save].leftIndex; if ((x_149 == -1)) { tree.arr[x_148_save].leftIndex = 3; - BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1}; - tree.arr[3] = tint_symbol_8; + BST const tint_symbol_7 = {.data=15, .leftIndex=-1, .rightIndex=-1}; + tree.arr[3] = tint_symbol_7; x_156_phi = true; break; } else { @@ -203,8 +203,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_141 = tree.arr[x_140_save].rightIndex; if ((x_141 == -1)) { tree.arr[x_140_save].rightIndex = 3; - BST const tint_symbol_9 = {.data=15, .leftIndex=-1, .rightIndex=-1}; - tree.arr[3] = tint_symbol_9; + BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1}; + tree.arr[3] = tint_symbol_8; x_156_phi = true; break; } else { @@ -253,8 +253,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_182 = tree.arr[x_181_save].leftIndex; if ((x_182 == -1)) { tree.arr[x_181_save].leftIndex = 4; - BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1}; - tree.arr[4] = tint_symbol_10; + BST const tint_symbol_9 = {.data=7, .leftIndex=-1, .rightIndex=-1}; + tree.arr[4] = tint_symbol_9; x_189_phi = true; break; } else { @@ -272,8 +272,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_174 = tree.arr[x_173_save].rightIndex; if ((x_174 == -1)) { tree.arr[x_173_save].rightIndex = 4; - BST const tint_symbol_11 = {.data=7, .leftIndex=-1, .rightIndex=-1}; - tree.arr[4] = tint_symbol_11; + BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1}; + tree.arr[4] = tint_symbol_10; x_189_phi = true; break; } else { @@ -322,8 +322,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_215 = tree.arr[x_214_save].leftIndex; if ((x_215 == -1)) { tree.arr[x_214_save].leftIndex = 5; - BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1}; - tree.arr[5] = tint_symbol_12; + BST const tint_symbol_11 = {.data=8, .leftIndex=-1, .rightIndex=-1}; + tree.arr[5] = tint_symbol_11; x_222_phi = true; break; } else { @@ -341,8 +341,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_207 = tree.arr[x_206_save].rightIndex; if ((x_207 == -1)) { tree.arr[x_206_save].rightIndex = 5; - BST const tint_symbol_13 = {.data=8, .leftIndex=-1, .rightIndex=-1}; - tree.arr[5] = tint_symbol_13; + BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1}; + tree.arr[5] = tint_symbol_12; x_222_phi = true; break; } else { @@ -391,8 +391,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_248 = tree.arr[x_247_save].leftIndex; if ((x_248 == -1)) { tree.arr[x_247_save].leftIndex = 6; - BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1}; - tree.arr[6] = tint_symbol_14; + BST const tint_symbol_13 = {.data=2, .leftIndex=-1, .rightIndex=-1}; + tree.arr[6] = tint_symbol_13; x_255_phi = true; break; } else { @@ -410,8 +410,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_240 = tree.arr[x_239_save].rightIndex; if ((x_240 == -1)) { tree.arr[x_239_save].rightIndex = 6; - BST const tint_symbol_15 = {.data=2, .leftIndex=-1, .rightIndex=-1}; - tree.arr[6] = tint_symbol_15; + BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1}; + tree.arr[6] = tint_symbol_14; x_255_phi = true; break; } else { @@ -460,8 +460,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_281 = tree.arr[x_280_save].leftIndex; if ((x_281 == -1)) { tree.arr[x_280_save].leftIndex = 7; - BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1}; - tree.arr[7] = tint_symbol_16; + BST const tint_symbol_15 = {.data=6, .leftIndex=-1, .rightIndex=-1}; + tree.arr[7] = tint_symbol_15; x_288_phi = true; break; } else { @@ -479,8 +479,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_273 = tree.arr[x_272_save].rightIndex; if ((x_273 == -1)) { tree.arr[x_272_save].rightIndex = 7; - BST const tint_symbol_17 = {.data=6, .leftIndex=-1, .rightIndex=-1}; - tree.arr[7] = tint_symbol_17; + BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1}; + tree.arr[7] = tint_symbol_16; x_288_phi = true; break; } else { @@ -529,8 +529,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_314 = tree.arr[x_313_save].leftIndex; if ((x_314 == -1)) { tree.arr[x_313_save].leftIndex = 8; - BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1}; - tree.arr[8] = tint_symbol_18; + BST const tint_symbol_17 = {.data=17, .leftIndex=-1, .rightIndex=-1}; + tree.arr[8] = tint_symbol_17; x_321_phi = true; break; } else { @@ -548,8 +548,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_306 = tree.arr[x_305_save].rightIndex; if ((x_306 == -1)) { tree.arr[x_305_save].rightIndex = 8; - BST const tint_symbol_19 = {.data=17, .leftIndex=-1, .rightIndex=-1}; - tree.arr[8] = tint_symbol_19; + BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1}; + tree.arr[8] = tint_symbol_18; x_321_phi = true; break; } else { @@ -598,8 +598,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_347 = tree.arr[x_346_save].leftIndex; if ((x_347 == -1)) { tree.arr[x_346_save].leftIndex = 9; - BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1}; - tree.arr[9] = tint_symbol_20; + BST const tint_symbol_19 = {.data=13, .leftIndex=-1, .rightIndex=-1}; + tree.arr[9] = tint_symbol_19; x_354_phi = true; break; } else { @@ -617,8 +617,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_339 = tree.arr[x_338_save].rightIndex; if ((x_339 == -1)) { tree.arr[x_338_save].rightIndex = 9; - BST const tint_symbol_21 = {.data=13, .leftIndex=-1, .rightIndex=-1}; - tree.arr[9] = tint_symbol_21; + BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1}; + tree.arr[9] = tint_symbol_20; x_354_phi = true; break; } else { @@ -686,7 +686,7 @@ void main_1(thread float4* const tint_symbol_23) { x_393_phi = true; break; } - float const x_389 = (*(tint_symbol_23))[select(3u, 3u, (3u <= 3u))]; + float const x_389 = (*(tint_symbol_22))[select(3u, 3u, (3u <= 3u))]; { x_374_phi = select(x_383, x_385, !((x_362 <= x_382))); } @@ -747,18 +747,24 @@ void main_1(thread float4* const tint_symbol_23) { } } if ((x_360 == as_type(20))) { - *(tint_symbol_23) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_22) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_23) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_22) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_24 = 0.0f; - main_1(&(tint_symbol_24)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_24}; - tint_symbol_1 const tint_symbol_22 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_22; +main_out tint_symbol_inner(thread float4* const tint_symbol_23) { + main_1(tint_symbol_23); + main_out const tint_symbol_21 = {.x_GLF_color_1=*(tint_symbol_23)}; + return tint_symbol_21; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_24 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_24)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.hlsl index 6b3b61f5d5..0d62f20839 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.hlsl @@ -14,8 +14,8 @@ void main_1() { int x_357_phi = 0; int x_360_phi = 0; int x_362_phi = 0; - const BST tint_symbol_2 = {9, -1, -1}; - tree[0] = tint_symbol_2; + const BST tint_symbol_1 = {9, -1, -1}; + tree[0] = tint_symbol_1; switch(0u) { default: { x_62_phi = 0; @@ -36,8 +36,8 @@ void main_1() { const int x_83 = tree[x_82_save].leftIndex; if ((x_83 == -1)) { tree[x_82_save].leftIndex = 1; - const BST tint_symbol_3 = {5, -1, -1}; - tree[1] = tint_symbol_3; + const BST tint_symbol_2 = {5, -1, -1}; + tree[1] = tint_symbol_2; x_90_phi = true; break; } else { @@ -55,8 +55,8 @@ void main_1() { const int x_75 = tree[x_74_save].rightIndex; if ((x_75 == -1)) { tree[x_74_save].rightIndex = 1; - const BST tint_symbol_4 = {5, -1, -1}; - tree[1] = tint_symbol_4; + const BST tint_symbol_3 = {5, -1, -1}; + tree[1] = tint_symbol_3; x_90_phi = true; break; } else { @@ -104,8 +104,8 @@ void main_1() { const int x_116 = tree[x_115_save].leftIndex; if ((x_116 == -1)) { tree[x_115_save].leftIndex = 2; - const BST tint_symbol_5 = {12, -1, -1}; - tree[2] = tint_symbol_5; + const BST tint_symbol_4 = {12, -1, -1}; + tree[2] = tint_symbol_4; x_123_phi = true; break; } else { @@ -123,8 +123,8 @@ void main_1() { const int x_108 = tree[x_107_save].rightIndex; if ((x_108 == -1)) { tree[x_107_save].rightIndex = 2; - const BST tint_symbol_6 = {12, -1, -1}; - tree[2] = tint_symbol_6; + const BST tint_symbol_5 = {12, -1, -1}; + tree[2] = tint_symbol_5; x_123_phi = true; break; } else { @@ -172,8 +172,8 @@ void main_1() { const int x_149 = tree[x_148_save].leftIndex; if ((x_149 == -1)) { tree[x_148_save].leftIndex = 3; - const BST tint_symbol_7 = {15, -1, -1}; - tree[3] = tint_symbol_7; + const BST tint_symbol_6 = {15, -1, -1}; + tree[3] = tint_symbol_6; x_156_phi = true; break; } else { @@ -191,8 +191,8 @@ void main_1() { const int x_141 = tree[x_140_save].rightIndex; if ((x_141 == -1)) { tree[x_140_save].rightIndex = 3; - const BST tint_symbol_8 = {15, -1, -1}; - tree[3] = tint_symbol_8; + const BST tint_symbol_7 = {15, -1, -1}; + tree[3] = tint_symbol_7; x_156_phi = true; break; } else { @@ -240,8 +240,8 @@ void main_1() { const int x_182 = tree[x_181_save].leftIndex; if ((x_182 == -1)) { tree[x_181_save].leftIndex = 4; - const BST tint_symbol_9 = {7, -1, -1}; - tree[4] = tint_symbol_9; + const BST tint_symbol_8 = {7, -1, -1}; + tree[4] = tint_symbol_8; x_189_phi = true; break; } else { @@ -259,8 +259,8 @@ void main_1() { const int x_174 = tree[x_173_save].rightIndex; if ((x_174 == -1)) { tree[x_173_save].rightIndex = 4; - const BST tint_symbol_10 = {7, -1, -1}; - tree[4] = tint_symbol_10; + const BST tint_symbol_9 = {7, -1, -1}; + tree[4] = tint_symbol_9; x_189_phi = true; break; } else { @@ -308,8 +308,8 @@ void main_1() { const int x_215 = tree[x_214_save].leftIndex; if ((x_215 == -1)) { tree[x_214_save].leftIndex = 5; - const BST tint_symbol_11 = {8, -1, -1}; - tree[5] = tint_symbol_11; + const BST tint_symbol_10 = {8, -1, -1}; + tree[5] = tint_symbol_10; x_222_phi = true; break; } else { @@ -327,8 +327,8 @@ void main_1() { const int x_207 = tree[x_206_save].rightIndex; if ((x_207 == -1)) { tree[x_206_save].rightIndex = 5; - const BST tint_symbol_12 = {8, -1, -1}; - tree[5] = tint_symbol_12; + const BST tint_symbol_11 = {8, -1, -1}; + tree[5] = tint_symbol_11; x_222_phi = true; break; } else { @@ -376,8 +376,8 @@ void main_1() { const int x_248 = tree[x_247_save].leftIndex; if ((x_248 == -1)) { tree[x_247_save].leftIndex = 6; - const BST tint_symbol_13 = {2, -1, -1}; - tree[6] = tint_symbol_13; + const BST tint_symbol_12 = {2, -1, -1}; + tree[6] = tint_symbol_12; x_255_phi = true; break; } else { @@ -395,8 +395,8 @@ void main_1() { const int x_240 = tree[x_239_save].rightIndex; if ((x_240 == -1)) { tree[x_239_save].rightIndex = 6; - const BST tint_symbol_14 = {2, -1, -1}; - tree[6] = tint_symbol_14; + const BST tint_symbol_13 = {2, -1, -1}; + tree[6] = tint_symbol_13; x_255_phi = true; break; } else { @@ -444,8 +444,8 @@ void main_1() { const int x_281 = tree[x_280_save].leftIndex; if ((x_281 == -1)) { tree[x_280_save].leftIndex = 7; - const BST tint_symbol_15 = {6, -1, -1}; - tree[7] = tint_symbol_15; + const BST tint_symbol_14 = {6, -1, -1}; + tree[7] = tint_symbol_14; x_288_phi = true; break; } else { @@ -463,8 +463,8 @@ void main_1() { const int x_273 = tree[x_272_save].rightIndex; if ((x_273 == -1)) { tree[x_272_save].rightIndex = 7; - const BST tint_symbol_16 = {6, -1, -1}; - tree[7] = tint_symbol_16; + const BST tint_symbol_15 = {6, -1, -1}; + tree[7] = tint_symbol_15; x_288_phi = true; break; } else { @@ -512,8 +512,8 @@ void main_1() { const int x_314 = tree[x_313_save].leftIndex; if ((x_314 == -1)) { tree[x_313_save].leftIndex = 8; - const BST tint_symbol_17 = {17, -1, -1}; - tree[8] = tint_symbol_17; + const BST tint_symbol_16 = {17, -1, -1}; + tree[8] = tint_symbol_16; x_321_phi = true; break; } else { @@ -531,8 +531,8 @@ void main_1() { const int x_306 = tree[x_305_save].rightIndex; if ((x_306 == -1)) { tree[x_305_save].rightIndex = 8; - const BST tint_symbol_18 = {17, -1, -1}; - tree[8] = tint_symbol_18; + const BST tint_symbol_17 = {17, -1, -1}; + tree[8] = tint_symbol_17; x_321_phi = true; break; } else { @@ -580,8 +580,8 @@ void main_1() { const int x_347 = tree[x_346_save].leftIndex; if ((x_347 == -1)) { tree[x_346_save].leftIndex = 9; - const BST tint_symbol_19 = {13, -1, -1}; - tree[9] = tint_symbol_19; + const BST tint_symbol_18 = {13, -1, -1}; + tree[9] = tint_symbol_18; x_354_phi = true; break; } else { @@ -599,8 +599,8 @@ void main_1() { const int x_339 = tree[x_338_save].rightIndex; if ((x_339 == -1)) { tree[x_338_save].rightIndex = 9; - const BST tint_symbol_20 = {13, -1, -1}; - tree[9] = tint_symbol_20; + const BST tint_symbol_19 = {13, -1, -1}; + tree[9] = tint_symbol_19; x_354_phi = true; break; } else { @@ -742,9 +742,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_21 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_21; + const main_out tint_symbol_20 = {x_GLF_color}; + return tint_symbol_20; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.msl index 320cbdbea3..bb781cd863 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.msl @@ -16,7 +16,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_23) { +void main_1(thread float4* const tint_symbol_22) { tint_array_wrapper tree = {}; int x_360 = 0; int x_62_phi = 0; @@ -24,8 +24,8 @@ void main_1(thread float4* const tint_symbol_23) { int x_357_phi = 0; int x_360_phi = 0; int x_362_phi = 0; - BST const tint_symbol_3 = {.data=9, .leftIndex=-1, .rightIndex=-1}; - tree.arr[0] = tint_symbol_3; + BST const tint_symbol_2 = {.data=9, .leftIndex=-1, .rightIndex=-1}; + tree.arr[0] = tint_symbol_2; switch(0u) { default: { x_62_phi = 0; @@ -46,8 +46,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_83 = tree.arr[x_82_save].leftIndex; if ((x_83 == -1)) { tree.arr[x_82_save].leftIndex = 1; - BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1}; - tree.arr[1] = tint_symbol_4; + BST const tint_symbol_3 = {.data=5, .leftIndex=-1, .rightIndex=-1}; + tree.arr[1] = tint_symbol_3; x_90_phi = true; break; } else { @@ -65,8 +65,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_75 = tree.arr[x_74_save].rightIndex; if ((x_75 == -1)) { tree.arr[x_74_save].rightIndex = 1; - BST const tint_symbol_5 = {.data=5, .leftIndex=-1, .rightIndex=-1}; - tree.arr[1] = tint_symbol_5; + BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1}; + tree.arr[1] = tint_symbol_4; x_90_phi = true; break; } else { @@ -115,8 +115,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_116 = tree.arr[x_115_save].leftIndex; if ((x_116 == -1)) { tree.arr[x_115_save].leftIndex = 2; - BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1}; - tree.arr[2] = tint_symbol_6; + BST const tint_symbol_5 = {.data=12, .leftIndex=-1, .rightIndex=-1}; + tree.arr[2] = tint_symbol_5; x_123_phi = true; break; } else { @@ -134,8 +134,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_108 = tree.arr[x_107_save].rightIndex; if ((x_108 == -1)) { tree.arr[x_107_save].rightIndex = 2; - BST const tint_symbol_7 = {.data=12, .leftIndex=-1, .rightIndex=-1}; - tree.arr[2] = tint_symbol_7; + BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1}; + tree.arr[2] = tint_symbol_6; x_123_phi = true; break; } else { @@ -184,8 +184,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_149 = tree.arr[x_148_save].leftIndex; if ((x_149 == -1)) { tree.arr[x_148_save].leftIndex = 3; - BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1}; - tree.arr[3] = tint_symbol_8; + BST const tint_symbol_7 = {.data=15, .leftIndex=-1, .rightIndex=-1}; + tree.arr[3] = tint_symbol_7; x_156_phi = true; break; } else { @@ -203,8 +203,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_141 = tree.arr[x_140_save].rightIndex; if ((x_141 == -1)) { tree.arr[x_140_save].rightIndex = 3; - BST const tint_symbol_9 = {.data=15, .leftIndex=-1, .rightIndex=-1}; - tree.arr[3] = tint_symbol_9; + BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1}; + tree.arr[3] = tint_symbol_8; x_156_phi = true; break; } else { @@ -253,8 +253,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_182 = tree.arr[x_181_save].leftIndex; if ((x_182 == -1)) { tree.arr[x_181_save].leftIndex = 4; - BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1}; - tree.arr[4] = tint_symbol_10; + BST const tint_symbol_9 = {.data=7, .leftIndex=-1, .rightIndex=-1}; + tree.arr[4] = tint_symbol_9; x_189_phi = true; break; } else { @@ -272,8 +272,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_174 = tree.arr[x_173_save].rightIndex; if ((x_174 == -1)) { tree.arr[x_173_save].rightIndex = 4; - BST const tint_symbol_11 = {.data=7, .leftIndex=-1, .rightIndex=-1}; - tree.arr[4] = tint_symbol_11; + BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1}; + tree.arr[4] = tint_symbol_10; x_189_phi = true; break; } else { @@ -322,8 +322,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_215 = tree.arr[x_214_save].leftIndex; if ((x_215 == -1)) { tree.arr[x_214_save].leftIndex = 5; - BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1}; - tree.arr[5] = tint_symbol_12; + BST const tint_symbol_11 = {.data=8, .leftIndex=-1, .rightIndex=-1}; + tree.arr[5] = tint_symbol_11; x_222_phi = true; break; } else { @@ -341,8 +341,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_207 = tree.arr[x_206_save].rightIndex; if ((x_207 == -1)) { tree.arr[x_206_save].rightIndex = 5; - BST const tint_symbol_13 = {.data=8, .leftIndex=-1, .rightIndex=-1}; - tree.arr[5] = tint_symbol_13; + BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1}; + tree.arr[5] = tint_symbol_12; x_222_phi = true; break; } else { @@ -391,8 +391,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_248 = tree.arr[x_247_save].leftIndex; if ((x_248 == -1)) { tree.arr[x_247_save].leftIndex = 6; - BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1}; - tree.arr[6] = tint_symbol_14; + BST const tint_symbol_13 = {.data=2, .leftIndex=-1, .rightIndex=-1}; + tree.arr[6] = tint_symbol_13; x_255_phi = true; break; } else { @@ -410,8 +410,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_240 = tree.arr[x_239_save].rightIndex; if ((x_240 == -1)) { tree.arr[x_239_save].rightIndex = 6; - BST const tint_symbol_15 = {.data=2, .leftIndex=-1, .rightIndex=-1}; - tree.arr[6] = tint_symbol_15; + BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1}; + tree.arr[6] = tint_symbol_14; x_255_phi = true; break; } else { @@ -460,8 +460,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_281 = tree.arr[x_280_save].leftIndex; if ((x_281 == -1)) { tree.arr[x_280_save].leftIndex = 7; - BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1}; - tree.arr[7] = tint_symbol_16; + BST const tint_symbol_15 = {.data=6, .leftIndex=-1, .rightIndex=-1}; + tree.arr[7] = tint_symbol_15; x_288_phi = true; break; } else { @@ -479,8 +479,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_273 = tree.arr[x_272_save].rightIndex; if ((x_273 == -1)) { tree.arr[x_272_save].rightIndex = 7; - BST const tint_symbol_17 = {.data=6, .leftIndex=-1, .rightIndex=-1}; - tree.arr[7] = tint_symbol_17; + BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1}; + tree.arr[7] = tint_symbol_16; x_288_phi = true; break; } else { @@ -529,8 +529,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_314 = tree.arr[x_313_save].leftIndex; if ((x_314 == -1)) { tree.arr[x_313_save].leftIndex = 8; - BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1}; - tree.arr[8] = tint_symbol_18; + BST const tint_symbol_17 = {.data=17, .leftIndex=-1, .rightIndex=-1}; + tree.arr[8] = tint_symbol_17; x_321_phi = true; break; } else { @@ -548,8 +548,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_306 = tree.arr[x_305_save].rightIndex; if ((x_306 == -1)) { tree.arr[x_305_save].rightIndex = 8; - BST const tint_symbol_19 = {.data=17, .leftIndex=-1, .rightIndex=-1}; - tree.arr[8] = tint_symbol_19; + BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1}; + tree.arr[8] = tint_symbol_18; x_321_phi = true; break; } else { @@ -598,8 +598,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_347 = tree.arr[x_346_save].leftIndex; if ((x_347 == -1)) { tree.arr[x_346_save].leftIndex = 9; - BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1}; - tree.arr[9] = tint_symbol_20; + BST const tint_symbol_19 = {.data=13, .leftIndex=-1, .rightIndex=-1}; + tree.arr[9] = tint_symbol_19; x_354_phi = true; break; } else { @@ -617,8 +617,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_339 = tree.arr[x_338_save].rightIndex; if ((x_339 == -1)) { tree.arr[x_338_save].rightIndex = 9; - BST const tint_symbol_21 = {.data=13, .leftIndex=-1, .rightIndex=-1}; - tree.arr[9] = tint_symbol_21; + BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1}; + tree.arr[9] = tint_symbol_20; x_354_phi = true; break; } else { @@ -686,7 +686,7 @@ void main_1(thread float4* const tint_symbol_23) { x_393_phi = true; break; } - float const x_389 = (*(tint_symbol_23))[select(3u, 3u, (3u <= 3u))]; + float const x_389 = (*(tint_symbol_22))[select(3u, 3u, (3u <= 3u))]; { x_374_phi = select(x_383, x_385, !((x_362 <= x_382))); } @@ -747,18 +747,24 @@ void main_1(thread float4* const tint_symbol_23) { } } if ((x_360 == as_type(20))) { - *(tint_symbol_23) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_22) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_23) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_22) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_24 = 0.0f; - main_1(&(tint_symbol_24)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_24}; - tint_symbol_1 const tint_symbol_22 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_22; +main_out tint_symbol_inner(thread float4* const tint_symbol_23) { + main_1(tint_symbol_23); + main_out const tint_symbol_21 = {.x_GLF_color_1=*(tint_symbol_23)}; + return tint_symbol_21; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_24 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_24)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.hlsl index 0326a9c8d6..038d8eadb9 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.hlsl @@ -29,8 +29,8 @@ void main_1() { break; } float4 x_98 = float4(0.0f, 0.0f, 0.0f, 0.0f); - const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_77 = tint_symbol_5; + const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_77 = tint_symbol_4; x_98 = x_77[x_92]; switch(0u) { default: { @@ -61,14 +61,14 @@ void main_1() { const bool x_121 = x_121_phi; x_90_phi = x_89; if (x_121) { - const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_78 = tint_symbol_6; + const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_78 = tint_symbol_5; const float x_125 = x_78[x_92].x; - const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_79 = tint_symbol_7; + const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_79 = tint_symbol_6; const float x_128 = x_79[x_92].y; - const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - x_80 = tint_symbol_8; + const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + x_80 = tint_symbol_7; x_136 = x_80[((((int(x_125) * int(x_128)) + (x_92 * 9)) + 11) % 16)]; x_90_phi = x_136; } @@ -93,11 +93,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; + const main_out tint_symbol_8 = {x_GLF_color}; + return tint_symbol_8; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.msl index 2d1262837f..6e79a07e35 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper_1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { tint_array_wrapper x_77 = {}; tint_array_wrapper x_78 = {}; tint_array_wrapper x_79 = {}; @@ -25,7 +25,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float float4 x_89 = 0.0f; float4 x_89_phi = 0.0f; int x_92_phi = 0; - float4 const x_81 = *(tint_symbol_9); + float4 const x_81 = *(tint_symbol_7); float2 const x_84 = x_6.resolution; float2 const x_87 = floor(((float2(x_81.x, x_81.y) / x_84) * 32.0f)); x_89_phi = float4(0.5f, 0.5f, 1.0f, 1.0f); @@ -42,8 +42,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float break; } float4 x_98 = 0.0f; - tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_77 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_77 = tint_symbol_2; x_98 = x_77.arr[x_92]; switch(0u) { default: { @@ -74,14 +74,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float bool const x_121 = x_121_phi; x_90_phi = x_89; if (x_121) { - tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_78 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_78 = tint_symbol_3; float const x_125 = x_78.arr[x_92].x; - tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_79 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_79 = tint_symbol_4; float const x_128 = x_79.arr[x_92].y; - tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - x_80 = tint_symbol_7; + tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + x_80 = tint_symbol_5; x_136 = x_80.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_125)) * as_type(int(x_128))))) + as_type(as_type((as_type(x_92) * as_type(9))))))) + as_type(11))) % 16)]; x_90_phi = x_136; } @@ -92,17 +92,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float x_92_phi = x_93; } } - *(tint_symbol_10) = x_89; + *(tint_symbol_8) = x_89; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_6, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.hlsl index 0326a9c8d6..038d8eadb9 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.hlsl @@ -29,8 +29,8 @@ void main_1() { break; } float4 x_98 = float4(0.0f, 0.0f, 0.0f, 0.0f); - const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_77 = tint_symbol_5; + const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_77 = tint_symbol_4; x_98 = x_77[x_92]; switch(0u) { default: { @@ -61,14 +61,14 @@ void main_1() { const bool x_121 = x_121_phi; x_90_phi = x_89; if (x_121) { - const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_78 = tint_symbol_6; + const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_78 = tint_symbol_5; const float x_125 = x_78[x_92].x; - const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_79 = tint_symbol_7; + const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_79 = tint_symbol_6; const float x_128 = x_79[x_92].y; - const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - x_80 = tint_symbol_8; + const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + x_80 = tint_symbol_7; x_136 = x_80[((((int(x_125) * int(x_128)) + (x_92 * 9)) + 11) % 16)]; x_90_phi = x_136; } @@ -93,11 +93,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; + const main_out tint_symbol_8 = {x_GLF_color}; + return tint_symbol_8; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.msl index 2d1262837f..6e79a07e35 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper_1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { tint_array_wrapper x_77 = {}; tint_array_wrapper x_78 = {}; tint_array_wrapper x_79 = {}; @@ -25,7 +25,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float float4 x_89 = 0.0f; float4 x_89_phi = 0.0f; int x_92_phi = 0; - float4 const x_81 = *(tint_symbol_9); + float4 const x_81 = *(tint_symbol_7); float2 const x_84 = x_6.resolution; float2 const x_87 = floor(((float2(x_81.x, x_81.y) / x_84) * 32.0f)); x_89_phi = float4(0.5f, 0.5f, 1.0f, 1.0f); @@ -42,8 +42,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float break; } float4 x_98 = 0.0f; - tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_77 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_77 = tint_symbol_2; x_98 = x_77.arr[x_92]; switch(0u) { default: { @@ -74,14 +74,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float bool const x_121 = x_121_phi; x_90_phi = x_89; if (x_121) { - tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_78 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_78 = tint_symbol_3; float const x_125 = x_78.arr[x_92].x; - tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_79 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_79 = tint_symbol_4; float const x_128 = x_79.arr[x_92].y; - tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - x_80 = tint_symbol_7; + tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + x_80 = tint_symbol_5; x_136 = x_80.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_125)) * as_type(int(x_128))))) + as_type(as_type((as_type(x_92) * as_type(9))))))) + as_type(11))) % 16)]; x_90_phi = x_136; } @@ -92,17 +92,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float x_92_phi = x_93; } } - *(tint_symbol_10) = x_89; + *(tint_symbol_8) = x_89; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_6, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.hlsl index 99984150c2..60a3f69874 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.hlsl @@ -31,11 +31,11 @@ void main_1() { x_72_phi = x_73; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_80[16] = indexable; - const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; - indexable = tint_symbol_6; + const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; + indexable = tint_symbol_5; indexable = x_80; const float2 x_81 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x); const float4 x_83 = indexable[asint((x_69 % 16))]; @@ -53,11 +53,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.msl index 5761e9d70d..44b01873b1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.msl @@ -10,16 +10,16 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { tint_array_wrapper indexable = {}; int x_69 = 0; int x_69_phi = 0; int x_72_phi = 0; - float4 const x_55 = *(tint_symbol_7); + float4 const x_55 = *(tint_symbol_5); float2 const x_58 = x_6.resolution; float2 const x_59 = (float2(x_55.x, x_55.y) / x_58); int const x_67 = as_type((as_type(int((x_59.x * 10.0f))) + as_type(as_type((as_type(int((x_59.y * 10.0f))) * as_type(10)))))); @@ -41,25 +41,31 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float x_72_phi = x_73; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; tint_array_wrapper const x_80 = indexable; - tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; - indexable = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; + indexable = tint_symbol_3; indexable = x_80; float2 const x_81 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x); float4 const x_83 = indexable.arr[as_type((x_69 % 16))]; - *(tint_symbol_8) = x_83; + *(tint_symbol_6) = x_83; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(x_6, tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_4; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.hlsl index 99984150c2..60a3f69874 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.hlsl @@ -31,11 +31,11 @@ void main_1() { x_72_phi = x_73; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_80[16] = indexable; - const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; - indexable = tint_symbol_6; + const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; + indexable = tint_symbol_5; indexable = x_80; const float2 x_81 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x); const float4 x_83 = indexable[asint((x_69 % 16))]; @@ -53,11 +53,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.msl index 5761e9d70d..44b01873b1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.msl @@ -10,16 +10,16 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { tint_array_wrapper indexable = {}; int x_69 = 0; int x_69_phi = 0; int x_72_phi = 0; - float4 const x_55 = *(tint_symbol_7); + float4 const x_55 = *(tint_symbol_5); float2 const x_58 = x_6.resolution; float2 const x_59 = (float2(x_55.x, x_55.y) / x_58); int const x_67 = as_type((as_type(int((x_59.x * 10.0f))) + as_type(as_type((as_type(int((x_59.y * 10.0f))) * as_type(10)))))); @@ -41,25 +41,31 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float x_72_phi = x_73; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; tint_array_wrapper const x_80 = indexable; - tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; - indexable = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; + indexable = tint_symbol_3; indexable = x_80; float2 const x_81 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x); float4 const x_83 = indexable.arr[as_type((x_69 % 16))]; - *(tint_symbol_8) = x_83; + *(tint_symbol_6) = x_83; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(x_6, tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_4; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.hlsl index ac6e8e006d..7838ecc3a4 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.hlsl @@ -31,8 +31,8 @@ void main_1() { x_72_phi = x_73; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float2 x_80 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x); const float4 x_82 = indexable[asint((x_69 % 16))]; x_GLF_color = x_82; @@ -49,11 +49,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.msl index 1a7dc718d0..a31a704dd6 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.msl @@ -10,16 +10,16 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; int x_69 = 0; int x_69_phi = 0; int x_72_phi = 0; - float4 const x_55 = *(tint_symbol_6); + float4 const x_55 = *(tint_symbol_4); float2 const x_58 = x_6.resolution; float2 const x_59 = (float2(x_55.x, x_55.y) / x_58); int const x_67 = as_type((as_type(int((x_59.x * 10.0f))) + as_type(as_type((as_type(int((x_59.y * 10.0f))) * as_type(10)))))); @@ -41,21 +41,27 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_72_phi = x_73; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float2 const x_80 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x); float4 const x_82 = indexable.arr[as_type((x_69 % 16))]; - *(tint_symbol_7) = x_82; + *(tint_symbol_5) = x_82; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.hlsl index ac6e8e006d..7838ecc3a4 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.hlsl @@ -31,8 +31,8 @@ void main_1() { x_72_phi = x_73; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float2 x_80 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x); const float4 x_82 = indexable[asint((x_69 % 16))]; x_GLF_color = x_82; @@ -49,11 +49,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.msl index 1a7dc718d0..a31a704dd6 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.msl @@ -10,16 +10,16 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; int x_69 = 0; int x_69_phi = 0; int x_72_phi = 0; - float4 const x_55 = *(tint_symbol_6); + float4 const x_55 = *(tint_symbol_4); float2 const x_58 = x_6.resolution; float2 const x_59 = (float2(x_55.x, x_55.y) / x_58); int const x_67 = as_type((as_type(int((x_59.x * 10.0f))) + as_type(as_type((as_type(int((x_59.y * 10.0f))) * as_type(10)))))); @@ -41,21 +41,27 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_72_phi = x_73; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float2 const x_80 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x); float4 const x_82 = indexable.arr[as_type((x_69 % 16))]; - *(tint_symbol_7) = x_82; + *(tint_symbol_5) = x_82; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.hlsl index 5ff3989336..f84cad32f9 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.hlsl @@ -95,11 +95,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.msl index c8ec7ecb6b..7440769378 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.msl @@ -13,13 +13,13 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_5) { +bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_3) { bool x_144 = false; - float const x_146 = (*(tint_symbol_5)).y; + float const x_146 = (*(tint_symbol_3)).y; float const x_148 = x_9.resolution.y; if ((x_146 < (x_148 / 2.0f))) { float const x_154 = *(a); @@ -34,7 +34,7 @@ bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* c return x_160; } -void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { int i = 0; tint_array_wrapper data = {}; int i_1 = 0; @@ -88,7 +88,7 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s param = x_92; float const x_94 = data.arr[x_90]; param_1 = x_94; - bool const x_95 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_6); + bool const x_95 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_4); doSwap = x_95; bool const x_96 = doSwap; if (x_96) { @@ -113,29 +113,35 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s i_1 = as_type((as_type(x_112) + as_type(1))); } } - float const x_115 = (*(tint_symbol_6)).x; + float const x_115 = (*(tint_symbol_4)).x; float const x_117 = x_9.resolution.x; if ((x_115 < (x_117 / 2.0f))) { float const x_124 = data.arr[0]; float const x_127 = data.arr[5]; float const x_130 = data.arr[9]; - *(tint_symbol_7) = float4((x_124 / 10.0f), (x_127 / 10.0f), (x_130 / 10.0f), 1.0f); + *(tint_symbol_5) = float4((x_124 / 10.0f), (x_127 / 10.0f), (x_130 / 10.0f), 1.0f); } else { float const x_134 = data.arr[5]; float const x_137 = data.arr[9]; float const x_140 = data.arr[0]; - *(tint_symbol_7) = float4((x_134 / 10.0f), (x_137 / 10.0f), (x_140 / 10.0f), 1.0f); + *(tint_symbol_5) = float4((x_134 / 10.0f), (x_137 / 10.0f), (x_140 / 10.0f), 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_13, x_9, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_13, x_9, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, x_9, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.hlsl index 5ff3989336..f84cad32f9 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.hlsl @@ -95,11 +95,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.msl index c8ec7ecb6b..7440769378 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.msl @@ -13,13 +13,13 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_5) { +bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_3) { bool x_144 = false; - float const x_146 = (*(tint_symbol_5)).y; + float const x_146 = (*(tint_symbol_3)).y; float const x_148 = x_9.resolution.y; if ((x_146 < (x_148 / 2.0f))) { float const x_154 = *(a); @@ -34,7 +34,7 @@ bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* c return x_160; } -void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { int i = 0; tint_array_wrapper data = {}; int i_1 = 0; @@ -88,7 +88,7 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s param = x_92; float const x_94 = data.arr[x_90]; param_1 = x_94; - bool const x_95 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_6); + bool const x_95 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_4); doSwap = x_95; bool const x_96 = doSwap; if (x_96) { @@ -113,29 +113,35 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s i_1 = as_type((as_type(x_112) + as_type(1))); } } - float const x_115 = (*(tint_symbol_6)).x; + float const x_115 = (*(tint_symbol_4)).x; float const x_117 = x_9.resolution.x; if ((x_115 < (x_117 / 2.0f))) { float const x_124 = data.arr[0]; float const x_127 = data.arr[5]; float const x_130 = data.arr[9]; - *(tint_symbol_7) = float4((x_124 / 10.0f), (x_127 / 10.0f), (x_130 / 10.0f), 1.0f); + *(tint_symbol_5) = float4((x_124 / 10.0f), (x_127 / 10.0f), (x_130 / 10.0f), 1.0f); } else { float const x_134 = data.arr[5]; float const x_137 = data.arr[9]; float const x_140 = data.arr[0]; - *(tint_symbol_7) = float4((x_134 / 10.0f), (x_137 / 10.0f), (x_140 / 10.0f), 1.0f); + *(tint_symbol_5) = float4((x_134 / 10.0f), (x_137 / 10.0f), (x_140 / 10.0f), 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_13, x_9, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_13, x_9, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, x_9, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.hlsl index 8afa23d312..9f00d0194d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.hlsl @@ -151,11 +151,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.msl index 9d9466971c..dd5350a3b4 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_5) { +bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_3) { bool x_147 = false; float x_158 = 0.0f; float x_159 = 0.0f; @@ -28,7 +28,7 @@ bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* c float x_160_phi = 0.0f; float x_180_phi = 0.0f; float x_186_phi = 0.0f; - float const x_149 = (*(tint_symbol_5)).y; + float const x_149 = (*(tint_symbol_3)).y; float const x_151 = x_9.resolution.y; bool const x_153 = (x_149 < (x_151 / 2.0f)); if (x_153) { @@ -91,7 +91,7 @@ bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* c return x_191; } -void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { int i = 0; tint_array_wrapper data = {}; int i_1 = 0; @@ -145,7 +145,7 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s param = x_95; float const x_97 = data.arr[x_93]; param_1 = x_97; - bool const x_98 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_6); + bool const x_98 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_4); doSwap = x_98; bool const x_99 = doSwap; if (x_99) { @@ -170,29 +170,35 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s i_1 = as_type((as_type(x_115) + as_type(1))); } } - float const x_118 = (*(tint_symbol_6)).x; + float const x_118 = (*(tint_symbol_4)).x; float const x_120 = x_9.resolution.x; if ((x_118 < (x_120 / 2.0f))) { float const x_127 = data.arr[0]; float const x_130 = data.arr[5]; float const x_133 = data.arr[9]; - *(tint_symbol_7) = float4((x_127 / 10.0f), (x_130 / 10.0f), (x_133 / 10.0f), 1.0f); + *(tint_symbol_5) = float4((x_127 / 10.0f), (x_130 / 10.0f), (x_133 / 10.0f), 1.0f); } else { float const x_137 = data.arr[5]; float const x_140 = data.arr[9]; float const x_143 = data.arr[0]; - *(tint_symbol_7) = float4((x_137 / 10.0f), (x_140 / 10.0f), (x_143 / 10.0f), 1.0f); + *(tint_symbol_5) = float4((x_137 / 10.0f), (x_140 / 10.0f), (x_143 / 10.0f), 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_13, x_9, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_13, x_9, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, x_9, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.hlsl index 8afa23d312..9f00d0194d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.hlsl @@ -151,11 +151,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.msl index 9d9466971c..dd5350a3b4 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_5) { +bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_3) { bool x_147 = false; float x_158 = 0.0f; float x_159 = 0.0f; @@ -28,7 +28,7 @@ bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* c float x_160_phi = 0.0f; float x_180_phi = 0.0f; float x_186_phi = 0.0f; - float const x_149 = (*(tint_symbol_5)).y; + float const x_149 = (*(tint_symbol_3)).y; float const x_151 = x_9.resolution.y; bool const x_153 = (x_149 < (x_151 / 2.0f)); if (x_153) { @@ -91,7 +91,7 @@ bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* c return x_191; } -void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { int i = 0; tint_array_wrapper data = {}; int i_1 = 0; @@ -145,7 +145,7 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s param = x_95; float const x_97 = data.arr[x_93]; param_1 = x_97; - bool const x_98 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_6); + bool const x_98 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_4); doSwap = x_98; bool const x_99 = doSwap; if (x_99) { @@ -170,29 +170,35 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s i_1 = as_type((as_type(x_115) + as_type(1))); } } - float const x_118 = (*(tint_symbol_6)).x; + float const x_118 = (*(tint_symbol_4)).x; float const x_120 = x_9.resolution.x; if ((x_118 < (x_120 / 2.0f))) { float const x_127 = data.arr[0]; float const x_130 = data.arr[5]; float const x_133 = data.arr[9]; - *(tint_symbol_7) = float4((x_127 / 10.0f), (x_130 / 10.0f), (x_133 / 10.0f), 1.0f); + *(tint_symbol_5) = float4((x_127 / 10.0f), (x_130 / 10.0f), (x_133 / 10.0f), 1.0f); } else { float const x_137 = data.arr[5]; float const x_140 = data.arr[9]; float const x_143 = data.arr[0]; - *(tint_symbol_7) = float4((x_137 / 10.0f), (x_140 / 10.0f), (x_143 / 10.0f), 1.0f); + *(tint_symbol_5) = float4((x_137 / 10.0f), (x_140 / 10.0f), (x_143 / 10.0f), 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_13, x_9, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_13, x_9, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, x_9, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.hlsl index 74ac34ac0e..38242ee356 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.hlsl @@ -38,8 +38,8 @@ void main_1() { x_68_phi = x_69; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_83 = indexable[asint((x_65 % 16))]; x_GLF_color = x_83; return; @@ -55,11 +55,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.msl index 561b2f20cf..a2c1a5fda0 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.msl @@ -10,16 +10,16 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; int x_65 = 0; int x_65_phi = 0; int x_68_phi = 0; - float4 const x_51 = *(tint_symbol_6); + float4 const x_51 = *(tint_symbol_4); float2 const x_54 = x_6.resolution; float2 const x_57 = floor(((float2(x_51.x, x_51.y) / x_54) * 8.0f)); int const x_63 = as_type((as_type(as_type((as_type(int(x_57.x)) * as_type(8)))) + as_type(int(x_57.y)))); @@ -48,20 +48,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_68_phi = x_69; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float4 const x_83 = indexable.arr[as_type((x_65 % 16))]; - *(tint_symbol_7) = x_83; + *(tint_symbol_5) = x_83; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.hlsl index 74ac34ac0e..38242ee356 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.hlsl @@ -38,8 +38,8 @@ void main_1() { x_68_phi = x_69; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_83 = indexable[asint((x_65 % 16))]; x_GLF_color = x_83; return; @@ -55,11 +55,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.msl index 561b2f20cf..a2c1a5fda0 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.msl @@ -10,16 +10,16 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; int x_65 = 0; int x_65_phi = 0; int x_68_phi = 0; - float4 const x_51 = *(tint_symbol_6); + float4 const x_51 = *(tint_symbol_4); float2 const x_54 = x_6.resolution; float2 const x_57 = floor(((float2(x_51.x, x_51.y) / x_54) * 8.0f)); int const x_63 = as_type((as_type(as_type((as_type(int(x_57.x)) * as_type(8)))) + as_type(int(x_57.y)))); @@ -48,20 +48,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_68_phi = x_69; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float4 const x_83 = indexable.arr[as_type((x_65 % 16))]; - *(tint_symbol_7) = x_83; + *(tint_symbol_5) = x_83; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.hlsl index 5df85e4d50..092c15448a 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.hlsl @@ -40,14 +40,14 @@ void main_1() { x_74_phi = x_75; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_88[16] = indexable; - const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; - indexable = tint_symbol_6; + const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; + indexable = tint_symbol_5; indexable = x_88; - const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)}; - const float4 x_89 = tint_symbol_7[1u]; + const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)}; + const float4 x_89 = tint_symbol_6[1u]; const float4 x_90[16] = {float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 8.0f, x_55), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(x_61, 0.5f, 1.0f)}; const float4 x_92 = indexable[asint((x_71 % 16))]; x_GLF_color = x_92; @@ -64,11 +64,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; + const main_out tint_symbol_7 = {x_GLF_color}; + return tint_symbol_7; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.msl index 9a040b1588..59a59044b5 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.msl @@ -10,16 +10,16 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { tint_array_wrapper indexable = {}; int x_71 = 0; int x_71_phi = 0; int x_74_phi = 0; - float4 const x_54 = *(tint_symbol_8); + float4 const x_54 = *(tint_symbol_6); float2 const x_55 = float2(x_54.x, x_54.y); float2 const x_58 = x_6.resolution; float2 const x_61 = ((x_55 / x_58) * 8.0f); @@ -50,27 +50,33 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float x_74_phi = x_75; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; tint_array_wrapper const x_88 = indexable; - tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; - indexable = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; + indexable = tint_symbol_3; indexable = x_88; - tint_array_wrapper const tint_symbol_6 = {.arr={float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)}}; - float4 const x_89 = tint_symbol_6.arr[1u]; + tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)}}; + float4 const x_89 = tint_symbol_4.arr[1u]; tint_array_wrapper const x_90 = {.arr={float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 8.0f, x_55), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(x_61, 0.5f, 1.0f)}}; float4 const x_92 = indexable.arr[as_type((x_71 % 16))]; - *(tint_symbol_9) = x_92; + *(tint_symbol_7) = x_92; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_10 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - tint_symbol_10 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11}; - tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { + *(tint_symbol_8) = gl_FragCoord_param; + main_1(x_6, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)}; + return tint_symbol_5; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_10 = 0.0f; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.hlsl index 5df85e4d50..092c15448a 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.hlsl @@ -40,14 +40,14 @@ void main_1() { x_74_phi = x_75; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_88[16] = indexable; - const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; - indexable = tint_symbol_6; + const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; + indexable = tint_symbol_5; indexable = x_88; - const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)}; - const float4 x_89 = tint_symbol_7[1u]; + const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)}; + const float4 x_89 = tint_symbol_6[1u]; const float4 x_90[16] = {float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 8.0f, x_55), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(x_61, 0.5f, 1.0f)}; const float4 x_92 = indexable[asint((x_71 % 16))]; x_GLF_color = x_92; @@ -64,11 +64,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; + const main_out tint_symbol_7 = {x_GLF_color}; + return tint_symbol_7; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.msl index 9a040b1588..59a59044b5 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.msl @@ -10,16 +10,16 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { tint_array_wrapper indexable = {}; int x_71 = 0; int x_71_phi = 0; int x_74_phi = 0; - float4 const x_54 = *(tint_symbol_8); + float4 const x_54 = *(tint_symbol_6); float2 const x_55 = float2(x_54.x, x_54.y); float2 const x_58 = x_6.resolution; float2 const x_61 = ((x_55 / x_58) * 8.0f); @@ -50,27 +50,33 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float x_74_phi = x_75; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; tint_array_wrapper const x_88 = indexable; - tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; - indexable = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; + indexable = tint_symbol_3; indexable = x_88; - tint_array_wrapper const tint_symbol_6 = {.arr={float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)}}; - float4 const x_89 = tint_symbol_6.arr[1u]; + tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)}}; + float4 const x_89 = tint_symbol_4.arr[1u]; tint_array_wrapper const x_90 = {.arr={float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 8.0f, x_55), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(x_61, 0.5f, 1.0f)}}; float4 const x_92 = indexable.arr[as_type((x_71 % 16))]; - *(tint_symbol_9) = x_92; + *(tint_symbol_7) = x_92; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_10 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - tint_symbol_10 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11}; - tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { + *(tint_symbol_8) = gl_FragCoord_param; + main_1(x_6, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)}; + return tint_symbol_5; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_10 = 0.0f; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.hlsl index 0b4750a89f..ff80e2f4b4 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.hlsl @@ -192,11 +192,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.msl index 3576345639..685b2ff717 100755 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float x_51 = 0.0f; float x_55 = 0.0f; @@ -31,7 +31,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float c = float3(7.0f, 8.0f, 9.0f); float const x_47 = x_7.resolution.x; float const x_49 = rint((x_47 * 0.125f)); - x_51 = (*(tint_symbol_5)).x; + x_51 = (*(tint_symbol_3)).x; switch(0u) { default: { x_55_phi = -0.5f; @@ -98,7 +98,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float bool x_120_phi = false; float const x_85 = x_85_phi; c.x = x_85; - x_88 = (*(tint_symbol_5)).y; + x_88 = (*(tint_symbol_3)).y; switch(0u) { default: { x_92_phi = -0.5f; @@ -182,17 +182,23 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } float3 const x_143 = c; float3 const x_145 = normalize(fabs(x_143)); - *(tint_symbol_6) = float4(x_145.x, x_145.y, x_145.z, 1.0f); + *(tint_symbol_4) = float4(x_145.x, x_145.y, x_145.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.hlsl index 3102fad3c5..fec7d26849 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.hlsl @@ -192,11 +192,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.msl index e9867220c8..661207d6ab 100755 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.msl @@ -7,11 +7,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float x_51 = 0.0f; float x_55 = 0.0f; @@ -31,7 +31,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float c = float3(7.0f, 8.0f, 9.0f); float const x_47 = x_7.resolution.x; float const x_49 = rint((x_47 * 0.125f)); - x_51 = (*(tint_symbol_5)).x; + x_51 = (*(tint_symbol_3)).x; switch(0u) { default: { x_55_phi = -0.5f; @@ -98,7 +98,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float bool x_120_phi = false; float const x_85 = x_85_phi; c.x = x_85; - x_88 = (*(tint_symbol_5)).y; + x_88 = (*(tint_symbol_3)).y; switch(0u) { default: { x_92_phi = -0.5f; @@ -182,17 +182,23 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } float3 const x_143 = c; float3 const x_145 = normalize(fabs(x_143)); - *(tint_symbol_6) = float4(x_145.x, x_145.y, x_145.z, 1.0f); + *(tint_symbol_4) = float4(x_145.x, x_145.y, x_145.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.hlsl index 0505c28fae..1c4efe4fce 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.hlsl @@ -201,14 +201,14 @@ void main_1() { x_303 = map; x_305_phi = x_303; } else { - const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - x_304 = tint_symbol_5; + const int tint_symbol_4[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + x_304 = tint_symbol_4; x_305_phi = x_304; } const int x_305[256] = x_305_phi; if (x_282) { - const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - map = tint_symbol_6; + const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + map = tint_symbol_5; } if (x_282) { map = x_305; @@ -232,8 +232,8 @@ void main_1() { const int x_341 = p.x; const int x_343 = p.y; const int x_345[256] = map; - const int tint_symbol_7[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - map = tint_symbol_7; + const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + map = tint_symbol_6; map = x_345; map[(x_341 + ((x_343 - 2) * 16))] = 1; const int x_350 = p.y; @@ -328,11 +328,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; + const main_out tint_symbol_7 = {x_GLF_color}; + return tint_symbol_7; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.msl index 51be36d668..e567765f47 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { float2 pos = 0.0f; int2 ipos = 0; int i = 0; @@ -24,7 +24,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ int directions = 0; int j = 0; int d = 0; - float4 const x_59 = *(tint_symbol_8); + float4 const x_59 = *(tint_symbol_6); float2 const x_62 = x_7.resolution; pos = (float2(x_59.x, x_59.y) / x_62); float const x_65 = pos.x; @@ -38,7 +38,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ break; } int const x_80 = i; - (*(tint_symbol_9)).arr[x_80] = 0; + (*(tint_symbol_7)).arr[x_80] = 0; { int const x_82 = i; i = as_type((as_type(x_82) + as_type(1))); @@ -65,7 +65,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_92) { int const x_96 = p.x; int const x_99 = p.y; - int const x_103 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_96) - as_type(2)))) + as_type(as_type((as_type(x_99) * as_type(16))))))]; + int const x_103 = (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_96) - as_type(2)))) + as_type(as_type((as_type(x_99) * as_type(16))))))]; x_104 = (x_103 == 0); x_105_phi = x_104; } @@ -80,7 +80,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_112) { int const x_116 = p.x; int const x_118 = p.y; - int const x_123 = (*(tint_symbol_9)).arr[as_type((as_type(x_116) + as_type(as_type((as_type(as_type((as_type(x_118) - as_type(2)))) * as_type(16))))))]; + int const x_123 = (*(tint_symbol_7)).arr[as_type((as_type(x_116) + as_type(as_type((as_type(as_type((as_type(x_118) - as_type(2)))) * as_type(16))))))]; x_124 = (x_123 == 0); x_125_phi = x_124; } @@ -95,7 +95,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_132) { int const x_136 = p.x; int const x_139 = p.y; - int const x_143 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_136) + as_type(2)))) + as_type(as_type((as_type(x_139) * as_type(16))))))]; + int const x_143 = (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_136) + as_type(2)))) + as_type(as_type((as_type(x_139) * as_type(16))))))]; x_144 = (x_143 == 0); x_145_phi = x_144; } @@ -110,7 +110,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_152) { int const x_156 = p.x; int const x_158 = p.y; - int const x_163 = (*(tint_symbol_9)).arr[as_type((as_type(x_156) + as_type(as_type((as_type(as_type((as_type(x_158) + as_type(2)))) * as_type(16))))))]; + int const x_163 = (*(tint_symbol_7)).arr[as_type((as_type(x_156) + as_type(as_type((as_type(as_type((as_type(x_158) + as_type(2)))) * as_type(16))))))]; x_164 = (x_163 == 0); x_165_phi = x_164; } @@ -164,7 +164,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ } int const x_189 = j; int const x_191 = i; - int const x_196 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_189) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_191) * as_type(2)))) * as_type(16))))))]; + int const x_196 = (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_189) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_191) * as_type(2)))) * as_type(16))))))]; if ((x_196 == 0)) { int const x_200 = j; p.x = as_type((as_type(x_200) * as_type(2))); @@ -184,7 +184,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ } int const x_211 = p.x; int const x_213 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_211) + as_type(as_type((as_type(x_213) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_211) + as_type(as_type((as_type(x_213) * as_type(16))))))] = 1; } else { int const x_217 = v; int const x_218 = directions; @@ -205,7 +205,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_230) { int const x_234 = p.x; int const x_237 = p.y; - int const x_241 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_234) - as_type(2)))) + as_type(as_type((as_type(x_237) * as_type(16))))))]; + int const x_241 = (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_234) - as_type(2)))) + as_type(as_type((as_type(x_237) * as_type(16))))))]; x_242 = (x_241 == 0); x_243_phi = x_242; } @@ -215,13 +215,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ d = as_type((as_type(x_246) - as_type(1))); int const x_249 = p.x; int const x_251 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_249) + as_type(as_type((as_type(x_251) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_249) + as_type(as_type((as_type(x_251) * as_type(16))))))] = 1; int const x_256 = p.x; int const x_259 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_256) - as_type(1)))) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_256) - as_type(1)))) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; int const x_264 = p.x; int const x_267 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(2)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(2)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; int const x_272 = p.x; p.x = as_type((as_type(x_272) - as_type(2))); } @@ -252,23 +252,23 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ int const x_297 = x_297_phi; int const x_299 = as_type((as_type(as_type((as_type(x_297) - as_type(2)))) * as_type(16))); if (x_282) { - x_303 = *(tint_symbol_9); + x_303 = *(tint_symbol_7); x_305_phi = x_303; } else { - tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - x_304 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + x_304 = tint_symbol_2; x_305_phi = x_304; } tint_array_wrapper const x_305 = x_305_phi; if (x_282) { - tint_array_wrapper const tint_symbol_5 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - *(tint_symbol_9) = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + *(tint_symbol_7) = tint_symbol_3; } if (x_282) { - *(tint_symbol_9) = x_305; + *(tint_symbol_7) = x_305; } if (x_282) { - x_315 = (*(tint_symbol_9)).arr[as_type((as_type(x_290) + as_type(x_299)))]; + x_315 = (*(tint_symbol_7)).arr[as_type((as_type(x_290) + as_type(x_299)))]; x_317_phi = x_315; } else { x_316 = 0; @@ -281,17 +281,17 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ d = as_type((as_type(x_323) - as_type(1))); int const x_326 = p.x; int const x_328 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_326) + as_type(as_type((as_type(x_328) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_326) + as_type(as_type((as_type(x_328) * as_type(16))))))] = 1; int const x_333 = p.x; int const x_335 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_333) + as_type(as_type((as_type(as_type((as_type(x_335) - as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_333) + as_type(as_type((as_type(as_type((as_type(x_335) - as_type(1)))) * as_type(16))))))] = 1; int const x_341 = p.x; int const x_343 = p.y; - tint_array_wrapper const x_345 = *(tint_symbol_9); - tint_array_wrapper const tint_symbol_6 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - *(tint_symbol_9) = tint_symbol_6; - *(tint_symbol_9) = x_345; - (*(tint_symbol_9)).arr[as_type((as_type(x_341) + as_type(as_type((as_type(as_type((as_type(x_343) - as_type(2)))) * as_type(16))))))] = 1; + tint_array_wrapper const x_345 = *(tint_symbol_7); + tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + *(tint_symbol_7) = tint_symbol_4; + *(tint_symbol_7) = x_345; + (*(tint_symbol_7)).arr[as_type((as_type(x_341) + as_type(as_type((as_type(as_type((as_type(x_343) - as_type(2)))) * as_type(16))))))] = 1; int const x_350 = p.y; p.y = as_type((as_type(x_350) - as_type(2))); } @@ -308,7 +308,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_360) { int const x_364 = p.x; int const x_367 = p.y; - int const x_371 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_364) + as_type(2)))) + as_type(as_type((as_type(x_367) * as_type(16))))))]; + int const x_371 = (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_364) + as_type(2)))) + as_type(as_type((as_type(x_367) * as_type(16))))))]; x_372 = (x_371 == 0); x_373_phi = x_372; } @@ -318,13 +318,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ d = as_type((as_type(x_376) - as_type(1))); int const x_379 = p.x; int const x_381 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_379) + as_type(as_type((as_type(x_381) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_379) + as_type(as_type((as_type(x_381) * as_type(16))))))] = 1; int const x_386 = p.x; int const x_389 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_386) + as_type(1)))) + as_type(as_type((as_type(x_389) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_386) + as_type(1)))) + as_type(as_type((as_type(x_389) * as_type(16))))))] = 1; int const x_394 = p.x; int const x_397 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_394) + as_type(2)))) + as_type(as_type((as_type(x_397) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_394) + as_type(2)))) + as_type(as_type((as_type(x_397) * as_type(16))))))] = 1; int const x_402 = p.x; p.x = as_type((as_type(x_402) + as_type(2))); } @@ -341,7 +341,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_412) { int const x_416 = p.x; int const x_418 = p.y; - int const x_423 = (*(tint_symbol_9)).arr[as_type((as_type(x_416) + as_type(as_type((as_type(as_type((as_type(x_418) + as_type(2)))) * as_type(16))))))]; + int const x_423 = (*(tint_symbol_7)).arr[as_type((as_type(x_416) + as_type(as_type((as_type(as_type((as_type(x_418) + as_type(2)))) * as_type(16))))))]; x_424 = (x_423 == 0); x_425_phi = x_424; } @@ -351,22 +351,22 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ d = as_type((as_type(x_428) - as_type(1))); int const x_431 = p.x; int const x_433 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_431) + as_type(as_type((as_type(x_433) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_431) + as_type(as_type((as_type(x_433) * as_type(16))))))] = 1; int const x_438 = p.x; int const x_440 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_438) + as_type(as_type((as_type(as_type((as_type(x_440) + as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_438) + as_type(as_type((as_type(as_type((as_type(x_440) + as_type(1)))) * as_type(16))))))] = 1; int const x_446 = p.x; int const x_448 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_446) + as_type(as_type((as_type(as_type((as_type(x_448) + as_type(2)))) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_446) + as_type(as_type((as_type(as_type((as_type(x_448) + as_type(2)))) * as_type(16))))))] = 1; int const x_454 = p.y; p.y = as_type((as_type(x_454) + as_type(2))); } } int const x_458 = ipos.y; int const x_461 = ipos.x; - int const x_464 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_458) * as_type(16)))) + as_type(x_461)))]; + int const x_464 = (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_458) * as_type(16)))) + as_type(x_461)))]; if ((x_464 == 1)) { - *(tint_symbol_10) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_8) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; } { @@ -377,18 +377,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ } } } - *(tint_symbol_10) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_8) = float4(0.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread tint_array_wrapper tint_symbol_12 = {}; - thread float4 tint_symbol_13 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13}; - tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_7, tint_symbol_9, tint_symbol_10, tint_symbol_11); + main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_11)}; + return tint_symbol_5; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_12 = 0.0f; + thread tint_array_wrapper tint_symbol_13 = {}; + thread float4 tint_symbol_14 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.hlsl index 0505c28fae..1c4efe4fce 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.hlsl @@ -201,14 +201,14 @@ void main_1() { x_303 = map; x_305_phi = x_303; } else { - const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - x_304 = tint_symbol_5; + const int tint_symbol_4[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + x_304 = tint_symbol_4; x_305_phi = x_304; } const int x_305[256] = x_305_phi; if (x_282) { - const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - map = tint_symbol_6; + const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + map = tint_symbol_5; } if (x_282) { map = x_305; @@ -232,8 +232,8 @@ void main_1() { const int x_341 = p.x; const int x_343 = p.y; const int x_345[256] = map; - const int tint_symbol_7[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - map = tint_symbol_7; + const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + map = tint_symbol_6; map = x_345; map[(x_341 + ((x_343 - 2) * 16))] = 1; const int x_350 = p.y; @@ -328,11 +328,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; + const main_out tint_symbol_7 = {x_GLF_color}; + return tint_symbol_7; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.msl index 51be36d668..e567765f47 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { float2 pos = 0.0f; int2 ipos = 0; int i = 0; @@ -24,7 +24,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ int directions = 0; int j = 0; int d = 0; - float4 const x_59 = *(tint_symbol_8); + float4 const x_59 = *(tint_symbol_6); float2 const x_62 = x_7.resolution; pos = (float2(x_59.x, x_59.y) / x_62); float const x_65 = pos.x; @@ -38,7 +38,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ break; } int const x_80 = i; - (*(tint_symbol_9)).arr[x_80] = 0; + (*(tint_symbol_7)).arr[x_80] = 0; { int const x_82 = i; i = as_type((as_type(x_82) + as_type(1))); @@ -65,7 +65,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_92) { int const x_96 = p.x; int const x_99 = p.y; - int const x_103 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_96) - as_type(2)))) + as_type(as_type((as_type(x_99) * as_type(16))))))]; + int const x_103 = (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_96) - as_type(2)))) + as_type(as_type((as_type(x_99) * as_type(16))))))]; x_104 = (x_103 == 0); x_105_phi = x_104; } @@ -80,7 +80,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_112) { int const x_116 = p.x; int const x_118 = p.y; - int const x_123 = (*(tint_symbol_9)).arr[as_type((as_type(x_116) + as_type(as_type((as_type(as_type((as_type(x_118) - as_type(2)))) * as_type(16))))))]; + int const x_123 = (*(tint_symbol_7)).arr[as_type((as_type(x_116) + as_type(as_type((as_type(as_type((as_type(x_118) - as_type(2)))) * as_type(16))))))]; x_124 = (x_123 == 0); x_125_phi = x_124; } @@ -95,7 +95,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_132) { int const x_136 = p.x; int const x_139 = p.y; - int const x_143 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_136) + as_type(2)))) + as_type(as_type((as_type(x_139) * as_type(16))))))]; + int const x_143 = (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_136) + as_type(2)))) + as_type(as_type((as_type(x_139) * as_type(16))))))]; x_144 = (x_143 == 0); x_145_phi = x_144; } @@ -110,7 +110,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_152) { int const x_156 = p.x; int const x_158 = p.y; - int const x_163 = (*(tint_symbol_9)).arr[as_type((as_type(x_156) + as_type(as_type((as_type(as_type((as_type(x_158) + as_type(2)))) * as_type(16))))))]; + int const x_163 = (*(tint_symbol_7)).arr[as_type((as_type(x_156) + as_type(as_type((as_type(as_type((as_type(x_158) + as_type(2)))) * as_type(16))))))]; x_164 = (x_163 == 0); x_165_phi = x_164; } @@ -164,7 +164,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ } int const x_189 = j; int const x_191 = i; - int const x_196 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_189) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_191) * as_type(2)))) * as_type(16))))))]; + int const x_196 = (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_189) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_191) * as_type(2)))) * as_type(16))))))]; if ((x_196 == 0)) { int const x_200 = j; p.x = as_type((as_type(x_200) * as_type(2))); @@ -184,7 +184,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ } int const x_211 = p.x; int const x_213 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_211) + as_type(as_type((as_type(x_213) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_211) + as_type(as_type((as_type(x_213) * as_type(16))))))] = 1; } else { int const x_217 = v; int const x_218 = directions; @@ -205,7 +205,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_230) { int const x_234 = p.x; int const x_237 = p.y; - int const x_241 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_234) - as_type(2)))) + as_type(as_type((as_type(x_237) * as_type(16))))))]; + int const x_241 = (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_234) - as_type(2)))) + as_type(as_type((as_type(x_237) * as_type(16))))))]; x_242 = (x_241 == 0); x_243_phi = x_242; } @@ -215,13 +215,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ d = as_type((as_type(x_246) - as_type(1))); int const x_249 = p.x; int const x_251 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_249) + as_type(as_type((as_type(x_251) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_249) + as_type(as_type((as_type(x_251) * as_type(16))))))] = 1; int const x_256 = p.x; int const x_259 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_256) - as_type(1)))) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_256) - as_type(1)))) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; int const x_264 = p.x; int const x_267 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(2)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(2)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; int const x_272 = p.x; p.x = as_type((as_type(x_272) - as_type(2))); } @@ -252,23 +252,23 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ int const x_297 = x_297_phi; int const x_299 = as_type((as_type(as_type((as_type(x_297) - as_type(2)))) * as_type(16))); if (x_282) { - x_303 = *(tint_symbol_9); + x_303 = *(tint_symbol_7); x_305_phi = x_303; } else { - tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - x_304 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + x_304 = tint_symbol_2; x_305_phi = x_304; } tint_array_wrapper const x_305 = x_305_phi; if (x_282) { - tint_array_wrapper const tint_symbol_5 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - *(tint_symbol_9) = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + *(tint_symbol_7) = tint_symbol_3; } if (x_282) { - *(tint_symbol_9) = x_305; + *(tint_symbol_7) = x_305; } if (x_282) { - x_315 = (*(tint_symbol_9)).arr[as_type((as_type(x_290) + as_type(x_299)))]; + x_315 = (*(tint_symbol_7)).arr[as_type((as_type(x_290) + as_type(x_299)))]; x_317_phi = x_315; } else { x_316 = 0; @@ -281,17 +281,17 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ d = as_type((as_type(x_323) - as_type(1))); int const x_326 = p.x; int const x_328 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_326) + as_type(as_type((as_type(x_328) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_326) + as_type(as_type((as_type(x_328) * as_type(16))))))] = 1; int const x_333 = p.x; int const x_335 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_333) + as_type(as_type((as_type(as_type((as_type(x_335) - as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_333) + as_type(as_type((as_type(as_type((as_type(x_335) - as_type(1)))) * as_type(16))))))] = 1; int const x_341 = p.x; int const x_343 = p.y; - tint_array_wrapper const x_345 = *(tint_symbol_9); - tint_array_wrapper const tint_symbol_6 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - *(tint_symbol_9) = tint_symbol_6; - *(tint_symbol_9) = x_345; - (*(tint_symbol_9)).arr[as_type((as_type(x_341) + as_type(as_type((as_type(as_type((as_type(x_343) - as_type(2)))) * as_type(16))))))] = 1; + tint_array_wrapper const x_345 = *(tint_symbol_7); + tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + *(tint_symbol_7) = tint_symbol_4; + *(tint_symbol_7) = x_345; + (*(tint_symbol_7)).arr[as_type((as_type(x_341) + as_type(as_type((as_type(as_type((as_type(x_343) - as_type(2)))) * as_type(16))))))] = 1; int const x_350 = p.y; p.y = as_type((as_type(x_350) - as_type(2))); } @@ -308,7 +308,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_360) { int const x_364 = p.x; int const x_367 = p.y; - int const x_371 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_364) + as_type(2)))) + as_type(as_type((as_type(x_367) * as_type(16))))))]; + int const x_371 = (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_364) + as_type(2)))) + as_type(as_type((as_type(x_367) * as_type(16))))))]; x_372 = (x_371 == 0); x_373_phi = x_372; } @@ -318,13 +318,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ d = as_type((as_type(x_376) - as_type(1))); int const x_379 = p.x; int const x_381 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_379) + as_type(as_type((as_type(x_381) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_379) + as_type(as_type((as_type(x_381) * as_type(16))))))] = 1; int const x_386 = p.x; int const x_389 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_386) + as_type(1)))) + as_type(as_type((as_type(x_389) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_386) + as_type(1)))) + as_type(as_type((as_type(x_389) * as_type(16))))))] = 1; int const x_394 = p.x; int const x_397 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_394) + as_type(2)))) + as_type(as_type((as_type(x_397) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_394) + as_type(2)))) + as_type(as_type((as_type(x_397) * as_type(16))))))] = 1; int const x_402 = p.x; p.x = as_type((as_type(x_402) + as_type(2))); } @@ -341,7 +341,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_412) { int const x_416 = p.x; int const x_418 = p.y; - int const x_423 = (*(tint_symbol_9)).arr[as_type((as_type(x_416) + as_type(as_type((as_type(as_type((as_type(x_418) + as_type(2)))) * as_type(16))))))]; + int const x_423 = (*(tint_symbol_7)).arr[as_type((as_type(x_416) + as_type(as_type((as_type(as_type((as_type(x_418) + as_type(2)))) * as_type(16))))))]; x_424 = (x_423 == 0); x_425_phi = x_424; } @@ -351,22 +351,22 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ d = as_type((as_type(x_428) - as_type(1))); int const x_431 = p.x; int const x_433 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_431) + as_type(as_type((as_type(x_433) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_431) + as_type(as_type((as_type(x_433) * as_type(16))))))] = 1; int const x_438 = p.x; int const x_440 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_438) + as_type(as_type((as_type(as_type((as_type(x_440) + as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_438) + as_type(as_type((as_type(as_type((as_type(x_440) + as_type(1)))) * as_type(16))))))] = 1; int const x_446 = p.x; int const x_448 = p.y; - (*(tint_symbol_9)).arr[as_type((as_type(x_446) + as_type(as_type((as_type(as_type((as_type(x_448) + as_type(2)))) * as_type(16))))))] = 1; + (*(tint_symbol_7)).arr[as_type((as_type(x_446) + as_type(as_type((as_type(as_type((as_type(x_448) + as_type(2)))) * as_type(16))))))] = 1; int const x_454 = p.y; p.y = as_type((as_type(x_454) + as_type(2))); } } int const x_458 = ipos.y; int const x_461 = ipos.x; - int const x_464 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_458) * as_type(16)))) + as_type(x_461)))]; + int const x_464 = (*(tint_symbol_7)).arr[as_type((as_type(as_type((as_type(x_458) * as_type(16)))) + as_type(x_461)))]; if ((x_464 == 1)) { - *(tint_symbol_10) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_8) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; } { @@ -377,18 +377,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ } } } - *(tint_symbol_10) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_8) = float4(0.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread tint_array_wrapper tint_symbol_12 = {}; - thread float4 tint_symbol_13 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13}; - tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_7, tint_symbol_9, tint_symbol_10, tint_symbol_11); + main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_11)}; + return tint_symbol_5; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_12 = 0.0f; + thread tint_array_wrapper tint_symbol_13 = {}; + thread float4 tint_symbol_14 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.hlsl index cfe3abd180..ac04bb1fc9 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.hlsl @@ -176,8 +176,8 @@ void main_1() { const int x_286 = p.x; const int x_288 = p.y; const int x_291[256] = map; - const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - map = tint_symbol_5; + const int tint_symbol_4[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + map = tint_symbol_4; map = x_291; const int x_294 = map[(x_286 + ((x_288 - 2) * 16))]; x_295 = (x_294 == 0); @@ -194,8 +194,8 @@ void main_1() { const int x_317 = p.x; const int x_319 = p.y; const int x_321[256] = map; - const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - map = tint_symbol_6; + const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + map = tint_symbol_5; map = x_321; map[(x_317 + ((x_319 - 2) * 16))] = 1; const int x_326 = p.y; @@ -290,11 +290,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.msl index 22486d281e..bf26bed8a1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) { float2 pos = 0.0f; int2 ipos = 0; int i = 0; @@ -24,7 +24,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ int directions = 0; int j = 0; int d = 0; - float4 const x_59 = *(tint_symbol_7); + float4 const x_59 = *(tint_symbol_5); float2 const x_62 = x_7.resolution; pos = (float2(x_59.x, x_59.y) / x_62); float const x_65 = pos.x; @@ -38,7 +38,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ break; } int const x_80 = i; - (*(tint_symbol_8)).arr[x_80] = 0; + (*(tint_symbol_6)).arr[x_80] = 0; { int const x_82 = i; i = as_type((as_type(x_82) + as_type(1))); @@ -65,7 +65,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_92) { int const x_96 = p.x; int const x_99 = p.y; - int const x_103 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_96) - as_type(2)))) + as_type(as_type((as_type(x_99) * as_type(16))))))]; + int const x_103 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_96) - as_type(2)))) + as_type(as_type((as_type(x_99) * as_type(16))))))]; x_104 = (x_103 == 0); x_105_phi = x_104; } @@ -80,7 +80,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_112) { int const x_116 = p.x; int const x_118 = p.y; - int const x_123 = (*(tint_symbol_8)).arr[as_type((as_type(x_116) + as_type(as_type((as_type(as_type((as_type(x_118) - as_type(2)))) * as_type(16))))))]; + int const x_123 = (*(tint_symbol_6)).arr[as_type((as_type(x_116) + as_type(as_type((as_type(as_type((as_type(x_118) - as_type(2)))) * as_type(16))))))]; x_124 = (x_123 == 0); x_125_phi = x_124; } @@ -95,7 +95,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_132) { int const x_136 = p.x; int const x_139 = p.y; - int const x_143 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_136) + as_type(2)))) + as_type(as_type((as_type(x_139) * as_type(16))))))]; + int const x_143 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_136) + as_type(2)))) + as_type(as_type((as_type(x_139) * as_type(16))))))]; x_144 = (x_143 == 0); x_145_phi = x_144; } @@ -110,7 +110,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_152) { int const x_156 = p.x; int const x_158 = p.y; - int const x_163 = (*(tint_symbol_8)).arr[as_type((as_type(x_156) + as_type(as_type((as_type(as_type((as_type(x_158) + as_type(2)))) * as_type(16))))))]; + int const x_163 = (*(tint_symbol_6)).arr[as_type((as_type(x_156) + as_type(as_type((as_type(as_type((as_type(x_158) + as_type(2)))) * as_type(16))))))]; x_164 = (x_163 == 0); x_165_phi = x_164; } @@ -154,7 +154,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ } int const x_189 = j; int const x_191 = i; - int const x_196 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_189) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_191) * as_type(2)))) * as_type(16))))))]; + int const x_196 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_189) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_191) * as_type(2)))) * as_type(16))))))]; if ((x_196 == 0)) { int const x_200 = j; p.x = as_type((as_type(x_200) * as_type(2))); @@ -174,7 +174,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ } int const x_211 = p.x; int const x_213 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_211) + as_type(as_type((as_type(x_213) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_211) + as_type(as_type((as_type(x_213) * as_type(16))))))] = 1; } else { int const x_217 = v; int const x_218 = directions; @@ -195,7 +195,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_230) { int const x_234 = p.x; int const x_237 = p.y; - int const x_241 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_234) - as_type(2)))) + as_type(as_type((as_type(x_237) * as_type(16))))))]; + int const x_241 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_234) - as_type(2)))) + as_type(as_type((as_type(x_237) * as_type(16))))))]; x_242 = (x_241 == 0); x_243_phi = x_242; } @@ -205,13 +205,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ d = as_type((as_type(x_246) - as_type(1))); int const x_249 = p.x; int const x_251 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_249) + as_type(as_type((as_type(x_251) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_249) + as_type(as_type((as_type(x_251) * as_type(16))))))] = 1; int const x_256 = p.x; int const x_259 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_256) - as_type(1)))) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_256) - as_type(1)))) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; int const x_264 = p.x; int const x_267 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(2)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(2)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; int const x_272 = p.x; p.x = as_type((as_type(x_272) - as_type(2))); } @@ -228,11 +228,11 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_282) { int const x_286 = p.x; int const x_288 = p.y; - tint_array_wrapper const x_291 = *(tint_symbol_8); - tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - *(tint_symbol_8) = tint_symbol_4; - *(tint_symbol_8) = x_291; - int const x_294 = (*(tint_symbol_8)).arr[as_type((as_type(x_286) + as_type(as_type((as_type(as_type((as_type(x_288) - as_type(2)))) * as_type(16))))))]; + tint_array_wrapper const x_291 = *(tint_symbol_6); + tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + *(tint_symbol_6) = tint_symbol_2; + *(tint_symbol_6) = x_291; + int const x_294 = (*(tint_symbol_6)).arr[as_type((as_type(x_286) + as_type(as_type((as_type(as_type((as_type(x_288) - as_type(2)))) * as_type(16))))))]; x_295 = (x_294 == 0); x_296_phi = x_295; } @@ -242,17 +242,17 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ d = as_type((as_type(x_299) - as_type(1))); int const x_302 = p.x; int const x_304 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_302) + as_type(as_type((as_type(x_304) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_302) + as_type(as_type((as_type(x_304) * as_type(16))))))] = 1; int const x_309 = p.x; int const x_311 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_309) + as_type(as_type((as_type(as_type((as_type(x_311) - as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_309) + as_type(as_type((as_type(as_type((as_type(x_311) - as_type(1)))) * as_type(16))))))] = 1; int const x_317 = p.x; int const x_319 = p.y; - tint_array_wrapper const x_321 = *(tint_symbol_8); - tint_array_wrapper const tint_symbol_5 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - *(tint_symbol_8) = tint_symbol_5; - *(tint_symbol_8) = x_321; - (*(tint_symbol_8)).arr[as_type((as_type(x_317) + as_type(as_type((as_type(as_type((as_type(x_319) - as_type(2)))) * as_type(16))))))] = 1; + tint_array_wrapper const x_321 = *(tint_symbol_6); + tint_array_wrapper const tint_symbol_3 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + *(tint_symbol_6) = tint_symbol_3; + *(tint_symbol_6) = x_321; + (*(tint_symbol_6)).arr[as_type((as_type(x_317) + as_type(as_type((as_type(as_type((as_type(x_319) - as_type(2)))) * as_type(16))))))] = 1; int const x_326 = p.y; p.y = as_type((as_type(x_326) - as_type(2))); } @@ -269,7 +269,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_336) { int const x_340 = p.x; int const x_343 = p.y; - int const x_347 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_340) + as_type(2)))) + as_type(as_type((as_type(x_343) * as_type(16))))))]; + int const x_347 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_340) + as_type(2)))) + as_type(as_type((as_type(x_343) * as_type(16))))))]; x_348 = (x_347 == 0); x_349_phi = x_348; } @@ -279,13 +279,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ d = as_type((as_type(x_352) - as_type(1))); int const x_355 = p.x; int const x_357 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_355) + as_type(as_type((as_type(x_357) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_355) + as_type(as_type((as_type(x_357) * as_type(16))))))] = 1; int const x_362 = p.x; int const x_365 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_362) + as_type(1)))) + as_type(as_type((as_type(x_365) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_362) + as_type(1)))) + as_type(as_type((as_type(x_365) * as_type(16))))))] = 1; int const x_370 = p.x; int const x_373 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_370) + as_type(2)))) + as_type(as_type((as_type(x_373) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_370) + as_type(2)))) + as_type(as_type((as_type(x_373) * as_type(16))))))] = 1; int const x_378 = p.x; p.x = as_type((as_type(x_378) + as_type(2))); } @@ -302,7 +302,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_388) { int const x_392 = p.x; int const x_394 = p.y; - int const x_399 = (*(tint_symbol_8)).arr[as_type((as_type(x_392) + as_type(as_type((as_type(as_type((as_type(x_394) + as_type(2)))) * as_type(16))))))]; + int const x_399 = (*(tint_symbol_6)).arr[as_type((as_type(x_392) + as_type(as_type((as_type(as_type((as_type(x_394) + as_type(2)))) * as_type(16))))))]; x_400 = (x_399 == 0); x_401_phi = x_400; } @@ -312,22 +312,22 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ d = as_type((as_type(x_404) - as_type(1))); int const x_407 = p.x; int const x_409 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_407) + as_type(as_type((as_type(x_409) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_407) + as_type(as_type((as_type(x_409) * as_type(16))))))] = 1; int const x_414 = p.x; int const x_416 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_414) + as_type(as_type((as_type(as_type((as_type(x_416) + as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_414) + as_type(as_type((as_type(as_type((as_type(x_416) + as_type(1)))) * as_type(16))))))] = 1; int const x_422 = p.x; int const x_424 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_422) + as_type(as_type((as_type(as_type((as_type(x_424) + as_type(2)))) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_422) + as_type(as_type((as_type(as_type((as_type(x_424) + as_type(2)))) * as_type(16))))))] = 1; int const x_430 = p.y; p.y = as_type((as_type(x_430) + as_type(2))); } } int const x_434 = ipos.y; int const x_437 = ipos.x; - int const x_440 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_434) * as_type(16)))) + as_type(x_437)))]; + int const x_440 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_434) * as_type(16)))) + as_type(x_437)))]; if ((x_440 == 1)) { - *(tint_symbol_9) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; } { @@ -338,18 +338,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ } } } - *(tint_symbol_9) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_10 = 0.0f; - thread tint_array_wrapper tint_symbol_11 = {}; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_10 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_8) = gl_FragCoord_param; + main_1(x_7, tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread tint_array_wrapper tint_symbol_12 = {}; + thread float4 tint_symbol_13 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.hlsl index cfe3abd180..ac04bb1fc9 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.hlsl @@ -176,8 +176,8 @@ void main_1() { const int x_286 = p.x; const int x_288 = p.y; const int x_291[256] = map; - const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - map = tint_symbol_5; + const int tint_symbol_4[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + map = tint_symbol_4; map = x_291; const int x_294 = map[(x_286 + ((x_288 - 2) * 16))]; x_295 = (x_294 == 0); @@ -194,8 +194,8 @@ void main_1() { const int x_317 = p.x; const int x_319 = p.y; const int x_321[256] = map; - const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - map = tint_symbol_6; + const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + map = tint_symbol_5; map = x_321; map[(x_317 + ((x_319 - 2) * 16))] = 1; const int x_326 = p.y; @@ -290,11 +290,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.msl index 22486d281e..bf26bed8a1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) { float2 pos = 0.0f; int2 ipos = 0; int i = 0; @@ -24,7 +24,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ int directions = 0; int j = 0; int d = 0; - float4 const x_59 = *(tint_symbol_7); + float4 const x_59 = *(tint_symbol_5); float2 const x_62 = x_7.resolution; pos = (float2(x_59.x, x_59.y) / x_62); float const x_65 = pos.x; @@ -38,7 +38,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ break; } int const x_80 = i; - (*(tint_symbol_8)).arr[x_80] = 0; + (*(tint_symbol_6)).arr[x_80] = 0; { int const x_82 = i; i = as_type((as_type(x_82) + as_type(1))); @@ -65,7 +65,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_92) { int const x_96 = p.x; int const x_99 = p.y; - int const x_103 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_96) - as_type(2)))) + as_type(as_type((as_type(x_99) * as_type(16))))))]; + int const x_103 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_96) - as_type(2)))) + as_type(as_type((as_type(x_99) * as_type(16))))))]; x_104 = (x_103 == 0); x_105_phi = x_104; } @@ -80,7 +80,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_112) { int const x_116 = p.x; int const x_118 = p.y; - int const x_123 = (*(tint_symbol_8)).arr[as_type((as_type(x_116) + as_type(as_type((as_type(as_type((as_type(x_118) - as_type(2)))) * as_type(16))))))]; + int const x_123 = (*(tint_symbol_6)).arr[as_type((as_type(x_116) + as_type(as_type((as_type(as_type((as_type(x_118) - as_type(2)))) * as_type(16))))))]; x_124 = (x_123 == 0); x_125_phi = x_124; } @@ -95,7 +95,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_132) { int const x_136 = p.x; int const x_139 = p.y; - int const x_143 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_136) + as_type(2)))) + as_type(as_type((as_type(x_139) * as_type(16))))))]; + int const x_143 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_136) + as_type(2)))) + as_type(as_type((as_type(x_139) * as_type(16))))))]; x_144 = (x_143 == 0); x_145_phi = x_144; } @@ -110,7 +110,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_152) { int const x_156 = p.x; int const x_158 = p.y; - int const x_163 = (*(tint_symbol_8)).arr[as_type((as_type(x_156) + as_type(as_type((as_type(as_type((as_type(x_158) + as_type(2)))) * as_type(16))))))]; + int const x_163 = (*(tint_symbol_6)).arr[as_type((as_type(x_156) + as_type(as_type((as_type(as_type((as_type(x_158) + as_type(2)))) * as_type(16))))))]; x_164 = (x_163 == 0); x_165_phi = x_164; } @@ -154,7 +154,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ } int const x_189 = j; int const x_191 = i; - int const x_196 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_189) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_191) * as_type(2)))) * as_type(16))))))]; + int const x_196 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_189) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_191) * as_type(2)))) * as_type(16))))))]; if ((x_196 == 0)) { int const x_200 = j; p.x = as_type((as_type(x_200) * as_type(2))); @@ -174,7 +174,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ } int const x_211 = p.x; int const x_213 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_211) + as_type(as_type((as_type(x_213) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_211) + as_type(as_type((as_type(x_213) * as_type(16))))))] = 1; } else { int const x_217 = v; int const x_218 = directions; @@ -195,7 +195,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_230) { int const x_234 = p.x; int const x_237 = p.y; - int const x_241 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_234) - as_type(2)))) + as_type(as_type((as_type(x_237) * as_type(16))))))]; + int const x_241 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_234) - as_type(2)))) + as_type(as_type((as_type(x_237) * as_type(16))))))]; x_242 = (x_241 == 0); x_243_phi = x_242; } @@ -205,13 +205,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ d = as_type((as_type(x_246) - as_type(1))); int const x_249 = p.x; int const x_251 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_249) + as_type(as_type((as_type(x_251) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_249) + as_type(as_type((as_type(x_251) * as_type(16))))))] = 1; int const x_256 = p.x; int const x_259 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_256) - as_type(1)))) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_256) - as_type(1)))) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; int const x_264 = p.x; int const x_267 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(2)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(2)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; int const x_272 = p.x; p.x = as_type((as_type(x_272) - as_type(2))); } @@ -228,11 +228,11 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_282) { int const x_286 = p.x; int const x_288 = p.y; - tint_array_wrapper const x_291 = *(tint_symbol_8); - tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - *(tint_symbol_8) = tint_symbol_4; - *(tint_symbol_8) = x_291; - int const x_294 = (*(tint_symbol_8)).arr[as_type((as_type(x_286) + as_type(as_type((as_type(as_type((as_type(x_288) - as_type(2)))) * as_type(16))))))]; + tint_array_wrapper const x_291 = *(tint_symbol_6); + tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + *(tint_symbol_6) = tint_symbol_2; + *(tint_symbol_6) = x_291; + int const x_294 = (*(tint_symbol_6)).arr[as_type((as_type(x_286) + as_type(as_type((as_type(as_type((as_type(x_288) - as_type(2)))) * as_type(16))))))]; x_295 = (x_294 == 0); x_296_phi = x_295; } @@ -242,17 +242,17 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ d = as_type((as_type(x_299) - as_type(1))); int const x_302 = p.x; int const x_304 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_302) + as_type(as_type((as_type(x_304) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_302) + as_type(as_type((as_type(x_304) * as_type(16))))))] = 1; int const x_309 = p.x; int const x_311 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_309) + as_type(as_type((as_type(as_type((as_type(x_311) - as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_309) + as_type(as_type((as_type(as_type((as_type(x_311) - as_type(1)))) * as_type(16))))))] = 1; int const x_317 = p.x; int const x_319 = p.y; - tint_array_wrapper const x_321 = *(tint_symbol_8); - tint_array_wrapper const tint_symbol_5 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - *(tint_symbol_8) = tint_symbol_5; - *(tint_symbol_8) = x_321; - (*(tint_symbol_8)).arr[as_type((as_type(x_317) + as_type(as_type((as_type(as_type((as_type(x_319) - as_type(2)))) * as_type(16))))))] = 1; + tint_array_wrapper const x_321 = *(tint_symbol_6); + tint_array_wrapper const tint_symbol_3 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + *(tint_symbol_6) = tint_symbol_3; + *(tint_symbol_6) = x_321; + (*(tint_symbol_6)).arr[as_type((as_type(x_317) + as_type(as_type((as_type(as_type((as_type(x_319) - as_type(2)))) * as_type(16))))))] = 1; int const x_326 = p.y; p.y = as_type((as_type(x_326) - as_type(2))); } @@ -269,7 +269,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_336) { int const x_340 = p.x; int const x_343 = p.y; - int const x_347 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_340) + as_type(2)))) + as_type(as_type((as_type(x_343) * as_type(16))))))]; + int const x_347 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_340) + as_type(2)))) + as_type(as_type((as_type(x_343) * as_type(16))))))]; x_348 = (x_347 == 0); x_349_phi = x_348; } @@ -279,13 +279,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ d = as_type((as_type(x_352) - as_type(1))); int const x_355 = p.x; int const x_357 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_355) + as_type(as_type((as_type(x_357) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_355) + as_type(as_type((as_type(x_357) * as_type(16))))))] = 1; int const x_362 = p.x; int const x_365 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_362) + as_type(1)))) + as_type(as_type((as_type(x_365) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_362) + as_type(1)))) + as_type(as_type((as_type(x_365) * as_type(16))))))] = 1; int const x_370 = p.x; int const x_373 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_370) + as_type(2)))) + as_type(as_type((as_type(x_373) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_370) + as_type(2)))) + as_type(as_type((as_type(x_373) * as_type(16))))))] = 1; int const x_378 = p.x; p.x = as_type((as_type(x_378) + as_type(2))); } @@ -302,7 +302,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_388) { int const x_392 = p.x; int const x_394 = p.y; - int const x_399 = (*(tint_symbol_8)).arr[as_type((as_type(x_392) + as_type(as_type((as_type(as_type((as_type(x_394) + as_type(2)))) * as_type(16))))))]; + int const x_399 = (*(tint_symbol_6)).arr[as_type((as_type(x_392) + as_type(as_type((as_type(as_type((as_type(x_394) + as_type(2)))) * as_type(16))))))]; x_400 = (x_399 == 0); x_401_phi = x_400; } @@ -312,22 +312,22 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ d = as_type((as_type(x_404) - as_type(1))); int const x_407 = p.x; int const x_409 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_407) + as_type(as_type((as_type(x_409) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_407) + as_type(as_type((as_type(x_409) * as_type(16))))))] = 1; int const x_414 = p.x; int const x_416 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_414) + as_type(as_type((as_type(as_type((as_type(x_416) + as_type(1)))) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_414) + as_type(as_type((as_type(as_type((as_type(x_416) + as_type(1)))) * as_type(16))))))] = 1; int const x_422 = p.x; int const x_424 = p.y; - (*(tint_symbol_8)).arr[as_type((as_type(x_422) + as_type(as_type((as_type(as_type((as_type(x_424) + as_type(2)))) * as_type(16))))))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_422) + as_type(as_type((as_type(as_type((as_type(x_424) + as_type(2)))) * as_type(16))))))] = 1; int const x_430 = p.y; p.y = as_type((as_type(x_430) + as_type(2))); } } int const x_434 = ipos.y; int const x_437 = ipos.x; - int const x_440 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_434) * as_type(16)))) + as_type(x_437)))]; + int const x_440 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_434) * as_type(16)))) + as_type(x_437)))]; if ((x_440 == 1)) { - *(tint_symbol_9) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; } { @@ -338,18 +338,24 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ } } } - *(tint_symbol_9) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_10 = 0.0f; - thread tint_array_wrapper tint_symbol_11 = {}; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_10 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_8) = gl_FragCoord_param; + main_1(x_7, tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread tint_array_wrapper tint_symbol_12 = {}; + thread float4 tint_symbol_13 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.hlsl index 6c28e9e96a..f2d5a903a0 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.hlsl @@ -30,8 +30,8 @@ void main_1() { int x_64_phi = 0; const int x_63 = x_63_phi; const int x_68[10] = data; - const int tint_symbol_5[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - data = tint_symbol_5; + const int tint_symbol_4[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + data = tint_symbol_4; data = x_68; const int x_69 = (x_63 + 1); x_64_phi = x_69; @@ -338,11 +338,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl index 13fa0cff56..56dceaa2bd 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper temp = {}; tint_array_wrapper data = {}; float x_190 = 0.0f; @@ -40,8 +40,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float int x_64_phi = 0; int const x_63 = x_63_phi; tint_array_wrapper const x_68 = data; - tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - data = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + data = tint_symbol_2; data = x_68; int const x_69 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_69; @@ -251,7 +251,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float float x_199 = 0.0f; float x_261 = 0.0f; float x_262_phi = 0.0f; - float const x_180 = (*(tint_symbol_6)).y; + float const x_180 = (*(tint_symbol_4)).y; x_181 = int(x_180); if ((x_181 < 30)) { int const x_187 = data.arr[0]; @@ -334,17 +334,23 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float x_263_phi = x_262; } float const x_263 = x_263_phi; - *(tint_symbol_7) = float4(x_263, x_263, x_263, 1.0f); + *(tint_symbol_5) = float4(x_263, x_263, x_263, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_8, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_8, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.hlsl index 975a0e5bb2..12e14f077f 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.hlsl @@ -30,8 +30,8 @@ void main_1() { int x_64_phi = 0; const int x_63 = x_63_phi; const int x_68[10] = data; - const int tint_symbol_5[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - data = tint_symbol_5; + const int tint_symbol_4[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + data = tint_symbol_4; data = x_68; const int x_69 = (x_63 + 1); x_64_phi = x_69; @@ -346,11 +346,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.msl index 261784f1f8..98ee292ed7 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper temp = {}; tint_array_wrapper data = {}; float x_190 = 0.0f; @@ -40,8 +40,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float int x_64_phi = 0; int const x_63 = x_63_phi; tint_array_wrapper const x_68 = data; - tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - data = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + data = tint_symbol_2; data = x_68; int const x_69 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_69; @@ -251,7 +251,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float float x_199 = 0.0f; float x_261 = 0.0f; float x_262_phi = 0.0f; - float const x_180 = (*(tint_symbol_6)).y; + float const x_180 = (*(tint_symbol_4)).y; x_181 = int(x_180); if ((x_181 < 30)) { int const x_187 = data.arr[0]; @@ -334,17 +334,23 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float x_263_phi = x_262; } float const x_263 = x_263_phi; - *(tint_symbol_7) = float4(x_263, x_263, x_263, 1.0f); + *(tint_symbol_5) = float4(x_263, x_263, x_263, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_8, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_8, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.hlsl index 40b050ea15..8ea7a19383 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.hlsl @@ -334,11 +334,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl index 3feada0531..4b8d917973 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { tint_array_wrapper temp = {}; tint_array_wrapper data = {}; float x_189 = 0.0f; @@ -247,7 +247,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float float x_198 = 0.0f; float x_260 = 0.0f; float x_261_phi = 0.0f; - float const x_179 = (*(tint_symbol_5)).y; + float const x_179 = (*(tint_symbol_3)).y; x_180 = int(x_179); if ((x_180 < 30)) { int const x_186 = data.arr[0]; @@ -330,17 +330,23 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float x_262_phi = x_261; } float const x_262 = x_262_phi; - *(tint_symbol_6) = float4(x_262, x_262, x_262, 1.0f); + *(tint_symbol_4) = float4(x_262, x_262, x_262, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.hlsl index 3b86173722..a73d085790 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.hlsl @@ -342,11 +342,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.msl index 13ce0fd8e4..2071bd11c8 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { tint_array_wrapper temp = {}; tint_array_wrapper data = {}; float x_189 = 0.0f; @@ -247,7 +247,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float float x_198 = 0.0f; float x_260 = 0.0f; float x_261_phi = 0.0f; - float const x_179 = (*(tint_symbol_5)).y; + float const x_179 = (*(tint_symbol_3)).y; x_180 = int(x_179); if ((x_180 < 30)) { int const x_186 = data.arr[0]; @@ -330,17 +330,23 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float x_262_phi = x_261; } float const x_262 = x_262_phi; - *(tint_symbol_6) = float4(x_262, x_262, x_262, 1.0f); + *(tint_symbol_4) = float4(x_262, x_262, x_262, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.hlsl index d473288f27..0e81ca2a61 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.hlsl @@ -250,11 +250,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl index 240379695d..eead08d915 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -35,23 +35,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_267 = i; - int const x_269 = (*(tint_symbol_5)).arr[x_267]; + int const x_269 = (*(tint_symbol_3)).arr[x_267]; int const x_270 = j; - int const x_272 = (*(tint_symbol_5)).arr[x_270]; + int const x_272 = (*(tint_symbol_3)).arr[x_270]; if ((x_269 < x_272)) { int const x_277 = k; k = as_type((as_type(x_277) + as_type(1))); int const x_279 = i; i = as_type((as_type(x_279) + as_type(1))); - int const x_282 = (*(tint_symbol_5)).arr[x_279]; - (*(tint_symbol_6)).arr[x_277] = x_282; + int const x_282 = (*(tint_symbol_3)).arr[x_279]; + (*(tint_symbol_4)).arr[x_277] = x_282; } else { int const x_284 = k; k = as_type((as_type(x_284) + as_type(1))); int const x_286 = j; j = as_type((as_type(x_286) + as_type(1))); - int const x_289 = (*(tint_symbol_5)).arr[x_286]; - (*(tint_symbol_6)).arr[x_284] = x_289; + int const x_289 = (*(tint_symbol_3)).arr[x_286]; + (*(tint_symbol_4)).arr[x_284] = x_289; } } while (true) { @@ -66,8 +66,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_302) + as_type(1))); int const x_304 = i; i = as_type((as_type(x_304) + as_type(1))); - int const x_307 = (*(tint_symbol_5)).arr[x_304]; - (*(tint_symbol_6)).arr[x_302] = x_307; + int const x_307 = (*(tint_symbol_3)).arr[x_304]; + (*(tint_symbol_4)).arr[x_302] = x_307; } int const x_309 = *(from); i_1 = x_309; @@ -80,8 +80,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_318 = i_1; int const x_319 = i_1; - int const x_321 = (*(tint_symbol_6)).arr[x_319]; - (*(tint_symbol_5)).arr[x_318] = x_321; + int const x_321 = (*(tint_symbol_4)).arr[x_319]; + (*(tint_symbol_3)).arr[x_318] = x_321; { int const x_323 = i_1; i_1 = as_type((as_type(x_323) + as_type(1))); @@ -90,7 +90,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -135,7 +135,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra param_1 = x_356; int const x_357 = to_1; param_2 = x_357; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_359 = m; int const x_361 = i_2; @@ -150,7 +150,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -161,52 +161,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_90) { case 9: { int const x_120 = i_3; - (*(tint_symbol_9)).arr[x_120] = -5; + (*(tint_symbol_7)).arr[x_120] = -5; break; } case 8: { int const x_118 = i_3; - (*(tint_symbol_9)).arr[x_118] = -4; + (*(tint_symbol_7)).arr[x_118] = -4; break; } case 7: { int const x_116 = i_3; - (*(tint_symbol_9)).arr[x_116] = -3; + (*(tint_symbol_7)).arr[x_116] = -3; break; } case 6: { int const x_114 = i_3; - (*(tint_symbol_9)).arr[x_114] = -2; + (*(tint_symbol_7)).arr[x_114] = -2; break; } case 5: { int const x_112 = i_3; - (*(tint_symbol_9)).arr[x_112] = -1; + (*(tint_symbol_7)).arr[x_112] = -1; break; } case 4: { int const x_110 = i_3; - (*(tint_symbol_9)).arr[x_110] = 0; + (*(tint_symbol_7)).arr[x_110] = 0; break; } case 3: { int const x_108 = i_3; - (*(tint_symbol_9)).arr[x_108] = 1; + (*(tint_symbol_7)).arr[x_108] = 1; break; } case 2: { int const x_106 = i_3; - (*(tint_symbol_9)).arr[x_106] = 2; + (*(tint_symbol_7)).arr[x_106] = 2; break; } case 1: { int const x_104 = i_3; - (*(tint_symbol_9)).arr[x_104] = 3; + (*(tint_symbol_7)).arr[x_104] = 3; break; } case 0: { int const x_102 = i_3; - (*(tint_symbol_9)).arr[x_102] = 4; + (*(tint_symbol_7)).arr[x_102] = 4; break; } default: { @@ -232,56 +232,56 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_133 = j_1; int const x_134 = j_1; - int const x_136 = (*(tint_symbol_9)).arr[x_134]; - (*(tint_symbol_10)).arr[x_133] = x_136; + int const x_136 = (*(tint_symbol_7)).arr[x_134]; + (*(tint_symbol_8)).arr[x_133] = x_136; { int const x_138 = j_1; j_1 = as_type((as_type(x_138) + as_type(1))); } } - mergeSort_(tint_symbol_9, tint_symbol_10); - float const x_142 = (*(tint_symbol_11)).y; + mergeSort_(tint_symbol_7, tint_symbol_8); + float const x_142 = (*(tint_symbol_9)).y; if ((int(x_142) < 30)) { - int const x_149 = (*(tint_symbol_9)).arr[0]; + int const x_149 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_149) / 10.0f)); } else { - float const x_154 = (*(tint_symbol_11)).y; + float const x_154 = (*(tint_symbol_9)).y; if ((int(x_154) < 60)) { - int const x_161 = (*(tint_symbol_9)).arr[1]; + int const x_161 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_161) / 10.0f)); } else { - float const x_166 = (*(tint_symbol_11)).y; + float const x_166 = (*(tint_symbol_9)).y; if ((int(x_166) < 90)) { - int const x_173 = (*(tint_symbol_9)).arr[2]; + int const x_173 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_173) / 10.0f)); } else { - float const x_178 = (*(tint_symbol_11)).y; + float const x_178 = (*(tint_symbol_9)).y; if ((int(x_178) < 120)) { - int const x_185 = (*(tint_symbol_9)).arr[3]; + int const x_185 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_185) / 10.0f)); } else { - float const x_190 = (*(tint_symbol_11)).y; + float const x_190 = (*(tint_symbol_9)).y; if ((int(x_190) < 150)) { discard_fragment(); } else { - float const x_197 = (*(tint_symbol_11)).y; + float const x_197 = (*(tint_symbol_9)).y; if ((int(x_197) < 180)) { - int const x_204 = (*(tint_symbol_9)).arr[5]; + int const x_204 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_204) / 10.0f)); } else { - float const x_209 = (*(tint_symbol_11)).y; + float const x_209 = (*(tint_symbol_9)).y; if ((int(x_209) < 210)) { - int const x_216 = (*(tint_symbol_9)).arr[6]; + int const x_216 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_216) / 10.0f)); } else { - float const x_221 = (*(tint_symbol_11)).y; + float const x_221 = (*(tint_symbol_9)).y; if ((int(x_221) < 240)) { - int const x_228 = (*(tint_symbol_9)).arr[7]; + int const x_228 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_228) / 10.0f)); } else { - float const x_233 = (*(tint_symbol_11)).y; + float const x_233 = (*(tint_symbol_9)).y; if ((int(x_233) < 270)) { - int const x_240 = (*(tint_symbol_9)).arr[8]; + int const x_240 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_240) / 10.0f)); } else { discard_fragment(); @@ -296,19 +296,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_244 = grey; float3 const x_245 = float3(x_244, x_244, x_244); - *(tint_symbol_12) = float4(x_245.x, x_245.y, x_245.z, 1.0f); + *(tint_symbol_10) = float4(x_245.x, x_245.y, x_245.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.hlsl index 6a30ba44d8..d127e3eec0 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.hlsl @@ -258,11 +258,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.msl index 7d925d1afa..5970567cbb 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -35,23 +35,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_267 = i; - int const x_269 = (*(tint_symbol_5)).arr[x_267]; + int const x_269 = (*(tint_symbol_3)).arr[x_267]; int const x_270 = j; - int const x_272 = (*(tint_symbol_5)).arr[x_270]; + int const x_272 = (*(tint_symbol_3)).arr[x_270]; if ((x_269 < x_272)) { int const x_277 = k; k = as_type((as_type(x_277) + as_type(1))); int const x_279 = i; i = as_type((as_type(x_279) + as_type(1))); - int const x_282 = (*(tint_symbol_5)).arr[x_279]; - (*(tint_symbol_6)).arr[x_277] = x_282; + int const x_282 = (*(tint_symbol_3)).arr[x_279]; + (*(tint_symbol_4)).arr[x_277] = x_282; } else { int const x_284 = k; k = as_type((as_type(x_284) + as_type(1))); int const x_286 = j; j = as_type((as_type(x_286) + as_type(1))); - int const x_289 = (*(tint_symbol_5)).arr[x_286]; - (*(tint_symbol_6)).arr[x_284] = x_289; + int const x_289 = (*(tint_symbol_3)).arr[x_286]; + (*(tint_symbol_4)).arr[x_284] = x_289; } } while (true) { @@ -66,8 +66,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_302) + as_type(1))); int const x_304 = i; i = as_type((as_type(x_304) + as_type(1))); - int const x_307 = (*(tint_symbol_5)).arr[x_304]; - (*(tint_symbol_6)).arr[x_302] = x_307; + int const x_307 = (*(tint_symbol_3)).arr[x_304]; + (*(tint_symbol_4)).arr[x_302] = x_307; } int const x_309 = *(from); i_1 = x_309; @@ -80,8 +80,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_318 = i_1; int const x_319 = i_1; - int const x_321 = (*(tint_symbol_6)).arr[x_319]; - (*(tint_symbol_5)).arr[x_318] = x_321; + int const x_321 = (*(tint_symbol_4)).arr[x_319]; + (*(tint_symbol_3)).arr[x_318] = x_321; { int const x_323 = i_1; i_1 = as_type((as_type(x_323) + as_type(1))); @@ -90,7 +90,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -135,7 +135,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra param_1 = x_356; int const x_357 = to_1; param_2 = x_357; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_359 = m; int const x_361 = i_2; @@ -150,7 +150,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -161,52 +161,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_90) { case 9: { int const x_120 = i_3; - (*(tint_symbol_9)).arr[x_120] = -5; + (*(tint_symbol_7)).arr[x_120] = -5; break; } case 8: { int const x_118 = i_3; - (*(tint_symbol_9)).arr[x_118] = -4; + (*(tint_symbol_7)).arr[x_118] = -4; break; } case 7: { int const x_116 = i_3; - (*(tint_symbol_9)).arr[x_116] = -3; + (*(tint_symbol_7)).arr[x_116] = -3; break; } case 6: { int const x_114 = i_3; - (*(tint_symbol_9)).arr[x_114] = -2; + (*(tint_symbol_7)).arr[x_114] = -2; break; } case 5: { int const x_112 = i_3; - (*(tint_symbol_9)).arr[x_112] = -1; + (*(tint_symbol_7)).arr[x_112] = -1; break; } case 4: { int const x_110 = i_3; - (*(tint_symbol_9)).arr[x_110] = 0; + (*(tint_symbol_7)).arr[x_110] = 0; break; } case 3: { int const x_108 = i_3; - (*(tint_symbol_9)).arr[x_108] = 1; + (*(tint_symbol_7)).arr[x_108] = 1; break; } case 2: { int const x_106 = i_3; - (*(tint_symbol_9)).arr[x_106] = 2; + (*(tint_symbol_7)).arr[x_106] = 2; break; } case 1: { int const x_104 = i_3; - (*(tint_symbol_9)).arr[x_104] = 3; + (*(tint_symbol_7)).arr[x_104] = 3; break; } case 0: { int const x_102 = i_3; - (*(tint_symbol_9)).arr[x_102] = 4; + (*(tint_symbol_7)).arr[x_102] = 4; break; } default: { @@ -232,56 +232,56 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_133 = j_1; int const x_134 = j_1; - int const x_136 = (*(tint_symbol_9)).arr[x_134]; - (*(tint_symbol_10)).arr[x_133] = x_136; + int const x_136 = (*(tint_symbol_7)).arr[x_134]; + (*(tint_symbol_8)).arr[x_133] = x_136; { int const x_138 = j_1; j_1 = as_type((as_type(x_138) + as_type(1))); } } - mergeSort_(tint_symbol_9, tint_symbol_10); - float const x_142 = (*(tint_symbol_11)).y; + mergeSort_(tint_symbol_7, tint_symbol_8); + float const x_142 = (*(tint_symbol_9)).y; if ((int(x_142) < 30)) { - int const x_149 = (*(tint_symbol_9)).arr[0]; + int const x_149 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_149) / 10.0f)); } else { - float const x_154 = (*(tint_symbol_11)).y; + float const x_154 = (*(tint_symbol_9)).y; if ((int(x_154) < 60)) { - int const x_161 = (*(tint_symbol_9)).arr[1]; + int const x_161 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_161) / 10.0f)); } else { - float const x_166 = (*(tint_symbol_11)).y; + float const x_166 = (*(tint_symbol_9)).y; if ((int(x_166) < 90)) { - int const x_173 = (*(tint_symbol_9)).arr[2]; + int const x_173 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_173) / 10.0f)); } else { - float const x_178 = (*(tint_symbol_11)).y; + float const x_178 = (*(tint_symbol_9)).y; if ((int(x_178) < 120)) { - int const x_185 = (*(tint_symbol_9)).arr[3]; + int const x_185 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_185) / 10.0f)); } else { - float const x_190 = (*(tint_symbol_11)).y; + float const x_190 = (*(tint_symbol_9)).y; if ((int(x_190) < 150)) { discard_fragment(); } else { - float const x_197 = (*(tint_symbol_11)).y; + float const x_197 = (*(tint_symbol_9)).y; if ((int(x_197) < 180)) { - int const x_204 = (*(tint_symbol_9)).arr[5]; + int const x_204 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_204) / 10.0f)); } else { - float const x_209 = (*(tint_symbol_11)).y; + float const x_209 = (*(tint_symbol_9)).y; if ((int(x_209) < 210)) { - int const x_216 = (*(tint_symbol_9)).arr[6]; + int const x_216 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_216) / 10.0f)); } else { - float const x_221 = (*(tint_symbol_11)).y; + float const x_221 = (*(tint_symbol_9)).y; if ((int(x_221) < 240)) { - int const x_228 = (*(tint_symbol_9)).arr[7]; + int const x_228 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_228) / 10.0f)); } else { - float const x_233 = (*(tint_symbol_11)).y; + float const x_233 = (*(tint_symbol_9)).y; if ((int(x_233) < 270)) { - int const x_240 = (*(tint_symbol_9)).arr[8]; + int const x_240 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_240) / 10.0f)); } else { discard_fragment(); @@ -296,19 +296,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_244 = grey; float3 const x_245 = float3(x_244, x_244, x_244); - *(tint_symbol_12) = float4(x_245.x, x_245.y, x_245.z, 1.0f); + *(tint_symbol_10) = float4(x_245.x, x_245.y, x_245.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.hlsl index 500e49ead4..fc8977b2b8 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.hlsl @@ -270,11 +270,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl index dcb5f467d0..9077451723 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -35,23 +35,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_278 = i; - int const x_280 = (*(tint_symbol_5)).arr[x_278]; + int const x_280 = (*(tint_symbol_3)).arr[x_278]; int const x_281 = j; - int const x_283 = (*(tint_symbol_5)).arr[x_281]; + int const x_283 = (*(tint_symbol_3)).arr[x_281]; if ((x_280 < x_283)) { int const x_288 = k; k = as_type((as_type(x_288) + as_type(1))); int const x_290 = i; i = as_type((as_type(x_290) + as_type(1))); - int const x_293 = (*(tint_symbol_5)).arr[x_290]; - (*(tint_symbol_6)).arr[x_288] = x_293; + int const x_293 = (*(tint_symbol_3)).arr[x_290]; + (*(tint_symbol_4)).arr[x_288] = x_293; } else { int const x_295 = k; k = as_type((as_type(x_295) + as_type(1))); int const x_297 = j; j = as_type((as_type(x_297) + as_type(1))); - int const x_300 = (*(tint_symbol_5)).arr[x_297]; - (*(tint_symbol_6)).arr[x_295] = x_300; + int const x_300 = (*(tint_symbol_3)).arr[x_297]; + (*(tint_symbol_4)).arr[x_295] = x_300; } } while (true) { @@ -66,8 +66,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_313) + as_type(1))); int const x_315 = i; i = as_type((as_type(x_315) + as_type(1))); - int const x_318 = (*(tint_symbol_5)).arr[x_315]; - (*(tint_symbol_6)).arr[x_313] = x_318; + int const x_318 = (*(tint_symbol_3)).arr[x_315]; + (*(tint_symbol_4)).arr[x_313] = x_318; } int const x_320 = *(from); i_1 = x_320; @@ -80,8 +80,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_329 = i_1; int const x_330 = i_1; - int const x_332 = (*(tint_symbol_6)).arr[x_330]; - (*(tint_symbol_5)).arr[x_329] = x_332; + int const x_332 = (*(tint_symbol_4)).arr[x_330]; + (*(tint_symbol_3)).arr[x_329] = x_332; { int const x_334 = i_1; i_1 = as_type((as_type(x_334) + as_type(1))); @@ -90,7 +90,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -135,7 +135,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra param_1 = x_367; int const x_368 = to_1; param_2 = x_368; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_370 = m; int const x_372 = i_2; @@ -150,7 +150,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -161,52 +161,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_92) { case 9: { int const x_122 = i_3; - (*(tint_symbol_9)).arr[x_122] = -5; + (*(tint_symbol_7)).arr[x_122] = -5; break; } case 8: { int const x_120 = i_3; - (*(tint_symbol_9)).arr[x_120] = -4; + (*(tint_symbol_7)).arr[x_120] = -4; break; } case 7: { int const x_118 = i_3; - (*(tint_symbol_9)).arr[x_118] = -3; + (*(tint_symbol_7)).arr[x_118] = -3; break; } case 6: { int const x_116 = i_3; - (*(tint_symbol_9)).arr[x_116] = -2; + (*(tint_symbol_7)).arr[x_116] = -2; break; } case 5: { int const x_114 = i_3; - (*(tint_symbol_9)).arr[x_114] = -1; + (*(tint_symbol_7)).arr[x_114] = -1; break; } case 4: { int const x_112 = i_3; - (*(tint_symbol_9)).arr[x_112] = 0; + (*(tint_symbol_7)).arr[x_112] = 0; break; } case 3: { int const x_110 = i_3; - (*(tint_symbol_9)).arr[x_110] = 1; + (*(tint_symbol_7)).arr[x_110] = 1; break; } case 2: { int const x_108 = i_3; - (*(tint_symbol_9)).arr[x_108] = 2; + (*(tint_symbol_7)).arr[x_108] = 2; break; } case 1: { int const x_106 = i_3; - (*(tint_symbol_9)).arr[x_106] = 3; + (*(tint_symbol_7)).arr[x_106] = 3; break; } case 0: { int const x_104 = i_3; - (*(tint_symbol_9)).arr[x_104] = 4; + (*(tint_symbol_7)).arr[x_104] = 4; break; } default: { @@ -237,57 +237,57 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_140 = j_1; int const x_141 = j_1; - int const x_143 = (*(tint_symbol_9)).arr[x_141]; - (*(tint_symbol_10)).arr[x_140] = x_143; + int const x_143 = (*(tint_symbol_7)).arr[x_141]; + (*(tint_symbol_8)).arr[x_140] = x_143; { int const x_145 = j_1; j_1 = as_type((as_type(x_145) + as_type(1))); } } - mergeSort_(tint_symbol_9, tint_symbol_10); - float const x_149 = (*(tint_symbol_11)).y; + mergeSort_(tint_symbol_7, tint_symbol_8); + float const x_149 = (*(tint_symbol_9)).y; if ((int(x_149) < 30)) { - int const x_156 = (*(tint_symbol_9)).arr[0]; + int const x_156 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_156) / 10.0f)); } else { - float const x_161 = (*(tint_symbol_11)).y; + float const x_161 = (*(tint_symbol_9)).y; if ((int(x_161) < 60)) { - int const x_168 = (*(tint_symbol_9)).arr[1]; + int const x_168 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_168) / 10.0f)); } else { - float const x_173 = (*(tint_symbol_11)).y; + float const x_173 = (*(tint_symbol_9)).y; if ((int(x_173) < 90)) { - int const x_180 = (*(tint_symbol_9)).arr[2]; + int const x_180 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_180) / 10.0f)); } else { - float const x_185 = (*(tint_symbol_11)).y; + float const x_185 = (*(tint_symbol_9)).y; if ((int(x_185) < 120)) { - int const x_192 = (*(tint_symbol_9)).arr[3]; + int const x_192 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_192) / 10.0f)); } else { - float const x_197 = (*(tint_symbol_11)).y; + float const x_197 = (*(tint_symbol_9)).y; if ((int(x_197) < 150)) { discard_fragment(); } else { - float const x_204 = (*(tint_symbol_11)).y; + float const x_204 = (*(tint_symbol_9)).y; if ((int(x_204) < 180)) { - int const x_211 = (*(tint_symbol_9)).arr[5]; + int const x_211 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_211) / 10.0f)); } else { - float const x_216 = (*(tint_symbol_11)).y; + float const x_216 = (*(tint_symbol_9)).y; if ((int(x_216) < 210)) { - int const x_223 = (*(tint_symbol_9)).arr[6]; + int const x_223 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_223) / 10.0f)); } else { - float const x_228 = (*(tint_symbol_11)).y; + float const x_228 = (*(tint_symbol_9)).y; if ((int(x_228) < 240)) { - int const x_235 = (*(tint_symbol_9)).arr[7]; + int const x_235 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_235) / 10.0f)); } else { - float const x_240 = (*(tint_symbol_11)).y; + float const x_240 = (*(tint_symbol_9)).y; bool guard233 = true; if ((int(x_240) < 270)) { - int const x_247 = (*(tint_symbol_9)).arr[8]; + int const x_247 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_247) / 10.0f)); guard233 = false; } else { @@ -311,19 +311,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_255 = grey; float3 const x_256 = float3(x_255, x_255, x_255); - *(tint_symbol_12) = float4(x_256.x, x_256.y, x_256.z, 1.0f); + *(tint_symbol_10) = float4(x_256.x, x_256.y, x_256.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.hlsl index b21b248eda..5b6b83e08e 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.hlsl @@ -278,11 +278,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.msl index 45b927b40f..233095704e 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -35,23 +35,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_278 = i; - int const x_280 = (*(tint_symbol_5)).arr[x_278]; + int const x_280 = (*(tint_symbol_3)).arr[x_278]; int const x_281 = j; - int const x_283 = (*(tint_symbol_5)).arr[x_281]; + int const x_283 = (*(tint_symbol_3)).arr[x_281]; if ((x_280 < x_283)) { int const x_288 = k; k = as_type((as_type(x_288) + as_type(1))); int const x_290 = i; i = as_type((as_type(x_290) + as_type(1))); - int const x_293 = (*(tint_symbol_5)).arr[x_290]; - (*(tint_symbol_6)).arr[x_288] = x_293; + int const x_293 = (*(tint_symbol_3)).arr[x_290]; + (*(tint_symbol_4)).arr[x_288] = x_293; } else { int const x_295 = k; k = as_type((as_type(x_295) + as_type(1))); int const x_297 = j; j = as_type((as_type(x_297) + as_type(1))); - int const x_300 = (*(tint_symbol_5)).arr[x_297]; - (*(tint_symbol_6)).arr[x_295] = x_300; + int const x_300 = (*(tint_symbol_3)).arr[x_297]; + (*(tint_symbol_4)).arr[x_295] = x_300; } } while (true) { @@ -66,8 +66,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_313) + as_type(1))); int const x_315 = i; i = as_type((as_type(x_315) + as_type(1))); - int const x_318 = (*(tint_symbol_5)).arr[x_315]; - (*(tint_symbol_6)).arr[x_313] = x_318; + int const x_318 = (*(tint_symbol_3)).arr[x_315]; + (*(tint_symbol_4)).arr[x_313] = x_318; } int const x_320 = *(from); i_1 = x_320; @@ -80,8 +80,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_329 = i_1; int const x_330 = i_1; - int const x_332 = (*(tint_symbol_6)).arr[x_330]; - (*(tint_symbol_5)).arr[x_329] = x_332; + int const x_332 = (*(tint_symbol_4)).arr[x_330]; + (*(tint_symbol_3)).arr[x_329] = x_332; { int const x_334 = i_1; i_1 = as_type((as_type(x_334) + as_type(1))); @@ -90,7 +90,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -135,7 +135,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra param_1 = x_367; int const x_368 = to_1; param_2 = x_368; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_370 = m; int const x_372 = i_2; @@ -150,7 +150,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -161,52 +161,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_92) { case 9: { int const x_122 = i_3; - (*(tint_symbol_9)).arr[x_122] = -5; + (*(tint_symbol_7)).arr[x_122] = -5; break; } case 8: { int const x_120 = i_3; - (*(tint_symbol_9)).arr[x_120] = -4; + (*(tint_symbol_7)).arr[x_120] = -4; break; } case 7: { int const x_118 = i_3; - (*(tint_symbol_9)).arr[x_118] = -3; + (*(tint_symbol_7)).arr[x_118] = -3; break; } case 6: { int const x_116 = i_3; - (*(tint_symbol_9)).arr[x_116] = -2; + (*(tint_symbol_7)).arr[x_116] = -2; break; } case 5: { int const x_114 = i_3; - (*(tint_symbol_9)).arr[x_114] = -1; + (*(tint_symbol_7)).arr[x_114] = -1; break; } case 4: { int const x_112 = i_3; - (*(tint_symbol_9)).arr[x_112] = 0; + (*(tint_symbol_7)).arr[x_112] = 0; break; } case 3: { int const x_110 = i_3; - (*(tint_symbol_9)).arr[x_110] = 1; + (*(tint_symbol_7)).arr[x_110] = 1; break; } case 2: { int const x_108 = i_3; - (*(tint_symbol_9)).arr[x_108] = 2; + (*(tint_symbol_7)).arr[x_108] = 2; break; } case 1: { int const x_106 = i_3; - (*(tint_symbol_9)).arr[x_106] = 3; + (*(tint_symbol_7)).arr[x_106] = 3; break; } case 0: { int const x_104 = i_3; - (*(tint_symbol_9)).arr[x_104] = 4; + (*(tint_symbol_7)).arr[x_104] = 4; break; } default: { @@ -237,57 +237,57 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_140 = j_1; int const x_141 = j_1; - int const x_143 = (*(tint_symbol_9)).arr[x_141]; - (*(tint_symbol_10)).arr[x_140] = x_143; + int const x_143 = (*(tint_symbol_7)).arr[x_141]; + (*(tint_symbol_8)).arr[x_140] = x_143; { int const x_145 = j_1; j_1 = as_type((as_type(x_145) + as_type(1))); } } - mergeSort_(tint_symbol_9, tint_symbol_10); - float const x_149 = (*(tint_symbol_11)).y; + mergeSort_(tint_symbol_7, tint_symbol_8); + float const x_149 = (*(tint_symbol_9)).y; if ((int(x_149) < 30)) { - int const x_156 = (*(tint_symbol_9)).arr[0]; + int const x_156 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_156) / 10.0f)); } else { - float const x_161 = (*(tint_symbol_11)).y; + float const x_161 = (*(tint_symbol_9)).y; if ((int(x_161) < 60)) { - int const x_168 = (*(tint_symbol_9)).arr[1]; + int const x_168 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_168) / 10.0f)); } else { - float const x_173 = (*(tint_symbol_11)).y; + float const x_173 = (*(tint_symbol_9)).y; if ((int(x_173) < 90)) { - int const x_180 = (*(tint_symbol_9)).arr[2]; + int const x_180 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_180) / 10.0f)); } else { - float const x_185 = (*(tint_symbol_11)).y; + float const x_185 = (*(tint_symbol_9)).y; if ((int(x_185) < 120)) { - int const x_192 = (*(tint_symbol_9)).arr[3]; + int const x_192 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_192) / 10.0f)); } else { - float const x_197 = (*(tint_symbol_11)).y; + float const x_197 = (*(tint_symbol_9)).y; if ((int(x_197) < 150)) { discard_fragment(); } else { - float const x_204 = (*(tint_symbol_11)).y; + float const x_204 = (*(tint_symbol_9)).y; if ((int(x_204) < 180)) { - int const x_211 = (*(tint_symbol_9)).arr[5]; + int const x_211 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_211) / 10.0f)); } else { - float const x_216 = (*(tint_symbol_11)).y; + float const x_216 = (*(tint_symbol_9)).y; if ((int(x_216) < 210)) { - int const x_223 = (*(tint_symbol_9)).arr[6]; + int const x_223 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_223) / 10.0f)); } else { - float const x_228 = (*(tint_symbol_11)).y; + float const x_228 = (*(tint_symbol_9)).y; if ((int(x_228) < 240)) { - int const x_235 = (*(tint_symbol_9)).arr[7]; + int const x_235 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_235) / 10.0f)); } else { - float const x_240 = (*(tint_symbol_11)).y; + float const x_240 = (*(tint_symbol_9)).y; bool guard233 = true; if ((int(x_240) < 270)) { - int const x_247 = (*(tint_symbol_9)).arr[8]; + int const x_247 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_247) / 10.0f)); guard233 = false; } else { @@ -311,19 +311,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_255 = grey; float3 const x_256 = float3(x_255, x_255, x_255); - *(tint_symbol_12) = float4(x_256.x, x_256.y, x_256.z, 1.0f); + *(tint_symbol_10) = float4(x_256.x, x_256.y, x_256.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.hlsl index 53b5eb3df7..22bc5fdc07 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.hlsl @@ -355,11 +355,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl index e9de4dfa78..2fa6daad31 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -58,9 +58,9 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co break; } int const x_274 = i; - int const x_276 = (*(tint_symbol_5)).arr[x_274]; + int const x_276 = (*(tint_symbol_3)).arr[x_274]; int const x_277 = j; - int const x_279 = (*(tint_symbol_5)).arr[x_277]; + int const x_279 = (*(tint_symbol_3)).arr[x_277]; bool const x_280 = (x_276 < x_279); if (x_280) { x_285 = k; @@ -99,7 +99,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co } int const x_315 = 0; if (x_280) { - x_320 = (*(tint_symbol_5)).arr[x_309]; + x_320 = (*(tint_symbol_3)).arr[x_309]; float const x_322 = x_28.injectionSwitch.y; x_328_phi = x_320; if (!((0.0f <= x_322))) { @@ -116,7 +116,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co } int const x_328 = x_328_phi; if (x_280) { - (*(tint_symbol_6)).arr[x_287] = select(x_315, x_328, x_280); + (*(tint_symbol_4)).arr[x_287] = select(x_315, x_328, x_280); } if (x_280) { x_339 = 0; @@ -153,13 +153,13 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co x_366 = 0; x_367_phi = x_366; } else { - x_365 = (*(tint_symbol_5)).arr[x_357]; + x_365 = (*(tint_symbol_3)).arr[x_357]; x_367_phi = x_365; } int const x_367 = x_367_phi; if (x_280) { } else { - (*(tint_symbol_6)).arr[x_340] = x_367; + (*(tint_symbol_4)).arr[x_340] = x_367; } } while (true) { @@ -174,8 +174,8 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co k = as_type((as_type(x_383) + as_type(1))); int const x_385 = i; i = as_type((as_type(x_385) + as_type(1))); - int const x_388 = (*(tint_symbol_5)).arr[x_385]; - (*(tint_symbol_6)).arr[x_383] = x_388; + int const x_388 = (*(tint_symbol_3)).arr[x_385]; + (*(tint_symbol_4)).arr[x_383] = x_388; } int const x_390 = *(from); i_1 = x_390; @@ -188,8 +188,8 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co } int const x_399 = i_1; int const x_400 = i_1; - int const x_402 = (*(tint_symbol_6)).arr[x_400]; - (*(tint_symbol_5)).arr[x_399] = x_402; + int const x_402 = (*(tint_symbol_4)).arr[x_400]; + (*(tint_symbol_3)).arr[x_399] = x_402; { int const x_404 = i_1; i_1 = as_type((as_type(x_404) + as_type(1))); @@ -198,7 +198,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co return; } -void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -243,7 +243,7 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo param_1 = x_437; int const x_438 = to_1; param_2 = x_438; - merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_440 = m; int const x_442 = i_2; @@ -258,7 +258,7 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -269,52 +269,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_94) { case 9: { int const x_124 = i_3; - (*(tint_symbol_9)).arr[x_124] = -5; + (*(tint_symbol_7)).arr[x_124] = -5; break; } case 8: { int const x_122 = i_3; - (*(tint_symbol_9)).arr[x_122] = -4; + (*(tint_symbol_7)).arr[x_122] = -4; break; } case 7: { int const x_120 = i_3; - (*(tint_symbol_9)).arr[x_120] = -3; + (*(tint_symbol_7)).arr[x_120] = -3; break; } case 6: { int const x_118 = i_3; - (*(tint_symbol_9)).arr[x_118] = -2; + (*(tint_symbol_7)).arr[x_118] = -2; break; } case 5: { int const x_116 = i_3; - (*(tint_symbol_9)).arr[x_116] = -1; + (*(tint_symbol_7)).arr[x_116] = -1; break; } case 4: { int const x_114 = i_3; - (*(tint_symbol_9)).arr[x_114] = 0; + (*(tint_symbol_7)).arr[x_114] = 0; break; } case 3: { int const x_112 = i_3; - (*(tint_symbol_9)).arr[x_112] = 1; + (*(tint_symbol_7)).arr[x_112] = 1; break; } case 2: { int const x_110 = i_3; - (*(tint_symbol_9)).arr[x_110] = 2; + (*(tint_symbol_7)).arr[x_110] = 2; break; } case 1: { int const x_108 = i_3; - (*(tint_symbol_9)).arr[x_108] = 3; + (*(tint_symbol_7)).arr[x_108] = 3; break; } case 0: { int const x_106 = i_3; - (*(tint_symbol_9)).arr[x_106] = 4; + (*(tint_symbol_7)).arr[x_106] = 4; break; } default: { @@ -340,56 +340,56 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_137 = j_1; int const x_138 = j_1; - int const x_140 = (*(tint_symbol_9)).arr[x_138]; - (*(tint_symbol_10)).arr[x_137] = x_140; + int const x_140 = (*(tint_symbol_7)).arr[x_138]; + (*(tint_symbol_8)).arr[x_137] = x_140; { int const x_142 = j_1; j_1 = as_type((as_type(x_142) + as_type(1))); } } - mergeSort_(x_28, tint_symbol_9, tint_symbol_10); - float const x_146 = (*(tint_symbol_11)).y; + mergeSort_(x_28, tint_symbol_7, tint_symbol_8); + float const x_146 = (*(tint_symbol_9)).y; if ((int(x_146) < 30)) { - int const x_153 = (*(tint_symbol_9)).arr[0]; + int const x_153 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_153) / 10.0f)); } else { - float const x_158 = (*(tint_symbol_11)).y; + float const x_158 = (*(tint_symbol_9)).y; if ((int(x_158) < 60)) { - int const x_165 = (*(tint_symbol_9)).arr[1]; + int const x_165 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_165) / 10.0f)); } else { - float const x_170 = (*(tint_symbol_11)).y; + float const x_170 = (*(tint_symbol_9)).y; if ((int(x_170) < 90)) { - int const x_177 = (*(tint_symbol_9)).arr[2]; + int const x_177 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_177) / 10.0f)); } else { - float const x_182 = (*(tint_symbol_11)).y; + float const x_182 = (*(tint_symbol_9)).y; if ((int(x_182) < 120)) { - int const x_189 = (*(tint_symbol_9)).arr[3]; + int const x_189 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_189) / 10.0f)); } else { - float const x_194 = (*(tint_symbol_11)).y; + float const x_194 = (*(tint_symbol_9)).y; if ((int(x_194) < 150)) { discard_fragment(); } else { - float const x_201 = (*(tint_symbol_11)).y; + float const x_201 = (*(tint_symbol_9)).y; if ((int(x_201) < 180)) { - int const x_208 = (*(tint_symbol_9)).arr[5]; + int const x_208 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_208) / 10.0f)); } else { - float const x_213 = (*(tint_symbol_11)).y; + float const x_213 = (*(tint_symbol_9)).y; if ((int(x_213) < 210)) { - int const x_220 = (*(tint_symbol_9)).arr[6]; + int const x_220 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_220) / 10.0f)); } else { - float const x_225 = (*(tint_symbol_11)).y; + float const x_225 = (*(tint_symbol_9)).y; if ((int(x_225) < 240)) { - int const x_232 = (*(tint_symbol_9)).arr[7]; + int const x_232 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_232) / 10.0f)); } else { - float const x_237 = (*(tint_symbol_11)).y; + float const x_237 = (*(tint_symbol_9)).y; if ((int(x_237) < 270)) { - int const x_244 = (*(tint_symbol_9)).arr[8]; + int const x_244 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_244) / 10.0f)); } else { discard_fragment(); @@ -404,19 +404,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_248 = grey; float3 const x_249 = float3(x_248, x_248, x_248); - *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f); + *(tint_symbol_10) = float4(x_249.x, x_249.y, x_249.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.hlsl index 5cccfe9135..8e26fc7080 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.hlsl @@ -363,11 +363,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.msl index 95f51be3b1..c9324dd1f6 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -58,9 +58,9 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co break; } int const x_274 = i; - int const x_276 = (*(tint_symbol_5)).arr[x_274]; + int const x_276 = (*(tint_symbol_3)).arr[x_274]; int const x_277 = j; - int const x_279 = (*(tint_symbol_5)).arr[x_277]; + int const x_279 = (*(tint_symbol_3)).arr[x_277]; bool const x_280 = (x_276 < x_279); if (x_280) { x_285 = k; @@ -99,7 +99,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co } int const x_315 = 0; if (x_280) { - x_320 = (*(tint_symbol_5)).arr[x_309]; + x_320 = (*(tint_symbol_3)).arr[x_309]; float const x_322 = x_28.injectionSwitch.y; x_328_phi = x_320; if (!((0.0f <= x_322))) { @@ -116,7 +116,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co } int const x_328 = x_328_phi; if (x_280) { - (*(tint_symbol_6)).arr[x_287] = select(x_315, x_328, x_280); + (*(tint_symbol_4)).arr[x_287] = select(x_315, x_328, x_280); } if (x_280) { x_339 = 0; @@ -153,13 +153,13 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co x_366 = 0; x_367_phi = x_366; } else { - x_365 = (*(tint_symbol_5)).arr[x_357]; + x_365 = (*(tint_symbol_3)).arr[x_357]; x_367_phi = x_365; } int const x_367 = x_367_phi; if (x_280) { } else { - (*(tint_symbol_6)).arr[x_340] = x_367; + (*(tint_symbol_4)).arr[x_340] = x_367; } } while (true) { @@ -174,8 +174,8 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co k = as_type((as_type(x_383) + as_type(1))); int const x_385 = i; i = as_type((as_type(x_385) + as_type(1))); - int const x_388 = (*(tint_symbol_5)).arr[x_385]; - (*(tint_symbol_6)).arr[x_383] = x_388; + int const x_388 = (*(tint_symbol_3)).arr[x_385]; + (*(tint_symbol_4)).arr[x_383] = x_388; } int const x_390 = *(from); i_1 = x_390; @@ -188,8 +188,8 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co } int const x_399 = i_1; int const x_400 = i_1; - int const x_402 = (*(tint_symbol_6)).arr[x_400]; - (*(tint_symbol_5)).arr[x_399] = x_402; + int const x_402 = (*(tint_symbol_4)).arr[x_400]; + (*(tint_symbol_3)).arr[x_399] = x_402; { int const x_404 = i_1; i_1 = as_type((as_type(x_404) + as_type(1))); @@ -198,7 +198,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co return; } -void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -243,7 +243,7 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo param_1 = x_437; int const x_438 = to_1; param_2 = x_438; - merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_440 = m; int const x_442 = i_2; @@ -258,7 +258,7 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -269,52 +269,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_94) { case 9: { int const x_124 = i_3; - (*(tint_symbol_9)).arr[x_124] = -5; + (*(tint_symbol_7)).arr[x_124] = -5; break; } case 8: { int const x_122 = i_3; - (*(tint_symbol_9)).arr[x_122] = -4; + (*(tint_symbol_7)).arr[x_122] = -4; break; } case 7: { int const x_120 = i_3; - (*(tint_symbol_9)).arr[x_120] = -3; + (*(tint_symbol_7)).arr[x_120] = -3; break; } case 6: { int const x_118 = i_3; - (*(tint_symbol_9)).arr[x_118] = -2; + (*(tint_symbol_7)).arr[x_118] = -2; break; } case 5: { int const x_116 = i_3; - (*(tint_symbol_9)).arr[x_116] = -1; + (*(tint_symbol_7)).arr[x_116] = -1; break; } case 4: { int const x_114 = i_3; - (*(tint_symbol_9)).arr[x_114] = 0; + (*(tint_symbol_7)).arr[x_114] = 0; break; } case 3: { int const x_112 = i_3; - (*(tint_symbol_9)).arr[x_112] = 1; + (*(tint_symbol_7)).arr[x_112] = 1; break; } case 2: { int const x_110 = i_3; - (*(tint_symbol_9)).arr[x_110] = 2; + (*(tint_symbol_7)).arr[x_110] = 2; break; } case 1: { int const x_108 = i_3; - (*(tint_symbol_9)).arr[x_108] = 3; + (*(tint_symbol_7)).arr[x_108] = 3; break; } case 0: { int const x_106 = i_3; - (*(tint_symbol_9)).arr[x_106] = 4; + (*(tint_symbol_7)).arr[x_106] = 4; break; } default: { @@ -340,56 +340,56 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_137 = j_1; int const x_138 = j_1; - int const x_140 = (*(tint_symbol_9)).arr[x_138]; - (*(tint_symbol_10)).arr[x_137] = x_140; + int const x_140 = (*(tint_symbol_7)).arr[x_138]; + (*(tint_symbol_8)).arr[x_137] = x_140; { int const x_142 = j_1; j_1 = as_type((as_type(x_142) + as_type(1))); } } - mergeSort_(x_28, tint_symbol_9, tint_symbol_10); - float const x_146 = (*(tint_symbol_11)).y; + mergeSort_(x_28, tint_symbol_7, tint_symbol_8); + float const x_146 = (*(tint_symbol_9)).y; if ((int(x_146) < 30)) { - int const x_153 = (*(tint_symbol_9)).arr[0]; + int const x_153 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_153) / 10.0f)); } else { - float const x_158 = (*(tint_symbol_11)).y; + float const x_158 = (*(tint_symbol_9)).y; if ((int(x_158) < 60)) { - int const x_165 = (*(tint_symbol_9)).arr[1]; + int const x_165 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_165) / 10.0f)); } else { - float const x_170 = (*(tint_symbol_11)).y; + float const x_170 = (*(tint_symbol_9)).y; if ((int(x_170) < 90)) { - int const x_177 = (*(tint_symbol_9)).arr[2]; + int const x_177 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_177) / 10.0f)); } else { - float const x_182 = (*(tint_symbol_11)).y; + float const x_182 = (*(tint_symbol_9)).y; if ((int(x_182) < 120)) { - int const x_189 = (*(tint_symbol_9)).arr[3]; + int const x_189 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_189) / 10.0f)); } else { - float const x_194 = (*(tint_symbol_11)).y; + float const x_194 = (*(tint_symbol_9)).y; if ((int(x_194) < 150)) { discard_fragment(); } else { - float const x_201 = (*(tint_symbol_11)).y; + float const x_201 = (*(tint_symbol_9)).y; if ((int(x_201) < 180)) { - int const x_208 = (*(tint_symbol_9)).arr[5]; + int const x_208 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_208) / 10.0f)); } else { - float const x_213 = (*(tint_symbol_11)).y; + float const x_213 = (*(tint_symbol_9)).y; if ((int(x_213) < 210)) { - int const x_220 = (*(tint_symbol_9)).arr[6]; + int const x_220 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_220) / 10.0f)); } else { - float const x_225 = (*(tint_symbol_11)).y; + float const x_225 = (*(tint_symbol_9)).y; if ((int(x_225) < 240)) { - int const x_232 = (*(tint_symbol_9)).arr[7]; + int const x_232 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_232) / 10.0f)); } else { - float const x_237 = (*(tint_symbol_11)).y; + float const x_237 = (*(tint_symbol_9)).y; if ((int(x_237) < 270)) { - int const x_244 = (*(tint_symbol_9)).arr[8]; + int const x_244 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_244) / 10.0f)); } else { discard_fragment(); @@ -404,19 +404,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_248 = grey; float3 const x_249 = float3(x_248, x_248, x_248); - *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f); + *(tint_symbol_10) = float4(x_249.x, x_249.y, x_249.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.hlsl index 316ccb0387..47787ab123 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.hlsl @@ -354,11 +354,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl index a814f01299..a7866a2ecf 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -57,9 +57,9 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co break; } int const x_272 = i; - int const x_274 = (*(tint_symbol_5)).arr[x_272]; + int const x_274 = (*(tint_symbol_3)).arr[x_272]; int const x_275 = j; - int const x_277 = (*(tint_symbol_5)).arr[x_275]; + int const x_277 = (*(tint_symbol_3)).arr[x_275]; bool const x_278 = (x_274 < x_277); if (x_278) { x_283 = k; @@ -98,7 +98,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co } int const x_313 = 0; if (x_278) { - x_318 = (*(tint_symbol_5)).arr[x_307]; + x_318 = (*(tint_symbol_3)).arr[x_307]; float const x_320 = x_28.injectionSwitch.y; x_326_phi = x_318; if (!((0.0f <= x_320))) { @@ -115,7 +115,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co } int const x_326 = x_326_phi; if (x_278) { - (*(tint_symbol_6)).arr[x_285] = select(x_313, x_326, x_278); + (*(tint_symbol_4)).arr[x_285] = select(x_313, x_326, x_278); } if (x_278) { x_337 = 0; @@ -152,13 +152,13 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co x_364 = 0; x_365_phi = x_364; } else { - x_363 = (*(tint_symbol_5)).arr[x_355]; + x_363 = (*(tint_symbol_3)).arr[x_355]; x_365_phi = x_363; } int const x_365 = x_365_phi; if (x_278) { } else { - (*(tint_symbol_6)).arr[x_338] = x_365; + (*(tint_symbol_4)).arr[x_338] = x_365; } } while (true) { @@ -173,8 +173,8 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co k = as_type((as_type(x_381) + as_type(1))); int const x_383 = i; i = as_type((as_type(x_383) + as_type(1))); - int const x_386 = (*(tint_symbol_5)).arr[x_383]; - (*(tint_symbol_6)).arr[x_381] = x_386; + int const x_386 = (*(tint_symbol_3)).arr[x_383]; + (*(tint_symbol_4)).arr[x_381] = x_386; } int const x_388 = *(from); i_1 = x_388; @@ -187,8 +187,8 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co } int const x_397 = i_1; int const x_398 = i_1; - int const x_400 = (*(tint_symbol_6)).arr[x_398]; - (*(tint_symbol_5)).arr[x_397] = x_400; + int const x_400 = (*(tint_symbol_4)).arr[x_398]; + (*(tint_symbol_3)).arr[x_397] = x_400; { int const x_402 = i_1; i_1 = as_type((as_type(x_402) + as_type(1))); @@ -197,7 +197,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co return; } -void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -242,7 +242,7 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo param_1 = x_435; int const x_436 = to_1; param_2 = x_436; - merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_438 = m; int const x_440 = i_2; @@ -257,7 +257,7 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -268,52 +268,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_94) { case 9: { int const x_124 = i_3; - (*(tint_symbol_9)).arr[x_124] = -5; + (*(tint_symbol_7)).arr[x_124] = -5; break; } case 8: { int const x_122 = i_3; - (*(tint_symbol_9)).arr[x_122] = -4; + (*(tint_symbol_7)).arr[x_122] = -4; break; } case 7: { int const x_120 = i_3; - (*(tint_symbol_9)).arr[x_120] = -3; + (*(tint_symbol_7)).arr[x_120] = -3; break; } case 6: { int const x_118 = i_3; - (*(tint_symbol_9)).arr[x_118] = -2; + (*(tint_symbol_7)).arr[x_118] = -2; break; } case 5: { int const x_116 = i_3; - (*(tint_symbol_9)).arr[x_116] = -1; + (*(tint_symbol_7)).arr[x_116] = -1; break; } case 4: { int const x_114 = i_3; - (*(tint_symbol_9)).arr[x_114] = 0; + (*(tint_symbol_7)).arr[x_114] = 0; break; } case 3: { int const x_112 = i_3; - (*(tint_symbol_9)).arr[x_112] = 1; + (*(tint_symbol_7)).arr[x_112] = 1; break; } case 2: { int const x_110 = i_3; - (*(tint_symbol_9)).arr[x_110] = 2; + (*(tint_symbol_7)).arr[x_110] = 2; break; } case 1: { int const x_108 = i_3; - (*(tint_symbol_9)).arr[x_108] = 3; + (*(tint_symbol_7)).arr[x_108] = 3; break; } case 0: { int const x_106 = i_3; - (*(tint_symbol_9)).arr[x_106] = 4; + (*(tint_symbol_7)).arr[x_106] = 4; break; } default: { @@ -339,56 +339,56 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_137 = j_1; int const x_138 = j_1; - int const x_140 = (*(tint_symbol_9)).arr[x_138]; - (*(tint_symbol_10)).arr[x_137] = x_140; + int const x_140 = (*(tint_symbol_7)).arr[x_138]; + (*(tint_symbol_8)).arr[x_137] = x_140; { int const x_142 = j_1; j_1 = as_type((as_type(x_142) + as_type(1))); } } - mergeSort_(x_28, tint_symbol_9, tint_symbol_10); - float const x_146 = (*(tint_symbol_11)).y; + mergeSort_(x_28, tint_symbol_7, tint_symbol_8); + float const x_146 = (*(tint_symbol_9)).y; if ((int(x_146) < 30)) { - int const x_153 = (*(tint_symbol_9)).arr[0]; + int const x_153 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_153) / 10.0f)); } else { - float const x_158 = (*(tint_symbol_11)).y; + float const x_158 = (*(tint_symbol_9)).y; if ((int(x_158) < 60)) { - int const x_165 = (*(tint_symbol_9)).arr[1]; + int const x_165 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_165) / 10.0f)); } else { - float const x_170 = (*(tint_symbol_11)).y; + float const x_170 = (*(tint_symbol_9)).y; if ((int(x_170) < 90)) { - int const x_177 = (*(tint_symbol_9)).arr[2]; + int const x_177 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_177) / 10.0f)); } else { - float const x_182 = (*(tint_symbol_11)).y; + float const x_182 = (*(tint_symbol_9)).y; if ((int(x_182) < 120)) { - int const x_189 = (*(tint_symbol_9)).arr[3]; + int const x_189 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_189) / 10.0f)); } else { - float const x_194 = (*(tint_symbol_11)).y; + float const x_194 = (*(tint_symbol_9)).y; if ((int(x_194) < 150)) { discard_fragment(); } else { - float const x_201 = (*(tint_symbol_11)).y; + float const x_201 = (*(tint_symbol_9)).y; if ((int(x_201) < 180)) { - int const x_208 = (*(tint_symbol_9)).arr[5]; + int const x_208 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_208) / 10.0f)); } else { - float const x_213 = (*(tint_symbol_11)).y; + float const x_213 = (*(tint_symbol_9)).y; if ((int(x_213) < 210)) { - int const x_220 = (*(tint_symbol_9)).arr[6]; + int const x_220 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_220) / 10.0f)); } else { - float const x_225 = (*(tint_symbol_11)).y; + float const x_225 = (*(tint_symbol_9)).y; if ((int(x_225) < 240)) { - int const x_232 = (*(tint_symbol_9)).arr[7]; + int const x_232 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_232) / 10.0f)); } else { - float const x_237 = (*(tint_symbol_11)).y; + float const x_237 = (*(tint_symbol_9)).y; if ((int(x_237) < 270)) { - int const x_244 = (*(tint_symbol_9)).arr[8]; + int const x_244 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_244) / 10.0f)); } else { discard_fragment(); @@ -403,19 +403,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_248 = grey; float3 const x_249 = float3(x_248, x_248, x_248); - *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f); + *(tint_symbol_10) = float4(x_249.x, x_249.y, x_249.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.hlsl index 9cf6e4b4ba..5f44e60dc2 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.hlsl @@ -362,11 +362,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.msl index ce84bf66e1..82af62cf9d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -57,9 +57,9 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co break; } int const x_272 = i; - int const x_274 = (*(tint_symbol_5)).arr[x_272]; + int const x_274 = (*(tint_symbol_3)).arr[x_272]; int const x_275 = j; - int const x_277 = (*(tint_symbol_5)).arr[x_275]; + int const x_277 = (*(tint_symbol_3)).arr[x_275]; bool const x_278 = (x_274 < x_277); if (x_278) { x_283 = k; @@ -98,7 +98,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co } int const x_313 = 0; if (x_278) { - x_318 = (*(tint_symbol_5)).arr[x_307]; + x_318 = (*(tint_symbol_3)).arr[x_307]; float const x_320 = x_28.injectionSwitch.y; x_326_phi = x_318; if (!((0.0f <= x_320))) { @@ -115,7 +115,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co } int const x_326 = x_326_phi; if (x_278) { - (*(tint_symbol_6)).arr[x_285] = select(x_313, x_326, x_278); + (*(tint_symbol_4)).arr[x_285] = select(x_313, x_326, x_278); } if (x_278) { x_337 = 0; @@ -152,13 +152,13 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co x_364 = 0; x_365_phi = x_364; } else { - x_363 = (*(tint_symbol_5)).arr[x_355]; + x_363 = (*(tint_symbol_3)).arr[x_355]; x_365_phi = x_363; } int const x_365 = x_365_phi; if (x_278) { } else { - (*(tint_symbol_6)).arr[x_338] = x_365; + (*(tint_symbol_4)).arr[x_338] = x_365; } } while (true) { @@ -173,8 +173,8 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co k = as_type((as_type(x_381) + as_type(1))); int const x_383 = i; i = as_type((as_type(x_383) + as_type(1))); - int const x_386 = (*(tint_symbol_5)).arr[x_383]; - (*(tint_symbol_6)).arr[x_381] = x_386; + int const x_386 = (*(tint_symbol_3)).arr[x_383]; + (*(tint_symbol_4)).arr[x_381] = x_386; } int const x_388 = *(from); i_1 = x_388; @@ -187,8 +187,8 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co } int const x_397 = i_1; int const x_398 = i_1; - int const x_400 = (*(tint_symbol_6)).arr[x_398]; - (*(tint_symbol_5)).arr[x_397] = x_400; + int const x_400 = (*(tint_symbol_4)).arr[x_398]; + (*(tint_symbol_3)).arr[x_397] = x_400; { int const x_402 = i_1; i_1 = as_type((as_type(x_402) + as_type(1))); @@ -197,7 +197,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co return; } -void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -242,7 +242,7 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo param_1 = x_435; int const x_436 = to_1; param_2 = x_436; - merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_438 = m; int const x_440 = i_2; @@ -257,7 +257,7 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -268,52 +268,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_94) { case 9: { int const x_124 = i_3; - (*(tint_symbol_9)).arr[x_124] = -5; + (*(tint_symbol_7)).arr[x_124] = -5; break; } case 8: { int const x_122 = i_3; - (*(tint_symbol_9)).arr[x_122] = -4; + (*(tint_symbol_7)).arr[x_122] = -4; break; } case 7: { int const x_120 = i_3; - (*(tint_symbol_9)).arr[x_120] = -3; + (*(tint_symbol_7)).arr[x_120] = -3; break; } case 6: { int const x_118 = i_3; - (*(tint_symbol_9)).arr[x_118] = -2; + (*(tint_symbol_7)).arr[x_118] = -2; break; } case 5: { int const x_116 = i_3; - (*(tint_symbol_9)).arr[x_116] = -1; + (*(tint_symbol_7)).arr[x_116] = -1; break; } case 4: { int const x_114 = i_3; - (*(tint_symbol_9)).arr[x_114] = 0; + (*(tint_symbol_7)).arr[x_114] = 0; break; } case 3: { int const x_112 = i_3; - (*(tint_symbol_9)).arr[x_112] = 1; + (*(tint_symbol_7)).arr[x_112] = 1; break; } case 2: { int const x_110 = i_3; - (*(tint_symbol_9)).arr[x_110] = 2; + (*(tint_symbol_7)).arr[x_110] = 2; break; } case 1: { int const x_108 = i_3; - (*(tint_symbol_9)).arr[x_108] = 3; + (*(tint_symbol_7)).arr[x_108] = 3; break; } case 0: { int const x_106 = i_3; - (*(tint_symbol_9)).arr[x_106] = 4; + (*(tint_symbol_7)).arr[x_106] = 4; break; } default: { @@ -339,56 +339,56 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_137 = j_1; int const x_138 = j_1; - int const x_140 = (*(tint_symbol_9)).arr[x_138]; - (*(tint_symbol_10)).arr[x_137] = x_140; + int const x_140 = (*(tint_symbol_7)).arr[x_138]; + (*(tint_symbol_8)).arr[x_137] = x_140; { int const x_142 = j_1; j_1 = as_type((as_type(x_142) + as_type(1))); } } - mergeSort_(x_28, tint_symbol_9, tint_symbol_10); - float const x_146 = (*(tint_symbol_11)).y; + mergeSort_(x_28, tint_symbol_7, tint_symbol_8); + float const x_146 = (*(tint_symbol_9)).y; if ((int(x_146) < 30)) { - int const x_153 = (*(tint_symbol_9)).arr[0]; + int const x_153 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_153) / 10.0f)); } else { - float const x_158 = (*(tint_symbol_11)).y; + float const x_158 = (*(tint_symbol_9)).y; if ((int(x_158) < 60)) { - int const x_165 = (*(tint_symbol_9)).arr[1]; + int const x_165 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_165) / 10.0f)); } else { - float const x_170 = (*(tint_symbol_11)).y; + float const x_170 = (*(tint_symbol_9)).y; if ((int(x_170) < 90)) { - int const x_177 = (*(tint_symbol_9)).arr[2]; + int const x_177 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_177) / 10.0f)); } else { - float const x_182 = (*(tint_symbol_11)).y; + float const x_182 = (*(tint_symbol_9)).y; if ((int(x_182) < 120)) { - int const x_189 = (*(tint_symbol_9)).arr[3]; + int const x_189 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_189) / 10.0f)); } else { - float const x_194 = (*(tint_symbol_11)).y; + float const x_194 = (*(tint_symbol_9)).y; if ((int(x_194) < 150)) { discard_fragment(); } else { - float const x_201 = (*(tint_symbol_11)).y; + float const x_201 = (*(tint_symbol_9)).y; if ((int(x_201) < 180)) { - int const x_208 = (*(tint_symbol_9)).arr[5]; + int const x_208 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_208) / 10.0f)); } else { - float const x_213 = (*(tint_symbol_11)).y; + float const x_213 = (*(tint_symbol_9)).y; if ((int(x_213) < 210)) { - int const x_220 = (*(tint_symbol_9)).arr[6]; + int const x_220 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_220) / 10.0f)); } else { - float const x_225 = (*(tint_symbol_11)).y; + float const x_225 = (*(tint_symbol_9)).y; if ((int(x_225) < 240)) { - int const x_232 = (*(tint_symbol_9)).arr[7]; + int const x_232 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_232) / 10.0f)); } else { - float const x_237 = (*(tint_symbol_11)).y; + float const x_237 = (*(tint_symbol_9)).y; if ((int(x_237) < 270)) { - int const x_244 = (*(tint_symbol_9)).arr[8]; + int const x_244 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_244) / 10.0f)); } else { discard_fragment(); @@ -403,19 +403,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_248 = grey; float3 const x_249 = float3(x_248, x_248, x_248); - *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f); + *(tint_symbol_10) = float4(x_249.x, x_249.y, x_249.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.hlsl index 11f7dec97c..926a578291 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.hlsl @@ -168,8 +168,8 @@ void main_1() { const int x_170 = x_91; const int x_171 = x_92; const int x_173[10] = data; - const int tint_symbol_5[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - data = tint_symbol_5; + const int tint_symbol_4[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + data = tint_symbol_4; data = x_173; x_89 = ((x_170 + x_171) - 1); x_88 = min(((x_91 + (2 * x_92)) - 1), x_93); @@ -251,13 +251,18 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } void mergeSort_() { diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl index 4f62633df6..98f46a0f4d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_4, thread tint_array_wrapper* const tint_symbol_5) { int k = 0; int i = 0; int j = 0; @@ -35,23 +35,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_319 = i; - int const x_321 = (*(tint_symbol_6)).arr[x_319]; + int const x_321 = (*(tint_symbol_4)).arr[x_319]; int const x_322 = j; - int const x_324 = (*(tint_symbol_6)).arr[x_322]; + int const x_324 = (*(tint_symbol_4)).arr[x_322]; if ((x_321 < x_324)) { int const x_329 = k; k = as_type((as_type(x_329) + as_type(1))); int const x_331 = i; i = as_type((as_type(x_331) + as_type(1))); - int const x_334 = (*(tint_symbol_6)).arr[x_331]; - (*(tint_symbol_7)).arr[x_329] = x_334; + int const x_334 = (*(tint_symbol_4)).arr[x_331]; + (*(tint_symbol_5)).arr[x_329] = x_334; } else { int const x_336 = k; k = as_type((as_type(x_336) + as_type(1))); int const x_338 = j; j = as_type((as_type(x_338) + as_type(1))); - int const x_341 = (*(tint_symbol_6)).arr[x_338]; - (*(tint_symbol_7)).arr[x_336] = x_341; + int const x_341 = (*(tint_symbol_4)).arr[x_338]; + (*(tint_symbol_5)).arr[x_336] = x_341; } } while (true) { @@ -66,8 +66,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_354) + as_type(1))); int const x_356 = i; i = as_type((as_type(x_356) + as_type(1))); - int const x_359 = (*(tint_symbol_6)).arr[x_356]; - (*(tint_symbol_7)).arr[x_354] = x_359; + int const x_359 = (*(tint_symbol_4)).arr[x_356]; + (*(tint_symbol_5)).arr[x_354] = x_359; } int const x_361 = *(from); i_1 = x_361; @@ -80,8 +80,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_370 = i_1; int const x_371 = i_1; - int const x_373 = (*(tint_symbol_7)).arr[x_371]; - (*(tint_symbol_6)).arr[x_370] = x_373; + int const x_373 = (*(tint_symbol_5)).arr[x_371]; + (*(tint_symbol_4)).arr[x_370] = x_373; { int const x_375 = i_1; i_1 = as_type((as_type(x_375) + as_type(1))); @@ -90,7 +90,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { int x_85 = 0; int x_86 = 0; int x_87 = 0; @@ -111,52 +111,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, switch(x_102) { case 9: { int const x_132 = i_3; - (*(tint_symbol_8)).arr[x_132] = -5; + (*(tint_symbol_6)).arr[x_132] = -5; break; } case 8: { int const x_130 = i_3; - (*(tint_symbol_8)).arr[x_130] = -4; + (*(tint_symbol_6)).arr[x_130] = -4; break; } case 7: { int const x_128 = i_3; - (*(tint_symbol_8)).arr[x_128] = -3; + (*(tint_symbol_6)).arr[x_128] = -3; break; } case 6: { int const x_126 = i_3; - (*(tint_symbol_8)).arr[x_126] = -2; + (*(tint_symbol_6)).arr[x_126] = -2; break; } case 5: { int const x_124 = i_3; - (*(tint_symbol_8)).arr[x_124] = -1; + (*(tint_symbol_6)).arr[x_124] = -1; break; } case 4: { int const x_122 = i_3; - (*(tint_symbol_8)).arr[x_122] = 0; + (*(tint_symbol_6)).arr[x_122] = 0; break; } case 3: { int const x_120 = i_3; - (*(tint_symbol_8)).arr[x_120] = 1; + (*(tint_symbol_6)).arr[x_120] = 1; break; } case 2: { int const x_118 = i_3; - (*(tint_symbol_8)).arr[x_118] = 2; + (*(tint_symbol_6)).arr[x_118] = 2; break; } case 1: { int const x_116 = i_3; - (*(tint_symbol_8)).arr[x_116] = 3; + (*(tint_symbol_6)).arr[x_116] = 3; break; } case 0: { int const x_114 = i_3; - (*(tint_symbol_8)).arr[x_114] = 4; + (*(tint_symbol_6)).arr[x_114] = 4; break; } default: { @@ -182,8 +182,8 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, } int const x_145 = j_1; int const x_146 = j_1; - int const x_148 = (*(tint_symbol_8)).arr[x_146]; - (*(tint_symbol_9)).arr[x_145] = x_148; + int const x_148 = (*(tint_symbol_6)).arr[x_146]; + (*(tint_symbol_7)).arr[x_145] = x_148; { int const x_150 = j_1; j_1 = as_type((as_type(x_150) + as_type(1))); @@ -212,10 +212,10 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, x_90 = x_169; int const x_170 = x_91; int const x_171 = x_92; - tint_array_wrapper const x_173 = *(tint_symbol_8); - tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - *(tint_symbol_8) = tint_symbol_4; - *(tint_symbol_8) = x_173; + tint_array_wrapper const x_173 = *(tint_symbol_6); + tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + *(tint_symbol_6) = tint_symbol_2; + *(tint_symbol_6) = x_173; x_89 = as_type((as_type(as_type((as_type(x_170) + as_type(x_171)))) - as_type(1))); int const x_175 = x_91; int const x_176 = x_92; @@ -227,7 +227,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, x_86 = x_183; int const x_184 = x_88; x_85 = x_184; - merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_8, tint_symbol_9); + merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_6, tint_symbol_7); { int const x_186 = x_92; int const x_188 = x_91; @@ -239,48 +239,48 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, x_92 = as_type((as_type(2) * as_type(x_190))); } } - float const x_194 = (*(tint_symbol_10)).y; + float const x_194 = (*(tint_symbol_8)).y; if ((int(x_194) < 30)) { - int const x_201 = (*(tint_symbol_8)).arr[0]; + int const x_201 = (*(tint_symbol_6)).arr[0]; grey = (0.5f + (float(x_201) / 10.0f)); } else { - float const x_206 = (*(tint_symbol_10)).y; + float const x_206 = (*(tint_symbol_8)).y; if ((int(x_206) < 60)) { - int const x_213 = (*(tint_symbol_8)).arr[1]; + int const x_213 = (*(tint_symbol_6)).arr[1]; grey = (0.5f + (float(x_213) / 10.0f)); } else { - float const x_218 = (*(tint_symbol_10)).y; + float const x_218 = (*(tint_symbol_8)).y; if ((int(x_218) < 90)) { - int const x_225 = (*(tint_symbol_8)).arr[2]; + int const x_225 = (*(tint_symbol_6)).arr[2]; grey = (0.5f + (float(x_225) / 10.0f)); } else { - float const x_230 = (*(tint_symbol_10)).y; + float const x_230 = (*(tint_symbol_8)).y; if ((int(x_230) < 120)) { - int const x_237 = (*(tint_symbol_8)).arr[3]; + int const x_237 = (*(tint_symbol_6)).arr[3]; grey = (0.5f + (float(x_237) / 10.0f)); } else { - float const x_242 = (*(tint_symbol_10)).y; + float const x_242 = (*(tint_symbol_8)).y; if ((int(x_242) < 150)) { discard_fragment(); } else { - float const x_249 = (*(tint_symbol_10)).y; + float const x_249 = (*(tint_symbol_8)).y; if ((int(x_249) < 180)) { - int const x_256 = (*(tint_symbol_8)).arr[5]; + int const x_256 = (*(tint_symbol_6)).arr[5]; grey = (0.5f + (float(x_256) / 10.0f)); } else { - float const x_261 = (*(tint_symbol_10)).y; + float const x_261 = (*(tint_symbol_8)).y; if ((int(x_261) < 210)) { - int const x_268 = (*(tint_symbol_8)).arr[6]; + int const x_268 = (*(tint_symbol_6)).arr[6]; grey = (0.5f + (float(x_268) / 10.0f)); } else { - float const x_273 = (*(tint_symbol_10)).y; + float const x_273 = (*(tint_symbol_8)).y; if ((int(x_273) < 240)) { - int const x_280 = (*(tint_symbol_8)).arr[7]; + int const x_280 = (*(tint_symbol_6)).arr[7]; grey = (0.5f + (float(x_280) / 10.0f)); } else { - float const x_285 = (*(tint_symbol_10)).y; + float const x_285 = (*(tint_symbol_8)).y; if ((int(x_285) < 270)) { - int const x_292 = (*(tint_symbol_8)).arr[8]; + int const x_292 = (*(tint_symbol_6)).arr[8]; grey = (0.5f + (float(x_292) / 10.0f)); } else { discard_fragment(); @@ -295,23 +295,29 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, } float const x_296 = grey; float3 const x_297 = float3(x_296, x_296, x_296); - *(tint_symbol_11) = float4(x_297.x, x_297.y, x_297.z, 1.0f); + *(tint_symbol_9) = float4(x_297.x, x_297.y, x_297.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_12 = 0.0f; - thread tint_array_wrapper tint_symbol_13 = {}; - thread tint_array_wrapper tint_symbol_14 = {}; - thread float4 tint_symbol_15 = 0.0f; - tint_symbol_12 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_12), &(tint_symbol_15)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_15}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread tint_array_wrapper* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread float4* const tint_symbol_13) { + *(tint_symbol_10) = gl_FragCoord_param; + main_1(x_28, tint_symbol_11, tint_symbol_12, tint_symbol_10, tint_symbol_13); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_13)}; + return tint_symbol_3; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_16, thread tint_array_wrapper* const tint_symbol_17) { +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_14 = 0.0f; + thread tint_array_wrapper tint_symbol_15 = {}; + thread tint_array_wrapper tint_symbol_16 = {}; + thread float4 tint_symbol_17 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; +} + +void mergeSort_(thread tint_array_wrapper* const tint_symbol_18, thread tint_array_wrapper* const tint_symbol_19) { int low = 0; int high = 0; int m = 0; @@ -356,7 +362,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_16, thread tint_arr param_1 = x_408; int const x_409 = to_1; param_2 = x_409; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_16, tint_symbol_17); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_18, tint_symbol_19); { int const x_411 = m; int const x_413 = i_2; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.hlsl index 03b86e89e7..f0bce5519e 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.hlsl @@ -176,8 +176,8 @@ void main_1() { const int x_170 = x_91; const int x_171 = x_92; const int x_173[10] = data; - const int tint_symbol_5[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - data = tint_symbol_5; + const int tint_symbol_4[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + data = tint_symbol_4; data = x_173; x_89 = ((x_170 + x_171) - 1); x_88 = min(((x_91 + (2 * x_92)) - 1), x_93); @@ -259,13 +259,18 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } void mergeSort_() { diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.msl index 13c53829af..49f299eadb 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_4, thread tint_array_wrapper* const tint_symbol_5) { int k = 0; int i = 0; int j = 0; @@ -35,23 +35,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_319 = i; - int const x_321 = (*(tint_symbol_6)).arr[x_319]; + int const x_321 = (*(tint_symbol_4)).arr[x_319]; int const x_322 = j; - int const x_324 = (*(tint_symbol_6)).arr[x_322]; + int const x_324 = (*(tint_symbol_4)).arr[x_322]; if ((x_321 < x_324)) { int const x_329 = k; k = as_type((as_type(x_329) + as_type(1))); int const x_331 = i; i = as_type((as_type(x_331) + as_type(1))); - int const x_334 = (*(tint_symbol_6)).arr[x_331]; - (*(tint_symbol_7)).arr[x_329] = x_334; + int const x_334 = (*(tint_symbol_4)).arr[x_331]; + (*(tint_symbol_5)).arr[x_329] = x_334; } else { int const x_336 = k; k = as_type((as_type(x_336) + as_type(1))); int const x_338 = j; j = as_type((as_type(x_338) + as_type(1))); - int const x_341 = (*(tint_symbol_6)).arr[x_338]; - (*(tint_symbol_7)).arr[x_336] = x_341; + int const x_341 = (*(tint_symbol_4)).arr[x_338]; + (*(tint_symbol_5)).arr[x_336] = x_341; } } while (true) { @@ -66,8 +66,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_354) + as_type(1))); int const x_356 = i; i = as_type((as_type(x_356) + as_type(1))); - int const x_359 = (*(tint_symbol_6)).arr[x_356]; - (*(tint_symbol_7)).arr[x_354] = x_359; + int const x_359 = (*(tint_symbol_4)).arr[x_356]; + (*(tint_symbol_5)).arr[x_354] = x_359; } int const x_361 = *(from); i_1 = x_361; @@ -80,8 +80,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_370 = i_1; int const x_371 = i_1; - int const x_373 = (*(tint_symbol_7)).arr[x_371]; - (*(tint_symbol_6)).arr[x_370] = x_373; + int const x_373 = (*(tint_symbol_5)).arr[x_371]; + (*(tint_symbol_4)).arr[x_370] = x_373; { int const x_375 = i_1; i_1 = as_type((as_type(x_375) + as_type(1))); @@ -90,7 +90,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { int x_85 = 0; int x_86 = 0; int x_87 = 0; @@ -111,52 +111,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, switch(x_102) { case 9: { int const x_132 = i_3; - (*(tint_symbol_8)).arr[x_132] = -5; + (*(tint_symbol_6)).arr[x_132] = -5; break; } case 8: { int const x_130 = i_3; - (*(tint_symbol_8)).arr[x_130] = -4; + (*(tint_symbol_6)).arr[x_130] = -4; break; } case 7: { int const x_128 = i_3; - (*(tint_symbol_8)).arr[x_128] = -3; + (*(tint_symbol_6)).arr[x_128] = -3; break; } case 6: { int const x_126 = i_3; - (*(tint_symbol_8)).arr[x_126] = -2; + (*(tint_symbol_6)).arr[x_126] = -2; break; } case 5: { int const x_124 = i_3; - (*(tint_symbol_8)).arr[x_124] = -1; + (*(tint_symbol_6)).arr[x_124] = -1; break; } case 4: { int const x_122 = i_3; - (*(tint_symbol_8)).arr[x_122] = 0; + (*(tint_symbol_6)).arr[x_122] = 0; break; } case 3: { int const x_120 = i_3; - (*(tint_symbol_8)).arr[x_120] = 1; + (*(tint_symbol_6)).arr[x_120] = 1; break; } case 2: { int const x_118 = i_3; - (*(tint_symbol_8)).arr[x_118] = 2; + (*(tint_symbol_6)).arr[x_118] = 2; break; } case 1: { int const x_116 = i_3; - (*(tint_symbol_8)).arr[x_116] = 3; + (*(tint_symbol_6)).arr[x_116] = 3; break; } case 0: { int const x_114 = i_3; - (*(tint_symbol_8)).arr[x_114] = 4; + (*(tint_symbol_6)).arr[x_114] = 4; break; } default: { @@ -182,8 +182,8 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, } int const x_145 = j_1; int const x_146 = j_1; - int const x_148 = (*(tint_symbol_8)).arr[x_146]; - (*(tint_symbol_9)).arr[x_145] = x_148; + int const x_148 = (*(tint_symbol_6)).arr[x_146]; + (*(tint_symbol_7)).arr[x_145] = x_148; { int const x_150 = j_1; j_1 = as_type((as_type(x_150) + as_type(1))); @@ -212,10 +212,10 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, x_90 = x_169; int const x_170 = x_91; int const x_171 = x_92; - tint_array_wrapper const x_173 = *(tint_symbol_8); - tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - *(tint_symbol_8) = tint_symbol_4; - *(tint_symbol_8) = x_173; + tint_array_wrapper const x_173 = *(tint_symbol_6); + tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + *(tint_symbol_6) = tint_symbol_2; + *(tint_symbol_6) = x_173; x_89 = as_type((as_type(as_type((as_type(x_170) + as_type(x_171)))) - as_type(1))); int const x_175 = x_91; int const x_176 = x_92; @@ -227,7 +227,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, x_86 = x_183; int const x_184 = x_88; x_85 = x_184; - merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_8, tint_symbol_9); + merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_6, tint_symbol_7); { int const x_186 = x_92; int const x_188 = x_91; @@ -239,48 +239,48 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, x_92 = as_type((as_type(2) * as_type(x_190))); } } - float const x_194 = (*(tint_symbol_10)).y; + float const x_194 = (*(tint_symbol_8)).y; if ((int(x_194) < 30)) { - int const x_201 = (*(tint_symbol_8)).arr[0]; + int const x_201 = (*(tint_symbol_6)).arr[0]; grey = (0.5f + (float(x_201) / 10.0f)); } else { - float const x_206 = (*(tint_symbol_10)).y; + float const x_206 = (*(tint_symbol_8)).y; if ((int(x_206) < 60)) { - int const x_213 = (*(tint_symbol_8)).arr[1]; + int const x_213 = (*(tint_symbol_6)).arr[1]; grey = (0.5f + (float(x_213) / 10.0f)); } else { - float const x_218 = (*(tint_symbol_10)).y; + float const x_218 = (*(tint_symbol_8)).y; if ((int(x_218) < 90)) { - int const x_225 = (*(tint_symbol_8)).arr[2]; + int const x_225 = (*(tint_symbol_6)).arr[2]; grey = (0.5f + (float(x_225) / 10.0f)); } else { - float const x_230 = (*(tint_symbol_10)).y; + float const x_230 = (*(tint_symbol_8)).y; if ((int(x_230) < 120)) { - int const x_237 = (*(tint_symbol_8)).arr[3]; + int const x_237 = (*(tint_symbol_6)).arr[3]; grey = (0.5f + (float(x_237) / 10.0f)); } else { - float const x_242 = (*(tint_symbol_10)).y; + float const x_242 = (*(tint_symbol_8)).y; if ((int(x_242) < 150)) { discard_fragment(); } else { - float const x_249 = (*(tint_symbol_10)).y; + float const x_249 = (*(tint_symbol_8)).y; if ((int(x_249) < 180)) { - int const x_256 = (*(tint_symbol_8)).arr[5]; + int const x_256 = (*(tint_symbol_6)).arr[5]; grey = (0.5f + (float(x_256) / 10.0f)); } else { - float const x_261 = (*(tint_symbol_10)).y; + float const x_261 = (*(tint_symbol_8)).y; if ((int(x_261) < 210)) { - int const x_268 = (*(tint_symbol_8)).arr[6]; + int const x_268 = (*(tint_symbol_6)).arr[6]; grey = (0.5f + (float(x_268) / 10.0f)); } else { - float const x_273 = (*(tint_symbol_10)).y; + float const x_273 = (*(tint_symbol_8)).y; if ((int(x_273) < 240)) { - int const x_280 = (*(tint_symbol_8)).arr[7]; + int const x_280 = (*(tint_symbol_6)).arr[7]; grey = (0.5f + (float(x_280) / 10.0f)); } else { - float const x_285 = (*(tint_symbol_10)).y; + float const x_285 = (*(tint_symbol_8)).y; if ((int(x_285) < 270)) { - int const x_292 = (*(tint_symbol_8)).arr[8]; + int const x_292 = (*(tint_symbol_6)).arr[8]; grey = (0.5f + (float(x_292) / 10.0f)); } else { discard_fragment(); @@ -295,23 +295,29 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, } float const x_296 = grey; float3 const x_297 = float3(x_296, x_296, x_296); - *(tint_symbol_11) = float4(x_297.x, x_297.y, x_297.z, 1.0f); + *(tint_symbol_9) = float4(x_297.x, x_297.y, x_297.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_12 = 0.0f; - thread tint_array_wrapper tint_symbol_13 = {}; - thread tint_array_wrapper tint_symbol_14 = {}; - thread float4 tint_symbol_15 = 0.0f; - tint_symbol_12 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_12), &(tint_symbol_15)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_15}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread tint_array_wrapper* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread float4* const tint_symbol_13) { + *(tint_symbol_10) = gl_FragCoord_param; + main_1(x_28, tint_symbol_11, tint_symbol_12, tint_symbol_10, tint_symbol_13); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_13)}; + return tint_symbol_3; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_16, thread tint_array_wrapper* const tint_symbol_17) { +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_14 = 0.0f; + thread tint_array_wrapper tint_symbol_15 = {}; + thread tint_array_wrapper tint_symbol_16 = {}; + thread float4 tint_symbol_17 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; +} + +void mergeSort_(thread tint_array_wrapper* const tint_symbol_18, thread tint_array_wrapper* const tint_symbol_19) { int low = 0; int high = 0; int m = 0; @@ -356,7 +362,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_16, thread tint_arr param_1 = x_408; int const x_409 = to_1; param_2 = x_409; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_16, tint_symbol_17); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_18, tint_symbol_19); { int const x_411 = m; int const x_413 = i_2; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.hlsl index 4e85af22d3..8b5199a364 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.hlsl @@ -245,13 +245,18 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } void mergeSort_() { diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl index 865de8fa50..765912de2a 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -35,23 +35,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_318 = i; - int const x_320 = (*(tint_symbol_5)).arr[x_318]; + int const x_320 = (*(tint_symbol_3)).arr[x_318]; int const x_321 = j; - int const x_323 = (*(tint_symbol_5)).arr[x_321]; + int const x_323 = (*(tint_symbol_3)).arr[x_321]; if ((x_320 < x_323)) { int const x_328 = k; k = as_type((as_type(x_328) + as_type(1))); int const x_330 = i; i = as_type((as_type(x_330) + as_type(1))); - int const x_333 = (*(tint_symbol_5)).arr[x_330]; - (*(tint_symbol_6)).arr[x_328] = x_333; + int const x_333 = (*(tint_symbol_3)).arr[x_330]; + (*(tint_symbol_4)).arr[x_328] = x_333; } else { int const x_335 = k; k = as_type((as_type(x_335) + as_type(1))); int const x_337 = j; j = as_type((as_type(x_337) + as_type(1))); - int const x_340 = (*(tint_symbol_5)).arr[x_337]; - (*(tint_symbol_6)).arr[x_335] = x_340; + int const x_340 = (*(tint_symbol_3)).arr[x_337]; + (*(tint_symbol_4)).arr[x_335] = x_340; } } while (true) { @@ -66,8 +66,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_353) + as_type(1))); int const x_355 = i; i = as_type((as_type(x_355) + as_type(1))); - int const x_358 = (*(tint_symbol_5)).arr[x_355]; - (*(tint_symbol_6)).arr[x_353] = x_358; + int const x_358 = (*(tint_symbol_3)).arr[x_355]; + (*(tint_symbol_4)).arr[x_353] = x_358; } int const x_360 = *(from); i_1 = x_360; @@ -80,8 +80,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_369 = i_1; int const x_370 = i_1; - int const x_372 = (*(tint_symbol_6)).arr[x_370]; - (*(tint_symbol_5)).arr[x_369] = x_372; + int const x_372 = (*(tint_symbol_4)).arr[x_370]; + (*(tint_symbol_3)).arr[x_369] = x_372; { int const x_374 = i_1; i_1 = as_type((as_type(x_374) + as_type(1))); @@ -90,7 +90,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { int x_85 = 0; int x_86 = 0; int x_87 = 0; @@ -111,52 +111,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, switch(x_102) { case 9: { int const x_132 = i_3; - (*(tint_symbol_7)).arr[x_132] = -5; + (*(tint_symbol_5)).arr[x_132] = -5; break; } case 8: { int const x_130 = i_3; - (*(tint_symbol_7)).arr[x_130] = -4; + (*(tint_symbol_5)).arr[x_130] = -4; break; } case 7: { int const x_128 = i_3; - (*(tint_symbol_7)).arr[x_128] = -3; + (*(tint_symbol_5)).arr[x_128] = -3; break; } case 6: { int const x_126 = i_3; - (*(tint_symbol_7)).arr[x_126] = -2; + (*(tint_symbol_5)).arr[x_126] = -2; break; } case 5: { int const x_124 = i_3; - (*(tint_symbol_7)).arr[x_124] = -1; + (*(tint_symbol_5)).arr[x_124] = -1; break; } case 4: { int const x_122 = i_3; - (*(tint_symbol_7)).arr[x_122] = 0; + (*(tint_symbol_5)).arr[x_122] = 0; break; } case 3: { int const x_120 = i_3; - (*(tint_symbol_7)).arr[x_120] = 1; + (*(tint_symbol_5)).arr[x_120] = 1; break; } case 2: { int const x_118 = i_3; - (*(tint_symbol_7)).arr[x_118] = 2; + (*(tint_symbol_5)).arr[x_118] = 2; break; } case 1: { int const x_116 = i_3; - (*(tint_symbol_7)).arr[x_116] = 3; + (*(tint_symbol_5)).arr[x_116] = 3; break; } case 0: { int const x_114 = i_3; - (*(tint_symbol_7)).arr[x_114] = 4; + (*(tint_symbol_5)).arr[x_114] = 4; break; } default: { @@ -182,8 +182,8 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, } int const x_145 = j_1; int const x_146 = j_1; - int const x_148 = (*(tint_symbol_7)).arr[x_146]; - (*(tint_symbol_8)).arr[x_145] = x_148; + int const x_148 = (*(tint_symbol_5)).arr[x_146]; + (*(tint_symbol_6)).arr[x_145] = x_148; { int const x_150 = j_1; j_1 = as_type((as_type(x_150) + as_type(1))); @@ -223,7 +223,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, x_86 = x_182; int const x_183 = x_88; x_85 = x_183; - merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_5, tint_symbol_6); { int const x_185 = x_92; int const x_187 = x_91; @@ -235,48 +235,48 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, x_92 = as_type((as_type(2) * as_type(x_189))); } } - float const x_193 = (*(tint_symbol_9)).y; + float const x_193 = (*(tint_symbol_7)).y; if ((int(x_193) < 30)) { - int const x_200 = (*(tint_symbol_7)).arr[0]; + int const x_200 = (*(tint_symbol_5)).arr[0]; grey = (0.5f + (float(x_200) / 10.0f)); } else { - float const x_205 = (*(tint_symbol_9)).y; + float const x_205 = (*(tint_symbol_7)).y; if ((int(x_205) < 60)) { - int const x_212 = (*(tint_symbol_7)).arr[1]; + int const x_212 = (*(tint_symbol_5)).arr[1]; grey = (0.5f + (float(x_212) / 10.0f)); } else { - float const x_217 = (*(tint_symbol_9)).y; + float const x_217 = (*(tint_symbol_7)).y; if ((int(x_217) < 90)) { - int const x_224 = (*(tint_symbol_7)).arr[2]; + int const x_224 = (*(tint_symbol_5)).arr[2]; grey = (0.5f + (float(x_224) / 10.0f)); } else { - float const x_229 = (*(tint_symbol_9)).y; + float const x_229 = (*(tint_symbol_7)).y; if ((int(x_229) < 120)) { - int const x_236 = (*(tint_symbol_7)).arr[3]; + int const x_236 = (*(tint_symbol_5)).arr[3]; grey = (0.5f + (float(x_236) / 10.0f)); } else { - float const x_241 = (*(tint_symbol_9)).y; + float const x_241 = (*(tint_symbol_7)).y; if ((int(x_241) < 150)) { discard_fragment(); } else { - float const x_248 = (*(tint_symbol_9)).y; + float const x_248 = (*(tint_symbol_7)).y; if ((int(x_248) < 180)) { - int const x_255 = (*(tint_symbol_7)).arr[5]; + int const x_255 = (*(tint_symbol_5)).arr[5]; grey = (0.5f + (float(x_255) / 10.0f)); } else { - float const x_260 = (*(tint_symbol_9)).y; + float const x_260 = (*(tint_symbol_7)).y; if ((int(x_260) < 210)) { - int const x_267 = (*(tint_symbol_7)).arr[6]; + int const x_267 = (*(tint_symbol_5)).arr[6]; grey = (0.5f + (float(x_267) / 10.0f)); } else { - float const x_272 = (*(tint_symbol_9)).y; + float const x_272 = (*(tint_symbol_7)).y; if ((int(x_272) < 240)) { - int const x_279 = (*(tint_symbol_7)).arr[7]; + int const x_279 = (*(tint_symbol_5)).arr[7]; grey = (0.5f + (float(x_279) / 10.0f)); } else { - float const x_284 = (*(tint_symbol_9)).y; + float const x_284 = (*(tint_symbol_7)).y; if ((int(x_284) < 270)) { - int const x_291 = (*(tint_symbol_7)).arr[8]; + int const x_291 = (*(tint_symbol_5)).arr[8]; grey = (0.5f + (float(x_291) / 10.0f)); } else { discard_fragment(); @@ -291,23 +291,29 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, } float const x_295 = grey; float3 const x_296 = float3(x_295, x_295, x_295); - *(tint_symbol_10) = float4(x_296.x, x_296.y, x_296.z, 1.0f); + *(tint_symbol_8) = float4(x_296.x, x_296.y, x_296.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread tint_array_wrapper tint_symbol_12 = {}; - thread tint_array_wrapper tint_symbol_13 = {}; - thread float4 tint_symbol_14 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_11), &(tint_symbol_14)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_14}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread tint_array_wrapper* const tint_symbol_11, thread float4* const tint_symbol_12) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_28, tint_symbol_10, tint_symbol_11, tint_symbol_9, tint_symbol_12); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_12)}; + return tint_symbol_2; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_15, thread tint_array_wrapper* const tint_symbol_16) { +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_13 = 0.0f; + thread tint_array_wrapper tint_symbol_14 = {}; + thread tint_array_wrapper tint_symbol_15 = {}; + thread float4 tint_symbol_16 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; +} + +void mergeSort_(thread tint_array_wrapper* const tint_symbol_17, thread tint_array_wrapper* const tint_symbol_18) { int low = 0; int high = 0; int m = 0; @@ -352,7 +358,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_15, thread tint_arr param_1 = x_407; int const x_408 = to_1; param_2 = x_408; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_15, tint_symbol_16); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_17, tint_symbol_18); { int const x_410 = m; int const x_412 = i_2; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.hlsl index 30e945e64d..a6b3a4aa70 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.hlsl @@ -253,13 +253,18 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } void mergeSort_() { diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.msl index c9c9307a3a..0a20d9302b 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -35,23 +35,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_318 = i; - int const x_320 = (*(tint_symbol_5)).arr[x_318]; + int const x_320 = (*(tint_symbol_3)).arr[x_318]; int const x_321 = j; - int const x_323 = (*(tint_symbol_5)).arr[x_321]; + int const x_323 = (*(tint_symbol_3)).arr[x_321]; if ((x_320 < x_323)) { int const x_328 = k; k = as_type((as_type(x_328) + as_type(1))); int const x_330 = i; i = as_type((as_type(x_330) + as_type(1))); - int const x_333 = (*(tint_symbol_5)).arr[x_330]; - (*(tint_symbol_6)).arr[x_328] = x_333; + int const x_333 = (*(tint_symbol_3)).arr[x_330]; + (*(tint_symbol_4)).arr[x_328] = x_333; } else { int const x_335 = k; k = as_type((as_type(x_335) + as_type(1))); int const x_337 = j; j = as_type((as_type(x_337) + as_type(1))); - int const x_340 = (*(tint_symbol_5)).arr[x_337]; - (*(tint_symbol_6)).arr[x_335] = x_340; + int const x_340 = (*(tint_symbol_3)).arr[x_337]; + (*(tint_symbol_4)).arr[x_335] = x_340; } } while (true) { @@ -66,8 +66,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_353) + as_type(1))); int const x_355 = i; i = as_type((as_type(x_355) + as_type(1))); - int const x_358 = (*(tint_symbol_5)).arr[x_355]; - (*(tint_symbol_6)).arr[x_353] = x_358; + int const x_358 = (*(tint_symbol_3)).arr[x_355]; + (*(tint_symbol_4)).arr[x_353] = x_358; } int const x_360 = *(from); i_1 = x_360; @@ -80,8 +80,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_369 = i_1; int const x_370 = i_1; - int const x_372 = (*(tint_symbol_6)).arr[x_370]; - (*(tint_symbol_5)).arr[x_369] = x_372; + int const x_372 = (*(tint_symbol_4)).arr[x_370]; + (*(tint_symbol_3)).arr[x_369] = x_372; { int const x_374 = i_1; i_1 = as_type((as_type(x_374) + as_type(1))); @@ -90,7 +90,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { int x_85 = 0; int x_86 = 0; int x_87 = 0; @@ -111,52 +111,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, switch(x_102) { case 9: { int const x_132 = i_3; - (*(tint_symbol_7)).arr[x_132] = -5; + (*(tint_symbol_5)).arr[x_132] = -5; break; } case 8: { int const x_130 = i_3; - (*(tint_symbol_7)).arr[x_130] = -4; + (*(tint_symbol_5)).arr[x_130] = -4; break; } case 7: { int const x_128 = i_3; - (*(tint_symbol_7)).arr[x_128] = -3; + (*(tint_symbol_5)).arr[x_128] = -3; break; } case 6: { int const x_126 = i_3; - (*(tint_symbol_7)).arr[x_126] = -2; + (*(tint_symbol_5)).arr[x_126] = -2; break; } case 5: { int const x_124 = i_3; - (*(tint_symbol_7)).arr[x_124] = -1; + (*(tint_symbol_5)).arr[x_124] = -1; break; } case 4: { int const x_122 = i_3; - (*(tint_symbol_7)).arr[x_122] = 0; + (*(tint_symbol_5)).arr[x_122] = 0; break; } case 3: { int const x_120 = i_3; - (*(tint_symbol_7)).arr[x_120] = 1; + (*(tint_symbol_5)).arr[x_120] = 1; break; } case 2: { int const x_118 = i_3; - (*(tint_symbol_7)).arr[x_118] = 2; + (*(tint_symbol_5)).arr[x_118] = 2; break; } case 1: { int const x_116 = i_3; - (*(tint_symbol_7)).arr[x_116] = 3; + (*(tint_symbol_5)).arr[x_116] = 3; break; } case 0: { int const x_114 = i_3; - (*(tint_symbol_7)).arr[x_114] = 4; + (*(tint_symbol_5)).arr[x_114] = 4; break; } default: { @@ -182,8 +182,8 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, } int const x_145 = j_1; int const x_146 = j_1; - int const x_148 = (*(tint_symbol_7)).arr[x_146]; - (*(tint_symbol_8)).arr[x_145] = x_148; + int const x_148 = (*(tint_symbol_5)).arr[x_146]; + (*(tint_symbol_6)).arr[x_145] = x_148; { int const x_150 = j_1; j_1 = as_type((as_type(x_150) + as_type(1))); @@ -223,7 +223,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, x_86 = x_182; int const x_183 = x_88; x_85 = x_183; - merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_5, tint_symbol_6); { int const x_185 = x_92; int const x_187 = x_91; @@ -235,48 +235,48 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, x_92 = as_type((as_type(2) * as_type(x_189))); } } - float const x_193 = (*(tint_symbol_9)).y; + float const x_193 = (*(tint_symbol_7)).y; if ((int(x_193) < 30)) { - int const x_200 = (*(tint_symbol_7)).arr[0]; + int const x_200 = (*(tint_symbol_5)).arr[0]; grey = (0.5f + (float(x_200) / 10.0f)); } else { - float const x_205 = (*(tint_symbol_9)).y; + float const x_205 = (*(tint_symbol_7)).y; if ((int(x_205) < 60)) { - int const x_212 = (*(tint_symbol_7)).arr[1]; + int const x_212 = (*(tint_symbol_5)).arr[1]; grey = (0.5f + (float(x_212) / 10.0f)); } else { - float const x_217 = (*(tint_symbol_9)).y; + float const x_217 = (*(tint_symbol_7)).y; if ((int(x_217) < 90)) { - int const x_224 = (*(tint_symbol_7)).arr[2]; + int const x_224 = (*(tint_symbol_5)).arr[2]; grey = (0.5f + (float(x_224) / 10.0f)); } else { - float const x_229 = (*(tint_symbol_9)).y; + float const x_229 = (*(tint_symbol_7)).y; if ((int(x_229) < 120)) { - int const x_236 = (*(tint_symbol_7)).arr[3]; + int const x_236 = (*(tint_symbol_5)).arr[3]; grey = (0.5f + (float(x_236) / 10.0f)); } else { - float const x_241 = (*(tint_symbol_9)).y; + float const x_241 = (*(tint_symbol_7)).y; if ((int(x_241) < 150)) { discard_fragment(); } else { - float const x_248 = (*(tint_symbol_9)).y; + float const x_248 = (*(tint_symbol_7)).y; if ((int(x_248) < 180)) { - int const x_255 = (*(tint_symbol_7)).arr[5]; + int const x_255 = (*(tint_symbol_5)).arr[5]; grey = (0.5f + (float(x_255) / 10.0f)); } else { - float const x_260 = (*(tint_symbol_9)).y; + float const x_260 = (*(tint_symbol_7)).y; if ((int(x_260) < 210)) { - int const x_267 = (*(tint_symbol_7)).arr[6]; + int const x_267 = (*(tint_symbol_5)).arr[6]; grey = (0.5f + (float(x_267) / 10.0f)); } else { - float const x_272 = (*(tint_symbol_9)).y; + float const x_272 = (*(tint_symbol_7)).y; if ((int(x_272) < 240)) { - int const x_279 = (*(tint_symbol_7)).arr[7]; + int const x_279 = (*(tint_symbol_5)).arr[7]; grey = (0.5f + (float(x_279) / 10.0f)); } else { - float const x_284 = (*(tint_symbol_9)).y; + float const x_284 = (*(tint_symbol_7)).y; if ((int(x_284) < 270)) { - int const x_291 = (*(tint_symbol_7)).arr[8]; + int const x_291 = (*(tint_symbol_5)).arr[8]; grey = (0.5f + (float(x_291) / 10.0f)); } else { discard_fragment(); @@ -291,23 +291,29 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, } float const x_295 = grey; float3 const x_296 = float3(x_295, x_295, x_295); - *(tint_symbol_10) = float4(x_296.x, x_296.y, x_296.z, 1.0f); + *(tint_symbol_8) = float4(x_296.x, x_296.y, x_296.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread tint_array_wrapper tint_symbol_12 = {}; - thread tint_array_wrapper tint_symbol_13 = {}; - thread float4 tint_symbol_14 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_11), &(tint_symbol_14)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_14}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread tint_array_wrapper* const tint_symbol_11, thread float4* const tint_symbol_12) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_28, tint_symbol_10, tint_symbol_11, tint_symbol_9, tint_symbol_12); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_12)}; + return tint_symbol_2; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_15, thread tint_array_wrapper* const tint_symbol_16) { +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_13 = 0.0f; + thread tint_array_wrapper tint_symbol_14 = {}; + thread tint_array_wrapper tint_symbol_15 = {}; + thread float4 tint_symbol_16 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; +} + +void mergeSort_(thread tint_array_wrapper* const tint_symbol_17, thread tint_array_wrapper* const tint_symbol_18) { int low = 0; int high = 0; int m = 0; @@ -352,7 +358,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_15, thread tint_arr param_1 = x_407; int const x_408 = to_1; param_2 = x_408; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_15, tint_symbol_16); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_17, tint_symbol_18); { int const x_410 = m; int const x_412 = i_2; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.hlsl index 5a6f9c465e..074ee656a1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.hlsl @@ -77,8 +77,8 @@ void main_1() { x_113_phi = x_114; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_121 = indexable[x_116]; x_GLF_color = x_121; return; @@ -94,11 +94,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.msl index f711d31c26..79268ae127 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; int2 x_77 = 0; int2 x_110 = 0; @@ -28,7 +28,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float int x_80_phi = 0; int2 x_111_phi = 0; int2 x_113_phi = 0; - float4 const x_56 = *(tint_symbol_6); + float4 const x_56 = *(tint_symbol_4); float2 const x_59 = x_6.resolution; float2 const x_60 = (float2(x_56.x, x_56.y) / x_59); int const x_63 = int((x_60.x * 8.0f)); @@ -94,20 +94,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_113_phi = x_114; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float4 const x_121 = indexable.arr[x_116]; - *(tint_symbol_7) = x_121; + *(tint_symbol_5) = x_121; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.hlsl index 5a6f9c465e..074ee656a1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.hlsl @@ -77,8 +77,8 @@ void main_1() { x_113_phi = x_114; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_121 = indexable[x_116]; x_GLF_color = x_121; return; @@ -94,11 +94,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.msl index f711d31c26..79268ae127 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; int2 x_77 = 0; int2 x_110 = 0; @@ -28,7 +28,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float int x_80_phi = 0; int2 x_111_phi = 0; int2 x_113_phi = 0; - float4 const x_56 = *(tint_symbol_6); + float4 const x_56 = *(tint_symbol_4); float2 const x_59 = x_6.resolution; float2 const x_60 = (float2(x_56.x, x_56.y) / x_59); int const x_63 = int((x_60.x * 8.0f)); @@ -94,20 +94,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_113_phi = x_114; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float4 const x_121 = indexable.arr[x_116]; - *(tint_symbol_7) = x_121; + *(tint_symbol_5) = x_121; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.hlsl index 9baedc80cd..9e536da6a1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.hlsl @@ -77,11 +77,11 @@ void main_1() { x_116_phi = x_117; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_123[16] = indexable; - const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; - indexable = tint_symbol_6; + const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; + indexable = tint_symbol_5; indexable = x_123; const float4 x_125 = indexable[x_119]; x_GLF_color = x_125; @@ -98,11 +98,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.msl index 49c5889e46..2740551a64 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { tint_array_wrapper indexable = {}; int2 x_80 = 0; int2 x_113 = 0; @@ -28,7 +28,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float int x_83_phi = 0; int2 x_114_phi = 0; int2 x_116_phi = 0; - float4 const x_59 = *(tint_symbol_7); + float4 const x_59 = *(tint_symbol_5); float2 const x_62 = x_6.resolution; float2 const x_63 = (float2(x_59.x, x_59.y) / x_62); int const x_66 = int((x_63.x * 8.0f)); @@ -94,24 +94,30 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float x_116_phi = x_117; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; tint_array_wrapper const x_123 = indexable; - tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; - indexable = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; + indexable = tint_symbol_3; indexable = x_123; float4 const x_125 = indexable.arr[x_119]; - *(tint_symbol_8) = x_125; + *(tint_symbol_6) = x_125; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(x_6, tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_4; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.hlsl index 9baedc80cd..9e536da6a1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.hlsl @@ -77,11 +77,11 @@ void main_1() { x_116_phi = x_117; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_123[16] = indexable; - const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; - indexable = tint_symbol_6; + const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; + indexable = tint_symbol_5; indexable = x_123; const float4 x_125 = indexable[x_119]; x_GLF_color = x_125; @@ -98,11 +98,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.msl index 49c5889e46..2740551a64 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { tint_array_wrapper indexable = {}; int2 x_80 = 0; int2 x_113 = 0; @@ -28,7 +28,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float int x_83_phi = 0; int2 x_114_phi = 0; int2 x_116_phi = 0; - float4 const x_59 = *(tint_symbol_7); + float4 const x_59 = *(tint_symbol_5); float2 const x_62 = x_6.resolution; float2 const x_63 = (float2(x_59.x, x_59.y) / x_62); int const x_66 = int((x_63.x * 8.0f)); @@ -94,24 +94,30 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float x_116_phi = x_117; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; tint_array_wrapper const x_123 = indexable; - tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; - indexable = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; + indexable = tint_symbol_3; indexable = x_123; float4 const x_125 = indexable.arr[x_119]; - *(tint_symbol_8) = x_125; + *(tint_symbol_6) = x_125; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(x_6, tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_4; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.hlsl index d58e8dc1c3..f697ee25eb 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.hlsl @@ -78,8 +78,8 @@ void main_1() { x_112_phi = x_113; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_120 = indexable[x_115]; x_GLF_color = x_120; return; @@ -95,11 +95,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.msl index 15febd0dca..f592466fdd 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; int2 x_76 = 0; int2 x_109 = 0; @@ -28,7 +28,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float int x_79_phi = 0; int2 x_110_phi = 0; int2 x_112_phi = 0; - float4 const x_55 = *(tint_symbol_6); + float4 const x_55 = *(tint_symbol_4); float2 const x_58 = x_6.resolution; float2 const x_59 = (float2(x_55.x, x_55.y) / x_58); int const x_62 = int((x_59.x * 8.0f)); @@ -94,20 +94,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_112_phi = x_113; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float4 const x_120 = indexable.arr[x_115]; - *(tint_symbol_7) = x_120; + *(tint_symbol_5) = x_120; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.hlsl index d58e8dc1c3..f697ee25eb 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.hlsl @@ -78,8 +78,8 @@ void main_1() { x_112_phi = x_113; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_120 = indexable[x_115]; x_GLF_color = x_120; return; @@ -95,11 +95,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.msl index 15febd0dca..f592466fdd 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; int2 x_76 = 0; int2 x_109 = 0; @@ -28,7 +28,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float int x_79_phi = 0; int2 x_110_phi = 0; int2 x_112_phi = 0; - float4 const x_55 = *(tint_symbol_6); + float4 const x_55 = *(tint_symbol_4); float2 const x_58 = x_6.resolution; float2 const x_59 = (float2(x_55.x, x_55.y) / x_58); int const x_62 = int((x_59.x * 8.0f)); @@ -94,20 +94,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_112_phi = x_113; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float4 const x_120 = indexable.arr[x_115]; - *(tint_symbol_7) = x_120; + *(tint_symbol_5) = x_120; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.hlsl index 64c4e8415e..7136ec9ca7 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.hlsl @@ -78,11 +78,11 @@ void main_1() { x_116_phi = x_117; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_124[16] = indexable; - const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; - indexable = tint_symbol_6; + const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; + indexable = tint_symbol_5; indexable = x_124; const float4 x_125 = indexable[x_119]; x_GLF_color = x_125; @@ -99,11 +99,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.msl index c082298214..91a89515bc 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { tint_array_wrapper indexable = {}; int2 x_80 = 0; int2 x_113 = 0; @@ -28,7 +28,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float int x_83_phi = 0; int2 x_114_phi = 0; int2 x_116_phi = 0; - float4 const x_58 = *(tint_symbol_7); + float4 const x_58 = *(tint_symbol_5); float2 const x_61 = x_6.resolution; float2 const x_62 = (float2(x_58.x, x_58.y) / x_61); int const x_65 = int((x_62.x * 8.0f)); @@ -94,24 +94,30 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float x_116_phi = x_117; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; tint_array_wrapper const x_124 = indexable; - tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; - indexable = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; + indexable = tint_symbol_3; indexable = x_124; float4 const x_125 = indexable.arr[x_119]; - *(tint_symbol_8) = x_125; + *(tint_symbol_6) = x_125; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(x_6, tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_4; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.hlsl index 64c4e8415e..7136ec9ca7 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.hlsl @@ -78,11 +78,11 @@ void main_1() { x_116_phi = x_117; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_124[16] = indexable; - const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; - indexable = tint_symbol_6; + const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; + indexable = tint_symbol_5; indexable = x_124; const float4 x_125 = indexable[x_119]; x_GLF_color = x_125; @@ -99,11 +99,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.msl index c082298214..91a89515bc 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { tint_array_wrapper indexable = {}; int2 x_80 = 0; int2 x_113 = 0; @@ -28,7 +28,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float int x_83_phi = 0; int2 x_114_phi = 0; int2 x_116_phi = 0; - float4 const x_58 = *(tint_symbol_7); + float4 const x_58 = *(tint_symbol_5); float2 const x_61 = x_6.resolution; float2 const x_62 = (float2(x_58.x, x_58.y) / x_61); int const x_65 = int((x_62.x * 8.0f)); @@ -94,24 +94,30 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float x_116_phi = x_117; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; tint_array_wrapper const x_124 = indexable; - tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; - indexable = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; + indexable = tint_symbol_3; indexable = x_124; float4 const x_125 = indexable.arr[x_119]; - *(tint_symbol_8) = x_125; + *(tint_symbol_6) = x_125; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(x_6, tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_4; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.hlsl index d1b1da575b..8ee9d11899 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.hlsl @@ -78,8 +78,8 @@ void main_1() { x_116_phi = x_117; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_124 = indexable[x_119]; x_GLF_color = x_124; return; @@ -95,11 +95,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.msl index ca93b97976..ee53aba53b 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; int2 x_80 = 0; int2 x_113 = 0; @@ -28,7 +28,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float int x_83_phi = 0; int2 x_114_phi = 0; int2 x_116_phi = 0; - float4 const x_58 = *(tint_symbol_6); + float4 const x_58 = *(tint_symbol_4); float2 const x_61 = x_6.resolution; float2 const x_62 = (float2(x_58.x, x_58.y) / x_61); int const x_65 = int((x_62.x * 8.0f)); @@ -94,20 +94,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_116_phi = x_117; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float4 const x_124 = indexable.arr[x_119]; - *(tint_symbol_7) = x_124; + *(tint_symbol_5) = x_124; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.hlsl index d1b1da575b..8ee9d11899 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.hlsl @@ -78,8 +78,8 @@ void main_1() { x_116_phi = x_117; } } - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_124 = indexable[x_119]; x_GLF_color = x_124; return; @@ -95,11 +95,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.msl index ca93b97976..ee53aba53b 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { tint_array_wrapper indexable = {}; int2 x_80 = 0; int2 x_113 = 0; @@ -28,7 +28,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float int x_83_phi = 0; int2 x_114_phi = 0; int2 x_116_phi = 0; - float4 const x_58 = *(tint_symbol_6); + float4 const x_58 = *(tint_symbol_4); float2 const x_61 = x_6.resolution; float2 const x_62 = (float2(x_58.x, x_58.y) / x_61); int const x_65 = int((x_62.x * 8.0f)); @@ -94,20 +94,26 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_116_phi = x_117; } } - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float4 const x_124 = indexable.arr[x_119]; - *(tint_symbol_7) = x_124; + *(tint_symbol_5) = x_124; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_6, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.hlsl index 375d7550e5..83b3b09863 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.hlsl @@ -36,13 +36,13 @@ void main_1() { break; } const int x_221 = x_214.x; - const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_196 = tint_symbol_5; + const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_196 = tint_symbol_4; const int x_223 = x_196[x_217]; const bool x_225 = (x_221 < (x_223 + 15)); if (x_225) { - const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_197 = tint_symbol_6; + const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_197 = tint_symbol_5; } if (x_225) { x_233 = x_197[x_217]; @@ -58,8 +58,8 @@ void main_1() { x_241_phi = x_225; } if (x_241_phi) { - const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_198 = tint_symbol_7; + const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_198 = tint_symbol_6; const int x_245 = x_198[x_217]; const float x_250 = ((15.0f - abs(float((x_221 - x_245)))) * 0.06666667f); x_251 = float4(x_250, x_250, x_250, 1.0f); @@ -98,11 +98,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; + const main_out tint_symbol_7 = {x_GLF_color}; + return tint_symbol_7; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.msl index bd5afe6dbb..042ed0c658 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { tint_array_wrapper x_196 = {}; tint_array_wrapper x_197 = {}; tint_array_wrapper x_198 = {}; @@ -25,7 +25,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float float4 x_253_phi = 0.0f; bool x_254_phi = false; float4 x_256_phi = 0.0f; - float4 const x_199 = *(tint_symbol_8); + float4 const x_199 = *(tint_symbol_6); float2 const x_202 = x_6.resolution; float2 const x_203 = (float2(x_199.x, x_199.y) / x_202); x_210 = int2(int((x_203.x * 256.0f)), int((x_203.y * 256.0f))); @@ -46,13 +46,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float break; } int const x_221 = x_214.x; - tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_196 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_196 = tint_symbol_2; int const x_223 = x_196.arr[x_217]; bool const x_225 = (x_221 < as_type((as_type(x_223) + as_type(15)))); if (x_225) { - tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_197 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_197 = tint_symbol_3; } if (x_225) { x_233 = x_197.arr[x_217]; @@ -70,8 +70,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float } bool const x_241 = x_241_phi; if (x_241) { - tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_198 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_198 = tint_symbol_4; int const x_245 = x_198.arr[x_217]; float const x_250 = ((15.0f - fabs(float(as_type((as_type(x_221) - as_type(x_245)))))) * 0.06666667f); x_251 = float4(x_250, x_250, x_250, 1.0f); @@ -97,17 +97,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float } } float4 const x_256 = x_256_phi; - *(tint_symbol_9) = x_256; + *(tint_symbol_7) = x_256; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_10 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - tint_symbol_10 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11}; - tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { + *(tint_symbol_8) = gl_FragCoord_param; + main_1(x_6, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)}; + return tint_symbol_5; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_10 = 0.0f; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.hlsl index 375d7550e5..83b3b09863 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.hlsl @@ -36,13 +36,13 @@ void main_1() { break; } const int x_221 = x_214.x; - const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_196 = tint_symbol_5; + const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_196 = tint_symbol_4; const int x_223 = x_196[x_217]; const bool x_225 = (x_221 < (x_223 + 15)); if (x_225) { - const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_197 = tint_symbol_6; + const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_197 = tint_symbol_5; } if (x_225) { x_233 = x_197[x_217]; @@ -58,8 +58,8 @@ void main_1() { x_241_phi = x_225; } if (x_241_phi) { - const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_198 = tint_symbol_7; + const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_198 = tint_symbol_6; const int x_245 = x_198[x_217]; const float x_250 = ((15.0f - abs(float((x_221 - x_245)))) * 0.06666667f); x_251 = float4(x_250, x_250, x_250, 1.0f); @@ -98,11 +98,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; + const main_out tint_symbol_7 = {x_GLF_color}; + return tint_symbol_7; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.msl index bd5afe6dbb..042ed0c658 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { tint_array_wrapper x_196 = {}; tint_array_wrapper x_197 = {}; tint_array_wrapper x_198 = {}; @@ -25,7 +25,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float float4 x_253_phi = 0.0f; bool x_254_phi = false; float4 x_256_phi = 0.0f; - float4 const x_199 = *(tint_symbol_8); + float4 const x_199 = *(tint_symbol_6); float2 const x_202 = x_6.resolution; float2 const x_203 = (float2(x_199.x, x_199.y) / x_202); x_210 = int2(int((x_203.x * 256.0f)), int((x_203.y * 256.0f))); @@ -46,13 +46,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float break; } int const x_221 = x_214.x; - tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_196 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_196 = tint_symbol_2; int const x_223 = x_196.arr[x_217]; bool const x_225 = (x_221 < as_type((as_type(x_223) + as_type(15)))); if (x_225) { - tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_197 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_197 = tint_symbol_3; } if (x_225) { x_233 = x_197.arr[x_217]; @@ -70,8 +70,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float } bool const x_241 = x_241_phi; if (x_241) { - tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_198 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_198 = tint_symbol_4; int const x_245 = x_198.arr[x_217]; float const x_250 = ((15.0f - fabs(float(as_type((as_type(x_221) - as_type(x_245)))))) * 0.06666667f); x_251 = float4(x_250, x_250, x_250, 1.0f); @@ -97,17 +97,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float } } float4 const x_256 = x_256_phi; - *(tint_symbol_9) = x_256; + *(tint_symbol_7) = x_256; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_10 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - tint_symbol_10 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11}; - tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { + *(tint_symbol_8) = gl_FragCoord_param; + main_1(x_6, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)}; + return tint_symbol_5; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_10 = 0.0f; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.hlsl index 0614b0d2a1..b185dbbbbb 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.hlsl @@ -35,13 +35,13 @@ void main_1() { break; } const int x_221 = x_214.x; - const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_196 = tint_symbol_5; + const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_196 = tint_symbol_4; const int x_223 = x_196[x_217]; const bool x_225 = (x_221 < (x_223 + 15)); if (x_225) { - const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_197 = tint_symbol_6; + const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_197 = tint_symbol_5; } if (x_225) { x_233 = x_197[x_217]; @@ -52,8 +52,8 @@ void main_1() { } const bool x_237 = (x_221 > (x_235_phi - 15)); if ((x_225 ? x_237 : x_225)) { - const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_198 = tint_symbol_7; + const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_198 = tint_symbol_6; const int x_243 = x_198[x_217]; const float x_248 = ((15.0f - abs(float((x_221 - x_243)))) * 0.06666667f); x_249 = float4(x_248, x_248, x_248, 1.0f); @@ -92,11 +92,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; + const main_out tint_symbol_7 = {x_GLF_color}; + return tint_symbol_7; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.msl index da2762d9fd..122125fb53 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { tint_array_wrapper x_196 = {}; tint_array_wrapper x_197 = {}; tint_array_wrapper x_198 = {}; @@ -25,7 +25,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float float4 x_251_phi = 0.0f; bool x_252_phi = false; float4 x_254_phi = 0.0f; - float4 const x_199 = *(tint_symbol_8); + float4 const x_199 = *(tint_symbol_6); float2 const x_202 = x_6.resolution; float2 const x_203 = (float2(x_199.x, x_199.y) / x_202); x_210 = int2(int((x_203.x * 256.0f)), int((x_203.y * 256.0f))); @@ -45,13 +45,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float break; } int const x_221 = x_214.x; - tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_196 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_196 = tint_symbol_2; int const x_223 = x_196.arr[x_217]; bool const x_225 = (x_221 < as_type((as_type(x_223) + as_type(15)))); if (x_225) { - tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_197 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_197 = tint_symbol_3; } if (x_225) { x_233 = x_197.arr[x_217]; @@ -63,8 +63,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float int const x_235 = x_235_phi; bool const x_237 = (x_221 > as_type((as_type(x_235) - as_type(15)))); if (select(x_225, x_237, x_225)) { - tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_198 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_198 = tint_symbol_4; int const x_243 = x_198.arr[x_217]; float const x_248 = ((15.0f - fabs(float(as_type((as_type(x_221) - as_type(x_243)))))) * 0.06666667f); x_249 = float4(x_248, x_248, x_248, 1.0f); @@ -90,17 +90,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float } } float4 const x_254 = x_254_phi; - *(tint_symbol_9) = x_254; + *(tint_symbol_7) = x_254; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_10 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - tint_symbol_10 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11}; - tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { + *(tint_symbol_8) = gl_FragCoord_param; + main_1(x_6, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)}; + return tint_symbol_5; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_10 = 0.0f; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.hlsl index 0614b0d2a1..b185dbbbbb 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.hlsl @@ -35,13 +35,13 @@ void main_1() { break; } const int x_221 = x_214.x; - const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_196 = tint_symbol_5; + const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_196 = tint_symbol_4; const int x_223 = x_196[x_217]; const bool x_225 = (x_221 < (x_223 + 15)); if (x_225) { - const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_197 = tint_symbol_6; + const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_197 = tint_symbol_5; } if (x_225) { x_233 = x_197[x_217]; @@ -52,8 +52,8 @@ void main_1() { } const bool x_237 = (x_221 > (x_235_phi - 15)); if ((x_225 ? x_237 : x_225)) { - const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - x_198 = tint_symbol_7; + const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + x_198 = tint_symbol_6; const int x_243 = x_198[x_217]; const float x_248 = ((15.0f - abs(float((x_221 - x_243)))) * 0.06666667f); x_249 = float4(x_248, x_248, x_248, 1.0f); @@ -92,11 +92,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; + const main_out tint_symbol_7 = {x_GLF_color}; + return tint_symbol_7; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.msl index da2762d9fd..122125fb53 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { tint_array_wrapper x_196 = {}; tint_array_wrapper x_197 = {}; tint_array_wrapper x_198 = {}; @@ -25,7 +25,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float float4 x_251_phi = 0.0f; bool x_252_phi = false; float4 x_254_phi = 0.0f; - float4 const x_199 = *(tint_symbol_8); + float4 const x_199 = *(tint_symbol_6); float2 const x_202 = x_6.resolution; float2 const x_203 = (float2(x_199.x, x_199.y) / x_202); x_210 = int2(int((x_203.x * 256.0f)), int((x_203.y * 256.0f))); @@ -45,13 +45,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float break; } int const x_221 = x_214.x; - tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_196 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_196 = tint_symbol_2; int const x_223 = x_196.arr[x_217]; bool const x_225 = (x_221 < as_type((as_type(x_223) + as_type(15)))); if (x_225) { - tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_197 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_197 = tint_symbol_3; } if (x_225) { x_233 = x_197.arr[x_217]; @@ -63,8 +63,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float int const x_235 = x_235_phi; bool const x_237 = (x_221 > as_type((as_type(x_235) - as_type(15)))); if (select(x_225, x_237, x_225)) { - tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - x_198 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + x_198 = tint_symbol_4; int const x_243 = x_198.arr[x_217]; float const x_248 = ((15.0f - fabs(float(as_type((as_type(x_221) - as_type(x_243)))))) * 0.06666667f); x_249 = float4(x_248, x_248, x_248, 1.0f); @@ -90,17 +90,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float } } float4 const x_254 = x_254_phi; - *(tint_symbol_9) = x_254; + *(tint_symbol_7) = x_254; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_10 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - tint_symbol_10 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11}; - tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { + *(tint_symbol_8) = gl_FragCoord_param; + main_1(x_6, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)}; + return tint_symbol_5; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_10 = 0.0f; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.hlsl index 7b7c9a4193..687698f528 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.hlsl @@ -19,16 +19,16 @@ float4 trace_vi2_(inout int2 pos) { } const int x_231 = pos.x; const int x_233 = pos.y; - const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - indexable = tint_symbol_5; + const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + indexable = tint_symbol_4; const int x_235 = indexable[x_233]; const bool x_237 = (x_231 < (x_235 + 15)); x_248_phi = x_237; if (x_237) { const int x_241 = pos.x; const int x_243 = pos.y; - const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - indexable_1 = tint_symbol_6; + const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + indexable_1 = tint_symbol_5; const int x_245 = indexable_1[x_243]; x_247 = (x_241 > (x_245 - 15)); x_248_phi = x_247; @@ -36,8 +36,8 @@ float4 trace_vi2_(inout int2 pos) { if (x_248_phi) { const int x_252 = pos.x; const int x_254 = pos.y; - const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - indexable_2 = tint_symbol_7; + const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + indexable_2 = tint_symbol_6; const int x_256 = indexable_2[x_254]; p = ((15.0f - abs(float((x_252 - x_256)))) / 15.0f); return float4(p, p, p, 1.0f); @@ -74,11 +74,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; + const main_out tint_symbol_7 = {x_GLF_color}; + return tint_symbol_7; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.msl index 3ed9534ff7..db783985ed 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.msl @@ -10,7 +10,7 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -29,16 +29,16 @@ float4 trace_vi2_(thread int2* const pos) { } int const x_231 = (*(pos)).x; int const x_233 = (*(pos)).y; - tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + indexable = tint_symbol_2; int const x_235 = indexable.arr[x_233]; bool const x_237 = (x_231 < as_type((as_type(x_235) + as_type(15)))); x_248_phi = x_237; if (x_237) { int const x_241 = (*(pos)).x; int const x_243 = (*(pos)).y; - tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - indexable_1 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + indexable_1 = tint_symbol_3; int const x_245 = indexable_1.arr[x_243]; x_247 = (x_241 > as_type((as_type(x_245) - as_type(15)))); x_248_phi = x_247; @@ -47,8 +47,8 @@ float4 trace_vi2_(thread int2* const pos) { if (x_248) { int const x_252 = (*(pos)).x; int const x_254 = (*(pos)).y; - tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - indexable_2 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + indexable_2 = tint_symbol_4; int const x_256 = indexable_2.arr[x_254]; p = ((15.0f - fabs(float(as_type((as_type(x_252) - as_type(x_256)))))) / 15.0f); float const x_262 = p; @@ -62,11 +62,11 @@ float4 trace_vi2_(thread int2* const pos) { return float4(0.0f, 0.0f, 0.0f, 1.0f); } -void main_1(constant buf0& x_13, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_13, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { float2 pos_1 = 0.0f; int2 ipos = 0; int2 param = 0; - float4 const x_205 = *(tint_symbol_8); + float4 const x_205 = *(tint_symbol_6); float2 const x_208 = x_13.resolution; pos_1 = (float2(x_205.x, x_205.y) / x_208); float const x_211 = pos_1.x; @@ -75,17 +75,23 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_8, thread floa int2 const x_219 = ipos; param = x_219; float4 const x_220 = trace_vi2_(&(param)); - *(tint_symbol_9) = x_220; + *(tint_symbol_7) = x_220; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { - thread float4 tint_symbol_10 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - tint_symbol_10 = gl_FragCoord_param; - main_1(x_13, &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11}; - tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { + *(tint_symbol_8) = gl_FragCoord_param; + main_1(x_13, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)}; + return tint_symbol_5; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { + thread float4 tint_symbol_10 = 0.0f; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.hlsl index 7b7c9a4193..687698f528 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.hlsl @@ -19,16 +19,16 @@ float4 trace_vi2_(inout int2 pos) { } const int x_231 = pos.x; const int x_233 = pos.y; - const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - indexable = tint_symbol_5; + const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + indexable = tint_symbol_4; const int x_235 = indexable[x_233]; const bool x_237 = (x_231 < (x_235 + 15)); x_248_phi = x_237; if (x_237) { const int x_241 = pos.x; const int x_243 = pos.y; - const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - indexable_1 = tint_symbol_6; + const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + indexable_1 = tint_symbol_5; const int x_245 = indexable_1[x_243]; x_247 = (x_241 > (x_245 - 15)); x_248_phi = x_247; @@ -36,8 +36,8 @@ float4 trace_vi2_(inout int2 pos) { if (x_248_phi) { const int x_252 = pos.x; const int x_254 = pos.y; - const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - indexable_2 = tint_symbol_7; + const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + indexable_2 = tint_symbol_6; const int x_256 = indexable_2[x_254]; p = ((15.0f - abs(float((x_252 - x_256)))) / 15.0f); return float4(p, p, p, 1.0f); @@ -74,11 +74,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; + const main_out tint_symbol_7 = {x_GLF_color}; + return tint_symbol_7; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.msl index 3ed9534ff7..db783985ed 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.msl @@ -10,7 +10,7 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -29,16 +29,16 @@ float4 trace_vi2_(thread int2* const pos) { } int const x_231 = (*(pos)).x; int const x_233 = (*(pos)).y; - tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + indexable = tint_symbol_2; int const x_235 = indexable.arr[x_233]; bool const x_237 = (x_231 < as_type((as_type(x_235) + as_type(15)))); x_248_phi = x_237; if (x_237) { int const x_241 = (*(pos)).x; int const x_243 = (*(pos)).y; - tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - indexable_1 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + indexable_1 = tint_symbol_3; int const x_245 = indexable_1.arr[x_243]; x_247 = (x_241 > as_type((as_type(x_245) - as_type(15)))); x_248_phi = x_247; @@ -47,8 +47,8 @@ float4 trace_vi2_(thread int2* const pos) { if (x_248) { int const x_252 = (*(pos)).x; int const x_254 = (*(pos)).y; - tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - indexable_2 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + indexable_2 = tint_symbol_4; int const x_256 = indexable_2.arr[x_254]; p = ((15.0f - fabs(float(as_type((as_type(x_252) - as_type(x_256)))))) / 15.0f); float const x_262 = p; @@ -62,11 +62,11 @@ float4 trace_vi2_(thread int2* const pos) { return float4(0.0f, 0.0f, 0.0f, 1.0f); } -void main_1(constant buf0& x_13, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_13, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { float2 pos_1 = 0.0f; int2 ipos = 0; int2 param = 0; - float4 const x_205 = *(tint_symbol_8); + float4 const x_205 = *(tint_symbol_6); float2 const x_208 = x_13.resolution; pos_1 = (float2(x_205.x, x_205.y) / x_208); float const x_211 = pos_1.x; @@ -75,17 +75,23 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_8, thread floa int2 const x_219 = ipos; param = x_219; float4 const x_220 = trace_vi2_(&(param)); - *(tint_symbol_9) = x_220; + *(tint_symbol_7) = x_220; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { - thread float4 tint_symbol_10 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - tint_symbol_10 = gl_FragCoord_param; - main_1(x_13, &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11}; - tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { + *(tint_symbol_8) = gl_FragCoord_param; + main_1(x_13, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)}; + return tint_symbol_5; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { + thread float4 tint_symbol_10 = 0.0f; + thread float4 tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.hlsl index f284cbd299..ac064f2b88 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.hlsl @@ -19,12 +19,12 @@ float4 trace_vi2_(inout int2 pos) { } const int x_233 = pos.x; const int x_235 = pos.y; - const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - indexable = tint_symbol_5; + const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + indexable = tint_symbol_4; const int x_237 = indexable[x_235]; const int x_238[256] = indexable; - const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - indexable = tint_symbol_6; + const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + indexable = tint_symbol_5; const int x_239 = pos.y; pos.y = 0; pos.y = x_239; @@ -34,8 +34,8 @@ float4 trace_vi2_(inout int2 pos) { if (x_241) { const int x_245 = pos.x; const int x_247 = pos.y; - const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - indexable_1 = tint_symbol_7; + const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + indexable_1 = tint_symbol_6; const int x_249 = indexable_1[x_247]; x_251 = (x_245 > (x_249 - 15)); x_252_phi = x_251; @@ -43,8 +43,8 @@ float4 trace_vi2_(inout int2 pos) { if (x_252_phi) { const int x_256 = pos.x; const int x_258 = pos.y; - const int tint_symbol_8[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - indexable_2 = tint_symbol_8; + const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + indexable_2 = tint_symbol_7; const int x_260 = indexable_2[x_258]; p = ((15.0f - abs(float((x_256 - x_260)))) / 15.0f); return float4(p, p, p, 1.0f); @@ -81,11 +81,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; + const main_out tint_symbol_8 = {x_GLF_color}; + return tint_symbol_8; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.msl index 7ecfd1f5f1..6ac12f1589 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.msl @@ -10,7 +10,7 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -29,12 +29,12 @@ float4 trace_vi2_(thread int2* const pos) { } int const x_233 = (*(pos)).x; int const x_235 = (*(pos)).y; - tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + indexable = tint_symbol_2; int const x_237 = indexable.arr[x_235]; tint_array_wrapper const x_238 = indexable; - tint_array_wrapper const tint_symbol_5 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - indexable = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + indexable = tint_symbol_3; int const x_239 = (*(pos)).y; (*(pos)).y = 0; (*(pos)).y = x_239; @@ -44,8 +44,8 @@ float4 trace_vi2_(thread int2* const pos) { if (x_241) { int const x_245 = (*(pos)).x; int const x_247 = (*(pos)).y; - tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - indexable_1 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + indexable_1 = tint_symbol_4; int const x_249 = indexable_1.arr[x_247]; x_251 = (x_245 > as_type((as_type(x_249) - as_type(15)))); x_252_phi = x_251; @@ -54,8 +54,8 @@ float4 trace_vi2_(thread int2* const pos) { if (x_252) { int const x_256 = (*(pos)).x; int const x_258 = (*(pos)).y; - tint_array_wrapper const tint_symbol_7 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - indexable_2 = tint_symbol_7; + tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + indexable_2 = tint_symbol_5; int const x_260 = indexable_2.arr[x_258]; p = ((15.0f - fabs(float(as_type((as_type(x_256) - as_type(x_260)))))) / 15.0f); float const x_266 = p; @@ -69,11 +69,11 @@ float4 trace_vi2_(thread int2* const pos) { return float4(0.0f, 0.0f, 0.0f, 1.0f); } -void main_1(constant buf0& x_13, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_13, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { float2 pos_1 = 0.0f; int2 ipos = 0; int2 param = 0; - float4 const x_207 = *(tint_symbol_9); + float4 const x_207 = *(tint_symbol_7); float2 const x_210 = x_13.resolution; pos_1 = (float2(x_207.x, x_207.y) / x_210); float const x_213 = pos_1.x; @@ -82,17 +82,23 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_9, thread floa int2 const x_221 = ipos; param = x_221; float4 const x_222 = trace_vi2_(&(param)); - *(tint_symbol_10) = x_222; + *(tint_symbol_8) = x_222; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_13, &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; +main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_13, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.hlsl index f284cbd299..ac064f2b88 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.hlsl @@ -19,12 +19,12 @@ float4 trace_vi2_(inout int2 pos) { } const int x_233 = pos.x; const int x_235 = pos.y; - const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - indexable = tint_symbol_5; + const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + indexable = tint_symbol_4; const int x_237 = indexable[x_235]; const int x_238[256] = indexable; - const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - indexable = tint_symbol_6; + const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + indexable = tint_symbol_5; const int x_239 = pos.y; pos.y = 0; pos.y = x_239; @@ -34,8 +34,8 @@ float4 trace_vi2_(inout int2 pos) { if (x_241) { const int x_245 = pos.x; const int x_247 = pos.y; - const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - indexable_1 = tint_symbol_7; + const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + indexable_1 = tint_symbol_6; const int x_249 = indexable_1[x_247]; x_251 = (x_245 > (x_249 - 15)); x_252_phi = x_251; @@ -43,8 +43,8 @@ float4 trace_vi2_(inout int2 pos) { if (x_252_phi) { const int x_256 = pos.x; const int x_258 = pos.y; - const int tint_symbol_8[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; - indexable_2 = tint_symbol_8; + const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}; + indexable_2 = tint_symbol_7; const int x_260 = indexable_2[x_258]; p = ((15.0f - abs(float((x_256 - x_260)))) / 15.0f); return float4(p, p, p, 1.0f); @@ -81,11 +81,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; + const main_out tint_symbol_8 = {x_GLF_color}; + return tint_symbol_8; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.msl index 7ecfd1f5f1..6ac12f1589 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.msl @@ -10,7 +10,7 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -29,12 +29,12 @@ float4 trace_vi2_(thread int2* const pos) { } int const x_233 = (*(pos)).x; int const x_235 = (*(pos)).y; - tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + indexable = tint_symbol_2; int const x_237 = indexable.arr[x_235]; tint_array_wrapper const x_238 = indexable; - tint_array_wrapper const tint_symbol_5 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - indexable = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + indexable = tint_symbol_3; int const x_239 = (*(pos)).y; (*(pos)).y = 0; (*(pos)).y = x_239; @@ -44,8 +44,8 @@ float4 trace_vi2_(thread int2* const pos) { if (x_241) { int const x_245 = (*(pos)).x; int const x_247 = (*(pos)).y; - tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - indexable_1 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + indexable_1 = tint_symbol_4; int const x_249 = indexable_1.arr[x_247]; x_251 = (x_245 > as_type((as_type(x_249) - as_type(15)))); x_252_phi = x_251; @@ -54,8 +54,8 @@ float4 trace_vi2_(thread int2* const pos) { if (x_252) { int const x_256 = (*(pos)).x; int const x_258 = (*(pos)).y; - tint_array_wrapper const tint_symbol_7 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; - indexable_2 = tint_symbol_7; + tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; + indexable_2 = tint_symbol_5; int const x_260 = indexable_2.arr[x_258]; p = ((15.0f - fabs(float(as_type((as_type(x_256) - as_type(x_260)))))) / 15.0f); float const x_266 = p; @@ -69,11 +69,11 @@ float4 trace_vi2_(thread int2* const pos) { return float4(0.0f, 0.0f, 0.0f, 1.0f); } -void main_1(constant buf0& x_13, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_13, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { float2 pos_1 = 0.0f; int2 ipos = 0; int2 param = 0; - float4 const x_207 = *(tint_symbol_9); + float4 const x_207 = *(tint_symbol_7); float2 const x_210 = x_13.resolution; pos_1 = (float2(x_207.x, x_207.y) / x_210); float const x_213 = pos_1.x; @@ -82,17 +82,23 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_9, thread floa int2 const x_221 = ipos; param = x_221; float4 const x_222 = trace_vi2_(&(param)); - *(tint_symbol_10) = x_222; + *(tint_symbol_8) = x_222; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_13, &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; +main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_13, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.hlsl index 18cfa065aa..766e0f8d78 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.hlsl @@ -204,11 +204,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.msl index 19624f7014..937c75885d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.msl @@ -13,26 +13,26 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +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_5) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_3) { int temp = 0; int const x_225 = *(i); - int const x_227 = (*(tint_symbol_5)).numbers.arr[x_225]; + int const x_227 = (*(tint_symbol_3)).numbers.arr[x_225]; temp = x_227; int const x_228 = *(i); int const x_229 = *(j); - int const x_231 = (*(tint_symbol_5)).numbers.arr[x_229]; - (*(tint_symbol_5)).numbers.arr[x_228] = x_231; + int const x_231 = (*(tint_symbol_3)).numbers.arr[x_229]; + (*(tint_symbol_3)).numbers.arr[x_228] = x_231; int const x_233 = *(j); int const x_234 = temp; - (*(tint_symbol_5)).numbers.arr[x_233] = x_234; + (*(tint_symbol_3)).numbers.arr[x_233] = x_234; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -41,7 +41,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_237 = *(h); - int const x_239 = (*(tint_symbol_6)).numbers.arr[x_237]; + int const x_239 = (*(tint_symbol_4)).numbers.arr[x_237]; pivot = x_239; int const x_240 = *(l); i_1 = as_type((as_type(x_240) - as_type(1))); @@ -55,7 +55,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_252 = j_1; - int const x_254 = (*(tint_symbol_6)).numbers.arr[x_252]; + int const x_254 = (*(tint_symbol_4)).numbers.arr[x_252]; int const x_255 = pivot; if ((x_254 <= x_255)) { int const x_259 = i_1; @@ -64,7 +64,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_261; int const x_262 = j_1; param_1 = x_262; - swap_i1_i1_(&(param), &(param_1), tint_symbol_6); + swap_i1_i1_(&(param), &(param_1), tint_symbol_4); } { int const x_264 = j_1; @@ -77,12 +77,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = x_268; int const x_269 = *(h); param_3 = x_269; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6); + swap_i1_i1_(&(param_2), &(param_3), tint_symbol_4); int const x_271 = i_1; return x_271; } -void quicksort_(thread QuicksortObject* const tint_symbol_7) { +void quicksort_(thread QuicksortObject* const tint_symbol_5) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -121,7 +121,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { param_4 = x_296; int const x_297 = h_1; param_5 = x_297; - int const x_298 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7); + int const x_298 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_5); p = x_298; int const x_299 = p; int const x_301 = l_1; @@ -155,7 +155,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { return; } -void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; @@ -168,89 +168,95 @@ void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, th } int const x_88 = i_2; int const x_89 = i_2; - (*(tint_symbol_8)).numbers.arr[x_88] = as_type((as_type(10) - as_type(x_89))); + (*(tint_symbol_6)).numbers.arr[x_88] = as_type((as_type(10) - as_type(x_89))); int const x_92 = i_2; int const x_93 = i_2; - int const x_95 = (*(tint_symbol_8)).numbers.arr[x_93]; + int const x_95 = (*(tint_symbol_6)).numbers.arr[x_93]; int const x_96 = i_2; - int const x_98 = (*(tint_symbol_8)).numbers.arr[x_96]; - (*(tint_symbol_8)).numbers.arr[x_92] = as_type((as_type(x_95) * as_type(x_98))); + int const x_98 = (*(tint_symbol_6)).numbers.arr[x_96]; + (*(tint_symbol_6)).numbers.arr[x_92] = as_type((as_type(x_95) * as_type(x_98))); { int const x_101 = i_2; i_2 = as_type((as_type(x_101) + as_type(1))); } } - quicksort_(tint_symbol_8); - float4 const x_104 = *(tint_symbol_9); + quicksort_(tint_symbol_6); + float4 const x_104 = *(tint_symbol_7); float2 const x_107 = x_32.resolution; uv = (float2(x_104.x, x_104.y) / x_107); color = float3(1.0f, 2.0f, 3.0f); - int const x_110 = (*(tint_symbol_8)).numbers.arr[0]; + int const x_110 = (*(tint_symbol_6)).numbers.arr[0]; float const x_113 = color.x; color.x = (x_113 + float(x_110)); float const x_117 = uv.x; if ((x_117 > 0.25f)) { - int const x_122 = (*(tint_symbol_8)).numbers.arr[1]; + int const x_122 = (*(tint_symbol_6)).numbers.arr[1]; float const x_125 = color.x; color.x = (x_125 + float(x_122)); } float const x_129 = uv.x; if ((x_129 > 0.5f)) { - int const x_134 = (*(tint_symbol_8)).numbers.arr[2]; + int const x_134 = (*(tint_symbol_6)).numbers.arr[2]; float const x_137 = color.y; color.y = (x_137 + float(x_134)); } float const x_141 = uv.x; if ((x_141 > 0.75f)) { - int const x_146 = (*(tint_symbol_8)).numbers.arr[3]; + int const x_146 = (*(tint_symbol_6)).numbers.arr[3]; float const x_149 = color.z; color.z = (x_149 + float(x_146)); } - int const x_153 = (*(tint_symbol_8)).numbers.arr[4]; + int const x_153 = (*(tint_symbol_6)).numbers.arr[4]; float const x_156 = color.y; color.y = (x_156 + float(x_153)); float const x_160 = uv.y; if ((x_160 > 0.25f)) { - int const x_165 = (*(tint_symbol_8)).numbers.arr[5]; + int const x_165 = (*(tint_symbol_6)).numbers.arr[5]; float const x_168 = color.x; color.x = (x_168 + float(x_165)); } float const x_172 = uv.y; if ((x_172 > 0.5f)) { - int const x_177 = (*(tint_symbol_8)).numbers.arr[6]; + int const x_177 = (*(tint_symbol_6)).numbers.arr[6]; float const x_180 = color.y; color.y = (x_180 + float(x_177)); } float const x_184 = uv.y; if ((x_184 > 0.75f)) { - int const x_189 = (*(tint_symbol_8)).numbers.arr[7]; + int const x_189 = (*(tint_symbol_6)).numbers.arr[7]; float const x_192 = color.z; color.z = (x_192 + float(x_189)); } - int const x_196 = (*(tint_symbol_8)).numbers.arr[8]; + int const x_196 = (*(tint_symbol_6)).numbers.arr[8]; float const x_199 = color.z; color.z = (x_199 + float(x_196)); float const x_203 = uv.x; float const x_205 = uv.y; if ((fabs((x_203 - x_205)) < 0.25f)) { - int const x_212 = (*(tint_symbol_8)).numbers.arr[9]; + int const x_212 = (*(tint_symbol_6)).numbers.arr[9]; float const x_215 = color.x; color.x = (x_215 + float(x_212)); } float3 const x_218 = color; float3 const x_219 = normalize(x_218); - *(tint_symbol_10) = float4(x_219.x, x_219.y, x_219.z, 1.0f); + *(tint_symbol_8) = float4(x_219.x, x_219.y, x_219.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread QuicksortObject tint_symbol_12 = {}; - thread float4 tint_symbol_13 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_32, &(tint_symbol_12), &(tint_symbol_11), &(tint_symbol_13)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_32, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_32, tint_symbol_10, tint_symbol_9, tint_symbol_11); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) { + thread float4 tint_symbol_12 = 0.0f; + thread QuicksortObject tint_symbol_13 = {}; + thread float4 tint_symbol_14 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_32, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.hlsl index 18cfa065aa..766e0f8d78 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.hlsl @@ -204,11 +204,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.msl index 19624f7014..937c75885d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.msl @@ -13,26 +13,26 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +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_5) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_3) { int temp = 0; int const x_225 = *(i); - int const x_227 = (*(tint_symbol_5)).numbers.arr[x_225]; + int const x_227 = (*(tint_symbol_3)).numbers.arr[x_225]; temp = x_227; int const x_228 = *(i); int const x_229 = *(j); - int const x_231 = (*(tint_symbol_5)).numbers.arr[x_229]; - (*(tint_symbol_5)).numbers.arr[x_228] = x_231; + int const x_231 = (*(tint_symbol_3)).numbers.arr[x_229]; + (*(tint_symbol_3)).numbers.arr[x_228] = x_231; int const x_233 = *(j); int const x_234 = temp; - (*(tint_symbol_5)).numbers.arr[x_233] = x_234; + (*(tint_symbol_3)).numbers.arr[x_233] = x_234; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -41,7 +41,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_237 = *(h); - int const x_239 = (*(tint_symbol_6)).numbers.arr[x_237]; + int const x_239 = (*(tint_symbol_4)).numbers.arr[x_237]; pivot = x_239; int const x_240 = *(l); i_1 = as_type((as_type(x_240) - as_type(1))); @@ -55,7 +55,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_252 = j_1; - int const x_254 = (*(tint_symbol_6)).numbers.arr[x_252]; + int const x_254 = (*(tint_symbol_4)).numbers.arr[x_252]; int const x_255 = pivot; if ((x_254 <= x_255)) { int const x_259 = i_1; @@ -64,7 +64,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_261; int const x_262 = j_1; param_1 = x_262; - swap_i1_i1_(&(param), &(param_1), tint_symbol_6); + swap_i1_i1_(&(param), &(param_1), tint_symbol_4); } { int const x_264 = j_1; @@ -77,12 +77,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = x_268; int const x_269 = *(h); param_3 = x_269; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6); + swap_i1_i1_(&(param_2), &(param_3), tint_symbol_4); int const x_271 = i_1; return x_271; } -void quicksort_(thread QuicksortObject* const tint_symbol_7) { +void quicksort_(thread QuicksortObject* const tint_symbol_5) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -121,7 +121,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { param_4 = x_296; int const x_297 = h_1; param_5 = x_297; - int const x_298 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7); + int const x_298 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_5); p = x_298; int const x_299 = p; int const x_301 = l_1; @@ -155,7 +155,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { return; } -void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; @@ -168,89 +168,95 @@ void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, th } int const x_88 = i_2; int const x_89 = i_2; - (*(tint_symbol_8)).numbers.arr[x_88] = as_type((as_type(10) - as_type(x_89))); + (*(tint_symbol_6)).numbers.arr[x_88] = as_type((as_type(10) - as_type(x_89))); int const x_92 = i_2; int const x_93 = i_2; - int const x_95 = (*(tint_symbol_8)).numbers.arr[x_93]; + int const x_95 = (*(tint_symbol_6)).numbers.arr[x_93]; int const x_96 = i_2; - int const x_98 = (*(tint_symbol_8)).numbers.arr[x_96]; - (*(tint_symbol_8)).numbers.arr[x_92] = as_type((as_type(x_95) * as_type(x_98))); + int const x_98 = (*(tint_symbol_6)).numbers.arr[x_96]; + (*(tint_symbol_6)).numbers.arr[x_92] = as_type((as_type(x_95) * as_type(x_98))); { int const x_101 = i_2; i_2 = as_type((as_type(x_101) + as_type(1))); } } - quicksort_(tint_symbol_8); - float4 const x_104 = *(tint_symbol_9); + quicksort_(tint_symbol_6); + float4 const x_104 = *(tint_symbol_7); float2 const x_107 = x_32.resolution; uv = (float2(x_104.x, x_104.y) / x_107); color = float3(1.0f, 2.0f, 3.0f); - int const x_110 = (*(tint_symbol_8)).numbers.arr[0]; + int const x_110 = (*(tint_symbol_6)).numbers.arr[0]; float const x_113 = color.x; color.x = (x_113 + float(x_110)); float const x_117 = uv.x; if ((x_117 > 0.25f)) { - int const x_122 = (*(tint_symbol_8)).numbers.arr[1]; + int const x_122 = (*(tint_symbol_6)).numbers.arr[1]; float const x_125 = color.x; color.x = (x_125 + float(x_122)); } float const x_129 = uv.x; if ((x_129 > 0.5f)) { - int const x_134 = (*(tint_symbol_8)).numbers.arr[2]; + int const x_134 = (*(tint_symbol_6)).numbers.arr[2]; float const x_137 = color.y; color.y = (x_137 + float(x_134)); } float const x_141 = uv.x; if ((x_141 > 0.75f)) { - int const x_146 = (*(tint_symbol_8)).numbers.arr[3]; + int const x_146 = (*(tint_symbol_6)).numbers.arr[3]; float const x_149 = color.z; color.z = (x_149 + float(x_146)); } - int const x_153 = (*(tint_symbol_8)).numbers.arr[4]; + int const x_153 = (*(tint_symbol_6)).numbers.arr[4]; float const x_156 = color.y; color.y = (x_156 + float(x_153)); float const x_160 = uv.y; if ((x_160 > 0.25f)) { - int const x_165 = (*(tint_symbol_8)).numbers.arr[5]; + int const x_165 = (*(tint_symbol_6)).numbers.arr[5]; float const x_168 = color.x; color.x = (x_168 + float(x_165)); } float const x_172 = uv.y; if ((x_172 > 0.5f)) { - int const x_177 = (*(tint_symbol_8)).numbers.arr[6]; + int const x_177 = (*(tint_symbol_6)).numbers.arr[6]; float const x_180 = color.y; color.y = (x_180 + float(x_177)); } float const x_184 = uv.y; if ((x_184 > 0.75f)) { - int const x_189 = (*(tint_symbol_8)).numbers.arr[7]; + int const x_189 = (*(tint_symbol_6)).numbers.arr[7]; float const x_192 = color.z; color.z = (x_192 + float(x_189)); } - int const x_196 = (*(tint_symbol_8)).numbers.arr[8]; + int const x_196 = (*(tint_symbol_6)).numbers.arr[8]; float const x_199 = color.z; color.z = (x_199 + float(x_196)); float const x_203 = uv.x; float const x_205 = uv.y; if ((fabs((x_203 - x_205)) < 0.25f)) { - int const x_212 = (*(tint_symbol_8)).numbers.arr[9]; + int const x_212 = (*(tint_symbol_6)).numbers.arr[9]; float const x_215 = color.x; color.x = (x_215 + float(x_212)); } float3 const x_218 = color; float3 const x_219 = normalize(x_218); - *(tint_symbol_10) = float4(x_219.x, x_219.y, x_219.z, 1.0f); + *(tint_symbol_8) = float4(x_219.x, x_219.y, x_219.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread QuicksortObject tint_symbol_12 = {}; - thread float4 tint_symbol_13 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_32, &(tint_symbol_12), &(tint_symbol_11), &(tint_symbol_13)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_32, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_32, tint_symbol_10, tint_symbol_9, tint_symbol_11); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) { + thread float4 tint_symbol_12 = 0.0f; + thread QuicksortObject tint_symbol_13 = {}; + thread float4 tint_symbol_14 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_32, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.hlsl index 405b0401a1..c8248ebf9e 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.hlsl @@ -204,11 +204,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.msl index 73e23fffff..ccdc0007b5 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.msl @@ -13,26 +13,26 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void swap_i1_i1_(thread int* const i, thread int* const j, float3x3 x_228, thread QuicksortObject* const tint_symbol_5) { +void swap_i1_i1_(thread int* const i, thread int* const j, float3x3 x_228, thread QuicksortObject* const tint_symbol_3) { int temp = 0; int const x_230 = *(i); - int const x_232 = (*(tint_symbol_5)).numbers.arr[x_230]; + int const x_232 = (*(tint_symbol_3)).numbers.arr[x_230]; temp = x_232; int const x_233 = *(i); int const x_234 = *(j); - int const x_236 = (*(tint_symbol_5)).numbers.arr[x_234]; - (*(tint_symbol_5)).numbers.arr[x_233] = x_236; + int const x_236 = (*(tint_symbol_3)).numbers.arr[x_234]; + (*(tint_symbol_3)).numbers.arr[x_233] = x_236; int const x_238 = *(j); int const x_239 = temp; - (*(tint_symbol_5)).numbers.arr[x_238] = x_239; + (*(tint_symbol_3)).numbers.arr[x_238] = x_239; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -41,7 +41,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_242 = *(h); - int const x_244 = (*(tint_symbol_6)).numbers.arr[x_242]; + int const x_244 = (*(tint_symbol_4)).numbers.arr[x_242]; pivot = x_244; int const x_245 = *(l); i_1 = as_type((as_type(x_245) - as_type(1))); @@ -55,7 +55,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_257 = j_1; - int const x_259 = (*(tint_symbol_6)).numbers.arr[x_257]; + int const x_259 = (*(tint_symbol_4)).numbers.arr[x_257]; int const x_260 = pivot; if ((x_259 <= x_260)) { int const x_264 = i_1; @@ -64,7 +64,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_266; int const x_267 = j_1; param_1 = x_267; - swap_i1_i1_(&(param), &(param_1), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_6); + swap_i1_i1_(&(param), &(param_1), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_4); } { int const x_269 = j_1; @@ -77,12 +77,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = x_273; int const x_274 = *(h); param_3 = x_274; - swap_i1_i1_(&(param_2), &(param_3), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_6); + swap_i1_i1_(&(param_2), &(param_3), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_4); int const x_276 = i_1; return x_276; } -void quicksort_(thread QuicksortObject* const tint_symbol_7) { +void quicksort_(thread QuicksortObject* const tint_symbol_5) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -121,7 +121,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { param_4 = x_301; int const x_302 = h_1; param_5 = x_302; - int const x_303 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7); + int const x_303 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_5); p = x_303; int const x_304 = p; int const x_306 = l_1; @@ -155,7 +155,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { return; } -void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; @@ -168,89 +168,95 @@ void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, th } int const x_92 = i_2; int const x_93 = i_2; - (*(tint_symbol_8)).numbers.arr[x_92] = as_type((as_type(10) - as_type(x_93))); + (*(tint_symbol_6)).numbers.arr[x_92] = as_type((as_type(10) - as_type(x_93))); int const x_96 = i_2; int const x_97 = i_2; - int const x_99 = (*(tint_symbol_8)).numbers.arr[x_97]; + int const x_99 = (*(tint_symbol_6)).numbers.arr[x_97]; int const x_100 = i_2; - int const x_102 = (*(tint_symbol_8)).numbers.arr[x_100]; - (*(tint_symbol_8)).numbers.arr[x_96] = as_type((as_type(x_99) * as_type(x_102))); + int const x_102 = (*(tint_symbol_6)).numbers.arr[x_100]; + (*(tint_symbol_6)).numbers.arr[x_96] = as_type((as_type(x_99) * as_type(x_102))); { int const x_105 = i_2; i_2 = as_type((as_type(x_105) + as_type(1))); } } - quicksort_(tint_symbol_8); - float4 const x_108 = *(tint_symbol_9); + quicksort_(tint_symbol_6); + float4 const x_108 = *(tint_symbol_7); float2 const x_111 = x_32.resolution; uv = (float2(x_108.x, x_108.y) / x_111); color = float3(1.0f, 2.0f, 3.0f); - int const x_114 = (*(tint_symbol_8)).numbers.arr[0]; + int const x_114 = (*(tint_symbol_6)).numbers.arr[0]; float const x_117 = color.x; color.x = (x_117 + float(x_114)); float const x_121 = uv.x; if ((x_121 > 0.25f)) { - int const x_126 = (*(tint_symbol_8)).numbers.arr[1]; + int const x_126 = (*(tint_symbol_6)).numbers.arr[1]; float const x_129 = color.x; color.x = (x_129 + float(x_126)); } float const x_133 = uv.x; if ((x_133 > 0.5f)) { - int const x_138 = (*(tint_symbol_8)).numbers.arr[2]; + int const x_138 = (*(tint_symbol_6)).numbers.arr[2]; float const x_141 = color.y; color.y = (x_141 + float(x_138)); } float const x_145 = uv.x; if ((x_145 > 0.75f)) { - int const x_150 = (*(tint_symbol_8)).numbers.arr[3]; + int const x_150 = (*(tint_symbol_6)).numbers.arr[3]; float const x_153 = color.z; color.z = (x_153 + float(x_150)); } - int const x_157 = (*(tint_symbol_8)).numbers.arr[4]; + int const x_157 = (*(tint_symbol_6)).numbers.arr[4]; float const x_160 = color.y; color.y = (x_160 + float(x_157)); float const x_164 = uv.y; if ((x_164 > 0.25f)) { - int const x_169 = (*(tint_symbol_8)).numbers.arr[5]; + int const x_169 = (*(tint_symbol_6)).numbers.arr[5]; float const x_172 = color.x; color.x = (x_172 + float(x_169)); } float const x_176 = uv.y; if ((x_176 > 0.5f)) { - int const x_181 = (*(tint_symbol_8)).numbers.arr[6]; + int const x_181 = (*(tint_symbol_6)).numbers.arr[6]; float const x_184 = color.y; color.y = (x_184 + float(x_181)); } float const x_188 = uv.y; if ((x_188 > 0.75f)) { - int const x_193 = (*(tint_symbol_8)).numbers.arr[7]; + int const x_193 = (*(tint_symbol_6)).numbers.arr[7]; float const x_196 = color.z; color.z = (x_196 + float(x_193)); } - int const x_200 = (*(tint_symbol_8)).numbers.arr[8]; + int const x_200 = (*(tint_symbol_6)).numbers.arr[8]; float const x_203 = color.z; color.z = (x_203 + float(x_200)); float const x_207 = uv.x; float const x_209 = uv.y; if ((fabs((x_207 - x_209)) < 0.25f)) { - int const x_216 = (*(tint_symbol_8)).numbers.arr[9]; + int const x_216 = (*(tint_symbol_6)).numbers.arr[9]; float const x_219 = color.x; color.x = (x_219 + float(x_216)); } float3 const x_222 = color; float3 const x_223 = normalize(x_222); - *(tint_symbol_10) = float4(x_223.x, x_223.y, x_223.z, 1.0f); + *(tint_symbol_8) = float4(x_223.x, x_223.y, x_223.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread QuicksortObject tint_symbol_12 = {}; - thread float4 tint_symbol_13 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_32, &(tint_symbol_12), &(tint_symbol_11), &(tint_symbol_13)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_32, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_32, tint_symbol_10, tint_symbol_9, tint_symbol_11); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) { + thread float4 tint_symbol_12 = 0.0f; + thread QuicksortObject tint_symbol_13 = {}; + thread float4 tint_symbol_14 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_32, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.hlsl index 405b0401a1..c8248ebf9e 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.hlsl @@ -204,11 +204,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.msl index 73e23fffff..ccdc0007b5 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.msl @@ -13,26 +13,26 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void swap_i1_i1_(thread int* const i, thread int* const j, float3x3 x_228, thread QuicksortObject* const tint_symbol_5) { +void swap_i1_i1_(thread int* const i, thread int* const j, float3x3 x_228, thread QuicksortObject* const tint_symbol_3) { int temp = 0; int const x_230 = *(i); - int const x_232 = (*(tint_symbol_5)).numbers.arr[x_230]; + int const x_232 = (*(tint_symbol_3)).numbers.arr[x_230]; temp = x_232; int const x_233 = *(i); int const x_234 = *(j); - int const x_236 = (*(tint_symbol_5)).numbers.arr[x_234]; - (*(tint_symbol_5)).numbers.arr[x_233] = x_236; + int const x_236 = (*(tint_symbol_3)).numbers.arr[x_234]; + (*(tint_symbol_3)).numbers.arr[x_233] = x_236; int const x_238 = *(j); int const x_239 = temp; - (*(tint_symbol_5)).numbers.arr[x_238] = x_239; + (*(tint_symbol_3)).numbers.arr[x_238] = x_239; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -41,7 +41,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_242 = *(h); - int const x_244 = (*(tint_symbol_6)).numbers.arr[x_242]; + int const x_244 = (*(tint_symbol_4)).numbers.arr[x_242]; pivot = x_244; int const x_245 = *(l); i_1 = as_type((as_type(x_245) - as_type(1))); @@ -55,7 +55,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_257 = j_1; - int const x_259 = (*(tint_symbol_6)).numbers.arr[x_257]; + int const x_259 = (*(tint_symbol_4)).numbers.arr[x_257]; int const x_260 = pivot; if ((x_259 <= x_260)) { int const x_264 = i_1; @@ -64,7 +64,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_266; int const x_267 = j_1; param_1 = x_267; - swap_i1_i1_(&(param), &(param_1), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_6); + swap_i1_i1_(&(param), &(param_1), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_4); } { int const x_269 = j_1; @@ -77,12 +77,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = x_273; int const x_274 = *(h); param_3 = x_274; - swap_i1_i1_(&(param_2), &(param_3), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_6); + swap_i1_i1_(&(param_2), &(param_3), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_4); int const x_276 = i_1; return x_276; } -void quicksort_(thread QuicksortObject* const tint_symbol_7) { +void quicksort_(thread QuicksortObject* const tint_symbol_5) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -121,7 +121,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { param_4 = x_301; int const x_302 = h_1; param_5 = x_302; - int const x_303 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7); + int const x_303 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_5); p = x_303; int const x_304 = p; int const x_306 = l_1; @@ -155,7 +155,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { return; } -void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; @@ -168,89 +168,95 @@ void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, th } int const x_92 = i_2; int const x_93 = i_2; - (*(tint_symbol_8)).numbers.arr[x_92] = as_type((as_type(10) - as_type(x_93))); + (*(tint_symbol_6)).numbers.arr[x_92] = as_type((as_type(10) - as_type(x_93))); int const x_96 = i_2; int const x_97 = i_2; - int const x_99 = (*(tint_symbol_8)).numbers.arr[x_97]; + int const x_99 = (*(tint_symbol_6)).numbers.arr[x_97]; int const x_100 = i_2; - int const x_102 = (*(tint_symbol_8)).numbers.arr[x_100]; - (*(tint_symbol_8)).numbers.arr[x_96] = as_type((as_type(x_99) * as_type(x_102))); + int const x_102 = (*(tint_symbol_6)).numbers.arr[x_100]; + (*(tint_symbol_6)).numbers.arr[x_96] = as_type((as_type(x_99) * as_type(x_102))); { int const x_105 = i_2; i_2 = as_type((as_type(x_105) + as_type(1))); } } - quicksort_(tint_symbol_8); - float4 const x_108 = *(tint_symbol_9); + quicksort_(tint_symbol_6); + float4 const x_108 = *(tint_symbol_7); float2 const x_111 = x_32.resolution; uv = (float2(x_108.x, x_108.y) / x_111); color = float3(1.0f, 2.0f, 3.0f); - int const x_114 = (*(tint_symbol_8)).numbers.arr[0]; + int const x_114 = (*(tint_symbol_6)).numbers.arr[0]; float const x_117 = color.x; color.x = (x_117 + float(x_114)); float const x_121 = uv.x; if ((x_121 > 0.25f)) { - int const x_126 = (*(tint_symbol_8)).numbers.arr[1]; + int const x_126 = (*(tint_symbol_6)).numbers.arr[1]; float const x_129 = color.x; color.x = (x_129 + float(x_126)); } float const x_133 = uv.x; if ((x_133 > 0.5f)) { - int const x_138 = (*(tint_symbol_8)).numbers.arr[2]; + int const x_138 = (*(tint_symbol_6)).numbers.arr[2]; float const x_141 = color.y; color.y = (x_141 + float(x_138)); } float const x_145 = uv.x; if ((x_145 > 0.75f)) { - int const x_150 = (*(tint_symbol_8)).numbers.arr[3]; + int const x_150 = (*(tint_symbol_6)).numbers.arr[3]; float const x_153 = color.z; color.z = (x_153 + float(x_150)); } - int const x_157 = (*(tint_symbol_8)).numbers.arr[4]; + int const x_157 = (*(tint_symbol_6)).numbers.arr[4]; float const x_160 = color.y; color.y = (x_160 + float(x_157)); float const x_164 = uv.y; if ((x_164 > 0.25f)) { - int const x_169 = (*(tint_symbol_8)).numbers.arr[5]; + int const x_169 = (*(tint_symbol_6)).numbers.arr[5]; float const x_172 = color.x; color.x = (x_172 + float(x_169)); } float const x_176 = uv.y; if ((x_176 > 0.5f)) { - int const x_181 = (*(tint_symbol_8)).numbers.arr[6]; + int const x_181 = (*(tint_symbol_6)).numbers.arr[6]; float const x_184 = color.y; color.y = (x_184 + float(x_181)); } float const x_188 = uv.y; if ((x_188 > 0.75f)) { - int const x_193 = (*(tint_symbol_8)).numbers.arr[7]; + int const x_193 = (*(tint_symbol_6)).numbers.arr[7]; float const x_196 = color.z; color.z = (x_196 + float(x_193)); } - int const x_200 = (*(tint_symbol_8)).numbers.arr[8]; + int const x_200 = (*(tint_symbol_6)).numbers.arr[8]; float const x_203 = color.z; color.z = (x_203 + float(x_200)); float const x_207 = uv.x; float const x_209 = uv.y; if ((fabs((x_207 - x_209)) < 0.25f)) { - int const x_216 = (*(tint_symbol_8)).numbers.arr[9]; + int const x_216 = (*(tint_symbol_6)).numbers.arr[9]; float const x_219 = color.x; color.x = (x_219 + float(x_216)); } float3 const x_222 = color; float3 const x_223 = normalize(x_222); - *(tint_symbol_10) = float4(x_223.x, x_223.y, x_223.z, 1.0f); + *(tint_symbol_8) = float4(x_223.x, x_223.y, x_223.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread QuicksortObject tint_symbol_12 = {}; - thread float4 tint_symbol_13 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_32, &(tint_symbol_12), &(tint_symbol_11), &(tint_symbol_13)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_32, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_32, tint_symbol_10, tint_symbol_9, tint_symbol_11); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) { + thread float4 tint_symbol_12 = 0.0f; + thread QuicksortObject tint_symbol_13 = {}; + thread float4 tint_symbol_14 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_32, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.hlsl index 2846e30cf1..d73c39b10d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.hlsl @@ -13,8 +13,8 @@ void main_1() { float4 x_95 = float4(0.0f, 0.0f, 0.0f, 0.0f); float4 x_95_phi = float4(0.0f, 0.0f, 0.0f, 0.0f); int x_98_phi = 0; - const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_81 = tint_symbol_5; + const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_81 = tint_symbol_4; const float4 x_86[8] = x_81; const float4 x_87 = gl_FragCoord; const float2 x_90 = asfloat(x_6[0].xy); @@ -64,18 +64,18 @@ void main_1() { const bool x_127 = x_127_phi; x_96_phi = x_95; if (x_127) { - const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_83 = tint_symbol_6; + const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_83 = tint_symbol_5; const float x_131 = x_83[x_98].x; - const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_84 = tint_symbol_7; + const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_84 = tint_symbol_6; const float x_134 = x_84[x_98].y; const float4 x_135[8] = x_81; - const float4 tint_symbol_8[8] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; - x_81 = tint_symbol_8; + const float4 tint_symbol_7[8] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; + x_81 = tint_symbol_7; x_81 = x_135; - const float4 tint_symbol_9[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - x_85 = tint_symbol_9; + const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + x_85 = tint_symbol_8; x_143 = x_85[((((int(x_131) * int(x_134)) + (x_98 * 9)) + 11) % 16)]; x_96_phi = x_143; } @@ -100,11 +100,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_10 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_10; + const main_out tint_symbol_9 = {x_GLF_color}; + return tint_symbol_9; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.msl index f6b0d6f45e..0b6546d189 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper_1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { tint_array_wrapper x_81 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; tint_array_wrapper x_82 = {}; tint_array_wrapper x_83 = {}; @@ -26,10 +26,10 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_10, thread floa float4 x_95 = 0.0f; float4 x_95_phi = 0.0f; int x_98_phi = 0; - tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_81 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_81 = tint_symbol_2; tint_array_wrapper const x_86 = x_81; - float4 const x_87 = *(tint_symbol_10); + float4 const x_87 = *(tint_symbol_8); float2 const x_90 = x_6.resolution; float2 const x_93 = floor(((float2(x_87.x, x_87.y) / x_90) * 32.0f)); x_95_phi = float4(0.5f, 0.5f, 1.0f, 1.0f); @@ -77,18 +77,18 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_10, thread floa bool const x_127 = x_127_phi; x_96_phi = x_95; if (x_127) { - tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_83 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_83 = tint_symbol_3; float const x_131 = x_83.arr[x_98].x; - tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_84 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_84 = tint_symbol_4; float const x_134 = x_84.arr[x_98].y; tint_array_wrapper const x_135 = x_81; - tint_array_wrapper const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; - x_81 = tint_symbol_7; + tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; + x_81 = tint_symbol_5; x_81 = x_135; - tint_array_wrapper_1 const tint_symbol_8 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - x_85 = tint_symbol_8; + tint_array_wrapper_1 const tint_symbol_6 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + x_85 = tint_symbol_6; x_143 = x_85.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_131)) * as_type(int(x_134))))) + as_type(as_type((as_type(x_98) * as_type(9))))))) + as_type(11))) % 16)]; x_96_phi = x_143; } @@ -99,17 +99,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_10, thread floa x_98_phi = x_99; } } - *(tint_symbol_11) = x_95; + *(tint_symbol_9) = x_95; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_12 = 0.0f; - thread float4 tint_symbol_13 = 0.0f; - tint_symbol_12 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_12), &(tint_symbol_13)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13}; - tint_symbol_2 const tint_symbol_9 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { + *(tint_symbol_10) = gl_FragCoord_param; + main_1(x_6, tint_symbol_10, tint_symbol_11); + main_out const tint_symbol_7 = {.x_GLF_color_1=*(tint_symbol_11)}; + return tint_symbol_7; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_12 = 0.0f; + thread float4 tint_symbol_13 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.hlsl index 2846e30cf1..d73c39b10d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.hlsl @@ -13,8 +13,8 @@ void main_1() { float4 x_95 = float4(0.0f, 0.0f, 0.0f, 0.0f); float4 x_95_phi = float4(0.0f, 0.0f, 0.0f, 0.0f); int x_98_phi = 0; - const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_81 = tint_symbol_5; + const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_81 = tint_symbol_4; const float4 x_86[8] = x_81; const float4 x_87 = gl_FragCoord; const float2 x_90 = asfloat(x_6[0].xy); @@ -64,18 +64,18 @@ void main_1() { const bool x_127 = x_127_phi; x_96_phi = x_95; if (x_127) { - const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_83 = tint_symbol_6; + const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_83 = tint_symbol_5; const float x_131 = x_83[x_98].x; - const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_84 = tint_symbol_7; + const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_84 = tint_symbol_6; const float x_134 = x_84[x_98].y; const float4 x_135[8] = x_81; - const float4 tint_symbol_8[8] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; - x_81 = tint_symbol_8; + const float4 tint_symbol_7[8] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}; + x_81 = tint_symbol_7; x_81 = x_135; - const float4 tint_symbol_9[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - x_85 = tint_symbol_9; + const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + x_85 = tint_symbol_8; x_143 = x_85[((((int(x_131) * int(x_134)) + (x_98 * 9)) + 11) % 16)]; x_96_phi = x_143; } @@ -100,11 +100,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_10 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_10; + const main_out tint_symbol_9 = {x_GLF_color}; + return tint_symbol_9; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.msl index f6b0d6f45e..0b6546d189 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper_1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { tint_array_wrapper x_81 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; tint_array_wrapper x_82 = {}; tint_array_wrapper x_83 = {}; @@ -26,10 +26,10 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_10, thread floa float4 x_95 = 0.0f; float4 x_95_phi = 0.0f; int x_98_phi = 0; - tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_81 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_81 = tint_symbol_2; tint_array_wrapper const x_86 = x_81; - float4 const x_87 = *(tint_symbol_10); + float4 const x_87 = *(tint_symbol_8); float2 const x_90 = x_6.resolution; float2 const x_93 = floor(((float2(x_87.x, x_87.y) / x_90) * 32.0f)); x_95_phi = float4(0.5f, 0.5f, 1.0f, 1.0f); @@ -77,18 +77,18 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_10, thread floa bool const x_127 = x_127_phi; x_96_phi = x_95; if (x_127) { - tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_83 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_83 = tint_symbol_3; float const x_131 = x_83.arr[x_98].x; - tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_84 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_84 = tint_symbol_4; float const x_134 = x_84.arr[x_98].y; tint_array_wrapper const x_135 = x_81; - tint_array_wrapper const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; - x_81 = tint_symbol_7; + tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; + x_81 = tint_symbol_5; x_81 = x_135; - tint_array_wrapper_1 const tint_symbol_8 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - x_85 = tint_symbol_8; + tint_array_wrapper_1 const tint_symbol_6 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + x_85 = tint_symbol_6; x_143 = x_85.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_131)) * as_type(int(x_134))))) + as_type(as_type((as_type(x_98) * as_type(9))))))) + as_type(11))) % 16)]; x_96_phi = x_143; } @@ -99,17 +99,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_10, thread floa x_98_phi = x_99; } } - *(tint_symbol_11) = x_95; + *(tint_symbol_9) = x_95; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_12 = 0.0f; - thread float4 tint_symbol_13 = 0.0f; - tint_symbol_12 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_12), &(tint_symbol_13)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13}; - tint_symbol_2 const tint_symbol_9 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { + *(tint_symbol_10) = gl_FragCoord_param; + main_1(x_6, tint_symbol_10, tint_symbol_11); + main_out const tint_symbol_7 = {.x_GLF_color_1=*(tint_symbol_11)}; + return tint_symbol_7; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_12 = 0.0f; + thread float4 tint_symbol_13 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.hlsl index d50630e11b..2f6304b6da 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.hlsl @@ -13,8 +13,8 @@ void main_1() { float4 x_95 = float4(0.0f, 0.0f, 0.0f, 0.0f); float4 x_95_phi = float4(0.0f, 0.0f, 0.0f, 0.0f); int x_98_phi = 0; - const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_81 = tint_symbol_5; + const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_81 = tint_symbol_4; const float4 x_86[8] = x_81; const float4 x_87 = gl_FragCoord; const float2 x_90 = asfloat(x_6[0].xy); @@ -64,14 +64,14 @@ void main_1() { const bool x_127 = x_127_phi; x_96_phi = x_95; if (x_127) { - const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_83 = tint_symbol_6; + const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_83 = tint_symbol_5; const float x_131 = x_83[x_98].x; - const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_84 = tint_symbol_7; + const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_84 = tint_symbol_6; const float x_134 = x_84[x_98].y; - const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - x_85 = tint_symbol_8; + const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + x_85 = tint_symbol_7; x_142 = x_85[((((int(x_131) * int(x_134)) + (x_98 * 9)) + 11) % 16)]; x_96_phi = x_142; } @@ -96,11 +96,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; + const main_out tint_symbol_8 = {x_GLF_color}; + return tint_symbol_8; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.msl index dd850d81fd..4eb5fa11a0 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper_1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { tint_array_wrapper x_81 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; tint_array_wrapper x_82 = {}; tint_array_wrapper x_83 = {}; @@ -26,10 +26,10 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float float4 x_95 = 0.0f; float4 x_95_phi = 0.0f; int x_98_phi = 0; - tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_81 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_81 = tint_symbol_2; tint_array_wrapper const x_86 = x_81; - float4 const x_87 = *(tint_symbol_9); + float4 const x_87 = *(tint_symbol_7); float2 const x_90 = x_6.resolution; float2 const x_93 = floor(((float2(x_87.x, x_87.y) / x_90) * 32.0f)); x_95_phi = float4(0.5f, 0.5f, 1.0f, 1.0f); @@ -77,14 +77,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float bool const x_127 = x_127_phi; x_96_phi = x_95; if (x_127) { - tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_83 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_83 = tint_symbol_3; float const x_131 = x_83.arr[x_98].x; - tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_84 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_84 = tint_symbol_4; float const x_134 = x_84.arr[x_98].y; - tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - x_85 = tint_symbol_7; + tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + x_85 = tint_symbol_5; x_142 = x_85.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_131)) * as_type(int(x_134))))) + as_type(as_type((as_type(x_98) * as_type(9))))))) + as_type(11))) % 16)]; x_96_phi = x_142; } @@ -95,17 +95,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float x_98_phi = x_99; } } - *(tint_symbol_10) = x_95; + *(tint_symbol_8) = x_95; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_6, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.hlsl index d50630e11b..2f6304b6da 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.hlsl @@ -13,8 +13,8 @@ void main_1() { float4 x_95 = float4(0.0f, 0.0f, 0.0f, 0.0f); float4 x_95_phi = float4(0.0f, 0.0f, 0.0f, 0.0f); int x_98_phi = 0; - const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_81 = tint_symbol_5; + const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_81 = tint_symbol_4; const float4 x_86[8] = x_81; const float4 x_87 = gl_FragCoord; const float2 x_90 = asfloat(x_6[0].xy); @@ -64,14 +64,14 @@ void main_1() { const bool x_127 = x_127_phi; x_96_phi = x_95; if (x_127) { - const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_83 = tint_symbol_6; + const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_83 = tint_symbol_5; const float x_131 = x_83[x_98].x; - const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - x_84 = tint_symbol_7; + const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + x_84 = tint_symbol_6; const float x_134 = x_84[x_98].y; - const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - x_85 = tint_symbol_8; + const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + x_85 = tint_symbol_7; x_142 = x_85[((((int(x_131) * int(x_134)) + (x_98 * 9)) + 11) % 16)]; x_96_phi = x_142; } @@ -96,11 +96,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; + const main_out tint_symbol_8 = {x_GLF_color}; + return tint_symbol_8; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.msl index dd850d81fd..4eb5fa11a0 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.msl @@ -13,11 +13,11 @@ struct tint_array_wrapper_1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { tint_array_wrapper x_81 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}}; tint_array_wrapper x_82 = {}; tint_array_wrapper x_83 = {}; @@ -26,10 +26,10 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float float4 x_95 = 0.0f; float4 x_95_phi = 0.0f; int x_98_phi = 0; - tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_81 = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_81 = tint_symbol_2; tint_array_wrapper const x_86 = x_81; - float4 const x_87 = *(tint_symbol_9); + float4 const x_87 = *(tint_symbol_7); float2 const x_90 = x_6.resolution; float2 const x_93 = floor(((float2(x_87.x, x_87.y) / x_90) * 32.0f)); x_95_phi = float4(0.5f, 0.5f, 1.0f, 1.0f); @@ -77,14 +77,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float bool const x_127 = x_127_phi; x_96_phi = x_95; if (x_127) { - tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_83 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_83 = tint_symbol_3; float const x_131 = x_83.arr[x_98].x; - tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - x_84 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + x_84 = tint_symbol_4; float const x_134 = x_84.arr[x_98].y; - tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - x_85 = tint_symbol_7; + tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + x_85 = tint_symbol_5; x_142 = x_85.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_131)) * as_type(int(x_134))))) + as_type(as_type((as_type(x_98) * as_type(9))))))) + as_type(11))) % 16)]; x_96_phi = x_142; } @@ -95,17 +95,23 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float x_98_phi = x_99; } } - *(tint_symbol_10) = x_95; + *(tint_symbol_8) = x_95; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_11 = gl_FragCoord_param; - main_1(x_6, &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; +main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_9) = gl_FragCoord_param; + main_1(x_6, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.hlsl index 1f593e3cf5..5f9933f69d 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.hlsl @@ -14,8 +14,8 @@ void main_1() { int x_353_phi = 0; int x_356_phi = 0; int x_358_phi = 0; - const BST tint_symbol_2 = {9, -1, -1}; - tree[0] = tint_symbol_2; + const BST tint_symbol_1 = {9, -1, -1}; + tree[0] = tint_symbol_1; switch(0u) { default: { x_58_phi = 0; @@ -36,8 +36,8 @@ void main_1() { const int x_79 = tree[x_78_save].leftIndex; if ((x_79 == -1)) { tree[x_78_save].leftIndex = 1; - const BST tint_symbol_3 = {5, -1, -1}; - tree[1] = tint_symbol_3; + const BST tint_symbol_2 = {5, -1, -1}; + tree[1] = tint_symbol_2; x_86_phi = true; break; } else { @@ -55,8 +55,8 @@ void main_1() { const int x_71 = tree[x_70_save].rightIndex; if ((x_71 == -1)) { tree[x_70_save].rightIndex = 1; - const BST tint_symbol_4 = {5, -1, -1}; - tree[1] = tint_symbol_4; + const BST tint_symbol_3 = {5, -1, -1}; + tree[1] = tint_symbol_3; x_86_phi = true; break; } else { @@ -104,8 +104,8 @@ void main_1() { const int x_112 = tree[x_111_save].leftIndex; if ((x_112 == -1)) { tree[x_111_save].leftIndex = 2; - const BST tint_symbol_5 = {12, -1, -1}; - tree[2] = tint_symbol_5; + const BST tint_symbol_4 = {12, -1, -1}; + tree[2] = tint_symbol_4; x_119_phi = true; break; } else { @@ -123,8 +123,8 @@ void main_1() { const int x_104 = tree[x_103_save].rightIndex; if ((x_104 == -1)) { tree[x_103_save].rightIndex = 2; - const BST tint_symbol_6 = {12, -1, -1}; - tree[2] = tint_symbol_6; + const BST tint_symbol_5 = {12, -1, -1}; + tree[2] = tint_symbol_5; x_119_phi = true; break; } else { @@ -172,8 +172,8 @@ void main_1() { const int x_145 = tree[x_144_save].leftIndex; if ((x_145 == -1)) { tree[x_144_save].leftIndex = 3; - const BST tint_symbol_7 = {15, -1, -1}; - tree[3] = tint_symbol_7; + const BST tint_symbol_6 = {15, -1, -1}; + tree[3] = tint_symbol_6; x_152_phi = true; break; } else { @@ -191,8 +191,8 @@ void main_1() { const int x_137 = tree[x_136_save].rightIndex; if ((x_137 == -1)) { tree[x_136_save].rightIndex = 3; - const BST tint_symbol_8 = {15, -1, -1}; - tree[3] = tint_symbol_8; + const BST tint_symbol_7 = {15, -1, -1}; + tree[3] = tint_symbol_7; x_152_phi = true; break; } else { @@ -240,8 +240,8 @@ void main_1() { const int x_178 = tree[x_177_save].leftIndex; if ((x_178 == -1)) { tree[x_177_save].leftIndex = 4; - const BST tint_symbol_9 = {7, -1, -1}; - tree[4] = tint_symbol_9; + const BST tint_symbol_8 = {7, -1, -1}; + tree[4] = tint_symbol_8; x_185_phi = true; break; } else { @@ -259,8 +259,8 @@ void main_1() { const int x_170 = tree[x_169_save].rightIndex; if ((x_170 == -1)) { tree[x_169_save].rightIndex = 4; - const BST tint_symbol_10 = {7, -1, -1}; - tree[4] = tint_symbol_10; + const BST tint_symbol_9 = {7, -1, -1}; + tree[4] = tint_symbol_9; x_185_phi = true; break; } else { @@ -308,8 +308,8 @@ void main_1() { const int x_211 = tree[x_210_save].leftIndex; if ((x_211 == -1)) { tree[x_210_save].leftIndex = 5; - const BST tint_symbol_11 = {8, -1, -1}; - tree[5] = tint_symbol_11; + const BST tint_symbol_10 = {8, -1, -1}; + tree[5] = tint_symbol_10; x_218_phi = true; break; } else { @@ -327,8 +327,8 @@ void main_1() { const int x_203 = tree[x_202_save].rightIndex; if ((x_203 == -1)) { tree[x_202_save].rightIndex = 5; - const BST tint_symbol_12 = {8, -1, -1}; - tree[5] = tint_symbol_12; + const BST tint_symbol_11 = {8, -1, -1}; + tree[5] = tint_symbol_11; x_218_phi = true; break; } else { @@ -376,8 +376,8 @@ void main_1() { const int x_244 = tree[x_243_save].leftIndex; if ((x_244 == -1)) { tree[x_243_save].leftIndex = 6; - const BST tint_symbol_13 = {2, -1, -1}; - tree[6] = tint_symbol_13; + const BST tint_symbol_12 = {2, -1, -1}; + tree[6] = tint_symbol_12; x_251_phi = true; break; } else { @@ -395,8 +395,8 @@ void main_1() { const int x_236 = tree[x_235_save].rightIndex; if ((x_236 == -1)) { tree[x_235_save].rightIndex = 6; - const BST tint_symbol_14 = {2, -1, -1}; - tree[6] = tint_symbol_14; + const BST tint_symbol_13 = {2, -1, -1}; + tree[6] = tint_symbol_13; x_251_phi = true; break; } else { @@ -444,8 +444,8 @@ void main_1() { const int x_277 = tree[x_276_save].leftIndex; if ((x_277 == -1)) { tree[x_276_save].leftIndex = 7; - const BST tint_symbol_15 = {6, -1, -1}; - tree[7] = tint_symbol_15; + const BST tint_symbol_14 = {6, -1, -1}; + tree[7] = tint_symbol_14; x_284_phi = true; break; } else { @@ -463,8 +463,8 @@ void main_1() { const int x_269 = tree[x_268_save].rightIndex; if ((x_269 == -1)) { tree[x_268_save].rightIndex = 7; - const BST tint_symbol_16 = {6, -1, -1}; - tree[7] = tint_symbol_16; + const BST tint_symbol_15 = {6, -1, -1}; + tree[7] = tint_symbol_15; x_284_phi = true; break; } else { @@ -512,8 +512,8 @@ void main_1() { const int x_310 = tree[x_309_save].leftIndex; if ((x_310 == -1)) { tree[x_309_save].leftIndex = 8; - const BST tint_symbol_17 = {17, -1, -1}; - tree[8] = tint_symbol_17; + const BST tint_symbol_16 = {17, -1, -1}; + tree[8] = tint_symbol_16; x_317_phi = true; break; } else { @@ -531,8 +531,8 @@ void main_1() { const int x_302 = tree[x_301_save].rightIndex; if ((x_302 == -1)) { tree[x_301_save].rightIndex = 8; - const BST tint_symbol_18 = {17, -1, -1}; - tree[8] = tint_symbol_18; + const BST tint_symbol_17 = {17, -1, -1}; + tree[8] = tint_symbol_17; x_317_phi = true; break; } else { @@ -580,8 +580,8 @@ void main_1() { const int x_343 = tree[x_342_save].leftIndex; if ((x_343 == -1)) { tree[x_342_save].leftIndex = 9; - const BST tint_symbol_19 = {13, -1, -1}; - tree[9] = tint_symbol_19; + const BST tint_symbol_18 = {13, -1, -1}; + tree[9] = tint_symbol_18; x_350_phi = true; break; } else { @@ -599,8 +599,8 @@ void main_1() { const int x_335 = tree[x_334_save].rightIndex; if ((x_335 == -1)) { tree[x_334_save].rightIndex = 9; - const BST tint_symbol_20 = {13, -1, -1}; - tree[9] = tint_symbol_20; + const BST tint_symbol_19 = {13, -1, -1}; + tree[9] = tint_symbol_19; x_350_phi = true; break; } else { @@ -740,9 +740,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_21 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_21; + const main_out tint_symbol_20 = {x_GLF_color}; + return tint_symbol_20; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.msl index 1f650e516a..3338c66a75 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.msl @@ -16,7 +16,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_23) { +void main_1(thread float4* const tint_symbol_22) { tint_array_wrapper tree = {}; int x_356 = 0; int x_58_phi = 0; @@ -24,8 +24,8 @@ void main_1(thread float4* const tint_symbol_23) { int x_353_phi = 0; int x_356_phi = 0; int x_358_phi = 0; - BST const tint_symbol_3 = {.data=9, .leftIndex=-1, .rightIndex=-1}; - tree.arr[0] = tint_symbol_3; + BST const tint_symbol_2 = {.data=9, .leftIndex=-1, .rightIndex=-1}; + tree.arr[0] = tint_symbol_2; switch(0u) { default: { x_58_phi = 0; @@ -46,8 +46,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_79 = tree.arr[x_78_save].leftIndex; if ((x_79 == -1)) { tree.arr[x_78_save].leftIndex = 1; - BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1}; - tree.arr[1] = tint_symbol_4; + BST const tint_symbol_3 = {.data=5, .leftIndex=-1, .rightIndex=-1}; + tree.arr[1] = tint_symbol_3; x_86_phi = true; break; } else { @@ -65,8 +65,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_71 = tree.arr[x_70_save].rightIndex; if ((x_71 == -1)) { tree.arr[x_70_save].rightIndex = 1; - BST const tint_symbol_5 = {.data=5, .leftIndex=-1, .rightIndex=-1}; - tree.arr[1] = tint_symbol_5; + BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1}; + tree.arr[1] = tint_symbol_4; x_86_phi = true; break; } else { @@ -115,8 +115,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_112 = tree.arr[x_111_save].leftIndex; if ((x_112 == -1)) { tree.arr[x_111_save].leftIndex = 2; - BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1}; - tree.arr[2] = tint_symbol_6; + BST const tint_symbol_5 = {.data=12, .leftIndex=-1, .rightIndex=-1}; + tree.arr[2] = tint_symbol_5; x_119_phi = true; break; } else { @@ -134,8 +134,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_104 = tree.arr[x_103_save].rightIndex; if ((x_104 == -1)) { tree.arr[x_103_save].rightIndex = 2; - BST const tint_symbol_7 = {.data=12, .leftIndex=-1, .rightIndex=-1}; - tree.arr[2] = tint_symbol_7; + BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1}; + tree.arr[2] = tint_symbol_6; x_119_phi = true; break; } else { @@ -184,8 +184,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_145 = tree.arr[x_144_save].leftIndex; if ((x_145 == -1)) { tree.arr[x_144_save].leftIndex = 3; - BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1}; - tree.arr[3] = tint_symbol_8; + BST const tint_symbol_7 = {.data=15, .leftIndex=-1, .rightIndex=-1}; + tree.arr[3] = tint_symbol_7; x_152_phi = true; break; } else { @@ -203,8 +203,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_137 = tree.arr[x_136_save].rightIndex; if ((x_137 == -1)) { tree.arr[x_136_save].rightIndex = 3; - BST const tint_symbol_9 = {.data=15, .leftIndex=-1, .rightIndex=-1}; - tree.arr[3] = tint_symbol_9; + BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1}; + tree.arr[3] = tint_symbol_8; x_152_phi = true; break; } else { @@ -253,8 +253,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_178 = tree.arr[x_177_save].leftIndex; if ((x_178 == -1)) { tree.arr[x_177_save].leftIndex = 4; - BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1}; - tree.arr[4] = tint_symbol_10; + BST const tint_symbol_9 = {.data=7, .leftIndex=-1, .rightIndex=-1}; + tree.arr[4] = tint_symbol_9; x_185_phi = true; break; } else { @@ -272,8 +272,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_170 = tree.arr[x_169_save].rightIndex; if ((x_170 == -1)) { tree.arr[x_169_save].rightIndex = 4; - BST const tint_symbol_11 = {.data=7, .leftIndex=-1, .rightIndex=-1}; - tree.arr[4] = tint_symbol_11; + BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1}; + tree.arr[4] = tint_symbol_10; x_185_phi = true; break; } else { @@ -322,8 +322,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_211 = tree.arr[x_210_save].leftIndex; if ((x_211 == -1)) { tree.arr[x_210_save].leftIndex = 5; - BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1}; - tree.arr[5] = tint_symbol_12; + BST const tint_symbol_11 = {.data=8, .leftIndex=-1, .rightIndex=-1}; + tree.arr[5] = tint_symbol_11; x_218_phi = true; break; } else { @@ -341,8 +341,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_203 = tree.arr[x_202_save].rightIndex; if ((x_203 == -1)) { tree.arr[x_202_save].rightIndex = 5; - BST const tint_symbol_13 = {.data=8, .leftIndex=-1, .rightIndex=-1}; - tree.arr[5] = tint_symbol_13; + BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1}; + tree.arr[5] = tint_symbol_12; x_218_phi = true; break; } else { @@ -391,8 +391,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_244 = tree.arr[x_243_save].leftIndex; if ((x_244 == -1)) { tree.arr[x_243_save].leftIndex = 6; - BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1}; - tree.arr[6] = tint_symbol_14; + BST const tint_symbol_13 = {.data=2, .leftIndex=-1, .rightIndex=-1}; + tree.arr[6] = tint_symbol_13; x_251_phi = true; break; } else { @@ -410,8 +410,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_236 = tree.arr[x_235_save].rightIndex; if ((x_236 == -1)) { tree.arr[x_235_save].rightIndex = 6; - BST const tint_symbol_15 = {.data=2, .leftIndex=-1, .rightIndex=-1}; - tree.arr[6] = tint_symbol_15; + BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1}; + tree.arr[6] = tint_symbol_14; x_251_phi = true; break; } else { @@ -460,8 +460,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_277 = tree.arr[x_276_save].leftIndex; if ((x_277 == -1)) { tree.arr[x_276_save].leftIndex = 7; - BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1}; - tree.arr[7] = tint_symbol_16; + BST const tint_symbol_15 = {.data=6, .leftIndex=-1, .rightIndex=-1}; + tree.arr[7] = tint_symbol_15; x_284_phi = true; break; } else { @@ -479,8 +479,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_269 = tree.arr[x_268_save].rightIndex; if ((x_269 == -1)) { tree.arr[x_268_save].rightIndex = 7; - BST const tint_symbol_17 = {.data=6, .leftIndex=-1, .rightIndex=-1}; - tree.arr[7] = tint_symbol_17; + BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1}; + tree.arr[7] = tint_symbol_16; x_284_phi = true; break; } else { @@ -529,8 +529,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_310 = tree.arr[x_309_save].leftIndex; if ((x_310 == -1)) { tree.arr[x_309_save].leftIndex = 8; - BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1}; - tree.arr[8] = tint_symbol_18; + BST const tint_symbol_17 = {.data=17, .leftIndex=-1, .rightIndex=-1}; + tree.arr[8] = tint_symbol_17; x_317_phi = true; break; } else { @@ -548,8 +548,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_302 = tree.arr[x_301_save].rightIndex; if ((x_302 == -1)) { tree.arr[x_301_save].rightIndex = 8; - BST const tint_symbol_19 = {.data=17, .leftIndex=-1, .rightIndex=-1}; - tree.arr[8] = tint_symbol_19; + BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1}; + tree.arr[8] = tint_symbol_18; x_317_phi = true; break; } else { @@ -598,8 +598,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_343 = tree.arr[x_342_save].leftIndex; if ((x_343 == -1)) { tree.arr[x_342_save].leftIndex = 9; - BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1}; - tree.arr[9] = tint_symbol_20; + BST const tint_symbol_19 = {.data=13, .leftIndex=-1, .rightIndex=-1}; + tree.arr[9] = tint_symbol_19; x_350_phi = true; break; } else { @@ -617,8 +617,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_335 = tree.arr[x_334_save].rightIndex; if ((x_335 == -1)) { tree.arr[x_334_save].rightIndex = 9; - BST const tint_symbol_21 = {.data=13, .leftIndex=-1, .rightIndex=-1}; - tree.arr[9] = tint_symbol_21; + BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1}; + tree.arr[9] = tint_symbol_20; x_350_phi = true; break; } else { @@ -745,18 +745,24 @@ void main_1(thread float4* const tint_symbol_23) { } } if ((x_356 == as_type(20))) { - *(tint_symbol_23) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_22) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_23) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_22) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_24 = 0.0f; - main_1(&(tint_symbol_24)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_24}; - tint_symbol_1 const tint_symbol_22 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_22; +main_out tint_symbol_inner(thread float4* const tint_symbol_23) { + main_1(tint_symbol_23); + main_out const tint_symbol_21 = {.x_GLF_color_1=*(tint_symbol_23)}; + return tint_symbol_21; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_24 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_24)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.hlsl index 1f593e3cf5..5f9933f69d 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.hlsl @@ -14,8 +14,8 @@ void main_1() { int x_353_phi = 0; int x_356_phi = 0; int x_358_phi = 0; - const BST tint_symbol_2 = {9, -1, -1}; - tree[0] = tint_symbol_2; + const BST tint_symbol_1 = {9, -1, -1}; + tree[0] = tint_symbol_1; switch(0u) { default: { x_58_phi = 0; @@ -36,8 +36,8 @@ void main_1() { const int x_79 = tree[x_78_save].leftIndex; if ((x_79 == -1)) { tree[x_78_save].leftIndex = 1; - const BST tint_symbol_3 = {5, -1, -1}; - tree[1] = tint_symbol_3; + const BST tint_symbol_2 = {5, -1, -1}; + tree[1] = tint_symbol_2; x_86_phi = true; break; } else { @@ -55,8 +55,8 @@ void main_1() { const int x_71 = tree[x_70_save].rightIndex; if ((x_71 == -1)) { tree[x_70_save].rightIndex = 1; - const BST tint_symbol_4 = {5, -1, -1}; - tree[1] = tint_symbol_4; + const BST tint_symbol_3 = {5, -1, -1}; + tree[1] = tint_symbol_3; x_86_phi = true; break; } else { @@ -104,8 +104,8 @@ void main_1() { const int x_112 = tree[x_111_save].leftIndex; if ((x_112 == -1)) { tree[x_111_save].leftIndex = 2; - const BST tint_symbol_5 = {12, -1, -1}; - tree[2] = tint_symbol_5; + const BST tint_symbol_4 = {12, -1, -1}; + tree[2] = tint_symbol_4; x_119_phi = true; break; } else { @@ -123,8 +123,8 @@ void main_1() { const int x_104 = tree[x_103_save].rightIndex; if ((x_104 == -1)) { tree[x_103_save].rightIndex = 2; - const BST tint_symbol_6 = {12, -1, -1}; - tree[2] = tint_symbol_6; + const BST tint_symbol_5 = {12, -1, -1}; + tree[2] = tint_symbol_5; x_119_phi = true; break; } else { @@ -172,8 +172,8 @@ void main_1() { const int x_145 = tree[x_144_save].leftIndex; if ((x_145 == -1)) { tree[x_144_save].leftIndex = 3; - const BST tint_symbol_7 = {15, -1, -1}; - tree[3] = tint_symbol_7; + const BST tint_symbol_6 = {15, -1, -1}; + tree[3] = tint_symbol_6; x_152_phi = true; break; } else { @@ -191,8 +191,8 @@ void main_1() { const int x_137 = tree[x_136_save].rightIndex; if ((x_137 == -1)) { tree[x_136_save].rightIndex = 3; - const BST tint_symbol_8 = {15, -1, -1}; - tree[3] = tint_symbol_8; + const BST tint_symbol_7 = {15, -1, -1}; + tree[3] = tint_symbol_7; x_152_phi = true; break; } else { @@ -240,8 +240,8 @@ void main_1() { const int x_178 = tree[x_177_save].leftIndex; if ((x_178 == -1)) { tree[x_177_save].leftIndex = 4; - const BST tint_symbol_9 = {7, -1, -1}; - tree[4] = tint_symbol_9; + const BST tint_symbol_8 = {7, -1, -1}; + tree[4] = tint_symbol_8; x_185_phi = true; break; } else { @@ -259,8 +259,8 @@ void main_1() { const int x_170 = tree[x_169_save].rightIndex; if ((x_170 == -1)) { tree[x_169_save].rightIndex = 4; - const BST tint_symbol_10 = {7, -1, -1}; - tree[4] = tint_symbol_10; + const BST tint_symbol_9 = {7, -1, -1}; + tree[4] = tint_symbol_9; x_185_phi = true; break; } else { @@ -308,8 +308,8 @@ void main_1() { const int x_211 = tree[x_210_save].leftIndex; if ((x_211 == -1)) { tree[x_210_save].leftIndex = 5; - const BST tint_symbol_11 = {8, -1, -1}; - tree[5] = tint_symbol_11; + const BST tint_symbol_10 = {8, -1, -1}; + tree[5] = tint_symbol_10; x_218_phi = true; break; } else { @@ -327,8 +327,8 @@ void main_1() { const int x_203 = tree[x_202_save].rightIndex; if ((x_203 == -1)) { tree[x_202_save].rightIndex = 5; - const BST tint_symbol_12 = {8, -1, -1}; - tree[5] = tint_symbol_12; + const BST tint_symbol_11 = {8, -1, -1}; + tree[5] = tint_symbol_11; x_218_phi = true; break; } else { @@ -376,8 +376,8 @@ void main_1() { const int x_244 = tree[x_243_save].leftIndex; if ((x_244 == -1)) { tree[x_243_save].leftIndex = 6; - const BST tint_symbol_13 = {2, -1, -1}; - tree[6] = tint_symbol_13; + const BST tint_symbol_12 = {2, -1, -1}; + tree[6] = tint_symbol_12; x_251_phi = true; break; } else { @@ -395,8 +395,8 @@ void main_1() { const int x_236 = tree[x_235_save].rightIndex; if ((x_236 == -1)) { tree[x_235_save].rightIndex = 6; - const BST tint_symbol_14 = {2, -1, -1}; - tree[6] = tint_symbol_14; + const BST tint_symbol_13 = {2, -1, -1}; + tree[6] = tint_symbol_13; x_251_phi = true; break; } else { @@ -444,8 +444,8 @@ void main_1() { const int x_277 = tree[x_276_save].leftIndex; if ((x_277 == -1)) { tree[x_276_save].leftIndex = 7; - const BST tint_symbol_15 = {6, -1, -1}; - tree[7] = tint_symbol_15; + const BST tint_symbol_14 = {6, -1, -1}; + tree[7] = tint_symbol_14; x_284_phi = true; break; } else { @@ -463,8 +463,8 @@ void main_1() { const int x_269 = tree[x_268_save].rightIndex; if ((x_269 == -1)) { tree[x_268_save].rightIndex = 7; - const BST tint_symbol_16 = {6, -1, -1}; - tree[7] = tint_symbol_16; + const BST tint_symbol_15 = {6, -1, -1}; + tree[7] = tint_symbol_15; x_284_phi = true; break; } else { @@ -512,8 +512,8 @@ void main_1() { const int x_310 = tree[x_309_save].leftIndex; if ((x_310 == -1)) { tree[x_309_save].leftIndex = 8; - const BST tint_symbol_17 = {17, -1, -1}; - tree[8] = tint_symbol_17; + const BST tint_symbol_16 = {17, -1, -1}; + tree[8] = tint_symbol_16; x_317_phi = true; break; } else { @@ -531,8 +531,8 @@ void main_1() { const int x_302 = tree[x_301_save].rightIndex; if ((x_302 == -1)) { tree[x_301_save].rightIndex = 8; - const BST tint_symbol_18 = {17, -1, -1}; - tree[8] = tint_symbol_18; + const BST tint_symbol_17 = {17, -1, -1}; + tree[8] = tint_symbol_17; x_317_phi = true; break; } else { @@ -580,8 +580,8 @@ void main_1() { const int x_343 = tree[x_342_save].leftIndex; if ((x_343 == -1)) { tree[x_342_save].leftIndex = 9; - const BST tint_symbol_19 = {13, -1, -1}; - tree[9] = tint_symbol_19; + const BST tint_symbol_18 = {13, -1, -1}; + tree[9] = tint_symbol_18; x_350_phi = true; break; } else { @@ -599,8 +599,8 @@ void main_1() { const int x_335 = tree[x_334_save].rightIndex; if ((x_335 == -1)) { tree[x_334_save].rightIndex = 9; - const BST tint_symbol_20 = {13, -1, -1}; - tree[9] = tint_symbol_20; + const BST tint_symbol_19 = {13, -1, -1}; + tree[9] = tint_symbol_19; x_350_phi = true; break; } else { @@ -740,9 +740,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_21 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_21; + const main_out tint_symbol_20 = {x_GLF_color}; + return tint_symbol_20; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.msl index 1f650e516a..3338c66a75 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.msl @@ -16,7 +16,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_23) { +void main_1(thread float4* const tint_symbol_22) { tint_array_wrapper tree = {}; int x_356 = 0; int x_58_phi = 0; @@ -24,8 +24,8 @@ void main_1(thread float4* const tint_symbol_23) { int x_353_phi = 0; int x_356_phi = 0; int x_358_phi = 0; - BST const tint_symbol_3 = {.data=9, .leftIndex=-1, .rightIndex=-1}; - tree.arr[0] = tint_symbol_3; + BST const tint_symbol_2 = {.data=9, .leftIndex=-1, .rightIndex=-1}; + tree.arr[0] = tint_symbol_2; switch(0u) { default: { x_58_phi = 0; @@ -46,8 +46,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_79 = tree.arr[x_78_save].leftIndex; if ((x_79 == -1)) { tree.arr[x_78_save].leftIndex = 1; - BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1}; - tree.arr[1] = tint_symbol_4; + BST const tint_symbol_3 = {.data=5, .leftIndex=-1, .rightIndex=-1}; + tree.arr[1] = tint_symbol_3; x_86_phi = true; break; } else { @@ -65,8 +65,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_71 = tree.arr[x_70_save].rightIndex; if ((x_71 == -1)) { tree.arr[x_70_save].rightIndex = 1; - BST const tint_symbol_5 = {.data=5, .leftIndex=-1, .rightIndex=-1}; - tree.arr[1] = tint_symbol_5; + BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1}; + tree.arr[1] = tint_symbol_4; x_86_phi = true; break; } else { @@ -115,8 +115,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_112 = tree.arr[x_111_save].leftIndex; if ((x_112 == -1)) { tree.arr[x_111_save].leftIndex = 2; - BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1}; - tree.arr[2] = tint_symbol_6; + BST const tint_symbol_5 = {.data=12, .leftIndex=-1, .rightIndex=-1}; + tree.arr[2] = tint_symbol_5; x_119_phi = true; break; } else { @@ -134,8 +134,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_104 = tree.arr[x_103_save].rightIndex; if ((x_104 == -1)) { tree.arr[x_103_save].rightIndex = 2; - BST const tint_symbol_7 = {.data=12, .leftIndex=-1, .rightIndex=-1}; - tree.arr[2] = tint_symbol_7; + BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1}; + tree.arr[2] = tint_symbol_6; x_119_phi = true; break; } else { @@ -184,8 +184,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_145 = tree.arr[x_144_save].leftIndex; if ((x_145 == -1)) { tree.arr[x_144_save].leftIndex = 3; - BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1}; - tree.arr[3] = tint_symbol_8; + BST const tint_symbol_7 = {.data=15, .leftIndex=-1, .rightIndex=-1}; + tree.arr[3] = tint_symbol_7; x_152_phi = true; break; } else { @@ -203,8 +203,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_137 = tree.arr[x_136_save].rightIndex; if ((x_137 == -1)) { tree.arr[x_136_save].rightIndex = 3; - BST const tint_symbol_9 = {.data=15, .leftIndex=-1, .rightIndex=-1}; - tree.arr[3] = tint_symbol_9; + BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1}; + tree.arr[3] = tint_symbol_8; x_152_phi = true; break; } else { @@ -253,8 +253,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_178 = tree.arr[x_177_save].leftIndex; if ((x_178 == -1)) { tree.arr[x_177_save].leftIndex = 4; - BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1}; - tree.arr[4] = tint_symbol_10; + BST const tint_symbol_9 = {.data=7, .leftIndex=-1, .rightIndex=-1}; + tree.arr[4] = tint_symbol_9; x_185_phi = true; break; } else { @@ -272,8 +272,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_170 = tree.arr[x_169_save].rightIndex; if ((x_170 == -1)) { tree.arr[x_169_save].rightIndex = 4; - BST const tint_symbol_11 = {.data=7, .leftIndex=-1, .rightIndex=-1}; - tree.arr[4] = tint_symbol_11; + BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1}; + tree.arr[4] = tint_symbol_10; x_185_phi = true; break; } else { @@ -322,8 +322,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_211 = tree.arr[x_210_save].leftIndex; if ((x_211 == -1)) { tree.arr[x_210_save].leftIndex = 5; - BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1}; - tree.arr[5] = tint_symbol_12; + BST const tint_symbol_11 = {.data=8, .leftIndex=-1, .rightIndex=-1}; + tree.arr[5] = tint_symbol_11; x_218_phi = true; break; } else { @@ -341,8 +341,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_203 = tree.arr[x_202_save].rightIndex; if ((x_203 == -1)) { tree.arr[x_202_save].rightIndex = 5; - BST const tint_symbol_13 = {.data=8, .leftIndex=-1, .rightIndex=-1}; - tree.arr[5] = tint_symbol_13; + BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1}; + tree.arr[5] = tint_symbol_12; x_218_phi = true; break; } else { @@ -391,8 +391,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_244 = tree.arr[x_243_save].leftIndex; if ((x_244 == -1)) { tree.arr[x_243_save].leftIndex = 6; - BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1}; - tree.arr[6] = tint_symbol_14; + BST const tint_symbol_13 = {.data=2, .leftIndex=-1, .rightIndex=-1}; + tree.arr[6] = tint_symbol_13; x_251_phi = true; break; } else { @@ -410,8 +410,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_236 = tree.arr[x_235_save].rightIndex; if ((x_236 == -1)) { tree.arr[x_235_save].rightIndex = 6; - BST const tint_symbol_15 = {.data=2, .leftIndex=-1, .rightIndex=-1}; - tree.arr[6] = tint_symbol_15; + BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1}; + tree.arr[6] = tint_symbol_14; x_251_phi = true; break; } else { @@ -460,8 +460,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_277 = tree.arr[x_276_save].leftIndex; if ((x_277 == -1)) { tree.arr[x_276_save].leftIndex = 7; - BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1}; - tree.arr[7] = tint_symbol_16; + BST const tint_symbol_15 = {.data=6, .leftIndex=-1, .rightIndex=-1}; + tree.arr[7] = tint_symbol_15; x_284_phi = true; break; } else { @@ -479,8 +479,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_269 = tree.arr[x_268_save].rightIndex; if ((x_269 == -1)) { tree.arr[x_268_save].rightIndex = 7; - BST const tint_symbol_17 = {.data=6, .leftIndex=-1, .rightIndex=-1}; - tree.arr[7] = tint_symbol_17; + BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1}; + tree.arr[7] = tint_symbol_16; x_284_phi = true; break; } else { @@ -529,8 +529,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_310 = tree.arr[x_309_save].leftIndex; if ((x_310 == -1)) { tree.arr[x_309_save].leftIndex = 8; - BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1}; - tree.arr[8] = tint_symbol_18; + BST const tint_symbol_17 = {.data=17, .leftIndex=-1, .rightIndex=-1}; + tree.arr[8] = tint_symbol_17; x_317_phi = true; break; } else { @@ -548,8 +548,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_302 = tree.arr[x_301_save].rightIndex; if ((x_302 == -1)) { tree.arr[x_301_save].rightIndex = 8; - BST const tint_symbol_19 = {.data=17, .leftIndex=-1, .rightIndex=-1}; - tree.arr[8] = tint_symbol_19; + BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1}; + tree.arr[8] = tint_symbol_18; x_317_phi = true; break; } else { @@ -598,8 +598,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_343 = tree.arr[x_342_save].leftIndex; if ((x_343 == -1)) { tree.arr[x_342_save].leftIndex = 9; - BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1}; - tree.arr[9] = tint_symbol_20; + BST const tint_symbol_19 = {.data=13, .leftIndex=-1, .rightIndex=-1}; + tree.arr[9] = tint_symbol_19; x_350_phi = true; break; } else { @@ -617,8 +617,8 @@ void main_1(thread float4* const tint_symbol_23) { int const x_335 = tree.arr[x_334_save].rightIndex; if ((x_335 == -1)) { tree.arr[x_334_save].rightIndex = 9; - BST const tint_symbol_21 = {.data=13, .leftIndex=-1, .rightIndex=-1}; - tree.arr[9] = tint_symbol_21; + BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1}; + tree.arr[9] = tint_symbol_20; x_350_phi = true; break; } else { @@ -745,18 +745,24 @@ void main_1(thread float4* const tint_symbol_23) { } } if ((x_356 == as_type(20))) { - *(tint_symbol_23) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_22) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_23) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_22) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_24 = 0.0f; - main_1(&(tint_symbol_24)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_24}; - tint_symbol_1 const tint_symbol_22 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_22; +main_out tint_symbol_inner(thread float4* const tint_symbol_23) { + main_1(tint_symbol_23); + main_out const tint_symbol_21 = {.x_GLF_color_1=*(tint_symbol_23)}; + return tint_symbol_21; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_24 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_24)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.spvasm.expected.msl index 7b8839896d..9437ce732d 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.spvasm.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread float4* const tint_symbol_25) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_22, thread float4* const tint_symbol_23) { tint_array_wrapper tree = {}; bool x_67 = false; bool x_114 = false; @@ -31,8 +31,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int x_569_phi = 0; int x_572_phi = 0; int x_574_phi = 0; - BST const tint_symbol_4 = {.data=9, .leftIndex=-1, .rightIndex=-1}; - tree.arr[0] = tint_symbol_4; + BST const tint_symbol_2 = {.data=9, .leftIndex=-1, .rightIndex=-1}; + tree.arr[0] = tint_symbol_2; switch(0u) { default: { x_67_phi = false; @@ -66,8 +66,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_89_save].leftIndex = 1; - BST const tint_symbol_5 = {.data=5, .leftIndex=-1, .rightIndex=-1}; - tree.arr[1] = tint_symbol_5; + BST const tint_symbol_3 = {.data=5, .leftIndex=-1, .rightIndex=-1}; + tree.arr[1] = tint_symbol_3; while (true) { x_114_phi = x_67; if ((0 < int(x_97))) { @@ -99,8 +99,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_82 = tree.arr[x_81_save].rightIndex; if ((x_82 == -1)) { tree.arr[x_81_save].rightIndex = 1; - BST const tint_symbol_6 = {.data=5, .leftIndex=-1, .rightIndex=-1}; - tree.arr[1] = tint_symbol_6; + BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1}; + tree.arr[1] = tint_symbol_4; x_116_phi = true; break; } else { @@ -139,7 +139,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int x_120 = 0; bool x_134_phi = false; int const x_119 = x_119_phi; - float const x_125 = (*(tint_symbol_24)).y; + float const x_125 = (*(tint_symbol_22)).y; bool const x_126 = (x_125 < 0.0f); x_134_phi = x_126; if (!(x_126)) { @@ -190,8 +190,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_161_save].leftIndex = 2; - BST const tint_symbol_7 = {.data=12, .leftIndex=-1, .rightIndex=-1}; - tree.arr[2] = tint_symbol_7; + BST const tint_symbol_5 = {.data=12, .leftIndex=-1, .rightIndex=-1}; + tree.arr[2] = tint_symbol_5; while (true) { x_186_phi = x_139; if ((0 < int(x_169))) { @@ -223,8 +223,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_154 = tree.arr[x_153_save].rightIndex; if ((x_154 == -1)) { tree.arr[x_153_save].rightIndex = 2; - BST const tint_symbol_8 = {.data=12, .leftIndex=-1, .rightIndex=-1}; - tree.arr[2] = tint_symbol_8; + BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1}; + tree.arr[2] = tint_symbol_6; x_188_phi = true; break; } else { @@ -300,8 +300,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_215_save].leftIndex = 3; - BST const tint_symbol_9 = {.data=15, .leftIndex=-1, .rightIndex=-1}; - tree.arr[3] = tint_symbol_9; + BST const tint_symbol_7 = {.data=15, .leftIndex=-1, .rightIndex=-1}; + tree.arr[3] = tint_symbol_7; while (true) { x_240_phi = x_193; if ((0 < int(x_223))) { @@ -333,8 +333,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_208 = tree.arr[x_207_save].rightIndex; if ((x_208 == -1)) { tree.arr[x_207_save].rightIndex = 3; - BST const tint_symbol_10 = {.data=15, .leftIndex=-1, .rightIndex=-1}; - tree.arr[3] = tint_symbol_10; + BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1}; + tree.arr[3] = tint_symbol_8; x_242_phi = true; break; } else { @@ -405,8 +405,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_269_save].leftIndex = 4; - BST const tint_symbol_11 = {.data=7, .leftIndex=-1, .rightIndex=-1}; - tree.arr[4] = tint_symbol_11; + BST const tint_symbol_9 = {.data=7, .leftIndex=-1, .rightIndex=-1}; + tree.arr[4] = tint_symbol_9; while (true) { x_294_phi = x_247; if ((0 < int(x_277))) { @@ -438,8 +438,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_262 = tree.arr[x_261_save].rightIndex; if ((x_262 == -1)) { tree.arr[x_261_save].rightIndex = 4; - BST const tint_symbol_12 = {.data=7, .leftIndex=-1, .rightIndex=-1}; - tree.arr[4] = tint_symbol_12; + BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1}; + tree.arr[4] = tint_symbol_10; x_296_phi = true; break; } else { @@ -510,8 +510,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_323_save].leftIndex = 5; - BST const tint_symbol_13 = {.data=8, .leftIndex=-1, .rightIndex=-1}; - tree.arr[5] = tint_symbol_13; + BST const tint_symbol_11 = {.data=8, .leftIndex=-1, .rightIndex=-1}; + tree.arr[5] = tint_symbol_11; while (true) { x_348_phi = x_301; if ((0 < int(x_331))) { @@ -543,8 +543,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_316 = tree.arr[x_315_save].rightIndex; if ((x_316 == -1)) { tree.arr[x_315_save].rightIndex = 5; - BST const tint_symbol_14 = {.data=8, .leftIndex=-1, .rightIndex=-1}; - tree.arr[5] = tint_symbol_14; + BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1}; + tree.arr[5] = tint_symbol_12; x_350_phi = true; break; } else { @@ -615,8 +615,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_377_save].leftIndex = 6; - BST const tint_symbol_15 = {.data=2, .leftIndex=-1, .rightIndex=-1}; - tree.arr[6] = tint_symbol_15; + BST const tint_symbol_13 = {.data=2, .leftIndex=-1, .rightIndex=-1}; + tree.arr[6] = tint_symbol_13; while (true) { x_402_phi = x_355; if ((0 < int(x_385))) { @@ -648,8 +648,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_370 = tree.arr[x_369_save].rightIndex; if ((x_370 == -1)) { tree.arr[x_369_save].rightIndex = 6; - BST const tint_symbol_16 = {.data=2, .leftIndex=-1, .rightIndex=-1}; - tree.arr[6] = tint_symbol_16; + BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1}; + tree.arr[6] = tint_symbol_14; x_404_phi = true; break; } else { @@ -720,8 +720,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_431_save].leftIndex = 7; - BST const tint_symbol_17 = {.data=6, .leftIndex=-1, .rightIndex=-1}; - tree.arr[7] = tint_symbol_17; + BST const tint_symbol_15 = {.data=6, .leftIndex=-1, .rightIndex=-1}; + tree.arr[7] = tint_symbol_15; while (true) { x_456_phi = x_409; if ((0 < int(x_439))) { @@ -753,8 +753,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_424 = tree.arr[x_423_save].rightIndex; if ((x_424 == -1)) { tree.arr[x_423_save].rightIndex = 7; - BST const tint_symbol_18 = {.data=6, .leftIndex=-1, .rightIndex=-1}; - tree.arr[7] = tint_symbol_18; + BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1}; + tree.arr[7] = tint_symbol_16; x_458_phi = true; break; } else { @@ -825,8 +825,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_485_save].leftIndex = 8; - BST const tint_symbol_19 = {.data=17, .leftIndex=-1, .rightIndex=-1}; - tree.arr[8] = tint_symbol_19; + BST const tint_symbol_17 = {.data=17, .leftIndex=-1, .rightIndex=-1}; + tree.arr[8] = tint_symbol_17; while (true) { x_510_phi = x_463; if ((0 < int(x_493))) { @@ -858,8 +858,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_478 = tree.arr[x_477_save].rightIndex; if ((x_478 == -1)) { tree.arr[x_477_save].rightIndex = 8; - BST const tint_symbol_20 = {.data=17, .leftIndex=-1, .rightIndex=-1}; - tree.arr[8] = tint_symbol_20; + BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1}; + tree.arr[8] = tint_symbol_18; x_512_phi = true; break; } else { @@ -930,8 +930,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_539_save].leftIndex = 9; - BST const tint_symbol_21 = {.data=13, .leftIndex=-1, .rightIndex=-1}; - tree.arr[9] = tint_symbol_21; + BST const tint_symbol_19 = {.data=13, .leftIndex=-1, .rightIndex=-1}; + tree.arr[9] = tint_symbol_19; while (true) { x_564_phi = x_517; if ((0 < int(x_547))) { @@ -963,8 +963,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_532 = tree.arr[x_531_save].rightIndex; if ((x_532 == -1)) { tree.arr[x_531_save].rightIndex = 9; - BST const tint_symbol_22 = {.data=13, .leftIndex=-1, .rightIndex=-1}; - tree.arr[9] = tint_symbol_22; + BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1}; + tree.arr[9] = tint_symbol_20; x_566_phi = true; break; } else { @@ -1097,20 +1097,26 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa } } if ((x_572 == as_type(20))) { - *(tint_symbol_25) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_23) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_25) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_23) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_26 = 0.0f; - thread float4 tint_symbol_27 = 0.0f; - tint_symbol_26 = gl_FragCoord_param; - main_1(x_8, &(tint_symbol_26), &(tint_symbol_27)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_27}; - tint_symbol_2 const tint_symbol_23 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_23; +main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_24, thread float4* const tint_symbol_25) { + *(tint_symbol_24) = gl_FragCoord_param; + main_1(x_8, tint_symbol_24, tint_symbol_25); + main_out const tint_symbol_21 = {.x_GLF_color_1=*(tint_symbol_25)}; + return tint_symbol_21; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_26 = 0.0f; + thread float4 tint_symbol_27 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_26), &(tint_symbol_27)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl.expected.msl index 7b8839896d..9437ce732d 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl.expected.msl @@ -15,11 +15,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread float4* const tint_symbol_25) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_22, thread float4* const tint_symbol_23) { tint_array_wrapper tree = {}; bool x_67 = false; bool x_114 = false; @@ -31,8 +31,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int x_569_phi = 0; int x_572_phi = 0; int x_574_phi = 0; - BST const tint_symbol_4 = {.data=9, .leftIndex=-1, .rightIndex=-1}; - tree.arr[0] = tint_symbol_4; + BST const tint_symbol_2 = {.data=9, .leftIndex=-1, .rightIndex=-1}; + tree.arr[0] = tint_symbol_2; switch(0u) { default: { x_67_phi = false; @@ -66,8 +66,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_89_save].leftIndex = 1; - BST const tint_symbol_5 = {.data=5, .leftIndex=-1, .rightIndex=-1}; - tree.arr[1] = tint_symbol_5; + BST const tint_symbol_3 = {.data=5, .leftIndex=-1, .rightIndex=-1}; + tree.arr[1] = tint_symbol_3; while (true) { x_114_phi = x_67; if ((0 < int(x_97))) { @@ -99,8 +99,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_82 = tree.arr[x_81_save].rightIndex; if ((x_82 == -1)) { tree.arr[x_81_save].rightIndex = 1; - BST const tint_symbol_6 = {.data=5, .leftIndex=-1, .rightIndex=-1}; - tree.arr[1] = tint_symbol_6; + BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1}; + tree.arr[1] = tint_symbol_4; x_116_phi = true; break; } else { @@ -139,7 +139,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int x_120 = 0; bool x_134_phi = false; int const x_119 = x_119_phi; - float const x_125 = (*(tint_symbol_24)).y; + float const x_125 = (*(tint_symbol_22)).y; bool const x_126 = (x_125 < 0.0f); x_134_phi = x_126; if (!(x_126)) { @@ -190,8 +190,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_161_save].leftIndex = 2; - BST const tint_symbol_7 = {.data=12, .leftIndex=-1, .rightIndex=-1}; - tree.arr[2] = tint_symbol_7; + BST const tint_symbol_5 = {.data=12, .leftIndex=-1, .rightIndex=-1}; + tree.arr[2] = tint_symbol_5; while (true) { x_186_phi = x_139; if ((0 < int(x_169))) { @@ -223,8 +223,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_154 = tree.arr[x_153_save].rightIndex; if ((x_154 == -1)) { tree.arr[x_153_save].rightIndex = 2; - BST const tint_symbol_8 = {.data=12, .leftIndex=-1, .rightIndex=-1}; - tree.arr[2] = tint_symbol_8; + BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1}; + tree.arr[2] = tint_symbol_6; x_188_phi = true; break; } else { @@ -300,8 +300,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_215_save].leftIndex = 3; - BST const tint_symbol_9 = {.data=15, .leftIndex=-1, .rightIndex=-1}; - tree.arr[3] = tint_symbol_9; + BST const tint_symbol_7 = {.data=15, .leftIndex=-1, .rightIndex=-1}; + tree.arr[3] = tint_symbol_7; while (true) { x_240_phi = x_193; if ((0 < int(x_223))) { @@ -333,8 +333,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_208 = tree.arr[x_207_save].rightIndex; if ((x_208 == -1)) { tree.arr[x_207_save].rightIndex = 3; - BST const tint_symbol_10 = {.data=15, .leftIndex=-1, .rightIndex=-1}; - tree.arr[3] = tint_symbol_10; + BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1}; + tree.arr[3] = tint_symbol_8; x_242_phi = true; break; } else { @@ -405,8 +405,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_269_save].leftIndex = 4; - BST const tint_symbol_11 = {.data=7, .leftIndex=-1, .rightIndex=-1}; - tree.arr[4] = tint_symbol_11; + BST const tint_symbol_9 = {.data=7, .leftIndex=-1, .rightIndex=-1}; + tree.arr[4] = tint_symbol_9; while (true) { x_294_phi = x_247; if ((0 < int(x_277))) { @@ -438,8 +438,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_262 = tree.arr[x_261_save].rightIndex; if ((x_262 == -1)) { tree.arr[x_261_save].rightIndex = 4; - BST const tint_symbol_12 = {.data=7, .leftIndex=-1, .rightIndex=-1}; - tree.arr[4] = tint_symbol_12; + BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1}; + tree.arr[4] = tint_symbol_10; x_296_phi = true; break; } else { @@ -510,8 +510,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_323_save].leftIndex = 5; - BST const tint_symbol_13 = {.data=8, .leftIndex=-1, .rightIndex=-1}; - tree.arr[5] = tint_symbol_13; + BST const tint_symbol_11 = {.data=8, .leftIndex=-1, .rightIndex=-1}; + tree.arr[5] = tint_symbol_11; while (true) { x_348_phi = x_301; if ((0 < int(x_331))) { @@ -543,8 +543,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_316 = tree.arr[x_315_save].rightIndex; if ((x_316 == -1)) { tree.arr[x_315_save].rightIndex = 5; - BST const tint_symbol_14 = {.data=8, .leftIndex=-1, .rightIndex=-1}; - tree.arr[5] = tint_symbol_14; + BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1}; + tree.arr[5] = tint_symbol_12; x_350_phi = true; break; } else { @@ -615,8 +615,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_377_save].leftIndex = 6; - BST const tint_symbol_15 = {.data=2, .leftIndex=-1, .rightIndex=-1}; - tree.arr[6] = tint_symbol_15; + BST const tint_symbol_13 = {.data=2, .leftIndex=-1, .rightIndex=-1}; + tree.arr[6] = tint_symbol_13; while (true) { x_402_phi = x_355; if ((0 < int(x_385))) { @@ -648,8 +648,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_370 = tree.arr[x_369_save].rightIndex; if ((x_370 == -1)) { tree.arr[x_369_save].rightIndex = 6; - BST const tint_symbol_16 = {.data=2, .leftIndex=-1, .rightIndex=-1}; - tree.arr[6] = tint_symbol_16; + BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1}; + tree.arr[6] = tint_symbol_14; x_404_phi = true; break; } else { @@ -720,8 +720,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_431_save].leftIndex = 7; - BST const tint_symbol_17 = {.data=6, .leftIndex=-1, .rightIndex=-1}; - tree.arr[7] = tint_symbol_17; + BST const tint_symbol_15 = {.data=6, .leftIndex=-1, .rightIndex=-1}; + tree.arr[7] = tint_symbol_15; while (true) { x_456_phi = x_409; if ((0 < int(x_439))) { @@ -753,8 +753,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_424 = tree.arr[x_423_save].rightIndex; if ((x_424 == -1)) { tree.arr[x_423_save].rightIndex = 7; - BST const tint_symbol_18 = {.data=6, .leftIndex=-1, .rightIndex=-1}; - tree.arr[7] = tint_symbol_18; + BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1}; + tree.arr[7] = tint_symbol_16; x_458_phi = true; break; } else { @@ -825,8 +825,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_485_save].leftIndex = 8; - BST const tint_symbol_19 = {.data=17, .leftIndex=-1, .rightIndex=-1}; - tree.arr[8] = tint_symbol_19; + BST const tint_symbol_17 = {.data=17, .leftIndex=-1, .rightIndex=-1}; + tree.arr[8] = tint_symbol_17; while (true) { x_510_phi = x_463; if ((0 < int(x_493))) { @@ -858,8 +858,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_478 = tree.arr[x_477_save].rightIndex; if ((x_478 == -1)) { tree.arr[x_477_save].rightIndex = 8; - BST const tint_symbol_20 = {.data=17, .leftIndex=-1, .rightIndex=-1}; - tree.arr[8] = tint_symbol_20; + BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1}; + tree.arr[8] = tint_symbol_18; x_512_phi = true; break; } else { @@ -930,8 +930,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa return; } tree.arr[x_539_save].leftIndex = 9; - BST const tint_symbol_21 = {.data=13, .leftIndex=-1, .rightIndex=-1}; - tree.arr[9] = tint_symbol_21; + BST const tint_symbol_19 = {.data=13, .leftIndex=-1, .rightIndex=-1}; + tree.arr[9] = tint_symbol_19; while (true) { x_564_phi = x_517; if ((0 < int(x_547))) { @@ -963,8 +963,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa int const x_532 = tree.arr[x_531_save].rightIndex; if ((x_532 == -1)) { tree.arr[x_531_save].rightIndex = 9; - BST const tint_symbol_22 = {.data=13, .leftIndex=-1, .rightIndex=-1}; - tree.arr[9] = tint_symbol_22; + BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1}; + tree.arr[9] = tint_symbol_20; x_566_phi = true; break; } else { @@ -1097,20 +1097,26 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa } } if ((x_572 == as_type(20))) { - *(tint_symbol_25) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_23) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_25) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_23) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_26 = 0.0f; - thread float4 tint_symbol_27 = 0.0f; - tint_symbol_26 = gl_FragCoord_param; - main_1(x_8, &(tint_symbol_26), &(tint_symbol_27)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_27}; - tint_symbol_2 const tint_symbol_23 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_23; +main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_24, thread float4* const tint_symbol_25) { + *(tint_symbol_24) = gl_FragCoord_param; + main_1(x_8, tint_symbol_24, tint_symbol_25); + main_out const tint_symbol_21 = {.x_GLF_color_1=*(tint_symbol_25)}; + return tint_symbol_21; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_26 = 0.0f; + thread float4 tint_symbol_27 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_26), &(tint_symbol_27)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.spvasm.expected.msl index 0ddc6e7729..70b032cd4a 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.spvasm.expected.msl @@ -24,7 +24,7 @@ void makeTreeNode_struct_BST_i1_i1_i11_i1_(thread BST* const tree, thread int* c return; } -void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_4) { +void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) { int baseIndex = 0; BST param = {}; int param_1 = 0; @@ -40,49 +40,49 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread } int const x_171 = *(data_1); int const x_172 = baseIndex; - int const x_174 = (*(tint_symbol_4)).arr[x_172].data; + int const x_174 = (*(tint_symbol_3)).arr[x_172].data; if ((x_171 <= x_174)) { int const x_179 = baseIndex; - int const x_181 = (*(tint_symbol_4)).arr[x_179].leftIndex; + int const x_181 = (*(tint_symbol_3)).arr[x_179].leftIndex; if ((x_181 == -1)) { int const x_186 = baseIndex; int const x_187 = *(treeIndex); - (*(tint_symbol_4)).arr[x_186].leftIndex = x_187; + (*(tint_symbol_3)).arr[x_186].leftIndex = x_187; int const x_189 = *(treeIndex); - BST const x_191 = (*(tint_symbol_4)).arr[x_189]; + BST const x_191 = (*(tint_symbol_3)).arr[x_189]; param = x_191; int const x_192 = *(data_1); param_1 = x_192; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1)); BST const x_194 = param; - (*(tint_symbol_4)).arr[x_189] = x_194; + (*(tint_symbol_3)).arr[x_189] = x_194; return; } else { int const x_196 = baseIndex; - int const x_198 = (*(tint_symbol_4)).arr[x_196].leftIndex; + int const x_198 = (*(tint_symbol_3)).arr[x_196].leftIndex; baseIndex = x_198; continue; } return; } else { int const x_199 = baseIndex; - int const x_201 = (*(tint_symbol_4)).arr[x_199].rightIndex; + int const x_201 = (*(tint_symbol_3)).arr[x_199].rightIndex; if ((x_201 == -1)) { int const x_206 = baseIndex; int const x_207 = *(treeIndex); - (*(tint_symbol_4)).arr[x_206].rightIndex = x_207; + (*(tint_symbol_3)).arr[x_206].rightIndex = x_207; int const x_209 = *(treeIndex); - BST const x_211 = (*(tint_symbol_4)).arr[x_209]; + BST const x_211 = (*(tint_symbol_3)).arr[x_209]; param_2 = x_211; int const x_212 = *(data_1); param_3 = x_212; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3)); BST const x_214 = param_2; - (*(tint_symbol_4)).arr[x_209] = x_214; + (*(tint_symbol_3)).arr[x_209] = x_214; return; } else { int const x_216 = baseIndex; - int const x_218 = (*(tint_symbol_4)).arr[x_216].rightIndex; + int const x_218 = (*(tint_symbol_3)).arr[x_216].rightIndex; baseIndex = x_218; continue; } @@ -93,7 +93,7 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread return; } -int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_5) { +int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) { int index = 0; BST currentNode = {}; int x_220 = 0; @@ -105,7 +105,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s break; } int const x_228 = index; - BST const x_230 = (*(tint_symbol_5)).arr[x_228]; + BST const x_230 = (*(tint_symbol_4)).arr[x_228]; currentNode = x_230; int const x_232 = currentNode.data; int const x_233 = *(target); @@ -128,7 +128,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s return -1; } -void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) { int treeIndex_1 = 0; BST param_4 = {}; int param_5 = 0; @@ -155,66 +155,66 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const int result = 0; int param_24 = 0; treeIndex_1 = 0; - BST const x_84 = (*(tint_symbol_6)).arr[0]; + BST const x_84 = (*(tint_symbol_5)).arr[0]; param_4 = x_84; param_5 = 9; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5)); BST const x_86 = param_4; - (*(tint_symbol_6)).arr[0] = x_86; + (*(tint_symbol_5)).arr[0] = x_86; int const x_88 = treeIndex_1; treeIndex_1 = as_type((as_type(x_88) + as_type(1))); int const x_90 = treeIndex_1; param_6 = x_90; param_7 = 5; - insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6); + insert_i1_i1_(&(param_6), &(param_7), tint_symbol_5); int const x_92 = treeIndex_1; treeIndex_1 = as_type((as_type(x_92) + as_type(1))); int const x_94 = treeIndex_1; param_8 = x_94; param_9 = 12; - insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6); + insert_i1_i1_(&(param_8), &(param_9), tint_symbol_5); int const x_96 = treeIndex_1; treeIndex_1 = as_type((as_type(x_96) + as_type(1))); int const x_98 = treeIndex_1; param_10 = x_98; param_11 = 15; - insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6); + insert_i1_i1_(&(param_10), &(param_11), tint_symbol_5); int const x_100 = treeIndex_1; treeIndex_1 = as_type((as_type(x_100) + as_type(1))); int const x_102 = treeIndex_1; param_12 = x_102; param_13 = 7; - insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6); + insert_i1_i1_(&(param_12), &(param_13), tint_symbol_5); int const x_104 = treeIndex_1; treeIndex_1 = as_type((as_type(x_104) + as_type(1))); int const x_106 = treeIndex_1; param_14 = x_106; param_15 = 8; - insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6); + insert_i1_i1_(&(param_14), &(param_15), tint_symbol_5); int const x_108 = treeIndex_1; treeIndex_1 = as_type((as_type(x_108) + as_type(1))); int const x_110 = treeIndex_1; param_16 = x_110; param_17 = 2; - insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6); + insert_i1_i1_(&(param_16), &(param_17), tint_symbol_5); int const x_112 = treeIndex_1; treeIndex_1 = as_type((as_type(x_112) + as_type(1))); int const x_114 = treeIndex_1; param_18 = x_114; param_19 = 6; - insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6); + insert_i1_i1_(&(param_18), &(param_19), tint_symbol_5); int const x_116 = treeIndex_1; treeIndex_1 = as_type((as_type(x_116) + as_type(1))); int const x_118 = treeIndex_1; param_20 = x_118; param_21 = 17; - insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6); + insert_i1_i1_(&(param_20), &(param_21), tint_symbol_5); int const x_120 = treeIndex_1; treeIndex_1 = as_type((as_type(x_120) + as_type(1))); int const x_122 = treeIndex_1; param_22 = x_122; param_23 = 13; - insert_i1_i1_(&(param_22), &(param_23), tint_symbol_6); + insert_i1_i1_(&(param_22), &(param_23), tint_symbol_5); count = 0; i = 0; while (true) { @@ -225,7 +225,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const } int const x_131 = i; param_24 = x_131; - int const x_132 = search_i1_(&(param_24), tint_symbol_6); + int const x_132 = search_i1_(&(param_24), tint_symbol_5); result = x_132; int const x_133 = i; switch(x_133) { @@ -263,19 +263,25 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const } int const x_152 = count; if ((x_152 == 20)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_6) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread tint_array_wrapper tint_symbol_8 = {}; - thread float4 tint_symbol_9 = 0.0f; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread tint_array_wrapper tint_symbol_9 = {}; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl.expected.msl index 0ddc6e7729..70b032cd4a 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl.expected.msl @@ -24,7 +24,7 @@ void makeTreeNode_struct_BST_i1_i1_i11_i1_(thread BST* const tree, thread int* c return; } -void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_4) { +void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) { int baseIndex = 0; BST param = {}; int param_1 = 0; @@ -40,49 +40,49 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread } int const x_171 = *(data_1); int const x_172 = baseIndex; - int const x_174 = (*(tint_symbol_4)).arr[x_172].data; + int const x_174 = (*(tint_symbol_3)).arr[x_172].data; if ((x_171 <= x_174)) { int const x_179 = baseIndex; - int const x_181 = (*(tint_symbol_4)).arr[x_179].leftIndex; + int const x_181 = (*(tint_symbol_3)).arr[x_179].leftIndex; if ((x_181 == -1)) { int const x_186 = baseIndex; int const x_187 = *(treeIndex); - (*(tint_symbol_4)).arr[x_186].leftIndex = x_187; + (*(tint_symbol_3)).arr[x_186].leftIndex = x_187; int const x_189 = *(treeIndex); - BST const x_191 = (*(tint_symbol_4)).arr[x_189]; + BST const x_191 = (*(tint_symbol_3)).arr[x_189]; param = x_191; int const x_192 = *(data_1); param_1 = x_192; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1)); BST const x_194 = param; - (*(tint_symbol_4)).arr[x_189] = x_194; + (*(tint_symbol_3)).arr[x_189] = x_194; return; } else { int const x_196 = baseIndex; - int const x_198 = (*(tint_symbol_4)).arr[x_196].leftIndex; + int const x_198 = (*(tint_symbol_3)).arr[x_196].leftIndex; baseIndex = x_198; continue; } return; } else { int const x_199 = baseIndex; - int const x_201 = (*(tint_symbol_4)).arr[x_199].rightIndex; + int const x_201 = (*(tint_symbol_3)).arr[x_199].rightIndex; if ((x_201 == -1)) { int const x_206 = baseIndex; int const x_207 = *(treeIndex); - (*(tint_symbol_4)).arr[x_206].rightIndex = x_207; + (*(tint_symbol_3)).arr[x_206].rightIndex = x_207; int const x_209 = *(treeIndex); - BST const x_211 = (*(tint_symbol_4)).arr[x_209]; + BST const x_211 = (*(tint_symbol_3)).arr[x_209]; param_2 = x_211; int const x_212 = *(data_1); param_3 = x_212; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3)); BST const x_214 = param_2; - (*(tint_symbol_4)).arr[x_209] = x_214; + (*(tint_symbol_3)).arr[x_209] = x_214; return; } else { int const x_216 = baseIndex; - int const x_218 = (*(tint_symbol_4)).arr[x_216].rightIndex; + int const x_218 = (*(tint_symbol_3)).arr[x_216].rightIndex; baseIndex = x_218; continue; } @@ -93,7 +93,7 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread return; } -int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_5) { +int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) { int index = 0; BST currentNode = {}; int x_220 = 0; @@ -105,7 +105,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s break; } int const x_228 = index; - BST const x_230 = (*(tint_symbol_5)).arr[x_228]; + BST const x_230 = (*(tint_symbol_4)).arr[x_228]; currentNode = x_230; int const x_232 = currentNode.data; int const x_233 = *(target); @@ -128,7 +128,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s return -1; } -void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) { int treeIndex_1 = 0; BST param_4 = {}; int param_5 = 0; @@ -155,66 +155,66 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const int result = 0; int param_24 = 0; treeIndex_1 = 0; - BST const x_84 = (*(tint_symbol_6)).arr[0]; + BST const x_84 = (*(tint_symbol_5)).arr[0]; param_4 = x_84; param_5 = 9; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5)); BST const x_86 = param_4; - (*(tint_symbol_6)).arr[0] = x_86; + (*(tint_symbol_5)).arr[0] = x_86; int const x_88 = treeIndex_1; treeIndex_1 = as_type((as_type(x_88) + as_type(1))); int const x_90 = treeIndex_1; param_6 = x_90; param_7 = 5; - insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6); + insert_i1_i1_(&(param_6), &(param_7), tint_symbol_5); int const x_92 = treeIndex_1; treeIndex_1 = as_type((as_type(x_92) + as_type(1))); int const x_94 = treeIndex_1; param_8 = x_94; param_9 = 12; - insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6); + insert_i1_i1_(&(param_8), &(param_9), tint_symbol_5); int const x_96 = treeIndex_1; treeIndex_1 = as_type((as_type(x_96) + as_type(1))); int const x_98 = treeIndex_1; param_10 = x_98; param_11 = 15; - insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6); + insert_i1_i1_(&(param_10), &(param_11), tint_symbol_5); int const x_100 = treeIndex_1; treeIndex_1 = as_type((as_type(x_100) + as_type(1))); int const x_102 = treeIndex_1; param_12 = x_102; param_13 = 7; - insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6); + insert_i1_i1_(&(param_12), &(param_13), tint_symbol_5); int const x_104 = treeIndex_1; treeIndex_1 = as_type((as_type(x_104) + as_type(1))); int const x_106 = treeIndex_1; param_14 = x_106; param_15 = 8; - insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6); + insert_i1_i1_(&(param_14), &(param_15), tint_symbol_5); int const x_108 = treeIndex_1; treeIndex_1 = as_type((as_type(x_108) + as_type(1))); int const x_110 = treeIndex_1; param_16 = x_110; param_17 = 2; - insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6); + insert_i1_i1_(&(param_16), &(param_17), tint_symbol_5); int const x_112 = treeIndex_1; treeIndex_1 = as_type((as_type(x_112) + as_type(1))); int const x_114 = treeIndex_1; param_18 = x_114; param_19 = 6; - insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6); + insert_i1_i1_(&(param_18), &(param_19), tint_symbol_5); int const x_116 = treeIndex_1; treeIndex_1 = as_type((as_type(x_116) + as_type(1))); int const x_118 = treeIndex_1; param_20 = x_118; param_21 = 17; - insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6); + insert_i1_i1_(&(param_20), &(param_21), tint_symbol_5); int const x_120 = treeIndex_1; treeIndex_1 = as_type((as_type(x_120) + as_type(1))); int const x_122 = treeIndex_1; param_22 = x_122; param_23 = 13; - insert_i1_i1_(&(param_22), &(param_23), tint_symbol_6); + insert_i1_i1_(&(param_22), &(param_23), tint_symbol_5); count = 0; i = 0; while (true) { @@ -225,7 +225,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const } int const x_131 = i; param_24 = x_131; - int const x_132 = search_i1_(&(param_24), tint_symbol_6); + int const x_132 = search_i1_(&(param_24), tint_symbol_5); result = x_132; int const x_133 = i; switch(x_133) { @@ -263,19 +263,25 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const } int const x_152 = count; if ((x_152 == 20)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_6) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread tint_array_wrapper tint_symbol_8 = {}; - thread float4 tint_symbol_9 = 0.0f; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread tint_array_wrapper tint_symbol_9 = {}; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.spvasm.expected.msl index 8a78d71f8e..2597e3770a 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.spvasm.expected.msl @@ -12,7 +12,7 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -24,7 +24,7 @@ void makeTreeNode_struct_BST_i1_i1_i11_i1_(thread BST* const tree, thread int* c return; } -void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_5) { +void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) { int baseIndex = 0; BST param = {}; int param_1 = 0; @@ -40,49 +40,49 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread } int const x_182 = *(data_1); int const x_183 = baseIndex; - int const x_185 = (*(tint_symbol_5)).arr[x_183].data; + int const x_185 = (*(tint_symbol_3)).arr[x_183].data; if ((x_182 <= x_185)) { int const x_190 = baseIndex; - int const x_192 = (*(tint_symbol_5)).arr[x_190].leftIndex; + int const x_192 = (*(tint_symbol_3)).arr[x_190].leftIndex; if ((x_192 == -1)) { int const x_197 = baseIndex; int const x_198 = *(treeIndex); - (*(tint_symbol_5)).arr[x_197].leftIndex = x_198; + (*(tint_symbol_3)).arr[x_197].leftIndex = x_198; int const x_200 = *(treeIndex); - BST const x_202 = (*(tint_symbol_5)).arr[x_200]; + BST const x_202 = (*(tint_symbol_3)).arr[x_200]; param = x_202; int const x_203 = *(data_1); param_1 = x_203; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1)); BST const x_205 = param; - (*(tint_symbol_5)).arr[x_200] = x_205; + (*(tint_symbol_3)).arr[x_200] = x_205; return; } else { int const x_207 = baseIndex; - int const x_209 = (*(tint_symbol_5)).arr[x_207].leftIndex; + int const x_209 = (*(tint_symbol_3)).arr[x_207].leftIndex; baseIndex = x_209; continue; } return; } else { int const x_210 = baseIndex; - int const x_212 = (*(tint_symbol_5)).arr[x_210].rightIndex; + int const x_212 = (*(tint_symbol_3)).arr[x_210].rightIndex; if ((x_212 == -1)) { int const x_217 = baseIndex; int const x_218 = *(treeIndex); - (*(tint_symbol_5)).arr[x_217].rightIndex = x_218; + (*(tint_symbol_3)).arr[x_217].rightIndex = x_218; int const x_220 = *(treeIndex); - BST const x_222 = (*(tint_symbol_5)).arr[x_220]; + BST const x_222 = (*(tint_symbol_3)).arr[x_220]; param_2 = x_222; int const x_223 = *(data_1); param_3 = x_223; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3)); BST const x_225 = param_2; - (*(tint_symbol_5)).arr[x_220] = x_225; + (*(tint_symbol_3)).arr[x_220] = x_225; return; } else { int const x_227 = baseIndex; - int const x_229 = (*(tint_symbol_5)).arr[x_227].rightIndex; + int const x_229 = (*(tint_symbol_3)).arr[x_227].rightIndex; baseIndex = x_229; continue; } @@ -93,7 +93,7 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread return; } -int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_6) { +int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) { int index = 0; BST currentNode = {}; int x_231 = 0; @@ -105,7 +105,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s break; } int const x_239 = index; - BST const x_241 = (*(tint_symbol_6)).arr[x_239]; + BST const x_241 = (*(tint_symbol_4)).arr[x_239]; currentNode = x_241; int const x_243 = currentNode.data; int const x_244 = *(target); @@ -128,7 +128,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s return -1; } -void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { int treeIndex_1 = 0; BST param_4 = {}; int param_5 = 0; @@ -155,66 +155,66 @@ void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const int result = 0; int param_24 = 0; treeIndex_1 = 0; - BST const x_88 = (*(tint_symbol_7)).arr[0]; + BST const x_88 = (*(tint_symbol_5)).arr[0]; param_4 = x_88; param_5 = 9; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5)); BST const x_90 = param_4; - (*(tint_symbol_7)).arr[0] = x_90; + (*(tint_symbol_5)).arr[0] = x_90; int const x_92 = treeIndex_1; treeIndex_1 = as_type((as_type(x_92) + as_type(1))); int const x_94 = treeIndex_1; param_6 = x_94; param_7 = 5; - insert_i1_i1_(&(param_6), &(param_7), tint_symbol_7); + insert_i1_i1_(&(param_6), &(param_7), tint_symbol_5); int const x_96 = treeIndex_1; treeIndex_1 = as_type((as_type(x_96) + as_type(1))); int const x_98 = treeIndex_1; param_8 = x_98; param_9 = 12; - insert_i1_i1_(&(param_8), &(param_9), tint_symbol_7); + insert_i1_i1_(&(param_8), &(param_9), tint_symbol_5); int const x_100 = treeIndex_1; treeIndex_1 = as_type((as_type(x_100) + as_type(1))); int const x_102 = treeIndex_1; param_10 = x_102; param_11 = 15; - insert_i1_i1_(&(param_10), &(param_11), tint_symbol_7); + insert_i1_i1_(&(param_10), &(param_11), tint_symbol_5); int const x_104 = treeIndex_1; treeIndex_1 = as_type((as_type(x_104) + as_type(1))); int const x_106 = treeIndex_1; param_12 = x_106; param_13 = 7; - insert_i1_i1_(&(param_12), &(param_13), tint_symbol_7); + insert_i1_i1_(&(param_12), &(param_13), tint_symbol_5); int const x_108 = treeIndex_1; treeIndex_1 = as_type((as_type(x_108) + as_type(1))); int const x_110 = treeIndex_1; param_14 = x_110; param_15 = 8; - insert_i1_i1_(&(param_14), &(param_15), tint_symbol_7); + insert_i1_i1_(&(param_14), &(param_15), tint_symbol_5); int const x_112 = treeIndex_1; treeIndex_1 = as_type((as_type(x_112) + as_type(1))); int const x_114 = treeIndex_1; param_16 = x_114; param_17 = 2; - insert_i1_i1_(&(param_16), &(param_17), tint_symbol_7); + insert_i1_i1_(&(param_16), &(param_17), tint_symbol_5); int const x_116 = treeIndex_1; treeIndex_1 = as_type((as_type(x_116) + as_type(1))); int const x_118 = treeIndex_1; param_18 = x_118; param_19 = 6; - insert_i1_i1_(&(param_18), &(param_19), tint_symbol_7); + insert_i1_i1_(&(param_18), &(param_19), tint_symbol_5); int const x_120 = treeIndex_1; treeIndex_1 = as_type((as_type(x_120) + as_type(1))); int const x_122 = treeIndex_1; param_20 = x_122; param_21 = 17; - insert_i1_i1_(&(param_20), &(param_21), tint_symbol_7); + insert_i1_i1_(&(param_20), &(param_21), tint_symbol_5); int const x_124 = treeIndex_1; treeIndex_1 = as_type((as_type(x_124) + as_type(1))); int const x_126 = treeIndex_1; param_22 = x_126; param_23 = 13; - insert_i1_i1_(&(param_22), &(param_23), tint_symbol_7); + insert_i1_i1_(&(param_22), &(param_23), tint_symbol_5); count = 0; i = 0; while (true) { @@ -227,7 +227,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const bool x_156_phi = false; int const x_135 = i; param_24 = x_135; - int const x_136 = search_i1_(&(param_24), tint_symbol_7); + int const x_136 = search_i1_(&(param_24), tint_symbol_5); result = x_136; int const x_137 = i; switch(x_137) { @@ -246,7 +246,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const bool const x_149 = (x_147 == x_148); x_156_phi = x_149; if (!(x_149)) { - float const x_154 = (*(tint_symbol_8)).x; + float const x_154 = (*(tint_symbol_6)).x; x_155 = (x_154 < 0.0f); x_156_phi = x_155; } @@ -273,21 +273,27 @@ void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const } int const x_163 = count; if ((x_163 == 20)) { - *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_9) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_10 = 0.0f; - thread tint_array_wrapper tint_symbol_11 = {}; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_10 = gl_FragCoord_param; - main_1(&(tint_symbol_11), &(tint_symbol_10), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_8) = gl_FragCoord_param; + main_1(tint_symbol_9, tint_symbol_8, tint_symbol_10); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_11 = 0.0f; + thread tint_array_wrapper tint_symbol_12 = {}; + thread float4 tint_symbol_13 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl.expected.msl index 8a78d71f8e..2597e3770a 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl.expected.msl @@ -12,7 +12,7 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -24,7 +24,7 @@ void makeTreeNode_struct_BST_i1_i1_i11_i1_(thread BST* const tree, thread int* c return; } -void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_5) { +void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) { int baseIndex = 0; BST param = {}; int param_1 = 0; @@ -40,49 +40,49 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread } int const x_182 = *(data_1); int const x_183 = baseIndex; - int const x_185 = (*(tint_symbol_5)).arr[x_183].data; + int const x_185 = (*(tint_symbol_3)).arr[x_183].data; if ((x_182 <= x_185)) { int const x_190 = baseIndex; - int const x_192 = (*(tint_symbol_5)).arr[x_190].leftIndex; + int const x_192 = (*(tint_symbol_3)).arr[x_190].leftIndex; if ((x_192 == -1)) { int const x_197 = baseIndex; int const x_198 = *(treeIndex); - (*(tint_symbol_5)).arr[x_197].leftIndex = x_198; + (*(tint_symbol_3)).arr[x_197].leftIndex = x_198; int const x_200 = *(treeIndex); - BST const x_202 = (*(tint_symbol_5)).arr[x_200]; + BST const x_202 = (*(tint_symbol_3)).arr[x_200]; param = x_202; int const x_203 = *(data_1); param_1 = x_203; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1)); BST const x_205 = param; - (*(tint_symbol_5)).arr[x_200] = x_205; + (*(tint_symbol_3)).arr[x_200] = x_205; return; } else { int const x_207 = baseIndex; - int const x_209 = (*(tint_symbol_5)).arr[x_207].leftIndex; + int const x_209 = (*(tint_symbol_3)).arr[x_207].leftIndex; baseIndex = x_209; continue; } return; } else { int const x_210 = baseIndex; - int const x_212 = (*(tint_symbol_5)).arr[x_210].rightIndex; + int const x_212 = (*(tint_symbol_3)).arr[x_210].rightIndex; if ((x_212 == -1)) { int const x_217 = baseIndex; int const x_218 = *(treeIndex); - (*(tint_symbol_5)).arr[x_217].rightIndex = x_218; + (*(tint_symbol_3)).arr[x_217].rightIndex = x_218; int const x_220 = *(treeIndex); - BST const x_222 = (*(tint_symbol_5)).arr[x_220]; + BST const x_222 = (*(tint_symbol_3)).arr[x_220]; param_2 = x_222; int const x_223 = *(data_1); param_3 = x_223; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3)); BST const x_225 = param_2; - (*(tint_symbol_5)).arr[x_220] = x_225; + (*(tint_symbol_3)).arr[x_220] = x_225; return; } else { int const x_227 = baseIndex; - int const x_229 = (*(tint_symbol_5)).arr[x_227].rightIndex; + int const x_229 = (*(tint_symbol_3)).arr[x_227].rightIndex; baseIndex = x_229; continue; } @@ -93,7 +93,7 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread return; } -int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_6) { +int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) { int index = 0; BST currentNode = {}; int x_231 = 0; @@ -105,7 +105,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s break; } int const x_239 = index; - BST const x_241 = (*(tint_symbol_6)).arr[x_239]; + BST const x_241 = (*(tint_symbol_4)).arr[x_239]; currentNode = x_241; int const x_243 = currentNode.data; int const x_244 = *(target); @@ -128,7 +128,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s return -1; } -void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { int treeIndex_1 = 0; BST param_4 = {}; int param_5 = 0; @@ -155,66 +155,66 @@ void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const int result = 0; int param_24 = 0; treeIndex_1 = 0; - BST const x_88 = (*(tint_symbol_7)).arr[0]; + BST const x_88 = (*(tint_symbol_5)).arr[0]; param_4 = x_88; param_5 = 9; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5)); BST const x_90 = param_4; - (*(tint_symbol_7)).arr[0] = x_90; + (*(tint_symbol_5)).arr[0] = x_90; int const x_92 = treeIndex_1; treeIndex_1 = as_type((as_type(x_92) + as_type(1))); int const x_94 = treeIndex_1; param_6 = x_94; param_7 = 5; - insert_i1_i1_(&(param_6), &(param_7), tint_symbol_7); + insert_i1_i1_(&(param_6), &(param_7), tint_symbol_5); int const x_96 = treeIndex_1; treeIndex_1 = as_type((as_type(x_96) + as_type(1))); int const x_98 = treeIndex_1; param_8 = x_98; param_9 = 12; - insert_i1_i1_(&(param_8), &(param_9), tint_symbol_7); + insert_i1_i1_(&(param_8), &(param_9), tint_symbol_5); int const x_100 = treeIndex_1; treeIndex_1 = as_type((as_type(x_100) + as_type(1))); int const x_102 = treeIndex_1; param_10 = x_102; param_11 = 15; - insert_i1_i1_(&(param_10), &(param_11), tint_symbol_7); + insert_i1_i1_(&(param_10), &(param_11), tint_symbol_5); int const x_104 = treeIndex_1; treeIndex_1 = as_type((as_type(x_104) + as_type(1))); int const x_106 = treeIndex_1; param_12 = x_106; param_13 = 7; - insert_i1_i1_(&(param_12), &(param_13), tint_symbol_7); + insert_i1_i1_(&(param_12), &(param_13), tint_symbol_5); int const x_108 = treeIndex_1; treeIndex_1 = as_type((as_type(x_108) + as_type(1))); int const x_110 = treeIndex_1; param_14 = x_110; param_15 = 8; - insert_i1_i1_(&(param_14), &(param_15), tint_symbol_7); + insert_i1_i1_(&(param_14), &(param_15), tint_symbol_5); int const x_112 = treeIndex_1; treeIndex_1 = as_type((as_type(x_112) + as_type(1))); int const x_114 = treeIndex_1; param_16 = x_114; param_17 = 2; - insert_i1_i1_(&(param_16), &(param_17), tint_symbol_7); + insert_i1_i1_(&(param_16), &(param_17), tint_symbol_5); int const x_116 = treeIndex_1; treeIndex_1 = as_type((as_type(x_116) + as_type(1))); int const x_118 = treeIndex_1; param_18 = x_118; param_19 = 6; - insert_i1_i1_(&(param_18), &(param_19), tint_symbol_7); + insert_i1_i1_(&(param_18), &(param_19), tint_symbol_5); int const x_120 = treeIndex_1; treeIndex_1 = as_type((as_type(x_120) + as_type(1))); int const x_122 = treeIndex_1; param_20 = x_122; param_21 = 17; - insert_i1_i1_(&(param_20), &(param_21), tint_symbol_7); + insert_i1_i1_(&(param_20), &(param_21), tint_symbol_5); int const x_124 = treeIndex_1; treeIndex_1 = as_type((as_type(x_124) + as_type(1))); int const x_126 = treeIndex_1; param_22 = x_126; param_23 = 13; - insert_i1_i1_(&(param_22), &(param_23), tint_symbol_7); + insert_i1_i1_(&(param_22), &(param_23), tint_symbol_5); count = 0; i = 0; while (true) { @@ -227,7 +227,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const bool x_156_phi = false; int const x_135 = i; param_24 = x_135; - int const x_136 = search_i1_(&(param_24), tint_symbol_7); + int const x_136 = search_i1_(&(param_24), tint_symbol_5); result = x_136; int const x_137 = i; switch(x_137) { @@ -246,7 +246,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const bool const x_149 = (x_147 == x_148); x_156_phi = x_149; if (!(x_149)) { - float const x_154 = (*(tint_symbol_8)).x; + float const x_154 = (*(tint_symbol_6)).x; x_155 = (x_154 < 0.0f); x_156_phi = x_155; } @@ -273,21 +273,27 @@ void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const } int const x_163 = count; if ((x_163 == 20)) { - *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_9) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_10 = 0.0f; - thread tint_array_wrapper tint_symbol_11 = {}; - thread float4 tint_symbol_12 = 0.0f; - tint_symbol_10 = gl_FragCoord_param; - main_1(&(tint_symbol_11), &(tint_symbol_10), &(tint_symbol_12)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_8) = gl_FragCoord_param; + main_1(tint_symbol_9, tint_symbol_8, tint_symbol_10); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_11 = 0.0f; + thread tint_array_wrapper tint_symbol_12 = {}; + thread float4 tint_symbol_13 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.hlsl index 11cdc01241..249e7a6c79 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.hlsl @@ -247,9 +247,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.msl index 30f0bea18f..76e4639b84 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.msl @@ -27,7 +27,7 @@ void makeTreeNode_struct_BST_i1_i1_i11_i1_(thread BST* const tree, thread int* c return; } -void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_4) { +void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) { int baseIndex = 0; BST param = {}; int param_1 = 0; @@ -44,25 +44,25 @@ void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* } int const x_179 = *(data_1); int const x_180 = baseIndex; - int const x_182 = (*(tint_symbol_4)).arr[x_180].data; + int const x_182 = (*(tint_symbol_3)).arr[x_180].data; if ((x_179 <= x_182)) { int const x_187 = baseIndex; - int const x_189 = (*(tint_symbol_4)).arr[x_187].leftIndex; + int const x_189 = (*(tint_symbol_3)).arr[x_187].leftIndex; if ((x_189 == -1)) { int const x_194 = baseIndex; int const x_195 = *(treeIndex); - (*(tint_symbol_4)).arr[x_194].leftIndex = x_195; + (*(tint_symbol_3)).arr[x_194].leftIndex = x_195; float const x_198 = x_16.injectionSwitch.x; float const x_200 = x_16.injectionSwitch.y; if ((x_198 < x_200)) { int const x_204 = *(treeIndex); - BST const x_206 = (*(tint_symbol_4)).arr[x_204]; + BST const x_206 = (*(tint_symbol_3)).arr[x_204]; param = x_206; int const x_207 = *(data_1); param_1 = x_207; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1)); BST const x_209 = param; - (*(tint_symbol_4)).arr[x_204] = x_209; + (*(tint_symbol_3)).arr[x_204] = x_209; } float const x_212 = x_16.injectionSwitch.x; float const x_214 = x_16.injectionSwitch.y; @@ -71,7 +71,7 @@ void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* } } else { int const x_218 = baseIndex; - int const x_220 = (*(tint_symbol_4)).arr[x_218].leftIndex; + int const x_220 = (*(tint_symbol_3)).arr[x_218].leftIndex; baseIndex = x_220; continue; } @@ -80,30 +80,30 @@ void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* float const x_224 = x_16.injectionSwitch.y; if ((x_222 < x_224)) { int const x_229 = baseIndex; - int const x_231 = (*(tint_symbol_4)).arr[x_229].rightIndex; + int const x_231 = (*(tint_symbol_3)).arr[x_229].rightIndex; x_170 = x_231; } else { int const x_232 = baseIndex; - int const x_234 = (*(tint_symbol_4)).arr[x_232].rightIndex; + int const x_234 = (*(tint_symbol_3)).arr[x_232].rightIndex; x_170 = x_234; } int const x_235 = x_170; if ((x_235 == -1)) { int const x_240 = baseIndex; int const x_241 = *(treeIndex); - (*(tint_symbol_4)).arr[x_240].rightIndex = x_241; + (*(tint_symbol_3)).arr[x_240].rightIndex = x_241; int const x_243 = *(treeIndex); - BST const x_245 = (*(tint_symbol_4)).arr[x_243]; + BST const x_245 = (*(tint_symbol_3)).arr[x_243]; param_2 = x_245; int const x_246 = *(data_1); param_3 = x_246; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3)); BST const x_248 = param_2; - (*(tint_symbol_4)).arr[x_243] = x_248; + (*(tint_symbol_3)).arr[x_243] = x_248; return; } else { int const x_250 = baseIndex; - int const x_252 = (*(tint_symbol_4)).arr[x_250].rightIndex; + int const x_252 = (*(tint_symbol_3)).arr[x_250].rightIndex; baseIndex = x_252; continue; } @@ -118,7 +118,7 @@ void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* return; } -int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_5) { +int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) { int index = 0; BST currentNode = {}; int x_261 = 0; @@ -130,7 +130,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s break; } int const x_269 = index; - BST const x_271 = (*(tint_symbol_5)).arr[x_269]; + BST const x_271 = (*(tint_symbol_4)).arr[x_269]; currentNode = x_271; int const x_273 = currentNode.data; int const x_274 = *(target); @@ -153,7 +153,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s return -1; } -void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) { int treeIndex_1 = 0; BST param_4 = {}; int param_5 = 0; @@ -180,66 +180,66 @@ void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, int result = 0; int param_24 = 0; treeIndex_1 = 0; - BST const x_91 = (*(tint_symbol_6)).arr[0]; + BST const x_91 = (*(tint_symbol_5)).arr[0]; param_4 = x_91; param_5 = 9; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5)); BST const x_93 = param_4; - (*(tint_symbol_6)).arr[0] = x_93; + (*(tint_symbol_5)).arr[0] = x_93; int const x_95 = treeIndex_1; treeIndex_1 = as_type((as_type(x_95) + as_type(1))); int const x_97 = treeIndex_1; param_6 = x_97; param_7 = 5; - insert_i1_i1_(x_16, &(param_6), &(param_7), tint_symbol_6); + insert_i1_i1_(x_16, &(param_6), &(param_7), tint_symbol_5); int const x_99 = treeIndex_1; treeIndex_1 = as_type((as_type(x_99) + as_type(1))); int const x_101 = treeIndex_1; param_8 = x_101; param_9 = 12; - insert_i1_i1_(x_16, &(param_8), &(param_9), tint_symbol_6); + insert_i1_i1_(x_16, &(param_8), &(param_9), tint_symbol_5); int const x_103 = treeIndex_1; treeIndex_1 = as_type((as_type(x_103) + as_type(1))); int const x_105 = treeIndex_1; param_10 = x_105; param_11 = 15; - insert_i1_i1_(x_16, &(param_10), &(param_11), tint_symbol_6); + insert_i1_i1_(x_16, &(param_10), &(param_11), tint_symbol_5); int const x_107 = treeIndex_1; treeIndex_1 = as_type((as_type(x_107) + as_type(1))); int const x_109 = treeIndex_1; param_12 = x_109; param_13 = 7; - insert_i1_i1_(x_16, &(param_12), &(param_13), tint_symbol_6); + insert_i1_i1_(x_16, &(param_12), &(param_13), tint_symbol_5); int const x_111 = treeIndex_1; treeIndex_1 = as_type((as_type(x_111) + as_type(1))); int const x_113 = treeIndex_1; param_14 = x_113; param_15 = 8; - insert_i1_i1_(x_16, &(param_14), &(param_15), tint_symbol_6); + insert_i1_i1_(x_16, &(param_14), &(param_15), tint_symbol_5); int const x_115 = treeIndex_1; treeIndex_1 = as_type((as_type(x_115) + as_type(1))); int const x_117 = treeIndex_1; param_16 = x_117; param_17 = 2; - insert_i1_i1_(x_16, &(param_16), &(param_17), tint_symbol_6); + insert_i1_i1_(x_16, &(param_16), &(param_17), tint_symbol_5); int const x_119 = treeIndex_1; treeIndex_1 = as_type((as_type(x_119) + as_type(1))); int const x_121 = treeIndex_1; param_18 = x_121; param_19 = 6; - insert_i1_i1_(x_16, &(param_18), &(param_19), tint_symbol_6); + insert_i1_i1_(x_16, &(param_18), &(param_19), tint_symbol_5); int const x_123 = treeIndex_1; treeIndex_1 = as_type((as_type(x_123) + as_type(1))); int const x_125 = treeIndex_1; param_20 = x_125; param_21 = 17; - insert_i1_i1_(x_16, &(param_20), &(param_21), tint_symbol_6); + insert_i1_i1_(x_16, &(param_20), &(param_21), tint_symbol_5); int const x_127 = treeIndex_1; treeIndex_1 = as_type((as_type(x_127) + as_type(1))); int const x_129 = treeIndex_1; param_22 = x_129; param_23 = 13; - insert_i1_i1_(x_16, &(param_22), &(param_23), tint_symbol_6); + insert_i1_i1_(x_16, &(param_22), &(param_23), tint_symbol_5); count = 0; i = 0; while (true) { @@ -250,7 +250,7 @@ void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, } int const x_138 = i; param_24 = x_138; - int const x_139 = search_i1_(&(param_24), tint_symbol_6); + int const x_139 = search_i1_(&(param_24), tint_symbol_5); result = x_139; int const x_140 = i; switch(x_140) { @@ -288,19 +288,25 @@ void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, } int const x_159 = count; if ((x_159 == 20)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_6) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_16 [[buffer(0)]]) { - thread tint_array_wrapper tint_symbol_8 = {}; - thread float4 tint_symbol_9 = 0.0f; - main_1(x_16, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { + main_1(x_16, tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_16 [[buffer(0)]]) { + thread tint_array_wrapper tint_symbol_9 = {}; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_16, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.hlsl index 11cdc01241..249e7a6c79 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.hlsl @@ -247,9 +247,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.msl index 30f0bea18f..76e4639b84 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.msl @@ -27,7 +27,7 @@ void makeTreeNode_struct_BST_i1_i1_i11_i1_(thread BST* const tree, thread int* c return; } -void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_4) { +void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) { int baseIndex = 0; BST param = {}; int param_1 = 0; @@ -44,25 +44,25 @@ void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* } int const x_179 = *(data_1); int const x_180 = baseIndex; - int const x_182 = (*(tint_symbol_4)).arr[x_180].data; + int const x_182 = (*(tint_symbol_3)).arr[x_180].data; if ((x_179 <= x_182)) { int const x_187 = baseIndex; - int const x_189 = (*(tint_symbol_4)).arr[x_187].leftIndex; + int const x_189 = (*(tint_symbol_3)).arr[x_187].leftIndex; if ((x_189 == -1)) { int const x_194 = baseIndex; int const x_195 = *(treeIndex); - (*(tint_symbol_4)).arr[x_194].leftIndex = x_195; + (*(tint_symbol_3)).arr[x_194].leftIndex = x_195; float const x_198 = x_16.injectionSwitch.x; float const x_200 = x_16.injectionSwitch.y; if ((x_198 < x_200)) { int const x_204 = *(treeIndex); - BST const x_206 = (*(tint_symbol_4)).arr[x_204]; + BST const x_206 = (*(tint_symbol_3)).arr[x_204]; param = x_206; int const x_207 = *(data_1); param_1 = x_207; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1)); BST const x_209 = param; - (*(tint_symbol_4)).arr[x_204] = x_209; + (*(tint_symbol_3)).arr[x_204] = x_209; } float const x_212 = x_16.injectionSwitch.x; float const x_214 = x_16.injectionSwitch.y; @@ -71,7 +71,7 @@ void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* } } else { int const x_218 = baseIndex; - int const x_220 = (*(tint_symbol_4)).arr[x_218].leftIndex; + int const x_220 = (*(tint_symbol_3)).arr[x_218].leftIndex; baseIndex = x_220; continue; } @@ -80,30 +80,30 @@ void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* float const x_224 = x_16.injectionSwitch.y; if ((x_222 < x_224)) { int const x_229 = baseIndex; - int const x_231 = (*(tint_symbol_4)).arr[x_229].rightIndex; + int const x_231 = (*(tint_symbol_3)).arr[x_229].rightIndex; x_170 = x_231; } else { int const x_232 = baseIndex; - int const x_234 = (*(tint_symbol_4)).arr[x_232].rightIndex; + int const x_234 = (*(tint_symbol_3)).arr[x_232].rightIndex; x_170 = x_234; } int const x_235 = x_170; if ((x_235 == -1)) { int const x_240 = baseIndex; int const x_241 = *(treeIndex); - (*(tint_symbol_4)).arr[x_240].rightIndex = x_241; + (*(tint_symbol_3)).arr[x_240].rightIndex = x_241; int const x_243 = *(treeIndex); - BST const x_245 = (*(tint_symbol_4)).arr[x_243]; + BST const x_245 = (*(tint_symbol_3)).arr[x_243]; param_2 = x_245; int const x_246 = *(data_1); param_3 = x_246; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3)); BST const x_248 = param_2; - (*(tint_symbol_4)).arr[x_243] = x_248; + (*(tint_symbol_3)).arr[x_243] = x_248; return; } else { int const x_250 = baseIndex; - int const x_252 = (*(tint_symbol_4)).arr[x_250].rightIndex; + int const x_252 = (*(tint_symbol_3)).arr[x_250].rightIndex; baseIndex = x_252; continue; } @@ -118,7 +118,7 @@ void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* return; } -int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_5) { +int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) { int index = 0; BST currentNode = {}; int x_261 = 0; @@ -130,7 +130,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s break; } int const x_269 = index; - BST const x_271 = (*(tint_symbol_5)).arr[x_269]; + BST const x_271 = (*(tint_symbol_4)).arr[x_269]; currentNode = x_271; int const x_273 = currentNode.data; int const x_274 = *(target); @@ -153,7 +153,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s return -1; } -void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) { int treeIndex_1 = 0; BST param_4 = {}; int param_5 = 0; @@ -180,66 +180,66 @@ void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, int result = 0; int param_24 = 0; treeIndex_1 = 0; - BST const x_91 = (*(tint_symbol_6)).arr[0]; + BST const x_91 = (*(tint_symbol_5)).arr[0]; param_4 = x_91; param_5 = 9; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5)); BST const x_93 = param_4; - (*(tint_symbol_6)).arr[0] = x_93; + (*(tint_symbol_5)).arr[0] = x_93; int const x_95 = treeIndex_1; treeIndex_1 = as_type((as_type(x_95) + as_type(1))); int const x_97 = treeIndex_1; param_6 = x_97; param_7 = 5; - insert_i1_i1_(x_16, &(param_6), &(param_7), tint_symbol_6); + insert_i1_i1_(x_16, &(param_6), &(param_7), tint_symbol_5); int const x_99 = treeIndex_1; treeIndex_1 = as_type((as_type(x_99) + as_type(1))); int const x_101 = treeIndex_1; param_8 = x_101; param_9 = 12; - insert_i1_i1_(x_16, &(param_8), &(param_9), tint_symbol_6); + insert_i1_i1_(x_16, &(param_8), &(param_9), tint_symbol_5); int const x_103 = treeIndex_1; treeIndex_1 = as_type((as_type(x_103) + as_type(1))); int const x_105 = treeIndex_1; param_10 = x_105; param_11 = 15; - insert_i1_i1_(x_16, &(param_10), &(param_11), tint_symbol_6); + insert_i1_i1_(x_16, &(param_10), &(param_11), tint_symbol_5); int const x_107 = treeIndex_1; treeIndex_1 = as_type((as_type(x_107) + as_type(1))); int const x_109 = treeIndex_1; param_12 = x_109; param_13 = 7; - insert_i1_i1_(x_16, &(param_12), &(param_13), tint_symbol_6); + insert_i1_i1_(x_16, &(param_12), &(param_13), tint_symbol_5); int const x_111 = treeIndex_1; treeIndex_1 = as_type((as_type(x_111) + as_type(1))); int const x_113 = treeIndex_1; param_14 = x_113; param_15 = 8; - insert_i1_i1_(x_16, &(param_14), &(param_15), tint_symbol_6); + insert_i1_i1_(x_16, &(param_14), &(param_15), tint_symbol_5); int const x_115 = treeIndex_1; treeIndex_1 = as_type((as_type(x_115) + as_type(1))); int const x_117 = treeIndex_1; param_16 = x_117; param_17 = 2; - insert_i1_i1_(x_16, &(param_16), &(param_17), tint_symbol_6); + insert_i1_i1_(x_16, &(param_16), &(param_17), tint_symbol_5); int const x_119 = treeIndex_1; treeIndex_1 = as_type((as_type(x_119) + as_type(1))); int const x_121 = treeIndex_1; param_18 = x_121; param_19 = 6; - insert_i1_i1_(x_16, &(param_18), &(param_19), tint_symbol_6); + insert_i1_i1_(x_16, &(param_18), &(param_19), tint_symbol_5); int const x_123 = treeIndex_1; treeIndex_1 = as_type((as_type(x_123) + as_type(1))); int const x_125 = treeIndex_1; param_20 = x_125; param_21 = 17; - insert_i1_i1_(x_16, &(param_20), &(param_21), tint_symbol_6); + insert_i1_i1_(x_16, &(param_20), &(param_21), tint_symbol_5); int const x_127 = treeIndex_1; treeIndex_1 = as_type((as_type(x_127) + as_type(1))); int const x_129 = treeIndex_1; param_22 = x_129; param_23 = 13; - insert_i1_i1_(x_16, &(param_22), &(param_23), tint_symbol_6); + insert_i1_i1_(x_16, &(param_22), &(param_23), tint_symbol_5); count = 0; i = 0; while (true) { @@ -250,7 +250,7 @@ void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, } int const x_138 = i; param_24 = x_138; - int const x_139 = search_i1_(&(param_24), tint_symbol_6); + int const x_139 = search_i1_(&(param_24), tint_symbol_5); result = x_139; int const x_140 = i; switch(x_140) { @@ -288,19 +288,25 @@ void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, } int const x_159 = count; if ((x_159 == 20)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_6) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_16 [[buffer(0)]]) { - thread tint_array_wrapper tint_symbol_8 = {}; - thread float4 tint_symbol_9 = 0.0f; - main_1(x_16, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { + main_1(x_16, tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_16 [[buffer(0)]]) { + thread tint_array_wrapper tint_symbol_9 = {}; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_16, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.spvasm.expected.msl index 3679d6014d..58102cc6e8 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.spvasm.expected.msl @@ -24,7 +24,7 @@ void makeTreeNode_struct_BST_i1_i1_i11_i1_(thread BST* const node, thread int* c return; } -void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_4) { +void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) { int baseIndex = 0; BST param = {}; int param_1 = 0; @@ -40,49 +40,49 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread } int const x_171 = *(data_1); int const x_172 = baseIndex; - int const x_174 = (*(tint_symbol_4)).arr[x_172].data; + int const x_174 = (*(tint_symbol_3)).arr[x_172].data; if ((x_171 <= x_174)) { int const x_179 = baseIndex; - int const x_181 = (*(tint_symbol_4)).arr[x_179].leftIndex; + int const x_181 = (*(tint_symbol_3)).arr[x_179].leftIndex; if ((x_181 == -1)) { int const x_186 = baseIndex; int const x_187 = *(treeIndex); - (*(tint_symbol_4)).arr[x_186].leftIndex = x_187; + (*(tint_symbol_3)).arr[x_186].leftIndex = x_187; int const x_189 = *(treeIndex); - BST const x_191 = (*(tint_symbol_4)).arr[x_189]; + BST const x_191 = (*(tint_symbol_3)).arr[x_189]; param = x_191; int const x_192 = *(data_1); param_1 = x_192; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1)); BST const x_194 = param; - (*(tint_symbol_4)).arr[x_189] = x_194; + (*(tint_symbol_3)).arr[x_189] = x_194; return; } else { int const x_196 = baseIndex; - int const x_198 = (*(tint_symbol_4)).arr[x_196].leftIndex; + int const x_198 = (*(tint_symbol_3)).arr[x_196].leftIndex; baseIndex = x_198; continue; } return; } else { int const x_199 = baseIndex; - int const x_201 = (*(tint_symbol_4)).arr[x_199].rightIndex; + int const x_201 = (*(tint_symbol_3)).arr[x_199].rightIndex; if ((x_201 == -1)) { int const x_206 = baseIndex; int const x_207 = *(treeIndex); - (*(tint_symbol_4)).arr[x_206].rightIndex = x_207; + (*(tint_symbol_3)).arr[x_206].rightIndex = x_207; int const x_209 = *(treeIndex); - BST const x_211 = (*(tint_symbol_4)).arr[x_209]; + BST const x_211 = (*(tint_symbol_3)).arr[x_209]; param_2 = x_211; int const x_212 = *(data_1); param_3 = x_212; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3)); BST const x_214 = param_2; - (*(tint_symbol_4)).arr[x_209] = x_214; + (*(tint_symbol_3)).arr[x_209] = x_214; return; } else { int const x_216 = baseIndex; - int const x_218 = (*(tint_symbol_4)).arr[x_216].rightIndex; + int const x_218 = (*(tint_symbol_3)).arr[x_216].rightIndex; baseIndex = x_218; continue; } @@ -93,7 +93,7 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread return; } -int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_5) { +int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) { int index = 0; BST currentNode = {}; int x_220 = 0; @@ -105,7 +105,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s break; } int const x_228 = index; - BST const x_230 = (*(tint_symbol_5)).arr[x_228]; + BST const x_230 = (*(tint_symbol_4)).arr[x_228]; currentNode = x_230; int const x_232 = currentNode.data; int const x_233 = *(target); @@ -128,7 +128,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s return -1; } -void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) { int treeIndex_1 = 0; BST param_4 = {}; int param_5 = 0; @@ -155,66 +155,66 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const int result = 0; int param_24 = 0; treeIndex_1 = 0; - BST const x_84 = (*(tint_symbol_6)).arr[0]; + BST const x_84 = (*(tint_symbol_5)).arr[0]; param_4 = x_84; param_5 = 9; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5)); BST const x_86 = param_4; - (*(tint_symbol_6)).arr[0] = x_86; + (*(tint_symbol_5)).arr[0] = x_86; int const x_88 = treeIndex_1; treeIndex_1 = as_type((as_type(x_88) + as_type(1))); int const x_90 = treeIndex_1; param_6 = x_90; param_7 = 5; - insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6); + insert_i1_i1_(&(param_6), &(param_7), tint_symbol_5); int const x_92 = treeIndex_1; treeIndex_1 = as_type((as_type(x_92) + as_type(1))); int const x_94 = treeIndex_1; param_8 = x_94; param_9 = 12; - insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6); + insert_i1_i1_(&(param_8), &(param_9), tint_symbol_5); int const x_96 = treeIndex_1; treeIndex_1 = as_type((as_type(x_96) + as_type(1))); int const x_98 = treeIndex_1; param_10 = x_98; param_11 = 15; - insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6); + insert_i1_i1_(&(param_10), &(param_11), tint_symbol_5); int const x_100 = treeIndex_1; treeIndex_1 = as_type((as_type(x_100) + as_type(1))); int const x_102 = treeIndex_1; param_12 = x_102; param_13 = 7; - insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6); + insert_i1_i1_(&(param_12), &(param_13), tint_symbol_5); int const x_104 = treeIndex_1; treeIndex_1 = as_type((as_type(x_104) + as_type(1))); int const x_106 = treeIndex_1; param_14 = x_106; param_15 = 8; - insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6); + insert_i1_i1_(&(param_14), &(param_15), tint_symbol_5); int const x_108 = treeIndex_1; treeIndex_1 = as_type((as_type(x_108) + as_type(1))); int const x_110 = treeIndex_1; param_16 = x_110; param_17 = 2; - insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6); + insert_i1_i1_(&(param_16), &(param_17), tint_symbol_5); int const x_112 = treeIndex_1; treeIndex_1 = as_type((as_type(x_112) + as_type(1))); int const x_114 = treeIndex_1; param_18 = x_114; param_19 = 6; - insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6); + insert_i1_i1_(&(param_18), &(param_19), tint_symbol_5); int const x_116 = treeIndex_1; treeIndex_1 = as_type((as_type(x_116) + as_type(1))); int const x_118 = treeIndex_1; param_20 = x_118; param_21 = 17; - insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6); + insert_i1_i1_(&(param_20), &(param_21), tint_symbol_5); int const x_120 = treeIndex_1; treeIndex_1 = as_type((as_type(x_120) + as_type(1))); int const x_122 = treeIndex_1; param_22 = x_122; param_23 = 13; - insert_i1_i1_(&(param_22), &(param_23), tint_symbol_6); + insert_i1_i1_(&(param_22), &(param_23), tint_symbol_5); count = 0; i = 0; while (true) { @@ -225,7 +225,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const } int const x_131 = i; param_24 = x_131; - int const x_132 = search_i1_(&(param_24), tint_symbol_6); + int const x_132 = search_i1_(&(param_24), tint_symbol_5); result = x_132; int const x_133 = i; switch(x_133) { @@ -263,19 +263,25 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const } int const x_152 = count; if ((x_152 == 20)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_6) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread tint_array_wrapper tint_symbol_8 = {}; - thread float4 tint_symbol_9 = 0.0f; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread tint_array_wrapper tint_symbol_9 = {}; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl.expected.msl index 3679d6014d..58102cc6e8 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl.expected.msl @@ -24,7 +24,7 @@ void makeTreeNode_struct_BST_i1_i1_i11_i1_(thread BST* const node, thread int* c return; } -void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_4) { +void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) { int baseIndex = 0; BST param = {}; int param_1 = 0; @@ -40,49 +40,49 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread } int const x_171 = *(data_1); int const x_172 = baseIndex; - int const x_174 = (*(tint_symbol_4)).arr[x_172].data; + int const x_174 = (*(tint_symbol_3)).arr[x_172].data; if ((x_171 <= x_174)) { int const x_179 = baseIndex; - int const x_181 = (*(tint_symbol_4)).arr[x_179].leftIndex; + int const x_181 = (*(tint_symbol_3)).arr[x_179].leftIndex; if ((x_181 == -1)) { int const x_186 = baseIndex; int const x_187 = *(treeIndex); - (*(tint_symbol_4)).arr[x_186].leftIndex = x_187; + (*(tint_symbol_3)).arr[x_186].leftIndex = x_187; int const x_189 = *(treeIndex); - BST const x_191 = (*(tint_symbol_4)).arr[x_189]; + BST const x_191 = (*(tint_symbol_3)).arr[x_189]; param = x_191; int const x_192 = *(data_1); param_1 = x_192; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1)); BST const x_194 = param; - (*(tint_symbol_4)).arr[x_189] = x_194; + (*(tint_symbol_3)).arr[x_189] = x_194; return; } else { int const x_196 = baseIndex; - int const x_198 = (*(tint_symbol_4)).arr[x_196].leftIndex; + int const x_198 = (*(tint_symbol_3)).arr[x_196].leftIndex; baseIndex = x_198; continue; } return; } else { int const x_199 = baseIndex; - int const x_201 = (*(tint_symbol_4)).arr[x_199].rightIndex; + int const x_201 = (*(tint_symbol_3)).arr[x_199].rightIndex; if ((x_201 == -1)) { int const x_206 = baseIndex; int const x_207 = *(treeIndex); - (*(tint_symbol_4)).arr[x_206].rightIndex = x_207; + (*(tint_symbol_3)).arr[x_206].rightIndex = x_207; int const x_209 = *(treeIndex); - BST const x_211 = (*(tint_symbol_4)).arr[x_209]; + BST const x_211 = (*(tint_symbol_3)).arr[x_209]; param_2 = x_211; int const x_212 = *(data_1); param_3 = x_212; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3)); BST const x_214 = param_2; - (*(tint_symbol_4)).arr[x_209] = x_214; + (*(tint_symbol_3)).arr[x_209] = x_214; return; } else { int const x_216 = baseIndex; - int const x_218 = (*(tint_symbol_4)).arr[x_216].rightIndex; + int const x_218 = (*(tint_symbol_3)).arr[x_216].rightIndex; baseIndex = x_218; continue; } @@ -93,7 +93,7 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread return; } -int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_5) { +int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) { int index = 0; BST currentNode = {}; int x_220 = 0; @@ -105,7 +105,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s break; } int const x_228 = index; - BST const x_230 = (*(tint_symbol_5)).arr[x_228]; + BST const x_230 = (*(tint_symbol_4)).arr[x_228]; currentNode = x_230; int const x_232 = currentNode.data; int const x_233 = *(target); @@ -128,7 +128,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_s return -1; } -void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) { int treeIndex_1 = 0; BST param_4 = {}; int param_5 = 0; @@ -155,66 +155,66 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const int result = 0; int param_24 = 0; treeIndex_1 = 0; - BST const x_84 = (*(tint_symbol_6)).arr[0]; + BST const x_84 = (*(tint_symbol_5)).arr[0]; param_4 = x_84; param_5 = 9; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5)); BST const x_86 = param_4; - (*(tint_symbol_6)).arr[0] = x_86; + (*(tint_symbol_5)).arr[0] = x_86; int const x_88 = treeIndex_1; treeIndex_1 = as_type((as_type(x_88) + as_type(1))); int const x_90 = treeIndex_1; param_6 = x_90; param_7 = 5; - insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6); + insert_i1_i1_(&(param_6), &(param_7), tint_symbol_5); int const x_92 = treeIndex_1; treeIndex_1 = as_type((as_type(x_92) + as_type(1))); int const x_94 = treeIndex_1; param_8 = x_94; param_9 = 12; - insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6); + insert_i1_i1_(&(param_8), &(param_9), tint_symbol_5); int const x_96 = treeIndex_1; treeIndex_1 = as_type((as_type(x_96) + as_type(1))); int const x_98 = treeIndex_1; param_10 = x_98; param_11 = 15; - insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6); + insert_i1_i1_(&(param_10), &(param_11), tint_symbol_5); int const x_100 = treeIndex_1; treeIndex_1 = as_type((as_type(x_100) + as_type(1))); int const x_102 = treeIndex_1; param_12 = x_102; param_13 = 7; - insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6); + insert_i1_i1_(&(param_12), &(param_13), tint_symbol_5); int const x_104 = treeIndex_1; treeIndex_1 = as_type((as_type(x_104) + as_type(1))); int const x_106 = treeIndex_1; param_14 = x_106; param_15 = 8; - insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6); + insert_i1_i1_(&(param_14), &(param_15), tint_symbol_5); int const x_108 = treeIndex_1; treeIndex_1 = as_type((as_type(x_108) + as_type(1))); int const x_110 = treeIndex_1; param_16 = x_110; param_17 = 2; - insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6); + insert_i1_i1_(&(param_16), &(param_17), tint_symbol_5); int const x_112 = treeIndex_1; treeIndex_1 = as_type((as_type(x_112) + as_type(1))); int const x_114 = treeIndex_1; param_18 = x_114; param_19 = 6; - insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6); + insert_i1_i1_(&(param_18), &(param_19), tint_symbol_5); int const x_116 = treeIndex_1; treeIndex_1 = as_type((as_type(x_116) + as_type(1))); int const x_118 = treeIndex_1; param_20 = x_118; param_21 = 17; - insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6); + insert_i1_i1_(&(param_20), &(param_21), tint_symbol_5); int const x_120 = treeIndex_1; treeIndex_1 = as_type((as_type(x_120) + as_type(1))); int const x_122 = treeIndex_1; param_22 = x_122; param_23 = 13; - insert_i1_i1_(&(param_22), &(param_23), tint_symbol_6); + insert_i1_i1_(&(param_22), &(param_23), tint_symbol_5); count = 0; i = 0; while (true) { @@ -225,7 +225,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const } int const x_131 = i; param_24 = x_131; - int const x_132 = search_i1_(&(param_24), tint_symbol_6); + int const x_132 = search_i1_(&(param_24), tint_symbol_5); result = x_132; int const x_133 = i; switch(x_133) { @@ -263,19 +263,25 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const } int const x_152 = count; if ((x_152 == 20)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_6) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread tint_array_wrapper tint_symbol_8 = {}; - thread float4 tint_symbol_9 = 0.0f; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread tint_array_wrapper tint_symbol_9 = {}; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.spvasm.expected.msl index f4569b5b0a..5dcf502ad0 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.spvasm.expected.msl @@ -33,7 +33,7 @@ void makeTreeNode_struct_BST_i1_i1_i11_i1_(thread BST* const node, thread int* c return; } -void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_4) { +void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_3) { int baseIndex = 0; BST param = {}; int param_1 = 0; @@ -49,49 +49,49 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread } int const x_221 = *(data_1); int const x_222 = baseIndex; - int const x_224 = (*(tint_symbol_4)).arr[x_222].data; + int const x_224 = (*(tint_symbol_3)).arr[x_222].data; if ((x_221 <= x_224)) { int const x_229 = baseIndex; - int const x_231 = (*(tint_symbol_4)).arr[x_229].leftIndex; + int const x_231 = (*(tint_symbol_3)).arr[x_229].leftIndex; if ((x_231 == -1)) { int const x_236 = baseIndex; int const x_237 = *(treeIndex); - (*(tint_symbol_4)).arr[x_236].leftIndex = x_237; + (*(tint_symbol_3)).arr[x_236].leftIndex = x_237; int const x_239 = *(treeIndex); - BST const x_241 = (*(tint_symbol_4)).arr[x_239]; + BST const x_241 = (*(tint_symbol_3)).arr[x_239]; param = x_241; int const x_242 = *(data_1); param_1 = x_242; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1)); BST const x_244 = param; - (*(tint_symbol_4)).arr[x_239] = x_244; + (*(tint_symbol_3)).arr[x_239] = x_244; return; } else { int const x_246 = baseIndex; - int const x_248 = (*(tint_symbol_4)).arr[x_246].leftIndex; + int const x_248 = (*(tint_symbol_3)).arr[x_246].leftIndex; baseIndex = x_248; continue; } return; } else { int const x_249 = baseIndex; - int const x_251 = (*(tint_symbol_4)).arr[x_249].rightIndex; + int const x_251 = (*(tint_symbol_3)).arr[x_249].rightIndex; if ((x_251 == -1)) { int const x_256 = baseIndex; int const x_257 = *(treeIndex); - (*(tint_symbol_4)).arr[x_256].rightIndex = x_257; + (*(tint_symbol_3)).arr[x_256].rightIndex = x_257; int const x_259 = *(treeIndex); - BST const x_261 = (*(tint_symbol_4)).arr[x_259]; + BST const x_261 = (*(tint_symbol_3)).arr[x_259]; param_2 = x_261; int const x_262 = *(data_1); param_3 = x_262; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3)); BST const x_264 = param_2; - (*(tint_symbol_4)).arr[x_259] = x_264; + (*(tint_symbol_3)).arr[x_259] = x_264; return; } else { int const x_266 = baseIndex; - int const x_268 = (*(tint_symbol_4)).arr[x_266].rightIndex; + int const x_268 = (*(tint_symbol_3)).arr[x_266].rightIndex; baseIndex = x_268; continue; } @@ -102,15 +102,15 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread return; } -int identity_i1_(thread int* const a, thread QuicksortObject* const tint_symbol_5) { +int identity_i1_(thread int* const a, thread QuicksortObject* const tint_symbol_4) { int const x_202 = *(a); int const x_203 = *(a); - (*(tint_symbol_5)).numbers.arr[x_202] = x_203; - int const x_206 = (*(tint_symbol_5)).numbers.arr[2]; + (*(tint_symbol_4)).numbers.arr[x_202] = x_203; + int const x_206 = (*(tint_symbol_4)).numbers.arr[2]; return x_206; } -int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_6) { +int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_5) { int index = 0; BST currentNode = {}; int x_270 = 0; @@ -122,7 +122,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint break; } int const x_278 = index; - BST const x_280 = (*(tint_symbol_6)).arr[x_278]; + BST const x_280 = (*(tint_symbol_5)).arr[x_278]; currentNode = x_280; int const x_282 = currentNode.data; int const x_283 = *(target); @@ -145,7 +145,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint return -1; } -void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_6, thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8) { int treeIndex_1 = 0; BST param_4 = {}; int param_5 = 0; @@ -176,66 +176,66 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ int result = 0; int param_25 = 0; treeIndex_1 = 0; - BST const x_101 = (*(tint_symbol_7)).arr[0]; + BST const x_101 = (*(tint_symbol_6)).arr[0]; param_4 = x_101; param_5 = 9; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5)); BST const x_103 = param_4; - (*(tint_symbol_7)).arr[0] = x_103; + (*(tint_symbol_6)).arr[0] = x_103; int const x_105 = treeIndex_1; treeIndex_1 = as_type((as_type(x_105) + as_type(1))); int const x_107 = treeIndex_1; param_6 = x_107; param_7 = 5; - insert_i1_i1_(&(param_6), &(param_7), tint_symbol_7); + insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6); int const x_109 = treeIndex_1; treeIndex_1 = as_type((as_type(x_109) + as_type(1))); int const x_111 = treeIndex_1; param_8 = x_111; param_9 = 12; - insert_i1_i1_(&(param_8), &(param_9), tint_symbol_7); + insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6); int const x_113 = treeIndex_1; treeIndex_1 = as_type((as_type(x_113) + as_type(1))); int const x_115 = treeIndex_1; param_10 = x_115; param_11 = 15; - insert_i1_i1_(&(param_10), &(param_11), tint_symbol_7); + insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6); int const x_117 = treeIndex_1; treeIndex_1 = as_type((as_type(x_117) + as_type(1))); int const x_119 = treeIndex_1; param_12 = x_119; param_13 = 7; - insert_i1_i1_(&(param_12), &(param_13), tint_symbol_7); + insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6); int const x_121 = treeIndex_1; treeIndex_1 = as_type((as_type(x_121) + as_type(1))); int const x_123 = treeIndex_1; param_14 = x_123; param_15 = 8; - insert_i1_i1_(&(param_14), &(param_15), tint_symbol_7); + insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6); int const x_125 = treeIndex_1; treeIndex_1 = as_type((as_type(x_125) + as_type(1))); int const x_127 = treeIndex_1; param_16 = x_127; param_17 = 2; - insert_i1_i1_(&(param_16), &(param_17), tint_symbol_7); + insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6); int const x_129 = treeIndex_1; treeIndex_1 = as_type((as_type(x_129) + as_type(1))); int const x_131 = treeIndex_1; param_18 = x_131; param_19 = 6; - insert_i1_i1_(&(param_18), &(param_19), tint_symbol_7); + insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6); int const x_133 = treeIndex_1; treeIndex_1 = as_type((as_type(x_133) + as_type(1))); int const x_135 = treeIndex_1; param_20 = x_135; param_21 = 17; - insert_i1_i1_(&(param_20), &(param_21), tint_symbol_7); + insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6); int const x_137 = treeIndex_1; treeIndex_1 = as_type((as_type(x_137) + as_type(1))); int const x_139 = treeIndex_1; param_22 = x_139; param_23 = 13; - insert_i1_i1_(&(param_22), &(param_23), tint_symbol_7); + insert_i1_i1_(&(param_22), &(param_23), tint_symbol_6); pp = 0; looplimiter0 = 0; i = 0; @@ -250,7 +250,7 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ if ((x_148 >= int(x_150))) { float const x_156 = x_50.injectionSwitch.y; param_24 = as_type((as_type(1) + as_type(int(x_156)))); - int const x_159 = identity_i1_(&(param_24), tint_symbol_8); + int const x_159 = identity_i1_(&(param_24), tint_symbol_7); pp = x_159; break; } @@ -275,7 +275,7 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ } int const x_175 = i_1; param_25 = x_175; - int const x_176 = search_i1_(&(param_25), tint_symbol_7); + int const x_176 = search_i1_(&(param_25), tint_symbol_6); result = x_176; int const x_177 = i_1; switch(x_177) { @@ -313,20 +313,26 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ } int const x_196 = count; if ((x_196 == 20)) { - *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_8) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_9) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_8) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_50 [[buffer(0)]]) { - thread tint_array_wrapper_1 tint_symbol_10 = {}; - thread QuicksortObject tint_symbol_11 = {}; - thread float4 tint_symbol_12 = 0.0f; - main_1(x_50, &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11) { + main_1(x_50, tint_symbol_9, tint_symbol_10, tint_symbol_11); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_50 [[buffer(0)]]) { + thread tint_array_wrapper_1 tint_symbol_12 = {}; + thread QuicksortObject tint_symbol_13 = {}; + thread float4 tint_symbol_14 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_50, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl.expected.msl index f4569b5b0a..5dcf502ad0 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl.expected.msl @@ -33,7 +33,7 @@ void makeTreeNode_struct_BST_i1_i1_i11_i1_(thread BST* const node, thread int* c return; } -void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_4) { +void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_3) { int baseIndex = 0; BST param = {}; int param_1 = 0; @@ -49,49 +49,49 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread } int const x_221 = *(data_1); int const x_222 = baseIndex; - int const x_224 = (*(tint_symbol_4)).arr[x_222].data; + int const x_224 = (*(tint_symbol_3)).arr[x_222].data; if ((x_221 <= x_224)) { int const x_229 = baseIndex; - int const x_231 = (*(tint_symbol_4)).arr[x_229].leftIndex; + int const x_231 = (*(tint_symbol_3)).arr[x_229].leftIndex; if ((x_231 == -1)) { int const x_236 = baseIndex; int const x_237 = *(treeIndex); - (*(tint_symbol_4)).arr[x_236].leftIndex = x_237; + (*(tint_symbol_3)).arr[x_236].leftIndex = x_237; int const x_239 = *(treeIndex); - BST const x_241 = (*(tint_symbol_4)).arr[x_239]; + BST const x_241 = (*(tint_symbol_3)).arr[x_239]; param = x_241; int const x_242 = *(data_1); param_1 = x_242; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1)); BST const x_244 = param; - (*(tint_symbol_4)).arr[x_239] = x_244; + (*(tint_symbol_3)).arr[x_239] = x_244; return; } else { int const x_246 = baseIndex; - int const x_248 = (*(tint_symbol_4)).arr[x_246].leftIndex; + int const x_248 = (*(tint_symbol_3)).arr[x_246].leftIndex; baseIndex = x_248; continue; } return; } else { int const x_249 = baseIndex; - int const x_251 = (*(tint_symbol_4)).arr[x_249].rightIndex; + int const x_251 = (*(tint_symbol_3)).arr[x_249].rightIndex; if ((x_251 == -1)) { int const x_256 = baseIndex; int const x_257 = *(treeIndex); - (*(tint_symbol_4)).arr[x_256].rightIndex = x_257; + (*(tint_symbol_3)).arr[x_256].rightIndex = x_257; int const x_259 = *(treeIndex); - BST const x_261 = (*(tint_symbol_4)).arr[x_259]; + BST const x_261 = (*(tint_symbol_3)).arr[x_259]; param_2 = x_261; int const x_262 = *(data_1); param_3 = x_262; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3)); BST const x_264 = param_2; - (*(tint_symbol_4)).arr[x_259] = x_264; + (*(tint_symbol_3)).arr[x_259] = x_264; return; } else { int const x_266 = baseIndex; - int const x_268 = (*(tint_symbol_4)).arr[x_266].rightIndex; + int const x_268 = (*(tint_symbol_3)).arr[x_266].rightIndex; baseIndex = x_268; continue; } @@ -102,15 +102,15 @@ void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread return; } -int identity_i1_(thread int* const a, thread QuicksortObject* const tint_symbol_5) { +int identity_i1_(thread int* const a, thread QuicksortObject* const tint_symbol_4) { int const x_202 = *(a); int const x_203 = *(a); - (*(tint_symbol_5)).numbers.arr[x_202] = x_203; - int const x_206 = (*(tint_symbol_5)).numbers.arr[2]; + (*(tint_symbol_4)).numbers.arr[x_202] = x_203; + int const x_206 = (*(tint_symbol_4)).numbers.arr[2]; return x_206; } -int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_6) { +int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_5) { int index = 0; BST currentNode = {}; int x_270 = 0; @@ -122,7 +122,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint break; } int const x_278 = index; - BST const x_280 = (*(tint_symbol_6)).arr[x_278]; + BST const x_280 = (*(tint_symbol_5)).arr[x_278]; currentNode = x_280; int const x_282 = currentNode.data; int const x_283 = *(target); @@ -145,7 +145,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint return -1; } -void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_6, thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8) { int treeIndex_1 = 0; BST param_4 = {}; int param_5 = 0; @@ -176,66 +176,66 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ int result = 0; int param_25 = 0; treeIndex_1 = 0; - BST const x_101 = (*(tint_symbol_7)).arr[0]; + BST const x_101 = (*(tint_symbol_6)).arr[0]; param_4 = x_101; param_5 = 9; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5)); BST const x_103 = param_4; - (*(tint_symbol_7)).arr[0] = x_103; + (*(tint_symbol_6)).arr[0] = x_103; int const x_105 = treeIndex_1; treeIndex_1 = as_type((as_type(x_105) + as_type(1))); int const x_107 = treeIndex_1; param_6 = x_107; param_7 = 5; - insert_i1_i1_(&(param_6), &(param_7), tint_symbol_7); + insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6); int const x_109 = treeIndex_1; treeIndex_1 = as_type((as_type(x_109) + as_type(1))); int const x_111 = treeIndex_1; param_8 = x_111; param_9 = 12; - insert_i1_i1_(&(param_8), &(param_9), tint_symbol_7); + insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6); int const x_113 = treeIndex_1; treeIndex_1 = as_type((as_type(x_113) + as_type(1))); int const x_115 = treeIndex_1; param_10 = x_115; param_11 = 15; - insert_i1_i1_(&(param_10), &(param_11), tint_symbol_7); + insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6); int const x_117 = treeIndex_1; treeIndex_1 = as_type((as_type(x_117) + as_type(1))); int const x_119 = treeIndex_1; param_12 = x_119; param_13 = 7; - insert_i1_i1_(&(param_12), &(param_13), tint_symbol_7); + insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6); int const x_121 = treeIndex_1; treeIndex_1 = as_type((as_type(x_121) + as_type(1))); int const x_123 = treeIndex_1; param_14 = x_123; param_15 = 8; - insert_i1_i1_(&(param_14), &(param_15), tint_symbol_7); + insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6); int const x_125 = treeIndex_1; treeIndex_1 = as_type((as_type(x_125) + as_type(1))); int const x_127 = treeIndex_1; param_16 = x_127; param_17 = 2; - insert_i1_i1_(&(param_16), &(param_17), tint_symbol_7); + insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6); int const x_129 = treeIndex_1; treeIndex_1 = as_type((as_type(x_129) + as_type(1))); int const x_131 = treeIndex_1; param_18 = x_131; param_19 = 6; - insert_i1_i1_(&(param_18), &(param_19), tint_symbol_7); + insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6); int const x_133 = treeIndex_1; treeIndex_1 = as_type((as_type(x_133) + as_type(1))); int const x_135 = treeIndex_1; param_20 = x_135; param_21 = 17; - insert_i1_i1_(&(param_20), &(param_21), tint_symbol_7); + insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6); int const x_137 = treeIndex_1; treeIndex_1 = as_type((as_type(x_137) + as_type(1))); int const x_139 = treeIndex_1; param_22 = x_139; param_23 = 13; - insert_i1_i1_(&(param_22), &(param_23), tint_symbol_7); + insert_i1_i1_(&(param_22), &(param_23), tint_symbol_6); pp = 0; looplimiter0 = 0; i = 0; @@ -250,7 +250,7 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ if ((x_148 >= int(x_150))) { float const x_156 = x_50.injectionSwitch.y; param_24 = as_type((as_type(1) + as_type(int(x_156)))); - int const x_159 = identity_i1_(&(param_24), tint_symbol_8); + int const x_159 = identity_i1_(&(param_24), tint_symbol_7); pp = x_159; break; } @@ -275,7 +275,7 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ } int const x_175 = i_1; param_25 = x_175; - int const x_176 = search_i1_(&(param_25), tint_symbol_7); + int const x_176 = search_i1_(&(param_25), tint_symbol_6); result = x_176; int const x_177 = i_1; switch(x_177) { @@ -313,20 +313,26 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ } int const x_196 = count; if ((x_196 == 20)) { - *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_8) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_9) = float4(0.0f, 0.0f, 1.0f, 1.0f); + *(tint_symbol_8) = float4(0.0f, 0.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_50 [[buffer(0)]]) { - thread tint_array_wrapper_1 tint_symbol_10 = {}; - thread QuicksortObject tint_symbol_11 = {}; - thread float4 tint_symbol_12 = 0.0f; - main_1(x_50, &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_12}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11) { + main_1(x_50, tint_symbol_9, tint_symbol_10, tint_symbol_11); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_50 [[buffer(0)]]) { + thread tint_array_wrapper_1 tint_symbol_12 = {}; + thread QuicksortObject tint_symbol_13 = {}; + thread float4 tint_symbol_14 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_50, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.hlsl index b305371d3d..dcab7e2639 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.hlsl @@ -40,8 +40,8 @@ void main_1() { v_1 = ((int(x_72) * 8) + int(x_76)); param = v_1; const int x_80 = collatz_i1_(param); - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_83 = indexable[(x_80 % 16)]; x_GLF_color = x_83; return; @@ -57,11 +57,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.msl index e563769aac..a149e5baa4 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.msl @@ -10,7 +10,7 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -38,12 +38,12 @@ int collatz_i1_(thread int* const v) { return x_105; } -void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { float2 lin = 0.0f; int v_1 = 0; int param = 0; tint_array_wrapper indexable = {}; - float4 const x_63 = *(tint_symbol_6); + float4 const x_63 = *(tint_symbol_4); float2 const x_66 = x_10.resolution; lin = (float2(x_63.x, x_63.y) / x_66); float2 const x_68 = lin; @@ -54,20 +54,26 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa int const x_79 = v_1; param = x_79; int const x_80 = collatz_i1_(&(param)); - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float4 const x_83 = indexable.arr[(x_80 % 16)]; - *(tint_symbol_7) = x_83; + *(tint_symbol_5) = x_83; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_10, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_10, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.hlsl index b305371d3d..dcab7e2639 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.hlsl @@ -40,8 +40,8 @@ void main_1() { v_1 = ((int(x_72) * 8) + int(x_76)); param = v_1; const int x_80 = collatz_i1_(param); - const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable = tint_symbol_4; const float4 x_83 = indexable[(x_80 % 16)]; x_GLF_color = x_83; return; @@ -57,11 +57,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.msl index e563769aac..a149e5baa4 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.msl @@ -10,7 +10,7 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -38,12 +38,12 @@ int collatz_i1_(thread int* const v) { return x_105; } -void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { float2 lin = 0.0f; int v_1 = 0; int param = 0; tint_array_wrapper indexable = {}; - float4 const x_63 = *(tint_symbol_6); + float4 const x_63 = *(tint_symbol_4); float2 const x_66 = x_10.resolution; lin = (float2(x_63.x, x_63.y) / x_66); float2 const x_68 = lin; @@ -54,20 +54,26 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa int const x_79 = v_1; param = x_79; int const x_80 = collatz_i1_(&(param)); - tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable = tint_symbol_2; float4 const x_83 = indexable.arr[(x_80 % 16)]; - *(tint_symbol_7) = x_83; + *(tint_symbol_5) = x_83; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_10, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_10, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_3; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.hlsl index c57ef0b84c..bd31e20700 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.hlsl @@ -210,11 +210,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.msl index a7377e3750..41ee53557b 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.msl @@ -10,11 +10,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float x_54 = 0.0f; float x_58 = 0.0f; @@ -34,7 +34,7 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy c = float3(7.0f, 8.0f, 9.0f); float const x_50 = x_9.resolution.x; float const x_52 = rint((x_50 * 0.125f)); - x_54 = (*(tint_symbol_5)).x; + x_54 = (*(tint_symbol_3)).x; switch(0u) { default: { x_58_phi = -0.5f; @@ -106,7 +106,7 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy bool x_137_phi = false; float const x_95 = x_95_phi; c.x = x_95; - x_98 = (*(tint_symbol_5)).y; + x_98 = (*(tint_symbol_3)).y; switch(0u) { default: { x_102_phi = -0.5f; @@ -200,17 +200,23 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy } float3 const x_167 = c; float3 const x_169 = normalize(fabs(x_167)); - *(tint_symbol_6) = float4(x_169.x, x_169.y, x_169.z, 1.0f); + *(tint_symbol_4) = float4(x_169.x, x_169.y, x_169.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_9, x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_9, x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.hlsl index 1b409b0e37..8282858c51 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.hlsl @@ -210,11 +210,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.msl index fc69ea6bd1..60d6aa5ee6 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.msl @@ -10,11 +10,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float x_54 = 0.0f; float x_58 = 0.0f; @@ -34,7 +34,7 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy c = float3(7.0f, 8.0f, 9.0f); float const x_50 = x_9.resolution.x; float const x_52 = rint((x_50 * 0.125f)); - x_54 = (*(tint_symbol_5)).x; + x_54 = (*(tint_symbol_3)).x; switch(0u) { default: { x_58_phi = -0.5f; @@ -106,7 +106,7 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy bool x_137_phi = false; float const x_95 = x_95_phi; c.x = x_95; - x_98 = (*(tint_symbol_5)).y; + x_98 = (*(tint_symbol_3)).y; switch(0u) { default: { x_102_phi = -0.5f; @@ -200,17 +200,23 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy } float3 const x_167 = c; float3 const x_169 = normalize(fabs(x_167)); - *(tint_symbol_6) = float4(x_169.x, x_169.y, x_169.z, 1.0f); + *(tint_symbol_4) = float4(x_169.x, x_169.y, x_169.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_9, x_6, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_9, x_6, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.hlsl index 461df510c8..4e2b4d79c7 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.hlsl @@ -85,11 +85,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.msl index 258c77bd85..1420486240 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -49,7 +49,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_141; } -void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_13, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float thirty_two_1 = 0.0f; float param = 0.0f; @@ -60,13 +60,13 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread floa c = float3(7.0f, 8.0f, 9.0f); float const x_56 = x_13.resolution.x; thirty_two_1 = rint((x_56 / 8.0f)); - float const x_60 = (*(tint_symbol_5)).x; + float const x_60 = (*(tint_symbol_3)).x; param = x_60; float const x_61 = thirty_two_1; param_1 = x_61; float const x_62 = compute_value_f1_f1_(&(param), &(param_1)); c.x = x_62; - float const x_65 = (*(tint_symbol_5)).y; + float const x_65 = (*(tint_symbol_3)).y; param_2 = x_65; float const x_66 = thirty_two_1; param_3 = x_66; @@ -99,17 +99,23 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread floa } float3 const x_99 = c; float3 const x_101 = normalize(fabs(x_99)); - *(tint_symbol_6) = float4(x_101.x, x_101.y, x_101.z, 1.0f); + *(tint_symbol_4) = float4(x_101.x, x_101.y, x_101.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_13, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_13, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.hlsl index 7295dbb849..86962b9935 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.hlsl @@ -85,11 +85,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.msl index 18723da312..3122dc667f 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -49,7 +49,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_141; } -void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_13, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float thirty_two_1 = 0.0f; float param = 0.0f; @@ -60,13 +60,13 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread floa c = float3(7.0f, 8.0f, 9.0f); float const x_56 = x_13.resolution.x; thirty_two_1 = rint((x_56 / 8.0f)); - float const x_60 = (*(tint_symbol_5)).x; + float const x_60 = (*(tint_symbol_3)).x; param = x_60; float const x_61 = thirty_two_1; param_1 = x_61; float const x_62 = compute_value_f1_f1_(&(param), &(param_1)); c.x = x_62; - float const x_65 = (*(tint_symbol_5)).y; + float const x_65 = (*(tint_symbol_3)).y; param_2 = x_65; float const x_66 = thirty_two_1; param_3 = x_66; @@ -99,17 +99,23 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread floa } float3 const x_99 = c; float3 const x_101 = normalize(fabs(x_99)); - *(tint_symbol_6) = float4(x_101.x, x_101.y, x_101.z, 1.0f); + *(tint_symbol_4) = float4(x_101.x, x_101.y, x_101.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_13, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_13, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.hlsl index 645b4dcdeb..7baccd88b8 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.hlsl @@ -96,11 +96,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.msl index 0021c5071c..30a0b7c9b0 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.msl @@ -10,7 +10,7 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -52,7 +52,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_155; } -void main_1(constant buf0& x_13, constant buf1& x_20, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_13, constant buf1& x_20, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float thirty_two_1 = 0.0f; float param = 0.0f; @@ -64,13 +64,13 @@ void main_1(constant buf0& x_13, constant buf1& x_20, thread float4* const tint_ c = float3(7.0f, 8.0f, 9.0f); float const x_60 = x_13.resolution.x; thirty_two_1 = rint((x_60 / 8.0f)); - float const x_64 = (*(tint_symbol_5)).x; + float const x_64 = (*(tint_symbol_3)).x; param = x_64; float const x_65 = thirty_two_1; param_1 = x_65; float const x_66 = compute_value_f1_f1_(&(param), &(param_1)); c.x = x_66; - float const x_69 = (*(tint_symbol_5)).y; + float const x_69 = (*(tint_symbol_3)).y; param_2 = x_69; float const x_70 = thirty_two_1; param_3 = x_70; @@ -112,17 +112,23 @@ void main_1(constant buf0& x_13, constant buf1& x_20, thread float4* const tint_ } float3 const x_114 = x_58; float3 const x_115 = normalize(x_114); - *(tint_symbol_6) = float4(x_115.x, x_115.y, x_115.z, 1.0f); + *(tint_symbol_4) = float4(x_115.x, x_115.y, x_115.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_20 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_13, x_20, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_13, x_20, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_20 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, x_20, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.hlsl index 91938cde6e..93d5a9da3f 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.hlsl @@ -96,11 +96,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.msl index 70aae88760..6e921c8f9a 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.msl @@ -10,7 +10,7 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -52,7 +52,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_155; } -void main_1(constant buf0& x_13, constant buf1& x_20, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_13, constant buf1& x_20, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float thirty_two_1 = 0.0f; float param = 0.0f; @@ -64,13 +64,13 @@ void main_1(constant buf0& x_13, constant buf1& x_20, thread float4* const tint_ c = float3(7.0f, 8.0f, 9.0f); float const x_60 = x_13.resolution.x; thirty_two_1 = rint((x_60 / 8.0f)); - float const x_64 = (*(tint_symbol_5)).x; + float const x_64 = (*(tint_symbol_3)).x; param = x_64; float const x_65 = thirty_two_1; param_1 = x_65; float const x_66 = compute_value_f1_f1_(&(param), &(param_1)); c.x = x_66; - float const x_69 = (*(tint_symbol_5)).y; + float const x_69 = (*(tint_symbol_3)).y; param_2 = x_69; float const x_70 = thirty_two_1; param_3 = x_70; @@ -112,17 +112,23 @@ void main_1(constant buf0& x_13, constant buf1& x_20, thread float4* const tint_ } float3 const x_114 = x_58; float3 const x_115 = normalize(x_114); - *(tint_symbol_6) = float4(x_115.x, x_115.y, x_115.z, 1.0f); + *(tint_symbol_4) = float4(x_115.x, x_115.y, x_115.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_20 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_13, x_20, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_13, x_20, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_20 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, x_20, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.hlsl index d2c43f110a..f1fa426801 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.hlsl @@ -113,11 +113,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.msl index 5d64b7813c..a91185bdfb 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -58,7 +58,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_91; } -void main_1(constant buf0& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float param = 0.0f; float param_1 = 0.0f; @@ -68,12 +68,12 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_5, thread floa c = float3(7.0f, 8.0f, 9.0f); float const x_52 = x_10.resolution.x; float const x_54 = rint((x_52 * 0.125f)); - float const x_56 = (*(tint_symbol_5)).x; + float const x_56 = (*(tint_symbol_3)).x; param = x_56; param_1 = x_54; float const x_57 = compute_value_f1_f1_(&(param), &(param_1)); c.x = x_57; - float const x_60 = (*(tint_symbol_5)).y; + float const x_60 = (*(tint_symbol_3)).y; param_2 = x_60; param_3 = x_54; float const x_61 = compute_value_f1_f1_(&(param_2), &(param_3)); @@ -103,17 +103,23 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_5, thread floa } float3 const x_82 = c; float3 const x_84 = normalize(fabs(x_82)); - *(tint_symbol_6) = float4(x_84.x, x_84.y, x_84.z, 1.0f); + *(tint_symbol_4) = float4(x_84.x, x_84.y, x_84.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_10, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_10, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.hlsl index 125f7d988e..591ca1b150 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.hlsl @@ -113,11 +113,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.msl index 4635d6f056..5aebe2c229 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -58,7 +58,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_91; } -void main_1(constant buf0& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float param = 0.0f; float param_1 = 0.0f; @@ -68,12 +68,12 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_5, thread floa c = float3(7.0f, 8.0f, 9.0f); float const x_52 = x_10.resolution.x; float const x_54 = rint((x_52 * 0.125f)); - float const x_56 = (*(tint_symbol_5)).x; + float const x_56 = (*(tint_symbol_3)).x; param = x_56; param_1 = x_54; float const x_57 = compute_value_f1_f1_(&(param), &(param_1)); c.x = x_57; - float const x_60 = (*(tint_symbol_5)).y; + float const x_60 = (*(tint_symbol_3)).y; param_2 = x_60; param_3 = x_54; float const x_61 = compute_value_f1_f1_(&(param_2), &(param_3)); @@ -103,17 +103,23 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_5, thread floa } float3 const x_82 = c; float3 const x_84 = normalize(fabs(x_82)); - *(tint_symbol_6) = float4(x_84.x, x_84.y, x_84.z, 1.0f); + *(tint_symbol_4) = float4(x_84.x, x_84.y, x_84.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_10, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_10, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.hlsl index 32ea2b3326..b9f1d3e2b5 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.hlsl @@ -123,11 +123,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.msl index cd4c8e2308..b8d279e7ad 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.msl @@ -10,7 +10,7 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -61,7 +61,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_104; } -void main_1(constant buf0& x_10, constant buf1& x_16, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_10, constant buf1& x_16, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float param = 0.0f; float param_1 = 0.0f; @@ -72,12 +72,12 @@ void main_1(constant buf0& x_10, constant buf1& x_16, thread float4* const tint_ c = float3(7.0f, 8.0f, 9.0f); float const x_56 = x_10.resolution.x; float const x_58 = rint((x_56 * 0.125f)); - float const x_60 = (*(tint_symbol_5)).x; + float const x_60 = (*(tint_symbol_3)).x; param = x_60; param_1 = x_58; float const x_61 = compute_value_f1_f1_(&(param), &(param_1)); c.x = x_61; - float const x_64 = (*(tint_symbol_5)).y; + float const x_64 = (*(tint_symbol_3)).y; param_2 = x_64; param_3 = x_58; float const x_65 = compute_value_f1_f1_(&(param_2), &(param_3)); @@ -114,17 +114,23 @@ void main_1(constant buf0& x_10, constant buf1& x_16, thread float4* const tint_ } float3 const x_95 = c; float3 const x_97 = normalize(fabs(x_95)); - *(tint_symbol_6) = float4(x_97.x, x_97.y, x_97.z, 1.0f); + *(tint_symbol_4) = float4(x_97.x, x_97.y, x_97.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_10, x_16, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_10, constant buf1& x_16, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_10, x_16, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, x_16, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.hlsl index 3a417dfd0d..24b43e06f8 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.hlsl @@ -123,11 +123,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.msl index 04458e7667..c30dcfddfa 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.msl @@ -10,7 +10,7 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -61,7 +61,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_104; } -void main_1(constant buf0& x_10, constant buf1& x_16, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_10, constant buf1& x_16, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float param = 0.0f; float param_1 = 0.0f; @@ -72,12 +72,12 @@ void main_1(constant buf0& x_10, constant buf1& x_16, thread float4* const tint_ c = float3(7.0f, 8.0f, 9.0f); float const x_56 = x_10.resolution.x; float const x_58 = rint((x_56 * 0.125f)); - float const x_60 = (*(tint_symbol_5)).x; + float const x_60 = (*(tint_symbol_3)).x; param = x_60; param_1 = x_58; float const x_61 = compute_value_f1_f1_(&(param), &(param_1)); c.x = x_61; - float const x_64 = (*(tint_symbol_5)).y; + float const x_64 = (*(tint_symbol_3)).y; param_2 = x_64; param_3 = x_58; float const x_65 = compute_value_f1_f1_(&(param_2), &(param_3)); @@ -114,17 +114,23 @@ void main_1(constant buf0& x_10, constant buf1& x_16, thread float4* const tint_ } float3 const x_95 = c; float3 const x_97 = normalize(fabs(x_95)); - *(tint_symbol_6) = float4(x_97.x, x_97.y, x_97.z, 1.0f); + *(tint_symbol_4) = float4(x_97.x, x_97.y, x_97.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_10, x_16, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_10, constant buf1& x_16, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_10, x_16, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, x_16, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.hlsl index 4740814080..e4ca124a0e 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.hlsl @@ -112,11 +112,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.msl index 025db52dac..6c63c38f0c 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.msl @@ -10,7 +10,7 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -52,7 +52,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_174; } -void main_1(constant buf0& x_13, constant buf1& x_19, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_13, constant buf1& x_19, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float thirty_two_1 = 0.0f; float param = 0.0f; @@ -65,13 +65,13 @@ void main_1(constant buf0& x_13, constant buf1& x_19, thread float4* const tint_ c = float3(7.0f, 8.0f, 9.0f); float const x_63 = x_13.resolution.x; thirty_two_1 = rint((x_63 / 8.0f)); - float const x_67 = (*(tint_symbol_5)).x; + float const x_67 = (*(tint_symbol_3)).x; param = x_67; float const x_68 = thirty_two_1; param_1 = x_68; float const x_69 = compute_value_f1_f1_(&(param), &(param_1)); c.x = x_69; - float const x_72 = (*(tint_symbol_5)).y; + float const x_72 = (*(tint_symbol_3)).y; param_2 = x_72; float const x_73 = thirty_two_1; param_3 = x_73; @@ -128,17 +128,23 @@ void main_1(constant buf0& x_13, constant buf1& x_19, thread float4* const tint_ } float3 const x_132 = c; float3 const x_134 = normalize(fabs(x_132)); - *(tint_symbol_6) = float4(x_134.x, x_134.y, x_134.z, 1.0f); + *(tint_symbol_4) = float4(x_134.x, x_134.y, x_134.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_19 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_13, x_19, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_19, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_13, x_19, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_19 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, x_19, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.hlsl index 8f3bad1342..abec6b6adc 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.hlsl @@ -112,11 +112,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.msl index 5515f82086..52d5ba9630 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.msl @@ -10,7 +10,7 @@ struct buf1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -52,7 +52,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_174; } -void main_1(constant buf0& x_13, constant buf1& x_19, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_13, constant buf1& x_19, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float thirty_two_1 = 0.0f; float param = 0.0f; @@ -65,13 +65,13 @@ void main_1(constant buf0& x_13, constant buf1& x_19, thread float4* const tint_ c = float3(7.0f, 8.0f, 9.0f); float const x_63 = x_13.resolution.x; thirty_two_1 = rint((x_63 / 8.0f)); - float const x_67 = (*(tint_symbol_5)).x; + float const x_67 = (*(tint_symbol_3)).x; param = x_67; float const x_68 = thirty_two_1; param_1 = x_68; float const x_69 = compute_value_f1_f1_(&(param), &(param_1)); c.x = x_69; - float const x_72 = (*(tint_symbol_5)).y; + float const x_72 = (*(tint_symbol_3)).y; param_2 = x_72; float const x_73 = thirty_two_1; param_3 = x_73; @@ -128,17 +128,23 @@ void main_1(constant buf0& x_13, constant buf1& x_19, thread float4* const tint_ } float3 const x_132 = c; float3 const x_134 = normalize(fabs(x_132)); - *(tint_symbol_6) = float4(x_134.x, x_134.y, x_134.z, 1.0f); + *(tint_symbol_4) = float4(x_134.x, x_134.y, x_134.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_19 [[buffer(1)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_13, x_19, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_19, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_13, x_19, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_19 [[buffer(1)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, x_19, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.hlsl index 66c6ab5868..66fe270396 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.hlsl @@ -90,11 +90,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.msl index 0af13fc244..23d3b1c909 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -49,7 +49,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_166; } -void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_13, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float thirty_two_1 = 0.0f; float param = 0.0f; @@ -60,13 +60,13 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread floa c = float3(7.0f, 8.0f, 9.0f); float const x_63 = x_13.resolution.x; thirty_two_1 = rint((x_63 / 8.0f)); - float const x_67 = (*(tint_symbol_5)).x; + float const x_67 = (*(tint_symbol_3)).x; param = x_67; float const x_68 = thirty_two_1; param_1 = x_68; float const x_69 = compute_value_f1_f1_(&(param), &(param_1)); c.x = x_69; - float const x_72 = (*(tint_symbol_5)).y; + float const x_72 = (*(tint_symbol_3)).y; param_2 = x_72; float const x_73 = thirty_two_1; param_3 = x_73; @@ -92,7 +92,7 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread floa int const x_112 = i_1; float const x_114 = c[x_112]; c[x_108] = (x_111 * x_114); - float const x_118 = (*(tint_symbol_5)).y; + float const x_118 = (*(tint_symbol_3)).y; if ((x_118 < 0.0f)) { break; } @@ -104,17 +104,23 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread floa } float3 const x_124 = c; float3 const x_126 = normalize(fabs(x_124)); - *(tint_symbol_6) = float4(x_126.x, x_126.y, x_126.z, 1.0f); + *(tint_symbol_4) = float4(x_126.x, x_126.y, x_126.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_13, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_13, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.hlsl index 20808b2648..579ca643a3 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.hlsl @@ -90,11 +90,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.msl index 4324befe62..fc0eff4fce 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -49,7 +49,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_166; } -void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_13, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float3 c = 0.0f; float thirty_two_1 = 0.0f; float param = 0.0f; @@ -60,13 +60,13 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread floa c = float3(7.0f, 8.0f, 9.0f); float const x_63 = x_13.resolution.x; thirty_two_1 = rint((x_63 / 8.0f)); - float const x_67 = (*(tint_symbol_5)).x; + float const x_67 = (*(tint_symbol_3)).x; param = x_67; float const x_68 = thirty_two_1; param_1 = x_68; float const x_69 = compute_value_f1_f1_(&(param), &(param_1)); c.x = x_69; - float const x_72 = (*(tint_symbol_5)).y; + float const x_72 = (*(tint_symbol_3)).y; param_2 = x_72; float const x_73 = thirty_two_1; param_3 = x_73; @@ -92,7 +92,7 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread floa int const x_112 = i_1; float const x_114 = c[x_112]; c[x_108] = (x_111 * x_114); - float const x_118 = (*(tint_symbol_5)).y; + float const x_118 = (*(tint_symbol_3)).y; if ((x_118 < 0.0f)) { break; } @@ -104,17 +104,23 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread floa } float3 const x_124 = c; float3 const x_126 = normalize(fabs(x_124)); - *(tint_symbol_6) = float4(x_126.x, x_126.y, x_126.z, 1.0f); + *(tint_symbol_4) = float4(x_126.x, x_126.y, x_126.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_13, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_13, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.hlsl index 8f288a08d7..a2853d8907 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.hlsl @@ -284,11 +284,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl index f9b3b82ea8..8a8ae50b56 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -35,23 +35,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_276 = i; - int const x_278 = (*(tint_symbol_5)).arr[x_276]; + int const x_278 = (*(tint_symbol_3)).arr[x_276]; int const x_279 = j; - int const x_281 = (*(tint_symbol_5)).arr[x_279]; + int const x_281 = (*(tint_symbol_3)).arr[x_279]; if ((x_278 < x_281)) { int const x_286 = k; k = as_type((as_type(x_286) + as_type(1))); int const x_288 = i; i = as_type((as_type(x_288) + as_type(1))); - int const x_291 = (*(tint_symbol_5)).arr[x_288]; - (*(tint_symbol_6)).arr[x_286] = x_291; + int const x_291 = (*(tint_symbol_3)).arr[x_288]; + (*(tint_symbol_4)).arr[x_286] = x_291; } else { int const x_293 = k; k = as_type((as_type(x_293) + as_type(1))); int const x_295 = j; j = as_type((as_type(x_295) + as_type(1))); - int const x_298 = (*(tint_symbol_5)).arr[x_295]; - (*(tint_symbol_6)).arr[x_293] = x_298; + int const x_298 = (*(tint_symbol_3)).arr[x_295]; + (*(tint_symbol_4)).arr[x_293] = x_298; } } while (true) { @@ -66,8 +66,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_311) + as_type(1))); int const x_313 = i; i = as_type((as_type(x_313) + as_type(1))); - int const x_316 = (*(tint_symbol_5)).arr[x_313]; - (*(tint_symbol_6)).arr[x_311] = x_316; + int const x_316 = (*(tint_symbol_3)).arr[x_313]; + (*(tint_symbol_4)).arr[x_311] = x_316; } int const x_318 = *(from); i_1 = x_318; @@ -80,8 +80,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_327 = i_1; int const x_328 = i_1; - int const x_330 = (*(tint_symbol_6)).arr[x_328]; - (*(tint_symbol_5)).arr[x_327] = x_330; + int const x_330 = (*(tint_symbol_4)).arr[x_328]; + (*(tint_symbol_3)).arr[x_327] = x_330; { int const x_332 = i_1; i_1 = as_type((as_type(x_332) + as_type(1))); @@ -90,11 +90,11 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -int func_i1_i1_(thread int* const m, thread int* const high, thread float4* const tint_symbol_7) { +int func_i1_i1_(thread int* const m, thread int* const high, thread float4* const tint_symbol_5) { int x = 0; int x_335 = 0; int x_336 = 0; - float const x_338 = (*(tint_symbol_7)).x; + float const x_338 = (*(tint_symbol_5)).x; if ((x_338 >= 0.0f)) { if (false) { int const x_346 = *(high); @@ -118,7 +118,7 @@ int func_i1_i1_(thread int* const m, thread int* const high, thread float4* cons return clamp(as_type((as_type(2) * as_type(x_353))), as_type((as_type(2) * as_type(x_355))), (as_type((as_type(2) * as_type(x_357))) / x_359)); } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) { +void mergeSort_(thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { int low = 0; int high_1 = 0; int m_1 = 0; @@ -165,13 +165,13 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_8, thread tint_arra param_1 = x_393; int const x_394 = to_1; param_2 = x_394; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_8, tint_symbol_9); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_6, tint_symbol_7); { int const x_396 = m_1; param_3 = x_396; int const x_397 = high_1; param_4 = x_397; - int const x_398 = func_i1_i1_(&(param_3), &(param_4), tint_symbol_10); + int const x_398 = func_i1_i1_(&(param_3), &(param_4), tint_symbol_8); int const x_399 = i_2; i_2 = as_type((as_type(x_399) + as_type(x_398))); } @@ -184,7 +184,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_8, thread tint_arra return; } -void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14) { +void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -195,52 +195,52 @@ void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_11 switch(x_99) { case 9: { int const x_129 = i_3; - (*(tint_symbol_11)).arr[x_129] = -5; + (*(tint_symbol_9)).arr[x_129] = -5; break; } case 8: { int const x_127 = i_3; - (*(tint_symbol_11)).arr[x_127] = -4; + (*(tint_symbol_9)).arr[x_127] = -4; break; } case 7: { int const x_125 = i_3; - (*(tint_symbol_11)).arr[x_125] = -3; + (*(tint_symbol_9)).arr[x_125] = -3; break; } case 6: { int const x_123 = i_3; - (*(tint_symbol_11)).arr[x_123] = -2; + (*(tint_symbol_9)).arr[x_123] = -2; break; } case 5: { int const x_121 = i_3; - (*(tint_symbol_11)).arr[x_121] = -1; + (*(tint_symbol_9)).arr[x_121] = -1; break; } case 4: { int const x_119 = i_3; - (*(tint_symbol_11)).arr[x_119] = 0; + (*(tint_symbol_9)).arr[x_119] = 0; break; } case 3: { int const x_117 = i_3; - (*(tint_symbol_11)).arr[x_117] = 1; + (*(tint_symbol_9)).arr[x_117] = 1; break; } case 2: { int const x_115 = i_3; - (*(tint_symbol_11)).arr[x_115] = 2; + (*(tint_symbol_9)).arr[x_115] = 2; break; } case 1: { int const x_113 = i_3; - (*(tint_symbol_11)).arr[x_113] = 3; + (*(tint_symbol_9)).arr[x_113] = 3; break; } case 0: { int const x_111 = i_3; - (*(tint_symbol_11)).arr[x_111] = 4; + (*(tint_symbol_9)).arr[x_111] = 4; break; } default: { @@ -266,56 +266,56 @@ void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_11 } int const x_142 = j_1; int const x_143 = j_1; - int const x_145 = (*(tint_symbol_11)).arr[x_143]; - (*(tint_symbol_12)).arr[x_142] = x_145; + int const x_145 = (*(tint_symbol_9)).arr[x_143]; + (*(tint_symbol_10)).arr[x_142] = x_145; { int const x_147 = j_1; j_1 = as_type((as_type(x_147) + as_type(1))); } } - mergeSort_(tint_symbol_11, tint_symbol_12, tint_symbol_13); - float const x_151 = (*(tint_symbol_13)).y; + mergeSort_(tint_symbol_9, tint_symbol_10, tint_symbol_11); + float const x_151 = (*(tint_symbol_11)).y; if ((int(x_151) < 30)) { - int const x_158 = (*(tint_symbol_11)).arr[0]; + int const x_158 = (*(tint_symbol_9)).arr[0]; grey = (0.5f + (float(x_158) / 10.0f)); } else { - float const x_163 = (*(tint_symbol_13)).y; + float const x_163 = (*(tint_symbol_11)).y; if ((int(x_163) < 60)) { - int const x_170 = (*(tint_symbol_11)).arr[1]; + int const x_170 = (*(tint_symbol_9)).arr[1]; grey = (0.5f + (float(x_170) / 10.0f)); } else { - float const x_175 = (*(tint_symbol_13)).y; + float const x_175 = (*(tint_symbol_11)).y; if ((int(x_175) < 90)) { - int const x_182 = (*(tint_symbol_11)).arr[2]; + int const x_182 = (*(tint_symbol_9)).arr[2]; grey = (0.5f + (float(x_182) / 10.0f)); } else { - float const x_187 = (*(tint_symbol_13)).y; + float const x_187 = (*(tint_symbol_11)).y; if ((int(x_187) < 120)) { - int const x_194 = (*(tint_symbol_11)).arr[3]; + int const x_194 = (*(tint_symbol_9)).arr[3]; grey = (0.5f + (float(x_194) / 10.0f)); } else { - float const x_199 = (*(tint_symbol_13)).y; + float const x_199 = (*(tint_symbol_11)).y; if ((int(x_199) < 150)) { discard_fragment(); } else { - float const x_206 = (*(tint_symbol_13)).y; + float const x_206 = (*(tint_symbol_11)).y; if ((int(x_206) < 180)) { - int const x_213 = (*(tint_symbol_11)).arr[5]; + int const x_213 = (*(tint_symbol_9)).arr[5]; grey = (0.5f + (float(x_213) / 10.0f)); } else { - float const x_218 = (*(tint_symbol_13)).y; + float const x_218 = (*(tint_symbol_11)).y; if ((int(x_218) < 210)) { - int const x_225 = (*(tint_symbol_11)).arr[6]; + int const x_225 = (*(tint_symbol_9)).arr[6]; grey = (0.5f + (float(x_225) / 10.0f)); } else { - float const x_230 = (*(tint_symbol_13)).y; + float const x_230 = (*(tint_symbol_11)).y; if ((int(x_230) < 240)) { - int const x_237 = (*(tint_symbol_11)).arr[7]; + int const x_237 = (*(tint_symbol_9)).arr[7]; grey = (0.5f + (float(x_237) / 10.0f)); } else { - float const x_242 = (*(tint_symbol_13)).y; + float const x_242 = (*(tint_symbol_11)).y; if ((int(x_242) < 270)) { - int const x_249 = (*(tint_symbol_11)).arr[8]; + int const x_249 = (*(tint_symbol_9)).arr[8]; grey = (0.5f + (float(x_249) / 10.0f)); } else { discard_fragment(); @@ -330,19 +330,25 @@ void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_11 } float const x_253 = grey; float3 const x_254 = float3(x_253, x_253, x_253); - *(tint_symbol_14) = float4(x_254.x, x_254.y, x_254.z, 1.0f); + *(tint_symbol_12) = float4(x_254.x, x_254.y, x_254.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) { - thread float4 tint_symbol_15 = 0.0f; - thread tint_array_wrapper tint_symbol_16 = {}; - thread tint_array_wrapper tint_symbol_17 = {}; - thread float4 tint_symbol_18 = 0.0f; - tint_symbol_15 = gl_FragCoord_param; - main_1(x_34, &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_15), &(tint_symbol_18)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_18}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_34, float4 gl_FragCoord_param, thread float4* const tint_symbol_13, thread tint_array_wrapper* const tint_symbol_14, thread tint_array_wrapper* const tint_symbol_15, thread float4* const tint_symbol_16) { + *(tint_symbol_13) = gl_FragCoord_param; + main_1(x_34, tint_symbol_14, tint_symbol_15, tint_symbol_13, tint_symbol_16); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_16)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) { + thread float4 tint_symbol_17 = 0.0f; + thread tint_array_wrapper tint_symbol_18 = {}; + thread tint_array_wrapper tint_symbol_19 = {}; + thread float4 tint_symbol_20 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_34, gl_FragCoord_param, &(tint_symbol_17), &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.hlsl index edd60f7c70..14daa854f1 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.hlsl @@ -292,11 +292,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.msl index 20eced1b76..557f911a36 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -35,23 +35,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_276 = i; - int const x_278 = (*(tint_symbol_5)).arr[x_276]; + int const x_278 = (*(tint_symbol_3)).arr[x_276]; int const x_279 = j; - int const x_281 = (*(tint_symbol_5)).arr[x_279]; + int const x_281 = (*(tint_symbol_3)).arr[x_279]; if ((x_278 < x_281)) { int const x_286 = k; k = as_type((as_type(x_286) + as_type(1))); int const x_288 = i; i = as_type((as_type(x_288) + as_type(1))); - int const x_291 = (*(tint_symbol_5)).arr[x_288]; - (*(tint_symbol_6)).arr[x_286] = x_291; + int const x_291 = (*(tint_symbol_3)).arr[x_288]; + (*(tint_symbol_4)).arr[x_286] = x_291; } else { int const x_293 = k; k = as_type((as_type(x_293) + as_type(1))); int const x_295 = j; j = as_type((as_type(x_295) + as_type(1))); - int const x_298 = (*(tint_symbol_5)).arr[x_295]; - (*(tint_symbol_6)).arr[x_293] = x_298; + int const x_298 = (*(tint_symbol_3)).arr[x_295]; + (*(tint_symbol_4)).arr[x_293] = x_298; } } while (true) { @@ -66,8 +66,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_311) + as_type(1))); int const x_313 = i; i = as_type((as_type(x_313) + as_type(1))); - int const x_316 = (*(tint_symbol_5)).arr[x_313]; - (*(tint_symbol_6)).arr[x_311] = x_316; + int const x_316 = (*(tint_symbol_3)).arr[x_313]; + (*(tint_symbol_4)).arr[x_311] = x_316; } int const x_318 = *(from); i_1 = x_318; @@ -80,8 +80,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_327 = i_1; int const x_328 = i_1; - int const x_330 = (*(tint_symbol_6)).arr[x_328]; - (*(tint_symbol_5)).arr[x_327] = x_330; + int const x_330 = (*(tint_symbol_4)).arr[x_328]; + (*(tint_symbol_3)).arr[x_327] = x_330; { int const x_332 = i_1; i_1 = as_type((as_type(x_332) + as_type(1))); @@ -90,11 +90,11 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -int func_i1_i1_(thread int* const m, thread int* const high, thread float4* const tint_symbol_7) { +int func_i1_i1_(thread int* const m, thread int* const high, thread float4* const tint_symbol_5) { int x = 0; int x_335 = 0; int x_336 = 0; - float const x_338 = (*(tint_symbol_7)).x; + float const x_338 = (*(tint_symbol_5)).x; if ((x_338 >= 0.0f)) { if (false) { int const x_346 = *(high); @@ -118,7 +118,7 @@ int func_i1_i1_(thread int* const m, thread int* const high, thread float4* cons return clamp(as_type((as_type(2) * as_type(x_353))), as_type((as_type(2) * as_type(x_355))), (as_type((as_type(2) * as_type(x_357))) / x_359)); } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) { +void mergeSort_(thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { int low = 0; int high_1 = 0; int m_1 = 0; @@ -165,13 +165,13 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_8, thread tint_arra param_1 = x_393; int const x_394 = to_1; param_2 = x_394; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_8, tint_symbol_9); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_6, tint_symbol_7); { int const x_396 = m_1; param_3 = x_396; int const x_397 = high_1; param_4 = x_397; - int const x_398 = func_i1_i1_(&(param_3), &(param_4), tint_symbol_10); + int const x_398 = func_i1_i1_(&(param_3), &(param_4), tint_symbol_8); int const x_399 = i_2; i_2 = as_type((as_type(x_399) + as_type(x_398))); } @@ -184,7 +184,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_8, thread tint_arra return; } -void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14) { +void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -195,52 +195,52 @@ void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_11 switch(x_99) { case 9: { int const x_129 = i_3; - (*(tint_symbol_11)).arr[x_129] = -5; + (*(tint_symbol_9)).arr[x_129] = -5; break; } case 8: { int const x_127 = i_3; - (*(tint_symbol_11)).arr[x_127] = -4; + (*(tint_symbol_9)).arr[x_127] = -4; break; } case 7: { int const x_125 = i_3; - (*(tint_symbol_11)).arr[x_125] = -3; + (*(tint_symbol_9)).arr[x_125] = -3; break; } case 6: { int const x_123 = i_3; - (*(tint_symbol_11)).arr[x_123] = -2; + (*(tint_symbol_9)).arr[x_123] = -2; break; } case 5: { int const x_121 = i_3; - (*(tint_symbol_11)).arr[x_121] = -1; + (*(tint_symbol_9)).arr[x_121] = -1; break; } case 4: { int const x_119 = i_3; - (*(tint_symbol_11)).arr[x_119] = 0; + (*(tint_symbol_9)).arr[x_119] = 0; break; } case 3: { int const x_117 = i_3; - (*(tint_symbol_11)).arr[x_117] = 1; + (*(tint_symbol_9)).arr[x_117] = 1; break; } case 2: { int const x_115 = i_3; - (*(tint_symbol_11)).arr[x_115] = 2; + (*(tint_symbol_9)).arr[x_115] = 2; break; } case 1: { int const x_113 = i_3; - (*(tint_symbol_11)).arr[x_113] = 3; + (*(tint_symbol_9)).arr[x_113] = 3; break; } case 0: { int const x_111 = i_3; - (*(tint_symbol_11)).arr[x_111] = 4; + (*(tint_symbol_9)).arr[x_111] = 4; break; } default: { @@ -266,56 +266,56 @@ void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_11 } int const x_142 = j_1; int const x_143 = j_1; - int const x_145 = (*(tint_symbol_11)).arr[x_143]; - (*(tint_symbol_12)).arr[x_142] = x_145; + int const x_145 = (*(tint_symbol_9)).arr[x_143]; + (*(tint_symbol_10)).arr[x_142] = x_145; { int const x_147 = j_1; j_1 = as_type((as_type(x_147) + as_type(1))); } } - mergeSort_(tint_symbol_11, tint_symbol_12, tint_symbol_13); - float const x_151 = (*(tint_symbol_13)).y; + mergeSort_(tint_symbol_9, tint_symbol_10, tint_symbol_11); + float const x_151 = (*(tint_symbol_11)).y; if ((int(x_151) < 30)) { - int const x_158 = (*(tint_symbol_11)).arr[0]; + int const x_158 = (*(tint_symbol_9)).arr[0]; grey = (0.5f + (float(x_158) / 10.0f)); } else { - float const x_163 = (*(tint_symbol_13)).y; + float const x_163 = (*(tint_symbol_11)).y; if ((int(x_163) < 60)) { - int const x_170 = (*(tint_symbol_11)).arr[1]; + int const x_170 = (*(tint_symbol_9)).arr[1]; grey = (0.5f + (float(x_170) / 10.0f)); } else { - float const x_175 = (*(tint_symbol_13)).y; + float const x_175 = (*(tint_symbol_11)).y; if ((int(x_175) < 90)) { - int const x_182 = (*(tint_symbol_11)).arr[2]; + int const x_182 = (*(tint_symbol_9)).arr[2]; grey = (0.5f + (float(x_182) / 10.0f)); } else { - float const x_187 = (*(tint_symbol_13)).y; + float const x_187 = (*(tint_symbol_11)).y; if ((int(x_187) < 120)) { - int const x_194 = (*(tint_symbol_11)).arr[3]; + int const x_194 = (*(tint_symbol_9)).arr[3]; grey = (0.5f + (float(x_194) / 10.0f)); } else { - float const x_199 = (*(tint_symbol_13)).y; + float const x_199 = (*(tint_symbol_11)).y; if ((int(x_199) < 150)) { discard_fragment(); } else { - float const x_206 = (*(tint_symbol_13)).y; + float const x_206 = (*(tint_symbol_11)).y; if ((int(x_206) < 180)) { - int const x_213 = (*(tint_symbol_11)).arr[5]; + int const x_213 = (*(tint_symbol_9)).arr[5]; grey = (0.5f + (float(x_213) / 10.0f)); } else { - float const x_218 = (*(tint_symbol_13)).y; + float const x_218 = (*(tint_symbol_11)).y; if ((int(x_218) < 210)) { - int const x_225 = (*(tint_symbol_11)).arr[6]; + int const x_225 = (*(tint_symbol_9)).arr[6]; grey = (0.5f + (float(x_225) / 10.0f)); } else { - float const x_230 = (*(tint_symbol_13)).y; + float const x_230 = (*(tint_symbol_11)).y; if ((int(x_230) < 240)) { - int const x_237 = (*(tint_symbol_11)).arr[7]; + int const x_237 = (*(tint_symbol_9)).arr[7]; grey = (0.5f + (float(x_237) / 10.0f)); } else { - float const x_242 = (*(tint_symbol_13)).y; + float const x_242 = (*(tint_symbol_11)).y; if ((int(x_242) < 270)) { - int const x_249 = (*(tint_symbol_11)).arr[8]; + int const x_249 = (*(tint_symbol_9)).arr[8]; grey = (0.5f + (float(x_249) / 10.0f)); } else { discard_fragment(); @@ -330,19 +330,25 @@ void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_11 } float const x_253 = grey; float3 const x_254 = float3(x_253, x_253, x_253); - *(tint_symbol_14) = float4(x_254.x, x_254.y, x_254.z, 1.0f); + *(tint_symbol_12) = float4(x_254.x, x_254.y, x_254.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) { - thread float4 tint_symbol_15 = 0.0f; - thread tint_array_wrapper tint_symbol_16 = {}; - thread tint_array_wrapper tint_symbol_17 = {}; - thread float4 tint_symbol_18 = 0.0f; - tint_symbol_15 = gl_FragCoord_param; - main_1(x_34, &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_15), &(tint_symbol_18)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_18}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_34, float4 gl_FragCoord_param, thread float4* const tint_symbol_13, thread tint_array_wrapper* const tint_symbol_14, thread tint_array_wrapper* const tint_symbol_15, thread float4* const tint_symbol_16) { + *(tint_symbol_13) = gl_FragCoord_param; + main_1(x_34, tint_symbol_14, tint_symbol_15, tint_symbol_13, tint_symbol_16); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_16)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) { + thread float4 tint_symbol_17 = 0.0f; + thread tint_array_wrapper tint_symbol_18 = {}; + thread tint_array_wrapper tint_symbol_19 = {}; + thread float4 tint_symbol_20 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_34, gl_FragCoord_param, &(tint_symbol_17), &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.hlsl index 0f638e21e2..318b26faa2 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.hlsl @@ -339,11 +339,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl index f04cff38ee..32f9395d85 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { tint_array_wrapper temp = {}; tint_array_wrapper data = {}; float x_180 = 0.0f; @@ -214,7 +214,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float float x_189 = 0.0f; float x_278 = 0.0f; float x_279_phi = 0.0f; - float const x_170 = (*(tint_symbol_5)).y; + float const x_170 = (*(tint_symbol_3)).y; x_171 = int(x_170); if ((x_171 < 30)) { int const x_177 = data.arr[0]; @@ -289,7 +289,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float float const x_251 = x_8.injectionSwitch.y; bool const x_252 = (x_62 > x_251); if (x_252) { - *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); } x_256_phi = float2(1.0f, 1.0f); x_259_phi = 0; @@ -335,17 +335,23 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float x_280_phi = x_279; } float const x_280 = x_280_phi; - *(tint_symbol_6) = float4(x_280, x_280, x_280, 1.0f); + *(tint_symbol_4) = float4(x_280, x_280, x_280, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.hlsl index d8b974e41b..44ed7540aa 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.hlsl @@ -347,11 +347,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.msl index 3236547436..03ab2986d5 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { tint_array_wrapper temp = {}; tint_array_wrapper data = {}; float x_180 = 0.0f; @@ -214,7 +214,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float float x_189 = 0.0f; float x_278 = 0.0f; float x_279_phi = 0.0f; - float const x_170 = (*(tint_symbol_5)).y; + float const x_170 = (*(tint_symbol_3)).y; x_171 = int(x_170); if ((x_171 < 30)) { int const x_177 = data.arr[0]; @@ -289,7 +289,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float float const x_251 = x_8.injectionSwitch.y; bool const x_252 = (x_62 > x_251); if (x_252) { - *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); } x_256_phi = float2(1.0f, 1.0f); x_259_phi = 0; @@ -335,17 +335,23 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float x_280_phi = x_279; } float const x_280 = x_280_phi; - *(tint_symbol_6) = float4(x_280, x_280, x_280, 1.0f); + *(tint_symbol_4) = float4(x_280, x_280, x_280, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.hlsl index a730b99002..3f27cea690 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.hlsl @@ -260,11 +260,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl index ad390280e3..8a3779594d 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -35,23 +35,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_278 = i; - int const x_280 = (*(tint_symbol_5)).arr[x_278]; + int const x_280 = (*(tint_symbol_3)).arr[x_278]; int const x_281 = j; - int const x_283 = (*(tint_symbol_5)).arr[x_281]; + int const x_283 = (*(tint_symbol_3)).arr[x_281]; if ((x_280 < x_283)) { int const x_288 = k; k = as_type((as_type(x_288) + as_type(1))); int const x_290 = i; i = as_type((as_type(x_290) + as_type(1))); - int const x_293 = (*(tint_symbol_5)).arr[x_290]; - (*(tint_symbol_6)).arr[x_288] = x_293; + int const x_293 = (*(tint_symbol_3)).arr[x_290]; + (*(tint_symbol_4)).arr[x_288] = x_293; } else { int const x_295 = k; k = as_type((as_type(x_295) + as_type(1))); int const x_297 = j; j = as_type((as_type(x_297) + as_type(1))); - int const x_300 = (*(tint_symbol_5)).arr[x_297]; - (*(tint_symbol_6)).arr[x_295] = x_300; + int const x_300 = (*(tint_symbol_3)).arr[x_297]; + (*(tint_symbol_4)).arr[x_295] = x_300; } } while (true) { @@ -66,8 +66,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_313) + as_type(1))); int const x_315 = i; i = as_type((as_type(x_315) + as_type(1))); - int const x_318 = (*(tint_symbol_5)).arr[x_315]; - (*(tint_symbol_6)).arr[x_313] = x_318; + int const x_318 = (*(tint_symbol_3)).arr[x_315]; + (*(tint_symbol_4)).arr[x_313] = x_318; } int const x_320 = *(from); i_1 = x_320; @@ -80,8 +80,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_329 = i_1; int const x_330 = i_1; - int const x_332 = (*(tint_symbol_6)).arr[x_330]; - (*(tint_symbol_5)).arr[x_329] = x_332; + int const x_332 = (*(tint_symbol_4)).arr[x_330]; + (*(tint_symbol_3)).arr[x_329] = x_332; { int const x_334 = i_1; i_1 = as_type((as_type(x_334) + as_type(1))); @@ -90,7 +90,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -135,7 +135,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra param_1 = x_367; int const x_368 = to_1; param_2 = x_368; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_370 = m; int const x_372 = i_2; @@ -150,7 +150,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -162,52 +162,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_91) { case 9: { int const x_121 = i_3; - (*(tint_symbol_9)).arr[x_121] = -5; + (*(tint_symbol_7)).arr[x_121] = -5; break; } case 8: { int const x_119 = i_3; - (*(tint_symbol_9)).arr[x_119] = -4; + (*(tint_symbol_7)).arr[x_119] = -4; break; } case 7: { int const x_117 = i_3; - (*(tint_symbol_9)).arr[x_117] = -3; + (*(tint_symbol_7)).arr[x_117] = -3; break; } case 6: { int const x_115 = i_3; - (*(tint_symbol_9)).arr[x_115] = -2; + (*(tint_symbol_7)).arr[x_115] = -2; break; } case 5: { int const x_113 = i_3; - (*(tint_symbol_9)).arr[x_113] = -1; + (*(tint_symbol_7)).arr[x_113] = -1; break; } case 4: { int const x_111 = i_3; - (*(tint_symbol_9)).arr[x_111] = 0; + (*(tint_symbol_7)).arr[x_111] = 0; break; } case 3: { int const x_109 = i_3; - (*(tint_symbol_9)).arr[x_109] = 1; + (*(tint_symbol_7)).arr[x_109] = 1; break; } case 2: { int const x_107 = i_3; - (*(tint_symbol_9)).arr[x_107] = 2; + (*(tint_symbol_7)).arr[x_107] = 2; break; } case 1: { int const x_105 = i_3; - (*(tint_symbol_9)).arr[x_105] = 3; + (*(tint_symbol_7)).arr[x_105] = 3; break; } case 0: { int const x_103 = i_3; - (*(tint_symbol_9)).arr[x_103] = 4; + (*(tint_symbol_7)).arr[x_103] = 4; break; } default: { @@ -233,35 +233,35 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_134 = j_1; int const x_135 = j_1; - int const x_137 = (*(tint_symbol_9)).arr[x_135]; - (*(tint_symbol_10)).arr[x_134] = x_137; + int const x_137 = (*(tint_symbol_7)).arr[x_135]; + (*(tint_symbol_8)).arr[x_134] = x_137; { int const x_139 = j_1; j_1 = as_type((as_type(x_139) + as_type(1))); } } - mergeSort_(tint_symbol_9, tint_symbol_10); - float const x_143 = (*(tint_symbol_11)).y; + mergeSort_(tint_symbol_7, tint_symbol_8); + float const x_143 = (*(tint_symbol_9)).y; if ((int(x_143) < 30)) { - int const x_150 = (*(tint_symbol_9)).arr[0]; + int const x_150 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_150) / 10.0f)); } else { - float const x_155 = (*(tint_symbol_11)).y; + float const x_155 = (*(tint_symbol_9)).y; if ((int(x_155) < 60)) { - int const x_162 = (*(tint_symbol_9)).arr[1]; + int const x_162 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_162) / 10.0f)); } else { - float const x_167 = (*(tint_symbol_11)).y; + float const x_167 = (*(tint_symbol_9)).y; if ((int(x_167) < 90)) { - int const x_174 = (*(tint_symbol_9)).arr[2]; + int const x_174 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_174) / 10.0f)); } else { - float const x_179 = (*(tint_symbol_11)).y; + float const x_179 = (*(tint_symbol_9)).y; if ((int(x_179) < 120)) { - int const x_186 = (*(tint_symbol_9)).arr[3]; + int const x_186 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_186) / 10.0f)); } else { - float const x_191 = (*(tint_symbol_11)).y; + float const x_191 = (*(tint_symbol_9)).y; if ((int(x_191) < 150)) { int_i = 1; while (true) { @@ -274,24 +274,24 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, discard_fragment(); } } else { - float const x_208 = (*(tint_symbol_11)).y; + float const x_208 = (*(tint_symbol_9)).y; if ((int(x_208) < 180)) { - int const x_215 = (*(tint_symbol_9)).arr[5]; + int const x_215 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_215) / 10.0f)); } else { - float const x_220 = (*(tint_symbol_11)).y; + float const x_220 = (*(tint_symbol_9)).y; if ((int(x_220) < 210)) { - int const x_227 = (*(tint_symbol_9)).arr[6]; + int const x_227 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_227) / 10.0f)); } else { - float const x_232 = (*(tint_symbol_11)).y; + float const x_232 = (*(tint_symbol_9)).y; if ((int(x_232) < 240)) { - int const x_239 = (*(tint_symbol_9)).arr[7]; + int const x_239 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_239) / 10.0f)); } else { - float const x_244 = (*(tint_symbol_11)).y; + float const x_244 = (*(tint_symbol_9)).y; if ((int(x_244) < 270)) { - int const x_251 = (*(tint_symbol_9)).arr[8]; + int const x_251 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_251) / 10.0f)); } else { discard_fragment(); @@ -306,19 +306,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_255 = grey; float3 const x_256 = float3(x_255, x_255, x_255); - *(tint_symbol_12) = float4(x_256.x, x_256.y, x_256.z, 1.0f); + *(tint_symbol_10) = float4(x_256.x, x_256.y, x_256.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.hlsl index 347df10315..a889d316be 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.hlsl @@ -268,11 +268,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.msl index ba34077b88..c325cfff18 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.msl @@ -10,11 +10,11 @@ struct tint_array_wrapper { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { +void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) { int k = 0; int i = 0; int j = 0; @@ -35,23 +35,23 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_278 = i; - int const x_280 = (*(tint_symbol_5)).arr[x_278]; + int const x_280 = (*(tint_symbol_3)).arr[x_278]; int const x_281 = j; - int const x_283 = (*(tint_symbol_5)).arr[x_281]; + int const x_283 = (*(tint_symbol_3)).arr[x_281]; if ((x_280 < x_283)) { int const x_288 = k; k = as_type((as_type(x_288) + as_type(1))); int const x_290 = i; i = as_type((as_type(x_290) + as_type(1))); - int const x_293 = (*(tint_symbol_5)).arr[x_290]; - (*(tint_symbol_6)).arr[x_288] = x_293; + int const x_293 = (*(tint_symbol_3)).arr[x_290]; + (*(tint_symbol_4)).arr[x_288] = x_293; } else { int const x_295 = k; k = as_type((as_type(x_295) + as_type(1))); int const x_297 = j; j = as_type((as_type(x_297) + as_type(1))); - int const x_300 = (*(tint_symbol_5)).arr[x_297]; - (*(tint_symbol_6)).arr[x_295] = x_300; + int const x_300 = (*(tint_symbol_3)).arr[x_297]; + (*(tint_symbol_4)).arr[x_295] = x_300; } } while (true) { @@ -66,8 +66,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* k = as_type((as_type(x_313) + as_type(1))); int const x_315 = i; i = as_type((as_type(x_315) + as_type(1))); - int const x_318 = (*(tint_symbol_5)).arr[x_315]; - (*(tint_symbol_6)).arr[x_313] = x_318; + int const x_318 = (*(tint_symbol_3)).arr[x_315]; + (*(tint_symbol_4)).arr[x_313] = x_318; } int const x_320 = *(from); i_1 = x_320; @@ -80,8 +80,8 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* } int const x_329 = i_1; int const x_330 = i_1; - int const x_332 = (*(tint_symbol_6)).arr[x_330]; - (*(tint_symbol_5)).arr[x_329] = x_332; + int const x_332 = (*(tint_symbol_4)).arr[x_330]; + (*(tint_symbol_3)).arr[x_329] = x_332; { int const x_334 = i_1; i_1 = as_type((as_type(x_334) + as_type(1))); @@ -90,7 +90,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* return; } -void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) { +void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) { int low = 0; int high = 0; int m = 0; @@ -135,7 +135,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra param_1 = x_367; int const x_368 = to_1; param_2 = x_368; - merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8); + merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6); { int const x_370 = m; int const x_372 = i_2; @@ -150,7 +150,7 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra return; } -void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { +void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int i_3 = 0; int j_1 = 0; float grey = 0.0f; @@ -162,52 +162,52 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, switch(x_91) { case 9: { int const x_121 = i_3; - (*(tint_symbol_9)).arr[x_121] = -5; + (*(tint_symbol_7)).arr[x_121] = -5; break; } case 8: { int const x_119 = i_3; - (*(tint_symbol_9)).arr[x_119] = -4; + (*(tint_symbol_7)).arr[x_119] = -4; break; } case 7: { int const x_117 = i_3; - (*(tint_symbol_9)).arr[x_117] = -3; + (*(tint_symbol_7)).arr[x_117] = -3; break; } case 6: { int const x_115 = i_3; - (*(tint_symbol_9)).arr[x_115] = -2; + (*(tint_symbol_7)).arr[x_115] = -2; break; } case 5: { int const x_113 = i_3; - (*(tint_symbol_9)).arr[x_113] = -1; + (*(tint_symbol_7)).arr[x_113] = -1; break; } case 4: { int const x_111 = i_3; - (*(tint_symbol_9)).arr[x_111] = 0; + (*(tint_symbol_7)).arr[x_111] = 0; break; } case 3: { int const x_109 = i_3; - (*(tint_symbol_9)).arr[x_109] = 1; + (*(tint_symbol_7)).arr[x_109] = 1; break; } case 2: { int const x_107 = i_3; - (*(tint_symbol_9)).arr[x_107] = 2; + (*(tint_symbol_7)).arr[x_107] = 2; break; } case 1: { int const x_105 = i_3; - (*(tint_symbol_9)).arr[x_105] = 3; + (*(tint_symbol_7)).arr[x_105] = 3; break; } case 0: { int const x_103 = i_3; - (*(tint_symbol_9)).arr[x_103] = 4; + (*(tint_symbol_7)).arr[x_103] = 4; break; } default: { @@ -233,35 +233,35 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } int const x_134 = j_1; int const x_135 = j_1; - int const x_137 = (*(tint_symbol_9)).arr[x_135]; - (*(tint_symbol_10)).arr[x_134] = x_137; + int const x_137 = (*(tint_symbol_7)).arr[x_135]; + (*(tint_symbol_8)).arr[x_134] = x_137; { int const x_139 = j_1; j_1 = as_type((as_type(x_139) + as_type(1))); } } - mergeSort_(tint_symbol_9, tint_symbol_10); - float const x_143 = (*(tint_symbol_11)).y; + mergeSort_(tint_symbol_7, tint_symbol_8); + float const x_143 = (*(tint_symbol_9)).y; if ((int(x_143) < 30)) { - int const x_150 = (*(tint_symbol_9)).arr[0]; + int const x_150 = (*(tint_symbol_7)).arr[0]; grey = (0.5f + (float(x_150) / 10.0f)); } else { - float const x_155 = (*(tint_symbol_11)).y; + float const x_155 = (*(tint_symbol_9)).y; if ((int(x_155) < 60)) { - int const x_162 = (*(tint_symbol_9)).arr[1]; + int const x_162 = (*(tint_symbol_7)).arr[1]; grey = (0.5f + (float(x_162) / 10.0f)); } else { - float const x_167 = (*(tint_symbol_11)).y; + float const x_167 = (*(tint_symbol_9)).y; if ((int(x_167) < 90)) { - int const x_174 = (*(tint_symbol_9)).arr[2]; + int const x_174 = (*(tint_symbol_7)).arr[2]; grey = (0.5f + (float(x_174) / 10.0f)); } else { - float const x_179 = (*(tint_symbol_11)).y; + float const x_179 = (*(tint_symbol_9)).y; if ((int(x_179) < 120)) { - int const x_186 = (*(tint_symbol_9)).arr[3]; + int const x_186 = (*(tint_symbol_7)).arr[3]; grey = (0.5f + (float(x_186) / 10.0f)); } else { - float const x_191 = (*(tint_symbol_11)).y; + float const x_191 = (*(tint_symbol_9)).y; if ((int(x_191) < 150)) { int_i = 1; while (true) { @@ -274,24 +274,24 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, discard_fragment(); } } else { - float const x_208 = (*(tint_symbol_11)).y; + float const x_208 = (*(tint_symbol_9)).y; if ((int(x_208) < 180)) { - int const x_215 = (*(tint_symbol_9)).arr[5]; + int const x_215 = (*(tint_symbol_7)).arr[5]; grey = (0.5f + (float(x_215) / 10.0f)); } else { - float const x_220 = (*(tint_symbol_11)).y; + float const x_220 = (*(tint_symbol_9)).y; if ((int(x_220) < 210)) { - int const x_227 = (*(tint_symbol_9)).arr[6]; + int const x_227 = (*(tint_symbol_7)).arr[6]; grey = (0.5f + (float(x_227) / 10.0f)); } else { - float const x_232 = (*(tint_symbol_11)).y; + float const x_232 = (*(tint_symbol_9)).y; if ((int(x_232) < 240)) { - int const x_239 = (*(tint_symbol_9)).arr[7]; + int const x_239 = (*(tint_symbol_7)).arr[7]; grey = (0.5f + (float(x_239) / 10.0f)); } else { - float const x_244 = (*(tint_symbol_11)).y; + float const x_244 = (*(tint_symbol_9)).y; if ((int(x_244) < 270)) { - int const x_251 = (*(tint_symbol_9)).arr[8]; + int const x_251 = (*(tint_symbol_7)).arr[8]; grey = (0.5f + (float(x_251) / 10.0f)); } else { discard_fragment(); @@ -306,19 +306,25 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } float const x_255 = grey; float3 const x_256 = float3(x_255, x_255, x_255); - *(tint_symbol_12) = float4(x_256.x, x_256.y, x_256.z, 1.0f); + *(tint_symbol_10) = float4(x_256.x, x_256.y, x_256.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { - thread float4 tint_symbol_13 = 0.0f; - thread tint_array_wrapper tint_symbol_14 = {}; - thread tint_array_wrapper tint_symbol_15 = {}; - thread float4 tint_symbol_16 = 0.0f; - tint_symbol_13 = gl_FragCoord_param; - main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_11) = gl_FragCoord_param; + main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) { + thread float4 tint_symbol_15 = 0.0f; + thread tint_array_wrapper tint_symbol_16 = {}; + thread tint_array_wrapper tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.spvasm.expected.msl index fe68f0996b..02e660f515 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.spvasm.expected.msl @@ -13,26 +13,26 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +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_5) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_3) { int temp = 0; int const x_230 = *(i); - int const x_232 = (*(tint_symbol_5)).numbers.arr[x_230]; + int const x_232 = (*(tint_symbol_3)).numbers.arr[x_230]; temp = x_232; int const x_233 = *(i); int const x_234 = *(j); - int const x_236 = (*(tint_symbol_5)).numbers.arr[x_234]; - (*(tint_symbol_5)).numbers.arr[x_233] = x_236; + int const x_236 = (*(tint_symbol_3)).numbers.arr[x_234]; + (*(tint_symbol_3)).numbers.arr[x_233] = x_236; int const x_238 = *(j); int const x_239 = temp; - (*(tint_symbol_5)).numbers.arr[x_238] = x_239; + (*(tint_symbol_3)).numbers.arr[x_238] = x_239; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -41,7 +41,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_242 = *(h); - int const x_244 = (*(tint_symbol_6)).numbers.arr[x_242]; + int const x_244 = (*(tint_symbol_4)).numbers.arr[x_242]; pivot = x_244; int const x_245 = *(l); i_1 = as_type((as_type(x_245) - as_type(1))); @@ -55,7 +55,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_257 = j_1; - int const x_259 = (*(tint_symbol_6)).numbers.arr[x_257]; + int const x_259 = (*(tint_symbol_4)).numbers.arr[x_257]; int const x_260 = pivot; if ((x_259 <= x_260)) { int const x_264 = i_1; @@ -64,7 +64,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_266; int const x_267 = j_1; param_1 = x_267; - swap_i1_i1_(&(param), &(param_1), tint_symbol_6); + swap_i1_i1_(&(param), &(param_1), tint_symbol_4); } { int const x_269 = j_1; @@ -77,12 +77,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = x_273; int const x_274 = *(h); param_3 = x_274; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6); + swap_i1_i1_(&(param_2), &(param_3), tint_symbol_4); int const x_276 = i_1; return x_276; } -void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8) { +void quicksort_(thread float4* const tint_symbol_5, thread QuicksortObject* const tint_symbol_6) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -102,7 +102,7 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons top = x_281; int const x_282 = l_1; stack.arr[x_281] = x_282; - float const x_285 = (*(tint_symbol_7)).y; + float const x_285 = (*(tint_symbol_5)).y; if ((x_285 >= 0.0f)) { int const x_290 = h_1; if (false) { @@ -145,7 +145,7 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons param_4 = x_323; int const x_324 = h_1; param_5 = x_324; - int const x_325 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8); + int const x_325 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_6); p = x_325; int const x_326 = p; int const x_328 = l_1; @@ -179,7 +179,7 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons return; } -void main_1(constant buf0& x_34, thread QuicksortObject* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { +void main_1(constant buf0& x_34, thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; @@ -192,89 +192,95 @@ void main_1(constant buf0& x_34, thread QuicksortObject* const tint_symbol_9, th } int const x_93 = i_2; int const x_94 = i_2; - (*(tint_symbol_9)).numbers.arr[x_93] = as_type((as_type(10) - as_type(x_94))); + (*(tint_symbol_7)).numbers.arr[x_93] = as_type((as_type(10) - as_type(x_94))); int const x_97 = i_2; int const x_98 = i_2; - int const x_100 = (*(tint_symbol_9)).numbers.arr[x_98]; + int const x_100 = (*(tint_symbol_7)).numbers.arr[x_98]; int const x_101 = i_2; - int const x_103 = (*(tint_symbol_9)).numbers.arr[x_101]; - (*(tint_symbol_9)).numbers.arr[x_97] = as_type((as_type(x_100) * as_type(x_103))); + int const x_103 = (*(tint_symbol_7)).numbers.arr[x_101]; + (*(tint_symbol_7)).numbers.arr[x_97] = as_type((as_type(x_100) * as_type(x_103))); { int const x_106 = i_2; i_2 = as_type((as_type(x_106) + as_type(1))); } } - quicksort_(tint_symbol_10, tint_symbol_9); - float4 const x_109 = *(tint_symbol_10); + quicksort_(tint_symbol_8, tint_symbol_7); + float4 const x_109 = *(tint_symbol_8); float2 const x_112 = x_34.resolution; uv = (float2(x_109.x, x_109.y) / x_112); color = float3(1.0f, 2.0f, 3.0f); - int const x_115 = (*(tint_symbol_9)).numbers.arr[0]; + int const x_115 = (*(tint_symbol_7)).numbers.arr[0]; float const x_118 = color.x; color.x = (x_118 + float(x_115)); float const x_122 = uv.x; if ((x_122 > 0.25f)) { - int const x_127 = (*(tint_symbol_9)).numbers.arr[1]; + int const x_127 = (*(tint_symbol_7)).numbers.arr[1]; float const x_130 = color.x; color.x = (x_130 + float(x_127)); } float const x_134 = uv.x; if ((x_134 > 0.5f)) { - int const x_139 = (*(tint_symbol_9)).numbers.arr[2]; + int const x_139 = (*(tint_symbol_7)).numbers.arr[2]; float const x_142 = color.y; color.y = (x_142 + float(x_139)); } float const x_146 = uv.x; if ((x_146 > 0.75f)) { - int const x_151 = (*(tint_symbol_9)).numbers.arr[3]; + int const x_151 = (*(tint_symbol_7)).numbers.arr[3]; float const x_154 = color.z; color.z = (x_154 + float(x_151)); } - int const x_158 = (*(tint_symbol_9)).numbers.arr[4]; + int const x_158 = (*(tint_symbol_7)).numbers.arr[4]; float const x_161 = color.y; color.y = (x_161 + float(x_158)); float const x_165 = uv.y; if ((x_165 > 0.25f)) { - int const x_170 = (*(tint_symbol_9)).numbers.arr[5]; + int const x_170 = (*(tint_symbol_7)).numbers.arr[5]; float const x_173 = color.x; color.x = (x_173 + float(x_170)); } float const x_177 = uv.y; if ((x_177 > 0.5f)) { - int const x_182 = (*(tint_symbol_9)).numbers.arr[6]; + int const x_182 = (*(tint_symbol_7)).numbers.arr[6]; float const x_185 = color.y; color.y = (x_185 + float(x_182)); } float const x_189 = uv.y; if ((x_189 > 0.75f)) { - int const x_194 = (*(tint_symbol_9)).numbers.arr[7]; + int const x_194 = (*(tint_symbol_7)).numbers.arr[7]; float const x_197 = color.z; color.z = (x_197 + float(x_194)); } - int const x_201 = (*(tint_symbol_9)).numbers.arr[8]; + int const x_201 = (*(tint_symbol_7)).numbers.arr[8]; float const x_204 = color.z; color.z = (x_204 + float(x_201)); float const x_208 = uv.x; float const x_210 = uv.y; if ((fabs((x_208 - x_210)) < 0.25f)) { - int const x_217 = (*(tint_symbol_9)).numbers.arr[9]; + int const x_217 = (*(tint_symbol_7)).numbers.arr[9]; float const x_220 = color.x; color.x = (x_220 + float(x_217)); } float3 const x_223 = color; float3 const x_224 = normalize(x_223); - *(tint_symbol_11) = float4(x_224.x, x_224.y, x_224.z, 1.0f); + *(tint_symbol_9) = float4(x_224.x, x_224.y, x_224.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) { - thread float4 tint_symbol_12 = 0.0f; - thread QuicksortObject tint_symbol_13 = {}; - thread float4 tint_symbol_14 = 0.0f; - tint_symbol_12 = gl_FragCoord_param; - main_1(x_34, &(tint_symbol_13), &(tint_symbol_12), &(tint_symbol_14)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_14}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_34, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12) { + *(tint_symbol_10) = gl_FragCoord_param; + main_1(x_34, tint_symbol_11, tint_symbol_10, tint_symbol_12); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_12)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) { + thread float4 tint_symbol_13 = 0.0f; + thread QuicksortObject tint_symbol_14 = {}; + thread float4 tint_symbol_15 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_34, gl_FragCoord_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl.expected.msl index fe68f0996b..02e660f515 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl.expected.msl @@ -13,26 +13,26 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +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_5) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_3) { int temp = 0; int const x_230 = *(i); - int const x_232 = (*(tint_symbol_5)).numbers.arr[x_230]; + int const x_232 = (*(tint_symbol_3)).numbers.arr[x_230]; temp = x_232; int const x_233 = *(i); int const x_234 = *(j); - int const x_236 = (*(tint_symbol_5)).numbers.arr[x_234]; - (*(tint_symbol_5)).numbers.arr[x_233] = x_236; + int const x_236 = (*(tint_symbol_3)).numbers.arr[x_234]; + (*(tint_symbol_3)).numbers.arr[x_233] = x_236; int const x_238 = *(j); int const x_239 = temp; - (*(tint_symbol_5)).numbers.arr[x_238] = x_239; + (*(tint_symbol_3)).numbers.arr[x_238] = x_239; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -41,7 +41,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_242 = *(h); - int const x_244 = (*(tint_symbol_6)).numbers.arr[x_242]; + int const x_244 = (*(tint_symbol_4)).numbers.arr[x_242]; pivot = x_244; int const x_245 = *(l); i_1 = as_type((as_type(x_245) - as_type(1))); @@ -55,7 +55,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_257 = j_1; - int const x_259 = (*(tint_symbol_6)).numbers.arr[x_257]; + int const x_259 = (*(tint_symbol_4)).numbers.arr[x_257]; int const x_260 = pivot; if ((x_259 <= x_260)) { int const x_264 = i_1; @@ -64,7 +64,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_266; int const x_267 = j_1; param_1 = x_267; - swap_i1_i1_(&(param), &(param_1), tint_symbol_6); + swap_i1_i1_(&(param), &(param_1), tint_symbol_4); } { int const x_269 = j_1; @@ -77,12 +77,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = x_273; int const x_274 = *(h); param_3 = x_274; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6); + swap_i1_i1_(&(param_2), &(param_3), tint_symbol_4); int const x_276 = i_1; return x_276; } -void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8) { +void quicksort_(thread float4* const tint_symbol_5, thread QuicksortObject* const tint_symbol_6) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -102,7 +102,7 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons top = x_281; int const x_282 = l_1; stack.arr[x_281] = x_282; - float const x_285 = (*(tint_symbol_7)).y; + float const x_285 = (*(tint_symbol_5)).y; if ((x_285 >= 0.0f)) { int const x_290 = h_1; if (false) { @@ -145,7 +145,7 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons param_4 = x_323; int const x_324 = h_1; param_5 = x_324; - int const x_325 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8); + int const x_325 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_6); p = x_325; int const x_326 = p; int const x_328 = l_1; @@ -179,7 +179,7 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons return; } -void main_1(constant buf0& x_34, thread QuicksortObject* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { +void main_1(constant buf0& x_34, thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; @@ -192,89 +192,95 @@ void main_1(constant buf0& x_34, thread QuicksortObject* const tint_symbol_9, th } int const x_93 = i_2; int const x_94 = i_2; - (*(tint_symbol_9)).numbers.arr[x_93] = as_type((as_type(10) - as_type(x_94))); + (*(tint_symbol_7)).numbers.arr[x_93] = as_type((as_type(10) - as_type(x_94))); int const x_97 = i_2; int const x_98 = i_2; - int const x_100 = (*(tint_symbol_9)).numbers.arr[x_98]; + int const x_100 = (*(tint_symbol_7)).numbers.arr[x_98]; int const x_101 = i_2; - int const x_103 = (*(tint_symbol_9)).numbers.arr[x_101]; - (*(tint_symbol_9)).numbers.arr[x_97] = as_type((as_type(x_100) * as_type(x_103))); + int const x_103 = (*(tint_symbol_7)).numbers.arr[x_101]; + (*(tint_symbol_7)).numbers.arr[x_97] = as_type((as_type(x_100) * as_type(x_103))); { int const x_106 = i_2; i_2 = as_type((as_type(x_106) + as_type(1))); } } - quicksort_(tint_symbol_10, tint_symbol_9); - float4 const x_109 = *(tint_symbol_10); + quicksort_(tint_symbol_8, tint_symbol_7); + float4 const x_109 = *(tint_symbol_8); float2 const x_112 = x_34.resolution; uv = (float2(x_109.x, x_109.y) / x_112); color = float3(1.0f, 2.0f, 3.0f); - int const x_115 = (*(tint_symbol_9)).numbers.arr[0]; + int const x_115 = (*(tint_symbol_7)).numbers.arr[0]; float const x_118 = color.x; color.x = (x_118 + float(x_115)); float const x_122 = uv.x; if ((x_122 > 0.25f)) { - int const x_127 = (*(tint_symbol_9)).numbers.arr[1]; + int const x_127 = (*(tint_symbol_7)).numbers.arr[1]; float const x_130 = color.x; color.x = (x_130 + float(x_127)); } float const x_134 = uv.x; if ((x_134 > 0.5f)) { - int const x_139 = (*(tint_symbol_9)).numbers.arr[2]; + int const x_139 = (*(tint_symbol_7)).numbers.arr[2]; float const x_142 = color.y; color.y = (x_142 + float(x_139)); } float const x_146 = uv.x; if ((x_146 > 0.75f)) { - int const x_151 = (*(tint_symbol_9)).numbers.arr[3]; + int const x_151 = (*(tint_symbol_7)).numbers.arr[3]; float const x_154 = color.z; color.z = (x_154 + float(x_151)); } - int const x_158 = (*(tint_symbol_9)).numbers.arr[4]; + int const x_158 = (*(tint_symbol_7)).numbers.arr[4]; float const x_161 = color.y; color.y = (x_161 + float(x_158)); float const x_165 = uv.y; if ((x_165 > 0.25f)) { - int const x_170 = (*(tint_symbol_9)).numbers.arr[5]; + int const x_170 = (*(tint_symbol_7)).numbers.arr[5]; float const x_173 = color.x; color.x = (x_173 + float(x_170)); } float const x_177 = uv.y; if ((x_177 > 0.5f)) { - int const x_182 = (*(tint_symbol_9)).numbers.arr[6]; + int const x_182 = (*(tint_symbol_7)).numbers.arr[6]; float const x_185 = color.y; color.y = (x_185 + float(x_182)); } float const x_189 = uv.y; if ((x_189 > 0.75f)) { - int const x_194 = (*(tint_symbol_9)).numbers.arr[7]; + int const x_194 = (*(tint_symbol_7)).numbers.arr[7]; float const x_197 = color.z; color.z = (x_197 + float(x_194)); } - int const x_201 = (*(tint_symbol_9)).numbers.arr[8]; + int const x_201 = (*(tint_symbol_7)).numbers.arr[8]; float const x_204 = color.z; color.z = (x_204 + float(x_201)); float const x_208 = uv.x; float const x_210 = uv.y; if ((fabs((x_208 - x_210)) < 0.25f)) { - int const x_217 = (*(tint_symbol_9)).numbers.arr[9]; + int const x_217 = (*(tint_symbol_7)).numbers.arr[9]; float const x_220 = color.x; color.x = (x_220 + float(x_217)); } float3 const x_223 = color; float3 const x_224 = normalize(x_223); - *(tint_symbol_11) = float4(x_224.x, x_224.y, x_224.z, 1.0f); + *(tint_symbol_9) = float4(x_224.x, x_224.y, x_224.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) { - thread float4 tint_symbol_12 = 0.0f; - thread QuicksortObject tint_symbol_13 = {}; - thread float4 tint_symbol_14 = 0.0f; - tint_symbol_12 = gl_FragCoord_param; - main_1(x_34, &(tint_symbol_13), &(tint_symbol_12), &(tint_symbol_14)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_14}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_34, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12) { + *(tint_symbol_10) = gl_FragCoord_param; + main_1(x_34, tint_symbol_11, tint_symbol_10, tint_symbol_12); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_12)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) { + thread float4 tint_symbol_13 = 0.0f; + thread QuicksortObject tint_symbol_14 = {}; + thread float4 tint_symbol_15 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_34, gl_FragCoord_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.hlsl index a3206291c1..d58db35c6c 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.hlsl @@ -209,11 +209,17 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param; +main_out main_inner(float4 x_GLF_pos_param) { x_GLF_pos = x_GLF_pos_param; main_1(); - const main_out tint_symbol_3 = {frag_color, gl_Position}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position}; - return tint_symbol_5; + const main_out tint_symbol_4 = {frag_color, gl_Position}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.msl index ea7fc7adbf..3eeabc0109 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.msl @@ -22,22 +22,22 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_6) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) { int temp = 0; int const x_239 = *(i); - int const x_241 = (*(tint_symbol_6)).numbers.arr[x_239]; + int const x_241 = (*(tint_symbol_5)).numbers.arr[x_239]; temp = x_241; int const x_242 = *(i); int const x_243 = *(j); - int const x_245 = (*(tint_symbol_6)).numbers.arr[x_243]; - (*(tint_symbol_6)).numbers.arr[x_242] = x_245; + int const x_245 = (*(tint_symbol_5)).numbers.arr[x_243]; + (*(tint_symbol_5)).numbers.arr[x_242] = x_245; int const x_247 = *(j); int const x_248 = temp; - (*(tint_symbol_6)).numbers.arr[x_247] = x_248; + (*(tint_symbol_5)).numbers.arr[x_247] = x_248; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_7) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -46,7 +46,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_251 = *(h); - int const x_253 = (*(tint_symbol_7)).numbers.arr[x_251]; + int const x_253 = (*(tint_symbol_6)).numbers.arr[x_251]; pivot = x_253; int const x_254 = *(l); i_1 = as_type((as_type(x_254) - as_type(1))); @@ -60,7 +60,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_266 = j_1; - int const x_268 = (*(tint_symbol_7)).numbers.arr[x_266]; + int const x_268 = (*(tint_symbol_6)).numbers.arr[x_266]; int const x_269 = pivot; if ((x_268 <= x_269)) { int const x_273 = i_1; @@ -69,7 +69,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_275; int const x_276 = j_1; param_1 = x_276; - swap_i1_i1_(&(param), &(param_1), tint_symbol_7); + swap_i1_i1_(&(param), &(param_1), tint_symbol_6); } { int const x_278 = j_1; @@ -80,12 +80,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = as_type((as_type(x_280) + as_type(1))); int const x_282 = *(h); param_3 = x_282; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7); + swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6); int const x_284 = i_1; return as_type((as_type(x_284) + as_type(1))); } -void quicksort_(thread QuicksortObject* const tint_symbol_8) { +void quicksort_(thread QuicksortObject* const tint_symbol_7) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -124,7 +124,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { param_4 = x_310; int const x_311 = h_1; param_5 = x_311; - int const x_312 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8); + int const x_312 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7); p = x_312; int const x_313 = p; int const x_315 = l_1; @@ -158,12 +158,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { return; } -void main_1(constant buf0& x_34, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12, thread float4* const tint_symbol_13) { +void main_1(constant buf0& x_34, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; - float4 const x_90 = *(tint_symbol_9); - *(tint_symbol_10) = ((x_90 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); + float4 const x_90 = *(tint_symbol_8); + *(tint_symbol_9) = ((x_90 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); i_2 = 0; while (true) { int const x_97 = i_2; @@ -173,94 +173,100 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_9, thread floa } int const x_100 = i_2; int const x_101 = i_2; - (*(tint_symbol_11)).numbers.arr[x_100] = as_type((as_type(10) - as_type(x_101))); + (*(tint_symbol_10)).numbers.arr[x_100] = as_type((as_type(10) - as_type(x_101))); int const x_104 = i_2; int const x_105 = i_2; - int const x_107 = (*(tint_symbol_11)).numbers.arr[x_105]; + int const x_107 = (*(tint_symbol_10)).numbers.arr[x_105]; int const x_108 = i_2; - int const x_110 = (*(tint_symbol_11)).numbers.arr[x_108]; - (*(tint_symbol_11)).numbers.arr[x_104] = as_type((as_type(x_107) * as_type(x_110))); + int const x_110 = (*(tint_symbol_10)).numbers.arr[x_108]; + (*(tint_symbol_10)).numbers.arr[x_104] = as_type((as_type(x_107) * as_type(x_110))); { int const x_113 = i_2; i_2 = as_type((as_type(x_113) + as_type(1))); } } - quicksort_(tint_symbol_11); - float4 const x_116 = *(tint_symbol_10); + quicksort_(tint_symbol_10); + float4 const x_116 = *(tint_symbol_9); float2 const x_119 = x_34.resolution; uv = (float2(x_116.x, x_116.y) / x_119); color = float3(1.0f, 2.0f, 3.0f); - int const x_122 = (*(tint_symbol_11)).numbers.arr[0]; + int const x_122 = (*(tint_symbol_10)).numbers.arr[0]; float const x_125 = color.x; color.x = (x_125 + float(x_122)); float const x_129 = uv.x; if ((x_129 > 0.25f)) { - int const x_134 = (*(tint_symbol_11)).numbers.arr[1]; + int const x_134 = (*(tint_symbol_10)).numbers.arr[1]; float const x_137 = color.x; color.x = (x_137 + float(x_134)); } float const x_141 = uv.x; if ((x_141 > 0.5f)) { - int const x_146 = (*(tint_symbol_11)).numbers.arr[2]; + int const x_146 = (*(tint_symbol_10)).numbers.arr[2]; float const x_149 = color.y; color.y = (x_149 + float(x_146)); } float const x_153 = uv.x; if ((x_153 > 0.75f)) { - int const x_158 = (*(tint_symbol_11)).numbers.arr[3]; + int const x_158 = (*(tint_symbol_10)).numbers.arr[3]; float const x_161 = color.z; color.z = (x_161 + float(x_158)); } - int const x_165 = (*(tint_symbol_11)).numbers.arr[4]; + int const x_165 = (*(tint_symbol_10)).numbers.arr[4]; float const x_168 = color.y; color.y = (x_168 + float(x_165)); float const x_172 = uv.y; if ((x_172 > 0.25f)) { - int const x_177 = (*(tint_symbol_11)).numbers.arr[5]; + int const x_177 = (*(tint_symbol_10)).numbers.arr[5]; float const x_180 = color.x; color.x = (x_180 + float(x_177)); } float const x_184 = uv.y; if ((x_184 > 0.5f)) { - int const x_189 = (*(tint_symbol_11)).numbers.arr[6]; + int const x_189 = (*(tint_symbol_10)).numbers.arr[6]; float const x_192 = color.y; color.y = (x_192 + float(x_189)); } float const x_196 = uv.y; if ((x_196 > 0.75f)) { - int const x_201 = (*(tint_symbol_11)).numbers.arr[7]; + int const x_201 = (*(tint_symbol_10)).numbers.arr[7]; float const x_204 = color.z; color.z = (x_204 + float(x_201)); } - int const x_208 = (*(tint_symbol_11)).numbers.arr[8]; + int const x_208 = (*(tint_symbol_10)).numbers.arr[8]; float const x_211 = color.z; color.z = (x_211 + float(x_208)); float const x_215 = uv.x; float const x_217 = uv.y; if ((fabs((x_215 - x_217)) < 0.25f)) { - int const x_224 = (*(tint_symbol_11)).numbers.arr[9]; + int const x_224 = (*(tint_symbol_10)).numbers.arr[9]; float const x_227 = color.x; color.x = (x_227 + float(x_224)); } float3 const x_230 = color; float3 const x_231 = normalize(x_230); - *(tint_symbol_12) = float4(x_231.x, x_231.y, x_231.z, 1.0f); - float4 const x_236 = *(tint_symbol_9); - *(tint_symbol_13) = x_236; + *(tint_symbol_11) = float4(x_231.x, x_231.y, x_231.z, 1.0f); + float4 const x_236 = *(tint_symbol_8); + *(tint_symbol_12) = x_236; return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_34 [[buffer(0)]]) { - thread float4 tint_symbol_14 = 0.0f; - thread float4 tint_symbol_15 = 0.0f; - thread QuicksortObject tint_symbol_16 = {}; - thread float4 tint_symbol_17 = 0.0f; - thread float4 tint_symbol_18 = 0.0f; - float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param; - tint_symbol_14 = x_GLF_pos_param; - main_1(x_34, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); - main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_17, .gl_Position=tint_symbol_18}; - tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_34, float4 x_GLF_pos_param, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14, thread QuicksortObject* const tint_symbol_15, thread float4* const tint_symbol_16, thread float4* const tint_symbol_17) { + *(tint_symbol_13) = x_GLF_pos_param; + main_1(x_34, tint_symbol_13, tint_symbol_14, tint_symbol_15, tint_symbol_16, tint_symbol_17); + main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_16), .gl_Position=*(tint_symbol_17)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_34 [[buffer(0)]]) { + thread float4 tint_symbol_18 = 0.0f; + thread float4 tint_symbol_19 = 0.0f; + thread QuicksortObject tint_symbol_20 = {}; + thread float4 tint_symbol_21 = 0.0f; + thread float4 tint_symbol_22 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_34, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20), &(tint_symbol_21), &(tint_symbol_22)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.hlsl index a3206291c1..d58db35c6c 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.hlsl @@ -209,11 +209,17 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param; +main_out main_inner(float4 x_GLF_pos_param) { x_GLF_pos = x_GLF_pos_param; main_1(); - const main_out tint_symbol_3 = {frag_color, gl_Position}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position}; - return tint_symbol_5; + const main_out tint_symbol_4 = {frag_color, gl_Position}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.msl index ea7fc7adbf..3eeabc0109 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.msl @@ -22,22 +22,22 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_6) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) { int temp = 0; int const x_239 = *(i); - int const x_241 = (*(tint_symbol_6)).numbers.arr[x_239]; + int const x_241 = (*(tint_symbol_5)).numbers.arr[x_239]; temp = x_241; int const x_242 = *(i); int const x_243 = *(j); - int const x_245 = (*(tint_symbol_6)).numbers.arr[x_243]; - (*(tint_symbol_6)).numbers.arr[x_242] = x_245; + int const x_245 = (*(tint_symbol_5)).numbers.arr[x_243]; + (*(tint_symbol_5)).numbers.arr[x_242] = x_245; int const x_247 = *(j); int const x_248 = temp; - (*(tint_symbol_6)).numbers.arr[x_247] = x_248; + (*(tint_symbol_5)).numbers.arr[x_247] = x_248; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_7) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -46,7 +46,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_251 = *(h); - int const x_253 = (*(tint_symbol_7)).numbers.arr[x_251]; + int const x_253 = (*(tint_symbol_6)).numbers.arr[x_251]; pivot = x_253; int const x_254 = *(l); i_1 = as_type((as_type(x_254) - as_type(1))); @@ -60,7 +60,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_266 = j_1; - int const x_268 = (*(tint_symbol_7)).numbers.arr[x_266]; + int const x_268 = (*(tint_symbol_6)).numbers.arr[x_266]; int const x_269 = pivot; if ((x_268 <= x_269)) { int const x_273 = i_1; @@ -69,7 +69,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_275; int const x_276 = j_1; param_1 = x_276; - swap_i1_i1_(&(param), &(param_1), tint_symbol_7); + swap_i1_i1_(&(param), &(param_1), tint_symbol_6); } { int const x_278 = j_1; @@ -80,12 +80,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = as_type((as_type(x_280) + as_type(1))); int const x_282 = *(h); param_3 = x_282; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7); + swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6); int const x_284 = i_1; return as_type((as_type(x_284) + as_type(1))); } -void quicksort_(thread QuicksortObject* const tint_symbol_8) { +void quicksort_(thread QuicksortObject* const tint_symbol_7) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -124,7 +124,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { param_4 = x_310; int const x_311 = h_1; param_5 = x_311; - int const x_312 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8); + int const x_312 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7); p = x_312; int const x_313 = p; int const x_315 = l_1; @@ -158,12 +158,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { return; } -void main_1(constant buf0& x_34, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12, thread float4* const tint_symbol_13) { +void main_1(constant buf0& x_34, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; - float4 const x_90 = *(tint_symbol_9); - *(tint_symbol_10) = ((x_90 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); + float4 const x_90 = *(tint_symbol_8); + *(tint_symbol_9) = ((x_90 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); i_2 = 0; while (true) { int const x_97 = i_2; @@ -173,94 +173,100 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_9, thread floa } int const x_100 = i_2; int const x_101 = i_2; - (*(tint_symbol_11)).numbers.arr[x_100] = as_type((as_type(10) - as_type(x_101))); + (*(tint_symbol_10)).numbers.arr[x_100] = as_type((as_type(10) - as_type(x_101))); int const x_104 = i_2; int const x_105 = i_2; - int const x_107 = (*(tint_symbol_11)).numbers.arr[x_105]; + int const x_107 = (*(tint_symbol_10)).numbers.arr[x_105]; int const x_108 = i_2; - int const x_110 = (*(tint_symbol_11)).numbers.arr[x_108]; - (*(tint_symbol_11)).numbers.arr[x_104] = as_type((as_type(x_107) * as_type(x_110))); + int const x_110 = (*(tint_symbol_10)).numbers.arr[x_108]; + (*(tint_symbol_10)).numbers.arr[x_104] = as_type((as_type(x_107) * as_type(x_110))); { int const x_113 = i_2; i_2 = as_type((as_type(x_113) + as_type(1))); } } - quicksort_(tint_symbol_11); - float4 const x_116 = *(tint_symbol_10); + quicksort_(tint_symbol_10); + float4 const x_116 = *(tint_symbol_9); float2 const x_119 = x_34.resolution; uv = (float2(x_116.x, x_116.y) / x_119); color = float3(1.0f, 2.0f, 3.0f); - int const x_122 = (*(tint_symbol_11)).numbers.arr[0]; + int const x_122 = (*(tint_symbol_10)).numbers.arr[0]; float const x_125 = color.x; color.x = (x_125 + float(x_122)); float const x_129 = uv.x; if ((x_129 > 0.25f)) { - int const x_134 = (*(tint_symbol_11)).numbers.arr[1]; + int const x_134 = (*(tint_symbol_10)).numbers.arr[1]; float const x_137 = color.x; color.x = (x_137 + float(x_134)); } float const x_141 = uv.x; if ((x_141 > 0.5f)) { - int const x_146 = (*(tint_symbol_11)).numbers.arr[2]; + int const x_146 = (*(tint_symbol_10)).numbers.arr[2]; float const x_149 = color.y; color.y = (x_149 + float(x_146)); } float const x_153 = uv.x; if ((x_153 > 0.75f)) { - int const x_158 = (*(tint_symbol_11)).numbers.arr[3]; + int const x_158 = (*(tint_symbol_10)).numbers.arr[3]; float const x_161 = color.z; color.z = (x_161 + float(x_158)); } - int const x_165 = (*(tint_symbol_11)).numbers.arr[4]; + int const x_165 = (*(tint_symbol_10)).numbers.arr[4]; float const x_168 = color.y; color.y = (x_168 + float(x_165)); float const x_172 = uv.y; if ((x_172 > 0.25f)) { - int const x_177 = (*(tint_symbol_11)).numbers.arr[5]; + int const x_177 = (*(tint_symbol_10)).numbers.arr[5]; float const x_180 = color.x; color.x = (x_180 + float(x_177)); } float const x_184 = uv.y; if ((x_184 > 0.5f)) { - int const x_189 = (*(tint_symbol_11)).numbers.arr[6]; + int const x_189 = (*(tint_symbol_10)).numbers.arr[6]; float const x_192 = color.y; color.y = (x_192 + float(x_189)); } float const x_196 = uv.y; if ((x_196 > 0.75f)) { - int const x_201 = (*(tint_symbol_11)).numbers.arr[7]; + int const x_201 = (*(tint_symbol_10)).numbers.arr[7]; float const x_204 = color.z; color.z = (x_204 + float(x_201)); } - int const x_208 = (*(tint_symbol_11)).numbers.arr[8]; + int const x_208 = (*(tint_symbol_10)).numbers.arr[8]; float const x_211 = color.z; color.z = (x_211 + float(x_208)); float const x_215 = uv.x; float const x_217 = uv.y; if ((fabs((x_215 - x_217)) < 0.25f)) { - int const x_224 = (*(tint_symbol_11)).numbers.arr[9]; + int const x_224 = (*(tint_symbol_10)).numbers.arr[9]; float const x_227 = color.x; color.x = (x_227 + float(x_224)); } float3 const x_230 = color; float3 const x_231 = normalize(x_230); - *(tint_symbol_12) = float4(x_231.x, x_231.y, x_231.z, 1.0f); - float4 const x_236 = *(tint_symbol_9); - *(tint_symbol_13) = x_236; + *(tint_symbol_11) = float4(x_231.x, x_231.y, x_231.z, 1.0f); + float4 const x_236 = *(tint_symbol_8); + *(tint_symbol_12) = x_236; return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_34 [[buffer(0)]]) { - thread float4 tint_symbol_14 = 0.0f; - thread float4 tint_symbol_15 = 0.0f; - thread QuicksortObject tint_symbol_16 = {}; - thread float4 tint_symbol_17 = 0.0f; - thread float4 tint_symbol_18 = 0.0f; - float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param; - tint_symbol_14 = x_GLF_pos_param; - main_1(x_34, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); - main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_17, .gl_Position=tint_symbol_18}; - tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_34, float4 x_GLF_pos_param, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14, thread QuicksortObject* const tint_symbol_15, thread float4* const tint_symbol_16, thread float4* const tint_symbol_17) { + *(tint_symbol_13) = x_GLF_pos_param; + main_1(x_34, tint_symbol_13, tint_symbol_14, tint_symbol_15, tint_symbol_16, tint_symbol_17); + main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_16), .gl_Position=*(tint_symbol_17)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_34 [[buffer(0)]]) { + thread float4 tint_symbol_18 = 0.0f; + thread float4 tint_symbol_19 = 0.0f; + thread QuicksortObject tint_symbol_20 = {}; + thread float4 tint_symbol_21 = 0.0f; + thread float4 tint_symbol_22 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_34, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20), &(tint_symbol_21), &(tint_symbol_22)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.hlsl index 266b98a40d..8dba20c45d 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 frag_color_param = tint_symbol.frag_color_param; +main_out main_inner(float4 frag_color_param) { frag_color = frag_color_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.frag_color_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.msl index bd94fa88ee..c305a2b892 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.msl @@ -11,20 +11,25 @@ struct tint_symbol_3 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_12 = *(tint_symbol_6); - *(tint_symbol_7) = x_12; +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_12 = *(tint_symbol_5); + *(tint_symbol_6) = x_12; return; } -fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const frag_color_param = tint_symbol_1.frag_color_param; - tint_symbol_8 = frag_color_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_4.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 frag_color_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = frag_color_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.frag_color_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.hlsl index 266b98a40d..8dba20c45d 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 frag_color_param = tint_symbol.frag_color_param; +main_out main_inner(float4 frag_color_param) { frag_color = frag_color_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.frag_color_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.msl index bd94fa88ee..c305a2b892 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.msl @@ -11,20 +11,25 @@ struct tint_symbol_3 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_12 = *(tint_symbol_6); - *(tint_symbol_7) = x_12; +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_12 = *(tint_symbol_5); + *(tint_symbol_6) = x_12; return; } -fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const frag_color_param = tint_symbol_1.frag_color_param; - tint_symbol_8 = frag_color_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_4.x_GLF_color_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 frag_color_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = frag_color_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.frag_color_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.spvasm.expected.msl index 865d47202b..3fa889c459 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.spvasm.expected.msl @@ -25,22 +25,22 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_6) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) { int temp = 0; int const x_250 = *(i); - int const x_252 = (*(tint_symbol_6)).numbers.arr[x_250]; + int const x_252 = (*(tint_symbol_5)).numbers.arr[x_250]; temp = x_252; int const x_253 = *(i); int const x_254 = *(j); - int const x_256 = (*(tint_symbol_6)).numbers.arr[x_254]; - (*(tint_symbol_6)).numbers.arr[x_253] = x_256; + int const x_256 = (*(tint_symbol_5)).numbers.arr[x_254]; + (*(tint_symbol_5)).numbers.arr[x_253] = x_256; int const x_258 = *(j); int const x_259 = temp; - (*(tint_symbol_6)).numbers.arr[x_258] = x_259; + (*(tint_symbol_5)).numbers.arr[x_258] = x_259; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_7) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -49,7 +49,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_262 = *(h); - int const x_264 = (*(tint_symbol_7)).numbers.arr[x_262]; + int const x_264 = (*(tint_symbol_6)).numbers.arr[x_262]; pivot = x_264; int const x_265 = *(l); i_1 = as_type((as_type(x_265) - as_type(1))); @@ -63,7 +63,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_277 = j_1; - int const x_279 = (*(tint_symbol_7)).numbers.arr[x_277]; + int const x_279 = (*(tint_symbol_6)).numbers.arr[x_277]; int const x_280 = pivot; if ((x_279 <= x_280)) { int const x_284 = i_1; @@ -72,7 +72,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_286; int const x_287 = j_1; param_1 = x_287; - swap_i1_i1_(&(param), &(param_1), tint_symbol_7); + swap_i1_i1_(&(param), &(param_1), tint_symbol_6); } { int const x_289 = j_1; @@ -83,12 +83,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = as_type((as_type(x_291) + as_type(1))); int const x_293 = *(h); param_3 = x_293; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7); + swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6); int const x_295 = i_1; return as_type((as_type(x_295) + as_type(1))); } -void quicksort_(thread QuicksortObject* const tint_symbol_8) { +void quicksort_(thread QuicksortObject* const tint_symbol_7) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -127,7 +127,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { param_4 = x_321; int const x_322 = h_1; param_5 = x_322; - int const x_323 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8); + int const x_323 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7); p = x_323; int const x_324 = p; int const x_326 = l_1; @@ -161,12 +161,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { return; } -void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12, thread float4* const tint_symbol_13) { +void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; - float4 const x_94 = *(tint_symbol_9); - *(tint_symbol_10) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); + float4 const x_94 = *(tint_symbol_8); + *(tint_symbol_9) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); i_2 = 0; while (true) { int const x_101 = i_2; @@ -176,7 +176,7 @@ void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_ } int const x_104 = i_2; int const x_105 = i_2; - (*(tint_symbol_11)).numbers.arr[x_104] = as_type((as_type(10) - as_type(x_105))); + (*(tint_symbol_10)).numbers.arr[x_104] = as_type((as_type(10) - as_type(x_105))); float const x_109 = x_33.injectionSwitch.x; float const x_111 = x_33.injectionSwitch.y; if ((x_109 > x_111)) { @@ -184,91 +184,97 @@ void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_ } int const x_115 = i_2; int const x_116 = i_2; - int const x_118 = (*(tint_symbol_11)).numbers.arr[x_116]; + int const x_118 = (*(tint_symbol_10)).numbers.arr[x_116]; int const x_119 = i_2; - int const x_121 = (*(tint_symbol_11)).numbers.arr[x_119]; - (*(tint_symbol_11)).numbers.arr[x_115] = as_type((as_type(x_118) * as_type(x_121))); + int const x_121 = (*(tint_symbol_10)).numbers.arr[x_119]; + (*(tint_symbol_10)).numbers.arr[x_115] = as_type((as_type(x_118) * as_type(x_121))); { int const x_124 = i_2; i_2 = as_type((as_type(x_124) + as_type(1))); } } - quicksort_(tint_symbol_11); - float4 const x_127 = *(tint_symbol_10); + quicksort_(tint_symbol_10); + float4 const x_127 = *(tint_symbol_9); float2 const x_130 = x_36.resolution; uv = (float2(x_127.x, x_127.y) / x_130); color = float3(1.0f, 2.0f, 3.0f); - int const x_133 = (*(tint_symbol_11)).numbers.arr[0]; + int const x_133 = (*(tint_symbol_10)).numbers.arr[0]; float const x_136 = color.x; color.x = (x_136 + float(x_133)); float const x_140 = uv.x; if ((x_140 > 0.25f)) { - int const x_145 = (*(tint_symbol_11)).numbers.arr[1]; + int const x_145 = (*(tint_symbol_10)).numbers.arr[1]; float const x_148 = color.x; color.x = (x_148 + float(x_145)); } float const x_152 = uv.x; if ((x_152 > 0.5f)) { - int const x_157 = (*(tint_symbol_11)).numbers.arr[2]; + int const x_157 = (*(tint_symbol_10)).numbers.arr[2]; float const x_160 = color.y; color.y = (x_160 + float(x_157)); } float const x_164 = uv.x; if ((x_164 > 0.75f)) { - int const x_169 = (*(tint_symbol_11)).numbers.arr[3]; + int const x_169 = (*(tint_symbol_10)).numbers.arr[3]; float const x_172 = color.z; color.z = (x_172 + float(x_169)); } - int const x_176 = (*(tint_symbol_11)).numbers.arr[4]; + int const x_176 = (*(tint_symbol_10)).numbers.arr[4]; float const x_179 = color.y; color.y = (x_179 + float(x_176)); float const x_183 = uv.y; if ((x_183 > 0.25f)) { - int const x_188 = (*(tint_symbol_11)).numbers.arr[5]; + int const x_188 = (*(tint_symbol_10)).numbers.arr[5]; float const x_191 = color.x; color.x = (x_191 + float(x_188)); } float const x_195 = uv.y; if ((x_195 > 0.5f)) { - int const x_200 = (*(tint_symbol_11)).numbers.arr[6]; + int const x_200 = (*(tint_symbol_10)).numbers.arr[6]; float const x_203 = color.y; color.y = (x_203 + float(x_200)); } float const x_207 = uv.y; if ((x_207 > 0.75f)) { - int const x_212 = (*(tint_symbol_11)).numbers.arr[7]; + int const x_212 = (*(tint_symbol_10)).numbers.arr[7]; float const x_215 = color.z; color.z = (x_215 + float(x_212)); } - int const x_219 = (*(tint_symbol_11)).numbers.arr[8]; + int const x_219 = (*(tint_symbol_10)).numbers.arr[8]; float const x_222 = color.z; color.z = (x_222 + float(x_219)); float const x_226 = uv.x; float const x_228 = uv.y; if ((fabs((x_226 - x_228)) < 0.25f)) { - int const x_235 = (*(tint_symbol_11)).numbers.arr[9]; + int const x_235 = (*(tint_symbol_10)).numbers.arr[9]; float const x_238 = color.x; color.x = (x_238 + float(x_235)); } float3 const x_241 = color; float3 const x_242 = normalize(x_241); - *(tint_symbol_12) = float4(x_242.x, x_242.y, x_242.z, 1.0f); - float4 const x_247 = *(tint_symbol_9); - *(tint_symbol_13) = x_247; + *(tint_symbol_11) = float4(x_242.x, x_242.y, x_242.z, 1.0f); + float4 const x_247 = *(tint_symbol_8); + *(tint_symbol_12) = x_247; return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_33 [[buffer(0)]], constant buf1& x_36 [[buffer(1)]]) { - thread float4 tint_symbol_14 = 0.0f; - thread float4 tint_symbol_15 = 0.0f; - thread QuicksortObject tint_symbol_16 = {}; - thread float4 tint_symbol_17 = 0.0f; - thread float4 tint_symbol_18 = 0.0f; - float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param; - tint_symbol_14 = x_GLF_pos_param; - main_1(x_33, x_36, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); - main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_17, .gl_Position=tint_symbol_18}; - tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_33, constant buf1& x_36, float4 x_GLF_pos_param, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14, thread QuicksortObject* const tint_symbol_15, thread float4* const tint_symbol_16, thread float4* const tint_symbol_17) { + *(tint_symbol_13) = x_GLF_pos_param; + main_1(x_33, x_36, tint_symbol_13, tint_symbol_14, tint_symbol_15, tint_symbol_16, tint_symbol_17); + main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_16), .gl_Position=*(tint_symbol_17)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_33 [[buffer(0)]], constant buf1& x_36 [[buffer(1)]]) { + thread float4 tint_symbol_18 = 0.0f; + thread float4 tint_symbol_19 = 0.0f; + thread QuicksortObject tint_symbol_20 = {}; + thread float4 tint_symbol_21 = 0.0f; + thread float4 tint_symbol_22 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_33, x_36, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20), &(tint_symbol_21), &(tint_symbol_22)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl.expected.msl index 865d47202b..3fa889c459 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl.expected.msl @@ -25,22 +25,22 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_6) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) { int temp = 0; int const x_250 = *(i); - int const x_252 = (*(tint_symbol_6)).numbers.arr[x_250]; + int const x_252 = (*(tint_symbol_5)).numbers.arr[x_250]; temp = x_252; int const x_253 = *(i); int const x_254 = *(j); - int const x_256 = (*(tint_symbol_6)).numbers.arr[x_254]; - (*(tint_symbol_6)).numbers.arr[x_253] = x_256; + int const x_256 = (*(tint_symbol_5)).numbers.arr[x_254]; + (*(tint_symbol_5)).numbers.arr[x_253] = x_256; int const x_258 = *(j); int const x_259 = temp; - (*(tint_symbol_6)).numbers.arr[x_258] = x_259; + (*(tint_symbol_5)).numbers.arr[x_258] = x_259; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_7) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -49,7 +49,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_262 = *(h); - int const x_264 = (*(tint_symbol_7)).numbers.arr[x_262]; + int const x_264 = (*(tint_symbol_6)).numbers.arr[x_262]; pivot = x_264; int const x_265 = *(l); i_1 = as_type((as_type(x_265) - as_type(1))); @@ -63,7 +63,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_277 = j_1; - int const x_279 = (*(tint_symbol_7)).numbers.arr[x_277]; + int const x_279 = (*(tint_symbol_6)).numbers.arr[x_277]; int const x_280 = pivot; if ((x_279 <= x_280)) { int const x_284 = i_1; @@ -72,7 +72,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_286; int const x_287 = j_1; param_1 = x_287; - swap_i1_i1_(&(param), &(param_1), tint_symbol_7); + swap_i1_i1_(&(param), &(param_1), tint_symbol_6); } { int const x_289 = j_1; @@ -83,12 +83,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = as_type((as_type(x_291) + as_type(1))); int const x_293 = *(h); param_3 = x_293; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7); + swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6); int const x_295 = i_1; return as_type((as_type(x_295) + as_type(1))); } -void quicksort_(thread QuicksortObject* const tint_symbol_8) { +void quicksort_(thread QuicksortObject* const tint_symbol_7) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -127,7 +127,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { param_4 = x_321; int const x_322 = h_1; param_5 = x_322; - int const x_323 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8); + int const x_323 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7); p = x_323; int const x_324 = p; int const x_326 = l_1; @@ -161,12 +161,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { return; } -void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12, thread float4* const tint_symbol_13) { +void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; - float4 const x_94 = *(tint_symbol_9); - *(tint_symbol_10) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); + float4 const x_94 = *(tint_symbol_8); + *(tint_symbol_9) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); i_2 = 0; while (true) { int const x_101 = i_2; @@ -176,7 +176,7 @@ void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_ } int const x_104 = i_2; int const x_105 = i_2; - (*(tint_symbol_11)).numbers.arr[x_104] = as_type((as_type(10) - as_type(x_105))); + (*(tint_symbol_10)).numbers.arr[x_104] = as_type((as_type(10) - as_type(x_105))); float const x_109 = x_33.injectionSwitch.x; float const x_111 = x_33.injectionSwitch.y; if ((x_109 > x_111)) { @@ -184,91 +184,97 @@ void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_ } int const x_115 = i_2; int const x_116 = i_2; - int const x_118 = (*(tint_symbol_11)).numbers.arr[x_116]; + int const x_118 = (*(tint_symbol_10)).numbers.arr[x_116]; int const x_119 = i_2; - int const x_121 = (*(tint_symbol_11)).numbers.arr[x_119]; - (*(tint_symbol_11)).numbers.arr[x_115] = as_type((as_type(x_118) * as_type(x_121))); + int const x_121 = (*(tint_symbol_10)).numbers.arr[x_119]; + (*(tint_symbol_10)).numbers.arr[x_115] = as_type((as_type(x_118) * as_type(x_121))); { int const x_124 = i_2; i_2 = as_type((as_type(x_124) + as_type(1))); } } - quicksort_(tint_symbol_11); - float4 const x_127 = *(tint_symbol_10); + quicksort_(tint_symbol_10); + float4 const x_127 = *(tint_symbol_9); float2 const x_130 = x_36.resolution; uv = (float2(x_127.x, x_127.y) / x_130); color = float3(1.0f, 2.0f, 3.0f); - int const x_133 = (*(tint_symbol_11)).numbers.arr[0]; + int const x_133 = (*(tint_symbol_10)).numbers.arr[0]; float const x_136 = color.x; color.x = (x_136 + float(x_133)); float const x_140 = uv.x; if ((x_140 > 0.25f)) { - int const x_145 = (*(tint_symbol_11)).numbers.arr[1]; + int const x_145 = (*(tint_symbol_10)).numbers.arr[1]; float const x_148 = color.x; color.x = (x_148 + float(x_145)); } float const x_152 = uv.x; if ((x_152 > 0.5f)) { - int const x_157 = (*(tint_symbol_11)).numbers.arr[2]; + int const x_157 = (*(tint_symbol_10)).numbers.arr[2]; float const x_160 = color.y; color.y = (x_160 + float(x_157)); } float const x_164 = uv.x; if ((x_164 > 0.75f)) { - int const x_169 = (*(tint_symbol_11)).numbers.arr[3]; + int const x_169 = (*(tint_symbol_10)).numbers.arr[3]; float const x_172 = color.z; color.z = (x_172 + float(x_169)); } - int const x_176 = (*(tint_symbol_11)).numbers.arr[4]; + int const x_176 = (*(tint_symbol_10)).numbers.arr[4]; float const x_179 = color.y; color.y = (x_179 + float(x_176)); float const x_183 = uv.y; if ((x_183 > 0.25f)) { - int const x_188 = (*(tint_symbol_11)).numbers.arr[5]; + int const x_188 = (*(tint_symbol_10)).numbers.arr[5]; float const x_191 = color.x; color.x = (x_191 + float(x_188)); } float const x_195 = uv.y; if ((x_195 > 0.5f)) { - int const x_200 = (*(tint_symbol_11)).numbers.arr[6]; + int const x_200 = (*(tint_symbol_10)).numbers.arr[6]; float const x_203 = color.y; color.y = (x_203 + float(x_200)); } float const x_207 = uv.y; if ((x_207 > 0.75f)) { - int const x_212 = (*(tint_symbol_11)).numbers.arr[7]; + int const x_212 = (*(tint_symbol_10)).numbers.arr[7]; float const x_215 = color.z; color.z = (x_215 + float(x_212)); } - int const x_219 = (*(tint_symbol_11)).numbers.arr[8]; + int const x_219 = (*(tint_symbol_10)).numbers.arr[8]; float const x_222 = color.z; color.z = (x_222 + float(x_219)); float const x_226 = uv.x; float const x_228 = uv.y; if ((fabs((x_226 - x_228)) < 0.25f)) { - int const x_235 = (*(tint_symbol_11)).numbers.arr[9]; + int const x_235 = (*(tint_symbol_10)).numbers.arr[9]; float const x_238 = color.x; color.x = (x_238 + float(x_235)); } float3 const x_241 = color; float3 const x_242 = normalize(x_241); - *(tint_symbol_12) = float4(x_242.x, x_242.y, x_242.z, 1.0f); - float4 const x_247 = *(tint_symbol_9); - *(tint_symbol_13) = x_247; + *(tint_symbol_11) = float4(x_242.x, x_242.y, x_242.z, 1.0f); + float4 const x_247 = *(tint_symbol_8); + *(tint_symbol_12) = x_247; return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_33 [[buffer(0)]], constant buf1& x_36 [[buffer(1)]]) { - thread float4 tint_symbol_14 = 0.0f; - thread float4 tint_symbol_15 = 0.0f; - thread QuicksortObject tint_symbol_16 = {}; - thread float4 tint_symbol_17 = 0.0f; - thread float4 tint_symbol_18 = 0.0f; - float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param; - tint_symbol_14 = x_GLF_pos_param; - main_1(x_33, x_36, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); - main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_17, .gl_Position=tint_symbol_18}; - tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf0& x_33, constant buf1& x_36, float4 x_GLF_pos_param, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14, thread QuicksortObject* const tint_symbol_15, thread float4* const tint_symbol_16, thread float4* const tint_symbol_17) { + *(tint_symbol_13) = x_GLF_pos_param; + main_1(x_33, x_36, tint_symbol_13, tint_symbol_14, tint_symbol_15, tint_symbol_16, tint_symbol_17); + main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_16), .gl_Position=*(tint_symbol_17)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_33 [[buffer(0)]], constant buf1& x_36 [[buffer(1)]]) { + thread float4 tint_symbol_18 = 0.0f; + thread float4 tint_symbol_19 = 0.0f; + thread QuicksortObject tint_symbol_20 = {}; + thread float4 tint_symbol_21 = 0.0f; + thread float4 tint_symbol_22 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_33, x_36, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20), &(tint_symbol_21), &(tint_symbol_22)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.hlsl index 99862c315c..2d65bff7d4 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.hlsl @@ -188,13 +188,19 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param; +main_out main_inner(float4 x_GLF_pos_param) { x_GLF_pos = x_GLF_pos_param; main_1(); - const main_out tint_symbol_3 = {frag_color, gl_Position}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position}; - return tint_symbol_5; + const main_out tint_symbol_4 = {frag_color, gl_Position}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } void swap_i1_i1_(inout int i, inout int j) { diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.msl index c34f5933dd..c013d1ca76 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.msl @@ -22,7 +22,7 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_34, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { int x_90 = 0; int x_91 = 0; int x_92 = 0; @@ -43,8 +43,8 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; - float4 const x_107 = *(tint_symbol_6); - *(tint_symbol_7) = ((x_107 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); + float4 const x_107 = *(tint_symbol_5); + *(tint_symbol_6) = ((x_107 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); i_2 = 0; while (true) { int const x_114 = i_2; @@ -54,13 +54,13 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa } int const x_117 = i_2; int const x_118 = i_2; - (*(tint_symbol_8)).numbers.arr[x_117] = as_type((as_type(10) - as_type(x_118))); + (*(tint_symbol_7)).numbers.arr[x_117] = as_type((as_type(10) - as_type(x_118))); int const x_121 = i_2; int const x_122 = i_2; - int const x_124 = (*(tint_symbol_8)).numbers.arr[x_122]; + int const x_124 = (*(tint_symbol_7)).numbers.arr[x_122]; int const x_125 = i_2; - int const x_127 = (*(tint_symbol_8)).numbers.arr[x_125]; - (*(tint_symbol_8)).numbers.arr[x_121] = as_type((as_type(x_124) * as_type(x_127))); + int const x_127 = (*(tint_symbol_7)).numbers.arr[x_125]; + (*(tint_symbol_7)).numbers.arr[x_121] = as_type((as_type(x_124) * as_type(x_127))); { int const x_130 = i_2; i_2 = as_type((as_type(x_130) + as_type(1))); @@ -98,7 +98,7 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa int const x_156 = x_101; x_106 = x_156; int const x_157 = x_106; - int const x_159 = (*(tint_symbol_8)).numbers.arr[x_157]; + int const x_159 = (*(tint_symbol_7)).numbers.arr[x_157]; x_92 = x_159; int const x_160 = x_105; x_93 = as_type((as_type(x_160) - as_type(1))); @@ -112,7 +112,7 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa break; } int const x_172 = x_94; - int const x_174 = (*(tint_symbol_8)).numbers.arr[x_172]; + int const x_174 = (*(tint_symbol_7)).numbers.arr[x_172]; int const x_175 = x_92; if ((x_174 <= x_175)) { int const x_179 = x_93; @@ -122,15 +122,15 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa int const x_182 = x_94; x_96 = x_182; int const x_183 = x_95; - int const x_185 = (*(tint_symbol_8)).numbers.arr[x_183]; + int const x_185 = (*(tint_symbol_7)).numbers.arr[x_183]; x_91 = x_185; int const x_186 = x_95; int const x_187 = x_96; - int const x_189 = (*(tint_symbol_8)).numbers.arr[x_187]; - (*(tint_symbol_8)).numbers.arr[x_186] = x_189; + int const x_189 = (*(tint_symbol_7)).numbers.arr[x_187]; + (*(tint_symbol_7)).numbers.arr[x_186] = x_189; int const x_191 = x_96; int const x_192 = x_91; - (*(tint_symbol_8)).numbers.arr[x_191] = x_192; + (*(tint_symbol_7)).numbers.arr[x_191] = x_192; } { int const x_194 = x_94; @@ -142,15 +142,15 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa int const x_198 = x_106; x_98 = x_198; int const x_199 = x_97; - int const x_201 = (*(tint_symbol_8)).numbers.arr[x_199]; + int const x_201 = (*(tint_symbol_7)).numbers.arr[x_199]; x_90 = x_201; int const x_202 = x_97; int const x_203 = x_98; - int const x_205 = (*(tint_symbol_8)).numbers.arr[x_203]; - (*(tint_symbol_8)).numbers.arr[x_202] = x_205; + int const x_205 = (*(tint_symbol_7)).numbers.arr[x_203]; + (*(tint_symbol_7)).numbers.arr[x_202] = x_205; int const x_207 = x_98; int const x_208 = x_90; - (*(tint_symbol_8)).numbers.arr[x_207] = x_208; + (*(tint_symbol_7)).numbers.arr[x_207] = x_208; int const x_210 = x_93; x_99 = as_type((as_type(x_210) + as_type(1))); int const x_212 = x_99; @@ -184,100 +184,106 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa x_103.arr[x_240] = x_241; } } - float4 const x_243 = *(tint_symbol_7); + float4 const x_243 = *(tint_symbol_6); float2 const x_246 = x_34.resolution; uv = (float2(x_243.x, x_243.y) / x_246); color = float3(1.0f, 2.0f, 3.0f); - int const x_249 = (*(tint_symbol_8)).numbers.arr[0]; + int const x_249 = (*(tint_symbol_7)).numbers.arr[0]; float const x_252 = color.x; color.x = (x_252 + float(x_249)); float const x_256 = uv.x; if ((x_256 > 0.25f)) { - int const x_261 = (*(tint_symbol_8)).numbers.arr[1]; + int const x_261 = (*(tint_symbol_7)).numbers.arr[1]; float const x_264 = color.x; color.x = (x_264 + float(x_261)); } float const x_268 = uv.x; if ((x_268 > 0.5f)) { - int const x_273 = (*(tint_symbol_8)).numbers.arr[2]; + int const x_273 = (*(tint_symbol_7)).numbers.arr[2]; float const x_276 = color.y; color.y = (x_276 + float(x_273)); } float const x_280 = uv.x; if ((x_280 > 0.75f)) { - int const x_285 = (*(tint_symbol_8)).numbers.arr[3]; + int const x_285 = (*(tint_symbol_7)).numbers.arr[3]; float const x_288 = color.z; color.z = (x_288 + float(x_285)); } - int const x_292 = (*(tint_symbol_8)).numbers.arr[4]; + int const x_292 = (*(tint_symbol_7)).numbers.arr[4]; float const x_295 = color.y; color.y = (x_295 + float(x_292)); float const x_299 = uv.y; if ((x_299 > 0.25f)) { - int const x_304 = (*(tint_symbol_8)).numbers.arr[5]; + int const x_304 = (*(tint_symbol_7)).numbers.arr[5]; float const x_307 = color.x; color.x = (x_307 + float(x_304)); } float const x_311 = uv.y; if ((x_311 > 0.5f)) { - int const x_316 = (*(tint_symbol_8)).numbers.arr[6]; + int const x_316 = (*(tint_symbol_7)).numbers.arr[6]; float const x_319 = color.y; color.y = (x_319 + float(x_316)); } float const x_323 = uv.y; if ((x_323 > 0.75f)) { - int const x_328 = (*(tint_symbol_8)).numbers.arr[7]; + int const x_328 = (*(tint_symbol_7)).numbers.arr[7]; float const x_331 = color.z; color.z = (x_331 + float(x_328)); } - int const x_335 = (*(tint_symbol_8)).numbers.arr[8]; + int const x_335 = (*(tint_symbol_7)).numbers.arr[8]; float const x_338 = color.z; color.z = (x_338 + float(x_335)); float const x_342 = uv.x; float const x_344 = uv.y; if ((fabs((x_342 - x_344)) < 0.25f)) { - int const x_351 = (*(tint_symbol_8)).numbers.arr[9]; + int const x_351 = (*(tint_symbol_7)).numbers.arr[9]; float const x_354 = color.x; color.x = (x_354 + float(x_351)); } float3 const x_357 = color; float3 const x_358 = normalize(x_357); - *(tint_symbol_9) = float4(x_358.x, x_358.y, x_358.z, 1.0f); - float4 const x_363 = *(tint_symbol_6); - *(tint_symbol_10) = x_363; + *(tint_symbol_8) = float4(x_358.x, x_358.y, x_358.z, 1.0f); + float4 const x_363 = *(tint_symbol_5); + *(tint_symbol_9) = x_363; return; } +main_out tint_symbol_inner(constant buf0& x_34, float4 x_GLF_pos_param, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11, thread QuicksortObject* const tint_symbol_12, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_10) = x_GLF_pos_param; + main_1(x_34, tint_symbol_10, tint_symbol_11, tint_symbol_12, tint_symbol_13, tint_symbol_14); + main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_13), .gl_Position=*(tint_symbol_14)}; + return tint_symbol_4; +} + vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_34 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - thread QuicksortObject tint_symbol_13 = {}; - thread float4 tint_symbol_14 = 0.0f; thread float4 tint_symbol_15 = 0.0f; - float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param; - tint_symbol_11 = x_GLF_pos_param; - main_1(x_34, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15)); - main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_14, .gl_Position=tint_symbol_15}; - tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; + thread float4 tint_symbol_16 = 0.0f; + thread QuicksortObject tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + thread float4 tint_symbol_19 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_34, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18), &(tint_symbol_19)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } -void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_16) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_20) { int temp = 0; int const x_366 = *(i); - int const x_368 = (*(tint_symbol_16)).numbers.arr[x_366]; + int const x_368 = (*(tint_symbol_20)).numbers.arr[x_366]; temp = x_368; int const x_369 = *(i); int const x_370 = *(j); - int const x_372 = (*(tint_symbol_16)).numbers.arr[x_370]; - (*(tint_symbol_16)).numbers.arr[x_369] = x_372; + int const x_372 = (*(tint_symbol_20)).numbers.arr[x_370]; + (*(tint_symbol_20)).numbers.arr[x_369] = x_372; int const x_374 = *(j); int const x_375 = temp; - (*(tint_symbol_16)).numbers.arr[x_374] = x_375; + (*(tint_symbol_20)).numbers.arr[x_374] = x_375; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_17) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_21) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -286,7 +292,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_378 = *(h); - int const x_380 = (*(tint_symbol_17)).numbers.arr[x_378]; + int const x_380 = (*(tint_symbol_21)).numbers.arr[x_378]; pivot = x_380; int const x_381 = *(l); i_1 = as_type((as_type(x_381) - as_type(1))); @@ -300,7 +306,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_393 = j_1; - int const x_395 = (*(tint_symbol_17)).numbers.arr[x_393]; + int const x_395 = (*(tint_symbol_21)).numbers.arr[x_393]; int const x_396 = pivot; if ((x_395 <= x_396)) { int const x_400 = i_1; @@ -309,7 +315,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_402; int const x_403 = j_1; param_1 = x_403; - swap_i1_i1_(&(param), &(param_1), tint_symbol_17); + swap_i1_i1_(&(param), &(param_1), tint_symbol_21); } { int const x_405 = j_1; @@ -320,12 +326,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = as_type((as_type(x_407) + as_type(1))); int const x_409 = *(h); param_3 = x_409; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_17); + swap_i1_i1_(&(param_2), &(param_3), tint_symbol_21); int const x_411 = i_1; return as_type((as_type(x_411) + as_type(1))); } -void quicksort_(thread QuicksortObject* const tint_symbol_18) { +void quicksort_(thread QuicksortObject* const tint_symbol_22) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -364,7 +370,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { param_4 = x_437; int const x_438 = h_1; param_5 = x_438; - int const x_439 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_18); + int const x_439 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_22); p = x_439; int const x_440 = p; int const x_442 = l_1; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.hlsl index 99862c315c..2d65bff7d4 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.hlsl @@ -188,13 +188,19 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param; +main_out main_inner(float4 x_GLF_pos_param) { x_GLF_pos = x_GLF_pos_param; main_1(); - const main_out tint_symbol_3 = {frag_color, gl_Position}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position}; - return tint_symbol_5; + const main_out tint_symbol_4 = {frag_color, gl_Position}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } void swap_i1_i1_(inout int i, inout int j) { diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.msl index c34f5933dd..c013d1ca76 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.msl @@ -22,7 +22,7 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { +void main_1(constant buf0& x_34, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { int x_90 = 0; int x_91 = 0; int x_92 = 0; @@ -43,8 +43,8 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; - float4 const x_107 = *(tint_symbol_6); - *(tint_symbol_7) = ((x_107 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); + float4 const x_107 = *(tint_symbol_5); + *(tint_symbol_6) = ((x_107 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); i_2 = 0; while (true) { int const x_114 = i_2; @@ -54,13 +54,13 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa } int const x_117 = i_2; int const x_118 = i_2; - (*(tint_symbol_8)).numbers.arr[x_117] = as_type((as_type(10) - as_type(x_118))); + (*(tint_symbol_7)).numbers.arr[x_117] = as_type((as_type(10) - as_type(x_118))); int const x_121 = i_2; int const x_122 = i_2; - int const x_124 = (*(tint_symbol_8)).numbers.arr[x_122]; + int const x_124 = (*(tint_symbol_7)).numbers.arr[x_122]; int const x_125 = i_2; - int const x_127 = (*(tint_symbol_8)).numbers.arr[x_125]; - (*(tint_symbol_8)).numbers.arr[x_121] = as_type((as_type(x_124) * as_type(x_127))); + int const x_127 = (*(tint_symbol_7)).numbers.arr[x_125]; + (*(tint_symbol_7)).numbers.arr[x_121] = as_type((as_type(x_124) * as_type(x_127))); { int const x_130 = i_2; i_2 = as_type((as_type(x_130) + as_type(1))); @@ -98,7 +98,7 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa int const x_156 = x_101; x_106 = x_156; int const x_157 = x_106; - int const x_159 = (*(tint_symbol_8)).numbers.arr[x_157]; + int const x_159 = (*(tint_symbol_7)).numbers.arr[x_157]; x_92 = x_159; int const x_160 = x_105; x_93 = as_type((as_type(x_160) - as_type(1))); @@ -112,7 +112,7 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa break; } int const x_172 = x_94; - int const x_174 = (*(tint_symbol_8)).numbers.arr[x_172]; + int const x_174 = (*(tint_symbol_7)).numbers.arr[x_172]; int const x_175 = x_92; if ((x_174 <= x_175)) { int const x_179 = x_93; @@ -122,15 +122,15 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa int const x_182 = x_94; x_96 = x_182; int const x_183 = x_95; - int const x_185 = (*(tint_symbol_8)).numbers.arr[x_183]; + int const x_185 = (*(tint_symbol_7)).numbers.arr[x_183]; x_91 = x_185; int const x_186 = x_95; int const x_187 = x_96; - int const x_189 = (*(tint_symbol_8)).numbers.arr[x_187]; - (*(tint_symbol_8)).numbers.arr[x_186] = x_189; + int const x_189 = (*(tint_symbol_7)).numbers.arr[x_187]; + (*(tint_symbol_7)).numbers.arr[x_186] = x_189; int const x_191 = x_96; int const x_192 = x_91; - (*(tint_symbol_8)).numbers.arr[x_191] = x_192; + (*(tint_symbol_7)).numbers.arr[x_191] = x_192; } { int const x_194 = x_94; @@ -142,15 +142,15 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa int const x_198 = x_106; x_98 = x_198; int const x_199 = x_97; - int const x_201 = (*(tint_symbol_8)).numbers.arr[x_199]; + int const x_201 = (*(tint_symbol_7)).numbers.arr[x_199]; x_90 = x_201; int const x_202 = x_97; int const x_203 = x_98; - int const x_205 = (*(tint_symbol_8)).numbers.arr[x_203]; - (*(tint_symbol_8)).numbers.arr[x_202] = x_205; + int const x_205 = (*(tint_symbol_7)).numbers.arr[x_203]; + (*(tint_symbol_7)).numbers.arr[x_202] = x_205; int const x_207 = x_98; int const x_208 = x_90; - (*(tint_symbol_8)).numbers.arr[x_207] = x_208; + (*(tint_symbol_7)).numbers.arr[x_207] = x_208; int const x_210 = x_93; x_99 = as_type((as_type(x_210) + as_type(1))); int const x_212 = x_99; @@ -184,100 +184,106 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa x_103.arr[x_240] = x_241; } } - float4 const x_243 = *(tint_symbol_7); + float4 const x_243 = *(tint_symbol_6); float2 const x_246 = x_34.resolution; uv = (float2(x_243.x, x_243.y) / x_246); color = float3(1.0f, 2.0f, 3.0f); - int const x_249 = (*(tint_symbol_8)).numbers.arr[0]; + int const x_249 = (*(tint_symbol_7)).numbers.arr[0]; float const x_252 = color.x; color.x = (x_252 + float(x_249)); float const x_256 = uv.x; if ((x_256 > 0.25f)) { - int const x_261 = (*(tint_symbol_8)).numbers.arr[1]; + int const x_261 = (*(tint_symbol_7)).numbers.arr[1]; float const x_264 = color.x; color.x = (x_264 + float(x_261)); } float const x_268 = uv.x; if ((x_268 > 0.5f)) { - int const x_273 = (*(tint_symbol_8)).numbers.arr[2]; + int const x_273 = (*(tint_symbol_7)).numbers.arr[2]; float const x_276 = color.y; color.y = (x_276 + float(x_273)); } float const x_280 = uv.x; if ((x_280 > 0.75f)) { - int const x_285 = (*(tint_symbol_8)).numbers.arr[3]; + int const x_285 = (*(tint_symbol_7)).numbers.arr[3]; float const x_288 = color.z; color.z = (x_288 + float(x_285)); } - int const x_292 = (*(tint_symbol_8)).numbers.arr[4]; + int const x_292 = (*(tint_symbol_7)).numbers.arr[4]; float const x_295 = color.y; color.y = (x_295 + float(x_292)); float const x_299 = uv.y; if ((x_299 > 0.25f)) { - int const x_304 = (*(tint_symbol_8)).numbers.arr[5]; + int const x_304 = (*(tint_symbol_7)).numbers.arr[5]; float const x_307 = color.x; color.x = (x_307 + float(x_304)); } float const x_311 = uv.y; if ((x_311 > 0.5f)) { - int const x_316 = (*(tint_symbol_8)).numbers.arr[6]; + int const x_316 = (*(tint_symbol_7)).numbers.arr[6]; float const x_319 = color.y; color.y = (x_319 + float(x_316)); } float const x_323 = uv.y; if ((x_323 > 0.75f)) { - int const x_328 = (*(tint_symbol_8)).numbers.arr[7]; + int const x_328 = (*(tint_symbol_7)).numbers.arr[7]; float const x_331 = color.z; color.z = (x_331 + float(x_328)); } - int const x_335 = (*(tint_symbol_8)).numbers.arr[8]; + int const x_335 = (*(tint_symbol_7)).numbers.arr[8]; float const x_338 = color.z; color.z = (x_338 + float(x_335)); float const x_342 = uv.x; float const x_344 = uv.y; if ((fabs((x_342 - x_344)) < 0.25f)) { - int const x_351 = (*(tint_symbol_8)).numbers.arr[9]; + int const x_351 = (*(tint_symbol_7)).numbers.arr[9]; float const x_354 = color.x; color.x = (x_354 + float(x_351)); } float3 const x_357 = color; float3 const x_358 = normalize(x_357); - *(tint_symbol_9) = float4(x_358.x, x_358.y, x_358.z, 1.0f); - float4 const x_363 = *(tint_symbol_6); - *(tint_symbol_10) = x_363; + *(tint_symbol_8) = float4(x_358.x, x_358.y, x_358.z, 1.0f); + float4 const x_363 = *(tint_symbol_5); + *(tint_symbol_9) = x_363; return; } +main_out tint_symbol_inner(constant buf0& x_34, float4 x_GLF_pos_param, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11, thread QuicksortObject* const tint_symbol_12, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14) { + *(tint_symbol_10) = x_GLF_pos_param; + main_1(x_34, tint_symbol_10, tint_symbol_11, tint_symbol_12, tint_symbol_13, tint_symbol_14); + main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_13), .gl_Position=*(tint_symbol_14)}; + return tint_symbol_4; +} + vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_34 [[buffer(0)]]) { - thread float4 tint_symbol_11 = 0.0f; - thread float4 tint_symbol_12 = 0.0f; - thread QuicksortObject tint_symbol_13 = {}; - thread float4 tint_symbol_14 = 0.0f; thread float4 tint_symbol_15 = 0.0f; - float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param; - tint_symbol_11 = x_GLF_pos_param; - main_1(x_34, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15)); - main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_14, .gl_Position=tint_symbol_15}; - tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; + thread float4 tint_symbol_16 = 0.0f; + thread QuicksortObject tint_symbol_17 = {}; + thread float4 tint_symbol_18 = 0.0f; + thread float4 tint_symbol_19 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_34, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18), &(tint_symbol_19)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } -void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_16) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_20) { int temp = 0; int const x_366 = *(i); - int const x_368 = (*(tint_symbol_16)).numbers.arr[x_366]; + int const x_368 = (*(tint_symbol_20)).numbers.arr[x_366]; temp = x_368; int const x_369 = *(i); int const x_370 = *(j); - int const x_372 = (*(tint_symbol_16)).numbers.arr[x_370]; - (*(tint_symbol_16)).numbers.arr[x_369] = x_372; + int const x_372 = (*(tint_symbol_20)).numbers.arr[x_370]; + (*(tint_symbol_20)).numbers.arr[x_369] = x_372; int const x_374 = *(j); int const x_375 = temp; - (*(tint_symbol_16)).numbers.arr[x_374] = x_375; + (*(tint_symbol_20)).numbers.arr[x_374] = x_375; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_17) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_21) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -286,7 +292,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_378 = *(h); - int const x_380 = (*(tint_symbol_17)).numbers.arr[x_378]; + int const x_380 = (*(tint_symbol_21)).numbers.arr[x_378]; pivot = x_380; int const x_381 = *(l); i_1 = as_type((as_type(x_381) - as_type(1))); @@ -300,7 +306,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_393 = j_1; - int const x_395 = (*(tint_symbol_17)).numbers.arr[x_393]; + int const x_395 = (*(tint_symbol_21)).numbers.arr[x_393]; int const x_396 = pivot; if ((x_395 <= x_396)) { int const x_400 = i_1; @@ -309,7 +315,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_402; int const x_403 = j_1; param_1 = x_403; - swap_i1_i1_(&(param), &(param_1), tint_symbol_17); + swap_i1_i1_(&(param), &(param_1), tint_symbol_21); } { int const x_405 = j_1; @@ -320,12 +326,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = as_type((as_type(x_407) + as_type(1))); int const x_409 = *(h); param_3 = x_409; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_17); + swap_i1_i1_(&(param_2), &(param_3), tint_symbol_21); int const x_411 = i_1; return as_type((as_type(x_411) + as_type(1))); } -void quicksort_(thread QuicksortObject* const tint_symbol_18) { +void quicksort_(thread QuicksortObject* const tint_symbol_22) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -364,7 +370,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { param_4 = x_437; int const x_438 = h_1; param_5 = x_438; - int const x_439 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_18); + int const x_439 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_22); p = x_439; int const x_440 = p; int const x_442 = l_1; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.hlsl index dd128c452e..53c62af549 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.hlsl @@ -206,13 +206,19 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param; +main_out main_inner(float4 x_GLF_pos_param) { x_GLF_pos = x_GLF_pos_param; main_1(); - const main_out tint_symbol_3 = {frag_color, gl_Position}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position}; - return tint_symbol_5; + const main_out tint_symbol_4 = {frag_color, gl_Position}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } void swap_i1_i1_(inout int i, inout int j) { diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.msl index c4cabb8f27..cd63817508 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.msl @@ -22,7 +22,7 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_5) { int x_314 = 0; int x_315 = 0; int pivot = 0; @@ -33,7 +33,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_316 = *(h); - int const x_318 = (*(tint_symbol_6)).numbers.arr[x_316]; + int const x_318 = (*(tint_symbol_5)).numbers.arr[x_316]; pivot = x_318; int const x_319 = *(l); i_1 = as_type((as_type(x_319) - as_type(1))); @@ -47,7 +47,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_331 = j_1; - int const x_333 = (*(tint_symbol_6)).numbers.arr[x_331]; + int const x_333 = (*(tint_symbol_5)).numbers.arr[x_331]; int const x_334 = pivot; if ((x_333 <= x_334)) { int const x_338 = i_1; @@ -57,15 +57,15 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_341 = j_1; param_1 = x_341; int const x_342 = param; - int const x_344 = (*(tint_symbol_6)).numbers.arr[x_342]; + int const x_344 = (*(tint_symbol_5)).numbers.arr[x_342]; x_315 = x_344; int const x_345 = param; int const x_346 = param_1; - int const x_348 = (*(tint_symbol_6)).numbers.arr[x_346]; - (*(tint_symbol_6)).numbers.arr[x_345] = x_348; + int const x_348 = (*(tint_symbol_5)).numbers.arr[x_346]; + (*(tint_symbol_5)).numbers.arr[x_345] = x_348; int const x_350 = param_1; int const x_351 = x_315; - (*(tint_symbol_6)).numbers.arr[x_350] = x_351; + (*(tint_symbol_5)).numbers.arr[x_350] = x_351; } { int const x_353 = j_1; @@ -77,15 +77,15 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_357 = *(h); param_3 = x_357; int const x_358 = param_2; - int const x_360 = (*(tint_symbol_6)).numbers.arr[x_358]; + int const x_360 = (*(tint_symbol_5)).numbers.arr[x_358]; x_314 = x_360; int const x_361 = param_2; int const x_362 = param_3; - int const x_364 = (*(tint_symbol_6)).numbers.arr[x_362]; - (*(tint_symbol_6)).numbers.arr[x_361] = x_364; + int const x_364 = (*(tint_symbol_5)).numbers.arr[x_362]; + (*(tint_symbol_5)).numbers.arr[x_361] = x_364; int const x_366 = param_3; int const x_367 = x_314; - (*(tint_symbol_6)).numbers.arr[x_366] = x_367; + (*(tint_symbol_5)).numbers.arr[x_366] = x_367; if (false) { } else { int const x_372 = i_1; @@ -94,7 +94,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui return 0; } -void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8, thread QuicksortObject* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { +void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int x_91 = 0; int x_92 = 0; int x_93 = 0; @@ -105,8 +105,8 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread floa int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; - float4 const x_98 = *(tint_symbol_7); - *(tint_symbol_8) = ((x_98 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); + float4 const x_98 = *(tint_symbol_6); + *(tint_symbol_7) = ((x_98 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); i_2 = 0; while (true) { int const x_105 = i_2; @@ -116,13 +116,13 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread floa } int const x_108 = i_2; int const x_109 = i_2; - (*(tint_symbol_9)).numbers.arr[x_108] = as_type((as_type(10) - as_type(x_109))); + (*(tint_symbol_8)).numbers.arr[x_108] = as_type((as_type(10) - as_type(x_109))); int const x_112 = i_2; int const x_113 = i_2; - int const x_115 = (*(tint_symbol_9)).numbers.arr[x_113]; + int const x_115 = (*(tint_symbol_8)).numbers.arr[x_113]; int const x_116 = i_2; - int const x_118 = (*(tint_symbol_9)).numbers.arr[x_116]; - (*(tint_symbol_9)).numbers.arr[x_112] = as_type((as_type(x_115) * as_type(x_118))); + int const x_118 = (*(tint_symbol_8)).numbers.arr[x_116]; + (*(tint_symbol_8)).numbers.arr[x_112] = as_type((as_type(x_115) * as_type(x_118))); { int const x_121 = i_2; i_2 = as_type((as_type(x_121) + as_type(1))); @@ -159,7 +159,7 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread floa x_96 = x_146; int const x_147 = x_92; x_97 = x_147; - int const x_148 = performPartition_i1_i1_(&(x_96), &(x_97), tint_symbol_9); + int const x_148 = performPartition_i1_i1_(&(x_96), &(x_97), tint_symbol_8); x_95 = x_148; int const x_149 = x_95; int const x_151 = x_91; @@ -190,100 +190,106 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread floa x_94.arr[x_176] = x_177; } } - float4 const x_179 = *(tint_symbol_8); + float4 const x_179 = *(tint_symbol_7); float2 const x_182 = x_34.resolution; uv = (float2(x_179.x, x_179.y) / x_182); color = float3(1.0f, 2.0f, 3.0f); - int const x_185 = (*(tint_symbol_9)).numbers.arr[0]; + int const x_185 = (*(tint_symbol_8)).numbers.arr[0]; float const x_188 = color.x; color.x = (x_188 + float(x_185)); float const x_192 = uv.x; if ((x_192 > 0.25f)) { - int const x_197 = (*(tint_symbol_9)).numbers.arr[1]; + int const x_197 = (*(tint_symbol_8)).numbers.arr[1]; float const x_200 = color.x; color.x = (x_200 + float(x_197)); } float const x_204 = uv.x; if ((x_204 > 0.5f)) { - int const x_209 = (*(tint_symbol_9)).numbers.arr[2]; + int const x_209 = (*(tint_symbol_8)).numbers.arr[2]; float const x_212 = color.y; color.y = (x_212 + float(x_209)); } float const x_216 = uv.x; if ((x_216 > 0.75f)) { - int const x_221 = (*(tint_symbol_9)).numbers.arr[3]; + int const x_221 = (*(tint_symbol_8)).numbers.arr[3]; float const x_224 = color.z; color.z = (x_224 + float(x_221)); } - int const x_228 = (*(tint_symbol_9)).numbers.arr[4]; + int const x_228 = (*(tint_symbol_8)).numbers.arr[4]; float const x_231 = color.y; color.y = (x_231 + float(x_228)); float const x_235 = uv.y; if ((x_235 > 0.25f)) { - int const x_240 = (*(tint_symbol_9)).numbers.arr[5]; + int const x_240 = (*(tint_symbol_8)).numbers.arr[5]; float const x_243 = color.x; color.x = (x_243 + float(x_240)); } float const x_247 = uv.y; if ((x_247 > 0.5f)) { - int const x_252 = (*(tint_symbol_9)).numbers.arr[6]; + int const x_252 = (*(tint_symbol_8)).numbers.arr[6]; float const x_255 = color.y; color.y = (x_255 + float(x_252)); } float const x_259 = uv.y; if ((x_259 > 0.75f)) { - int const x_264 = (*(tint_symbol_9)).numbers.arr[7]; + int const x_264 = (*(tint_symbol_8)).numbers.arr[7]; float const x_267 = color.z; color.z = (x_267 + float(x_264)); } - int const x_271 = (*(tint_symbol_9)).numbers.arr[8]; + int const x_271 = (*(tint_symbol_8)).numbers.arr[8]; float const x_274 = color.z; color.z = (x_274 + float(x_271)); float const x_278 = uv.x; float const x_280 = uv.y; if ((fabs((x_278 - x_280)) < 0.25f)) { - int const x_287 = (*(tint_symbol_9)).numbers.arr[9]; + int const x_287 = (*(tint_symbol_8)).numbers.arr[9]; float const x_290 = color.x; color.x = (x_290 + float(x_287)); } float3 const x_293 = color; float3 const x_294 = normalize(x_293); - *(tint_symbol_10) = float4(x_294.x, x_294.y, x_294.z, 1.0f); - float4 const x_299 = *(tint_symbol_7); - *(tint_symbol_11) = x_299; + *(tint_symbol_9) = float4(x_294.x, x_294.y, x_294.z, 1.0f); + float4 const x_299 = *(tint_symbol_6); + *(tint_symbol_10) = x_299; return; } +main_out tint_symbol_inner(constant buf0& x_34, float4 x_GLF_pos_param, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12, thread QuicksortObject* const tint_symbol_13, thread float4* const tint_symbol_14, thread float4* const tint_symbol_15) { + *(tint_symbol_11) = x_GLF_pos_param; + main_1(x_34, tint_symbol_11, tint_symbol_12, tint_symbol_13, tint_symbol_14, tint_symbol_15); + main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_14), .gl_Position=*(tint_symbol_15)}; + return tint_symbol_4; +} + vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_34 [[buffer(0)]]) { - thread float4 tint_symbol_12 = 0.0f; - thread float4 tint_symbol_13 = 0.0f; - thread QuicksortObject tint_symbol_14 = {}; - thread float4 tint_symbol_15 = 0.0f; thread float4 tint_symbol_16 = 0.0f; - float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param; - tint_symbol_12 = x_GLF_pos_param; - main_1(x_34, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16)); - main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_15, .gl_Position=tint_symbol_16}; - tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; + thread float4 tint_symbol_17 = 0.0f; + thread QuicksortObject tint_symbol_18 = {}; + thread float4 tint_symbol_19 = 0.0f; + thread float4 tint_symbol_20 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_34, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } -void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_17) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_21) { int temp = 0; int const x_302 = *(i); - int const x_304 = (*(tint_symbol_17)).numbers.arr[x_302]; + int const x_304 = (*(tint_symbol_21)).numbers.arr[x_302]; temp = x_304; int const x_305 = *(i); int const x_306 = *(j); - int const x_308 = (*(tint_symbol_17)).numbers.arr[x_306]; - (*(tint_symbol_17)).numbers.arr[x_305] = x_308; + int const x_308 = (*(tint_symbol_21)).numbers.arr[x_306]; + (*(tint_symbol_21)).numbers.arr[x_305] = x_308; int const x_310 = *(j); int const x_311 = temp; - (*(tint_symbol_17)).numbers.arr[x_310] = x_311; + (*(tint_symbol_21)).numbers.arr[x_310] = x_311; return; } -void quicksort_(thread QuicksortObject* const tint_symbol_18) { +void quicksort_(thread QuicksortObject* const tint_symbol_22) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -322,7 +328,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { param_4 = x_399; int const x_400 = h_1; param_5 = x_400; - int const x_401 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_18); + int const x_401 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_22); p = x_401; int const x_402 = p; int const x_404 = l_1; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.hlsl index dd128c452e..53c62af549 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.hlsl @@ -206,13 +206,19 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param; +main_out main_inner(float4 x_GLF_pos_param) { x_GLF_pos = x_GLF_pos_param; main_1(); - const main_out tint_symbol_3 = {frag_color, gl_Position}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position}; - return tint_symbol_5; + const main_out tint_symbol_4 = {frag_color, gl_Position}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } void swap_i1_i1_(inout int i, inout int j) { diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.msl index c4cabb8f27..cd63817508 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.msl @@ -22,7 +22,7 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_5) { int x_314 = 0; int x_315 = 0; int pivot = 0; @@ -33,7 +33,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_316 = *(h); - int const x_318 = (*(tint_symbol_6)).numbers.arr[x_316]; + int const x_318 = (*(tint_symbol_5)).numbers.arr[x_316]; pivot = x_318; int const x_319 = *(l); i_1 = as_type((as_type(x_319) - as_type(1))); @@ -47,7 +47,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_331 = j_1; - int const x_333 = (*(tint_symbol_6)).numbers.arr[x_331]; + int const x_333 = (*(tint_symbol_5)).numbers.arr[x_331]; int const x_334 = pivot; if ((x_333 <= x_334)) { int const x_338 = i_1; @@ -57,15 +57,15 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_341 = j_1; param_1 = x_341; int const x_342 = param; - int const x_344 = (*(tint_symbol_6)).numbers.arr[x_342]; + int const x_344 = (*(tint_symbol_5)).numbers.arr[x_342]; x_315 = x_344; int const x_345 = param; int const x_346 = param_1; - int const x_348 = (*(tint_symbol_6)).numbers.arr[x_346]; - (*(tint_symbol_6)).numbers.arr[x_345] = x_348; + int const x_348 = (*(tint_symbol_5)).numbers.arr[x_346]; + (*(tint_symbol_5)).numbers.arr[x_345] = x_348; int const x_350 = param_1; int const x_351 = x_315; - (*(tint_symbol_6)).numbers.arr[x_350] = x_351; + (*(tint_symbol_5)).numbers.arr[x_350] = x_351; } { int const x_353 = j_1; @@ -77,15 +77,15 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_357 = *(h); param_3 = x_357; int const x_358 = param_2; - int const x_360 = (*(tint_symbol_6)).numbers.arr[x_358]; + int const x_360 = (*(tint_symbol_5)).numbers.arr[x_358]; x_314 = x_360; int const x_361 = param_2; int const x_362 = param_3; - int const x_364 = (*(tint_symbol_6)).numbers.arr[x_362]; - (*(tint_symbol_6)).numbers.arr[x_361] = x_364; + int const x_364 = (*(tint_symbol_5)).numbers.arr[x_362]; + (*(tint_symbol_5)).numbers.arr[x_361] = x_364; int const x_366 = param_3; int const x_367 = x_314; - (*(tint_symbol_6)).numbers.arr[x_366] = x_367; + (*(tint_symbol_5)).numbers.arr[x_366] = x_367; if (false) { } else { int const x_372 = i_1; @@ -94,7 +94,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui return 0; } -void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8, thread QuicksortObject* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { +void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) { int x_91 = 0; int x_92 = 0; int x_93 = 0; @@ -105,8 +105,8 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread floa int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; - float4 const x_98 = *(tint_symbol_7); - *(tint_symbol_8) = ((x_98 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); + float4 const x_98 = *(tint_symbol_6); + *(tint_symbol_7) = ((x_98 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); i_2 = 0; while (true) { int const x_105 = i_2; @@ -116,13 +116,13 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread floa } int const x_108 = i_2; int const x_109 = i_2; - (*(tint_symbol_9)).numbers.arr[x_108] = as_type((as_type(10) - as_type(x_109))); + (*(tint_symbol_8)).numbers.arr[x_108] = as_type((as_type(10) - as_type(x_109))); int const x_112 = i_2; int const x_113 = i_2; - int const x_115 = (*(tint_symbol_9)).numbers.arr[x_113]; + int const x_115 = (*(tint_symbol_8)).numbers.arr[x_113]; int const x_116 = i_2; - int const x_118 = (*(tint_symbol_9)).numbers.arr[x_116]; - (*(tint_symbol_9)).numbers.arr[x_112] = as_type((as_type(x_115) * as_type(x_118))); + int const x_118 = (*(tint_symbol_8)).numbers.arr[x_116]; + (*(tint_symbol_8)).numbers.arr[x_112] = as_type((as_type(x_115) * as_type(x_118))); { int const x_121 = i_2; i_2 = as_type((as_type(x_121) + as_type(1))); @@ -159,7 +159,7 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread floa x_96 = x_146; int const x_147 = x_92; x_97 = x_147; - int const x_148 = performPartition_i1_i1_(&(x_96), &(x_97), tint_symbol_9); + int const x_148 = performPartition_i1_i1_(&(x_96), &(x_97), tint_symbol_8); x_95 = x_148; int const x_149 = x_95; int const x_151 = x_91; @@ -190,100 +190,106 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread floa x_94.arr[x_176] = x_177; } } - float4 const x_179 = *(tint_symbol_8); + float4 const x_179 = *(tint_symbol_7); float2 const x_182 = x_34.resolution; uv = (float2(x_179.x, x_179.y) / x_182); color = float3(1.0f, 2.0f, 3.0f); - int const x_185 = (*(tint_symbol_9)).numbers.arr[0]; + int const x_185 = (*(tint_symbol_8)).numbers.arr[0]; float const x_188 = color.x; color.x = (x_188 + float(x_185)); float const x_192 = uv.x; if ((x_192 > 0.25f)) { - int const x_197 = (*(tint_symbol_9)).numbers.arr[1]; + int const x_197 = (*(tint_symbol_8)).numbers.arr[1]; float const x_200 = color.x; color.x = (x_200 + float(x_197)); } float const x_204 = uv.x; if ((x_204 > 0.5f)) { - int const x_209 = (*(tint_symbol_9)).numbers.arr[2]; + int const x_209 = (*(tint_symbol_8)).numbers.arr[2]; float const x_212 = color.y; color.y = (x_212 + float(x_209)); } float const x_216 = uv.x; if ((x_216 > 0.75f)) { - int const x_221 = (*(tint_symbol_9)).numbers.arr[3]; + int const x_221 = (*(tint_symbol_8)).numbers.arr[3]; float const x_224 = color.z; color.z = (x_224 + float(x_221)); } - int const x_228 = (*(tint_symbol_9)).numbers.arr[4]; + int const x_228 = (*(tint_symbol_8)).numbers.arr[4]; float const x_231 = color.y; color.y = (x_231 + float(x_228)); float const x_235 = uv.y; if ((x_235 > 0.25f)) { - int const x_240 = (*(tint_symbol_9)).numbers.arr[5]; + int const x_240 = (*(tint_symbol_8)).numbers.arr[5]; float const x_243 = color.x; color.x = (x_243 + float(x_240)); } float const x_247 = uv.y; if ((x_247 > 0.5f)) { - int const x_252 = (*(tint_symbol_9)).numbers.arr[6]; + int const x_252 = (*(tint_symbol_8)).numbers.arr[6]; float const x_255 = color.y; color.y = (x_255 + float(x_252)); } float const x_259 = uv.y; if ((x_259 > 0.75f)) { - int const x_264 = (*(tint_symbol_9)).numbers.arr[7]; + int const x_264 = (*(tint_symbol_8)).numbers.arr[7]; float const x_267 = color.z; color.z = (x_267 + float(x_264)); } - int const x_271 = (*(tint_symbol_9)).numbers.arr[8]; + int const x_271 = (*(tint_symbol_8)).numbers.arr[8]; float const x_274 = color.z; color.z = (x_274 + float(x_271)); float const x_278 = uv.x; float const x_280 = uv.y; if ((fabs((x_278 - x_280)) < 0.25f)) { - int const x_287 = (*(tint_symbol_9)).numbers.arr[9]; + int const x_287 = (*(tint_symbol_8)).numbers.arr[9]; float const x_290 = color.x; color.x = (x_290 + float(x_287)); } float3 const x_293 = color; float3 const x_294 = normalize(x_293); - *(tint_symbol_10) = float4(x_294.x, x_294.y, x_294.z, 1.0f); - float4 const x_299 = *(tint_symbol_7); - *(tint_symbol_11) = x_299; + *(tint_symbol_9) = float4(x_294.x, x_294.y, x_294.z, 1.0f); + float4 const x_299 = *(tint_symbol_6); + *(tint_symbol_10) = x_299; return; } +main_out tint_symbol_inner(constant buf0& x_34, float4 x_GLF_pos_param, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12, thread QuicksortObject* const tint_symbol_13, thread float4* const tint_symbol_14, thread float4* const tint_symbol_15) { + *(tint_symbol_11) = x_GLF_pos_param; + main_1(x_34, tint_symbol_11, tint_symbol_12, tint_symbol_13, tint_symbol_14, tint_symbol_15); + main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_14), .gl_Position=*(tint_symbol_15)}; + return tint_symbol_4; +} + vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_34 [[buffer(0)]]) { - thread float4 tint_symbol_12 = 0.0f; - thread float4 tint_symbol_13 = 0.0f; - thread QuicksortObject tint_symbol_14 = {}; - thread float4 tint_symbol_15 = 0.0f; thread float4 tint_symbol_16 = 0.0f; - float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param; - tint_symbol_12 = x_GLF_pos_param; - main_1(x_34, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16)); - main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_15, .gl_Position=tint_symbol_16}; - tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; + thread float4 tint_symbol_17 = 0.0f; + thread QuicksortObject tint_symbol_18 = {}; + thread float4 tint_symbol_19 = 0.0f; + thread float4 tint_symbol_20 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_34, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } -void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_17) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_21) { int temp = 0; int const x_302 = *(i); - int const x_304 = (*(tint_symbol_17)).numbers.arr[x_302]; + int const x_304 = (*(tint_symbol_21)).numbers.arr[x_302]; temp = x_304; int const x_305 = *(i); int const x_306 = *(j); - int const x_308 = (*(tint_symbol_17)).numbers.arr[x_306]; - (*(tint_symbol_17)).numbers.arr[x_305] = x_308; + int const x_308 = (*(tint_symbol_21)).numbers.arr[x_306]; + (*(tint_symbol_21)).numbers.arr[x_305] = x_308; int const x_310 = *(j); int const x_311 = temp; - (*(tint_symbol_17)).numbers.arr[x_310] = x_311; + (*(tint_symbol_21)).numbers.arr[x_310] = x_311; return; } -void quicksort_(thread QuicksortObject* const tint_symbol_18) { +void quicksort_(thread QuicksortObject* const tint_symbol_22) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -322,7 +328,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { param_4 = x_399; int const x_400 = h_1; param_5 = x_400; - int const x_401 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_18); + int const x_401 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_22); p = x_401; int const x_402 = p; int const x_404 = l_1; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.hlsl index 231fdaf925..070307a0d1 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.hlsl @@ -215,11 +215,17 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param; +main_out main_inner(float4 x_GLF_pos_param) { x_GLF_pos = x_GLF_pos_param; main_1(); - const main_out tint_symbol_3 = {frag_color, gl_Position}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position}; - return tint_symbol_6; + const main_out tint_symbol_5 = {frag_color, gl_Position}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl index f8dc575a9c..e6931e1981 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl @@ -25,22 +25,22 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_6) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) { int temp = 0; int const x_257 = *(i); - int const x_259 = (*(tint_symbol_6)).numbers.arr[x_257]; + int const x_259 = (*(tint_symbol_5)).numbers.arr[x_257]; temp = x_259; int const x_260 = *(i); int const x_261 = *(j); - int const x_263 = (*(tint_symbol_6)).numbers.arr[x_261]; - (*(tint_symbol_6)).numbers.arr[x_260] = x_263; + int const x_263 = (*(tint_symbol_5)).numbers.arr[x_261]; + (*(tint_symbol_5)).numbers.arr[x_260] = x_263; int const x_265 = *(j); int const x_266 = temp; - (*(tint_symbol_6)).numbers.arr[x_265] = x_266; + (*(tint_symbol_5)).numbers.arr[x_265] = x_266; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_7) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -49,7 +49,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_269 = *(h); - int const x_271 = (*(tint_symbol_7)).numbers.arr[x_269]; + int const x_271 = (*(tint_symbol_6)).numbers.arr[x_269]; pivot = x_271; int const x_272 = *(l); i_1 = as_type((as_type(x_272) - as_type(1))); @@ -63,7 +63,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_284 = j_1; - int const x_286 = (*(tint_symbol_7)).numbers.arr[x_284]; + int const x_286 = (*(tint_symbol_6)).numbers.arr[x_284]; int const x_287 = pivot; if ((x_286 <= x_287)) { int const x_291 = i_1; @@ -72,7 +72,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_293; int const x_294 = j_1; param_1 = x_294; - swap_i1_i1_(&(param), &(param_1), tint_symbol_7); + swap_i1_i1_(&(param), &(param_1), tint_symbol_6); } { int const x_296 = j_1; @@ -83,12 +83,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = as_type((as_type(x_298) + as_type(1))); int const x_300 = *(h); param_3 = x_300; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7); + swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6); int const x_302 = i_1; return as_type((as_type(x_302) + as_type(1))); } -void quicksort_(thread QuicksortObject* const tint_symbol_8) { +void quicksort_(thread QuicksortObject* const tint_symbol_7) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -127,7 +127,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { param_4 = x_328; int const x_329 = h_1; param_5 = x_329; - int const x_330 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8); + int const x_330 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7); p = x_330; int const x_331 = p; int const x_333 = l_1; @@ -161,12 +161,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { return; } -void main_1(constant buf1& x_34, constant buf0& x_37, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12, thread float4* const tint_symbol_13) { +void main_1(constant buf1& x_34, constant buf0& x_37, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; - float4 const x_94 = *(tint_symbol_9); - *(tint_symbol_10) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); + float4 const x_94 = *(tint_symbol_8); + *(tint_symbol_9) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); i_2 = 0; while (true) { int const x_101 = i_2; @@ -176,97 +176,103 @@ void main_1(constant buf1& x_34, constant buf0& x_37, thread float4* const tint_ } int const x_104 = i_2; int const x_105 = i_2; - (*(tint_symbol_11)).numbers.arr[x_104] = as_type((as_type(10) - as_type(x_105))); + (*(tint_symbol_10)).numbers.arr[x_104] = as_type((as_type(10) - as_type(x_105))); int const x_108 = i_2; int const x_109 = i_2; - int const x_111 = (*(tint_symbol_11)).numbers.arr[x_109]; + int const x_111 = (*(tint_symbol_10)).numbers.arr[x_109]; int const x_112 = i_2; - int const x_114 = (*(tint_symbol_11)).numbers.arr[x_112]; - (*(tint_symbol_11)).numbers.arr[x_108] = as_type((as_type(x_111) * as_type(x_114))); + int const x_114 = (*(tint_symbol_10)).numbers.arr[x_112]; + (*(tint_symbol_10)).numbers.arr[x_108] = as_type((as_type(x_111) * as_type(x_114))); { int const x_117 = i_2; i_2 = as_type((as_type(x_117) + as_type(1))); } } - quicksort_(tint_symbol_11); - float4 const x_120 = *(tint_symbol_10); + quicksort_(tint_symbol_10); + float4 const x_120 = *(tint_symbol_9); float2 const x_123 = x_34.resolution; uv = (float2(x_120.x, x_120.y) / x_123); color = float3(1.0f, 2.0f, 3.0f); - int const x_126 = (*(tint_symbol_11)).numbers.arr[0]; + int const x_126 = (*(tint_symbol_10)).numbers.arr[0]; float const x_129 = color.x; color.x = (x_129 + float(x_126)); float const x_133 = uv.x; if ((x_133 > 0.25f)) { - int const x_138 = (*(tint_symbol_11)).numbers.arr[1]; + int const x_138 = (*(tint_symbol_10)).numbers.arr[1]; float const x_141 = color.x; color.x = (x_141 + float(x_138)); } float const x_145 = uv.x; if ((x_145 > 0.5f)) { float const x_150 = x_37.injectionSwitch.y; - int const x_155 = (*(tint_symbol_11)).numbers.arr[max(as_type((as_type(2) * as_type(int(x_150)))), 2)]; + int const x_155 = (*(tint_symbol_10)).numbers.arr[max(as_type((as_type(2) * as_type(int(x_150)))), 2)]; float const x_158 = x_37.injectionSwitch.y; - int const x_163 = (*(tint_symbol_11)).numbers.arr[max(as_type((as_type(2) * as_type(int(x_158)))), 2)]; + int const x_163 = (*(tint_symbol_10)).numbers.arr[max(as_type((as_type(2) * as_type(int(x_158)))), 2)]; float const x_167 = color.y; color.y = (x_167 + fmax(float(x_155), float(x_163))); } float const x_171 = uv.x; if ((x_171 > 0.75f)) { - int const x_176 = (*(tint_symbol_11)).numbers.arr[3]; + int const x_176 = (*(tint_symbol_10)).numbers.arr[3]; float const x_179 = color.z; color.z = (x_179 + float(x_176)); } - int const x_183 = (*(tint_symbol_11)).numbers.arr[4]; + int const x_183 = (*(tint_symbol_10)).numbers.arr[4]; float const x_186 = color.y; color.y = (x_186 + float(x_183)); float const x_190 = uv.y; if ((x_190 > 0.25f)) { - int const x_195 = (*(tint_symbol_11)).numbers.arr[5]; + int const x_195 = (*(tint_symbol_10)).numbers.arr[5]; float const x_198 = color.x; color.x = (x_198 + float(x_195)); } float const x_202 = uv.y; if ((x_202 > 0.5f)) { - int const x_207 = (*(tint_symbol_11)).numbers.arr[6]; + int const x_207 = (*(tint_symbol_10)).numbers.arr[6]; float const x_210 = color.y; color.y = (x_210 + float(x_207)); } float const x_214 = uv.y; if ((x_214 > 0.75f)) { - int const x_219 = (*(tint_symbol_11)).numbers.arr[7]; + int const x_219 = (*(tint_symbol_10)).numbers.arr[7]; float const x_222 = color.z; color.z = (x_222 + float(x_219)); } - int const x_226 = (*(tint_symbol_11)).numbers.arr[8]; + int const x_226 = (*(tint_symbol_10)).numbers.arr[8]; float const x_229 = color.z; color.z = (x_229 + float(x_226)); float const x_233 = uv.x; float const x_235 = uv.y; if ((fabs((x_233 - x_235)) < 0.25f)) { - int const x_242 = (*(tint_symbol_11)).numbers.arr[9]; + int const x_242 = (*(tint_symbol_10)).numbers.arr[9]; float const x_245 = color.x; color.x = (x_245 + float(x_242)); } float3 const x_248 = color; float3 const x_249 = normalize(x_248); - *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f); - float4 const x_254 = *(tint_symbol_9); - *(tint_symbol_13) = x_254; + *(tint_symbol_11) = float4(x_249.x, x_249.y, x_249.z, 1.0f); + float4 const x_254 = *(tint_symbol_8); + *(tint_symbol_12) = x_254; return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf1& x_34 [[buffer(1)]], constant buf0& x_37 [[buffer(0)]]) { - thread float4 tint_symbol_14 = 0.0f; - thread float4 tint_symbol_15 = 0.0f; - thread QuicksortObject tint_symbol_16 = {}; - thread float4 tint_symbol_17 = 0.0f; - thread float4 tint_symbol_18 = 0.0f; - float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param; - tint_symbol_14 = x_GLF_pos_param; - main_1(x_34, x_37, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); - main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_17, .gl_Position=tint_symbol_18}; - tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf1& x_34, constant buf0& x_37, float4 x_GLF_pos_param, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14, thread QuicksortObject* const tint_symbol_15, thread float4* const tint_symbol_16, thread float4* const tint_symbol_17) { + *(tint_symbol_13) = x_GLF_pos_param; + main_1(x_34, x_37, tint_symbol_13, tint_symbol_14, tint_symbol_15, tint_symbol_16, tint_symbol_17); + main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_16), .gl_Position=*(tint_symbol_17)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf1& x_34 [[buffer(1)]], constant buf0& x_37 [[buffer(0)]]) { + thread float4 tint_symbol_18 = 0.0f; + thread float4 tint_symbol_19 = 0.0f; + thread QuicksortObject tint_symbol_20 = {}; + thread float4 tint_symbol_21 = 0.0f; + thread float4 tint_symbol_22 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_34, x_37, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20), &(tint_symbol_21), &(tint_symbol_22)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.hlsl index 231fdaf925..070307a0d1 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.hlsl @@ -215,11 +215,17 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param; +main_out main_inner(float4 x_GLF_pos_param) { x_GLF_pos = x_GLF_pos_param; main_1(); - const main_out tint_symbol_3 = {frag_color, gl_Position}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position}; - return tint_symbol_6; + const main_out tint_symbol_5 = {frag_color, gl_Position}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl index f8dc575a9c..e6931e1981 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl @@ -25,22 +25,22 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_6) { +void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) { int temp = 0; int const x_257 = *(i); - int const x_259 = (*(tint_symbol_6)).numbers.arr[x_257]; + int const x_259 = (*(tint_symbol_5)).numbers.arr[x_257]; temp = x_259; int const x_260 = *(i); int const x_261 = *(j); - int const x_263 = (*(tint_symbol_6)).numbers.arr[x_261]; - (*(tint_symbol_6)).numbers.arr[x_260] = x_263; + int const x_263 = (*(tint_symbol_5)).numbers.arr[x_261]; + (*(tint_symbol_5)).numbers.arr[x_260] = x_263; int const x_265 = *(j); int const x_266 = temp; - (*(tint_symbol_6)).numbers.arr[x_265] = x_266; + (*(tint_symbol_5)).numbers.arr[x_265] = x_266; return; } -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_7) { +int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) { int pivot = 0; int i_1 = 0; int j_1 = 0; @@ -49,7 +49,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int param_2 = 0; int param_3 = 0; int const x_269 = *(h); - int const x_271 = (*(tint_symbol_7)).numbers.arr[x_269]; + int const x_271 = (*(tint_symbol_6)).numbers.arr[x_269]; pivot = x_271; int const x_272 = *(l); i_1 = as_type((as_type(x_272) - as_type(1))); @@ -63,7 +63,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui break; } int const x_284 = j_1; - int const x_286 = (*(tint_symbol_7)).numbers.arr[x_284]; + int const x_286 = (*(tint_symbol_6)).numbers.arr[x_284]; int const x_287 = pivot; if ((x_286 <= x_287)) { int const x_291 = i_1; @@ -72,7 +72,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param = x_293; int const x_294 = j_1; param_1 = x_294; - swap_i1_i1_(&(param), &(param_1), tint_symbol_7); + swap_i1_i1_(&(param), &(param_1), tint_symbol_6); } { int const x_296 = j_1; @@ -83,12 +83,12 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui param_2 = as_type((as_type(x_298) + as_type(1))); int const x_300 = *(h); param_3 = x_300; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7); + swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6); int const x_302 = i_1; return as_type((as_type(x_302) + as_type(1))); } -void quicksort_(thread QuicksortObject* const tint_symbol_8) { +void quicksort_(thread QuicksortObject* const tint_symbol_7) { int l_1 = 0; int h_1 = 0; int top = 0; @@ -127,7 +127,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { param_4 = x_328; int const x_329 = h_1; param_5 = x_329; - int const x_330 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8); + int const x_330 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7); p = x_330; int const x_331 = p; int const x_333 = l_1; @@ -161,12 +161,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { return; } -void main_1(constant buf1& x_34, constant buf0& x_37, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12, thread float4* const tint_symbol_13) { +void main_1(constant buf1& x_34, constant buf0& x_37, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) { int i_2 = 0; float2 uv = 0.0f; float3 color = 0.0f; - float4 const x_94 = *(tint_symbol_9); - *(tint_symbol_10) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); + float4 const x_94 = *(tint_symbol_8); + *(tint_symbol_9) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f)); i_2 = 0; while (true) { int const x_101 = i_2; @@ -176,97 +176,103 @@ void main_1(constant buf1& x_34, constant buf0& x_37, thread float4* const tint_ } int const x_104 = i_2; int const x_105 = i_2; - (*(tint_symbol_11)).numbers.arr[x_104] = as_type((as_type(10) - as_type(x_105))); + (*(tint_symbol_10)).numbers.arr[x_104] = as_type((as_type(10) - as_type(x_105))); int const x_108 = i_2; int const x_109 = i_2; - int const x_111 = (*(tint_symbol_11)).numbers.arr[x_109]; + int const x_111 = (*(tint_symbol_10)).numbers.arr[x_109]; int const x_112 = i_2; - int const x_114 = (*(tint_symbol_11)).numbers.arr[x_112]; - (*(tint_symbol_11)).numbers.arr[x_108] = as_type((as_type(x_111) * as_type(x_114))); + int const x_114 = (*(tint_symbol_10)).numbers.arr[x_112]; + (*(tint_symbol_10)).numbers.arr[x_108] = as_type((as_type(x_111) * as_type(x_114))); { int const x_117 = i_2; i_2 = as_type((as_type(x_117) + as_type(1))); } } - quicksort_(tint_symbol_11); - float4 const x_120 = *(tint_symbol_10); + quicksort_(tint_symbol_10); + float4 const x_120 = *(tint_symbol_9); float2 const x_123 = x_34.resolution; uv = (float2(x_120.x, x_120.y) / x_123); color = float3(1.0f, 2.0f, 3.0f); - int const x_126 = (*(tint_symbol_11)).numbers.arr[0]; + int const x_126 = (*(tint_symbol_10)).numbers.arr[0]; float const x_129 = color.x; color.x = (x_129 + float(x_126)); float const x_133 = uv.x; if ((x_133 > 0.25f)) { - int const x_138 = (*(tint_symbol_11)).numbers.arr[1]; + int const x_138 = (*(tint_symbol_10)).numbers.arr[1]; float const x_141 = color.x; color.x = (x_141 + float(x_138)); } float const x_145 = uv.x; if ((x_145 > 0.5f)) { float const x_150 = x_37.injectionSwitch.y; - int const x_155 = (*(tint_symbol_11)).numbers.arr[max(as_type((as_type(2) * as_type(int(x_150)))), 2)]; + int const x_155 = (*(tint_symbol_10)).numbers.arr[max(as_type((as_type(2) * as_type(int(x_150)))), 2)]; float const x_158 = x_37.injectionSwitch.y; - int const x_163 = (*(tint_symbol_11)).numbers.arr[max(as_type((as_type(2) * as_type(int(x_158)))), 2)]; + int const x_163 = (*(tint_symbol_10)).numbers.arr[max(as_type((as_type(2) * as_type(int(x_158)))), 2)]; float const x_167 = color.y; color.y = (x_167 + fmax(float(x_155), float(x_163))); } float const x_171 = uv.x; if ((x_171 > 0.75f)) { - int const x_176 = (*(tint_symbol_11)).numbers.arr[3]; + int const x_176 = (*(tint_symbol_10)).numbers.arr[3]; float const x_179 = color.z; color.z = (x_179 + float(x_176)); } - int const x_183 = (*(tint_symbol_11)).numbers.arr[4]; + int const x_183 = (*(tint_symbol_10)).numbers.arr[4]; float const x_186 = color.y; color.y = (x_186 + float(x_183)); float const x_190 = uv.y; if ((x_190 > 0.25f)) { - int const x_195 = (*(tint_symbol_11)).numbers.arr[5]; + int const x_195 = (*(tint_symbol_10)).numbers.arr[5]; float const x_198 = color.x; color.x = (x_198 + float(x_195)); } float const x_202 = uv.y; if ((x_202 > 0.5f)) { - int const x_207 = (*(tint_symbol_11)).numbers.arr[6]; + int const x_207 = (*(tint_symbol_10)).numbers.arr[6]; float const x_210 = color.y; color.y = (x_210 + float(x_207)); } float const x_214 = uv.y; if ((x_214 > 0.75f)) { - int const x_219 = (*(tint_symbol_11)).numbers.arr[7]; + int const x_219 = (*(tint_symbol_10)).numbers.arr[7]; float const x_222 = color.z; color.z = (x_222 + float(x_219)); } - int const x_226 = (*(tint_symbol_11)).numbers.arr[8]; + int const x_226 = (*(tint_symbol_10)).numbers.arr[8]; float const x_229 = color.z; color.z = (x_229 + float(x_226)); float const x_233 = uv.x; float const x_235 = uv.y; if ((fabs((x_233 - x_235)) < 0.25f)) { - int const x_242 = (*(tint_symbol_11)).numbers.arr[9]; + int const x_242 = (*(tint_symbol_10)).numbers.arr[9]; float const x_245 = color.x; color.x = (x_245 + float(x_242)); } float3 const x_248 = color; float3 const x_249 = normalize(x_248); - *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f); - float4 const x_254 = *(tint_symbol_9); - *(tint_symbol_13) = x_254; + *(tint_symbol_11) = float4(x_249.x, x_249.y, x_249.z, 1.0f); + float4 const x_254 = *(tint_symbol_8); + *(tint_symbol_12) = x_254; return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf1& x_34 [[buffer(1)]], constant buf0& x_37 [[buffer(0)]]) { - thread float4 tint_symbol_14 = 0.0f; - thread float4 tint_symbol_15 = 0.0f; - thread QuicksortObject tint_symbol_16 = {}; - thread float4 tint_symbol_17 = 0.0f; - thread float4 tint_symbol_18 = 0.0f; - float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param; - tint_symbol_14 = x_GLF_pos_param; - main_1(x_34, x_37, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18)); - main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_17, .gl_Position=tint_symbol_18}; - tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(constant buf1& x_34, constant buf0& x_37, float4 x_GLF_pos_param, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14, thread QuicksortObject* const tint_symbol_15, thread float4* const tint_symbol_16, thread float4* const tint_symbol_17) { + *(tint_symbol_13) = x_GLF_pos_param; + main_1(x_34, x_37, tint_symbol_13, tint_symbol_14, tint_symbol_15, tint_symbol_16, tint_symbol_17); + main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_16), .gl_Position=*(tint_symbol_17)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf1& x_34 [[buffer(1)]], constant buf0& x_37 [[buffer(0)]]) { + thread float4 tint_symbol_18 = 0.0f; + thread float4 tint_symbol_19 = 0.0f; + thread QuicksortObject tint_symbol_20 = {}; + thread float4 tint_symbol_21 = 0.0f; + thread float4 tint_symbol_22 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_34, x_37, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20), &(tint_symbol_21), &(tint_symbol_22)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.frag_color_1 = inner_result.frag_color_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.hlsl index 69f3fe68ce..f5639d72cd 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.hlsl @@ -61,23 +61,23 @@ float4 match_vf2_(inout float2 pos_1) { const int x_174 = i; const float2 x_175 = pos_1; param = x_175; - const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable = tint_symbol_4; const float4 x_177 = indexable[x_174]; param_1 = x_177; const bool x_178 = collision_vf2_vf4_(param, param_1); if (x_178) { const int x_181 = i; - const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable_1 = tint_symbol_6; + const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable_1 = tint_symbol_5; const float x_183 = indexable_1[x_181].x; const int x_185 = i; - const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable_2 = tint_symbol_7; + const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable_2 = tint_symbol_6; const float x_187 = indexable_2[x_185].y; const int x_190 = i; - const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable_3 = tint_symbol_8; + const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable_3 = tint_symbol_7; const float4 x_196 = indexable_3[((((int(x_183) * int(x_187)) + (x_190 * 9)) + 11) % 16)]; res = x_196; } @@ -109,11 +109,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; + const main_out tint_symbol_8 = {x_GLF_color}; + return tint_symbol_8; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.msl index 29a6f013c9..b78cdb2dcf 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.msl @@ -13,7 +13,7 @@ struct tint_array_wrapper_1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -43,7 +43,7 @@ bool collision_vf2_vf4_(thread float2* const pos, thread float4* const quad) { return true; } -float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_9) { +float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_7) { float4 res = 0.0f; float x_144 = 0.0f; float x_145 = 0.0f; @@ -54,13 +54,13 @@ float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_9 tint_array_wrapper indexable_1 = {}; tint_array_wrapper indexable_2 = {}; tint_array_wrapper_1 indexable_3 = {}; - float const x_147 = (*(tint_symbol_9)).x; + float const x_147 = (*(tint_symbol_7)).x; if ((x_147 < 0.0f)) { x_144 = -1.0f; } else { - float const x_153 = (*(tint_symbol_9)).x; + float const x_153 = (*(tint_symbol_7)).x; if ((x_153 >= 0.0f)) { - float const x_159 = (*(tint_symbol_9)).x; + float const x_159 = (*(tint_symbol_7)).x; x_145 = select(1.0f, 0.5f, (x_159 >= 0.0f)); } else { x_145 = 1.0f; @@ -80,23 +80,23 @@ float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_9 int const x_174 = i; float2 const x_175 = *(pos_1); param = x_175; - tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable = tint_symbol_2; float4 const x_177 = indexable.arr[x_174]; param_1 = x_177; bool const x_178 = collision_vf2_vf4_(&(param), &(param_1)); if (x_178) { int const x_181 = i; - tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable_1 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable_1 = tint_symbol_3; float const x_183 = indexable_1.arr[x_181].x; int const x_185 = i; - tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable_2 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable_2 = tint_symbol_4; float const x_187 = indexable_2.arr[x_185].y; int const x_190 = i; - tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable_3 = tint_symbol_7; + tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable_3 = tint_symbol_5; float4 const x_196 = indexable_3.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_183)) * as_type(int(x_187))))) + as_type(as_type((as_type(x_190) * as_type(9))))))) + as_type(11))) % 16)]; res = x_196; } @@ -109,28 +109,34 @@ float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_9 return x_199; } -void main_1(constant buf0& x_20, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { +void main_1(constant buf0& x_20, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { float2 lin = 0.0f; float2 param_2 = 0.0f; - float4 const x_98 = *(tint_symbol_10); + float4 const x_98 = *(tint_symbol_8); float2 const x_101 = x_20.resolution; lin = (float2(x_98.x, x_98.y) / x_101); float2 const x_103 = lin; lin = floor((x_103 * 32.0f)); float2 const x_106 = lin; param_2 = x_106; - float4 const x_107 = match_vf2_(&(param_2), tint_symbol_10); - *(tint_symbol_11) = x_107; + float4 const x_107 = match_vf2_(&(param_2), tint_symbol_8); + *(tint_symbol_9) = x_107; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) { - thread float4 tint_symbol_12 = 0.0f; - thread float4 tint_symbol_13 = 0.0f; - tint_symbol_12 = gl_FragCoord_param; - main_1(x_20, &(tint_symbol_12), &(tint_symbol_13)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13}; - tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; +main_out tint_symbol_inner(constant buf0& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { + *(tint_symbol_10) = gl_FragCoord_param; + main_1(x_20, tint_symbol_10, tint_symbol_11); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_11)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) { + thread float4 tint_symbol_12 = 0.0f; + thread float4 tint_symbol_13 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_20, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.hlsl index 69f3fe68ce..f5639d72cd 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.hlsl @@ -61,23 +61,23 @@ float4 match_vf2_(inout float2 pos_1) { const int x_174 = i; const float2 x_175 = pos_1; param = x_175; - const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable = tint_symbol_5; + const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable = tint_symbol_4; const float4 x_177 = indexable[x_174]; param_1 = x_177; const bool x_178 = collision_vf2_vf4_(param, param_1); if (x_178) { const int x_181 = i; - const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable_1 = tint_symbol_6; + const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable_1 = tint_symbol_5; const float x_183 = indexable_1[x_181].x; const int x_185 = i; - const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; - indexable_2 = tint_symbol_7; + const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}; + indexable_2 = tint_symbol_6; const float x_187 = indexable_2[x_185].y; const int x_190 = i; - const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; - indexable_3 = tint_symbol_8; + const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}; + indexable_3 = tint_symbol_7; const float4 x_196 = indexable_3[((((int(x_183) * int(x_187)) + (x_190 * 9)) + 11) % 16)]; res = x_196; } @@ -109,11 +109,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_9; + const main_out tint_symbol_8 = {x_GLF_color}; + return tint_symbol_8; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.msl index 29a6f013c9..b78cdb2dcf 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.msl @@ -13,7 +13,7 @@ struct tint_array_wrapper_1 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -43,7 +43,7 @@ bool collision_vf2_vf4_(thread float2* const pos, thread float4* const quad) { return true; } -float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_9) { +float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_7) { float4 res = 0.0f; float x_144 = 0.0f; float x_145 = 0.0f; @@ -54,13 +54,13 @@ float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_9 tint_array_wrapper indexable_1 = {}; tint_array_wrapper indexable_2 = {}; tint_array_wrapper_1 indexable_3 = {}; - float const x_147 = (*(tint_symbol_9)).x; + float const x_147 = (*(tint_symbol_7)).x; if ((x_147 < 0.0f)) { x_144 = -1.0f; } else { - float const x_153 = (*(tint_symbol_9)).x; + float const x_153 = (*(tint_symbol_7)).x; if ((x_153 >= 0.0f)) { - float const x_159 = (*(tint_symbol_9)).x; + float const x_159 = (*(tint_symbol_7)).x; x_145 = select(1.0f, 0.5f, (x_159 >= 0.0f)); } else { x_145 = 1.0f; @@ -80,23 +80,23 @@ float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_9 int const x_174 = i; float2 const x_175 = *(pos_1); param = x_175; - tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable = tint_symbol_4; + tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable = tint_symbol_2; float4 const x_177 = indexable.arr[x_174]; param_1 = x_177; bool const x_178 = collision_vf2_vf4_(&(param), &(param_1)); if (x_178) { int const x_181 = i; - tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable_1 = tint_symbol_5; + tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable_1 = tint_symbol_3; float const x_183 = indexable_1.arr[x_181].x; int const x_185 = i; - tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; - indexable_2 = tint_symbol_6; + tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}}; + indexable_2 = tint_symbol_4; float const x_187 = indexable_2.arr[x_185].y; int const x_190 = i; - tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; - indexable_3 = tint_symbol_7; + tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; + indexable_3 = tint_symbol_5; float4 const x_196 = indexable_3.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_183)) * as_type(int(x_187))))) + as_type(as_type((as_type(x_190) * as_type(9))))))) + as_type(11))) % 16)]; res = x_196; } @@ -109,28 +109,34 @@ float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_9 return x_199; } -void main_1(constant buf0& x_20, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { +void main_1(constant buf0& x_20, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { float2 lin = 0.0f; float2 param_2 = 0.0f; - float4 const x_98 = *(tint_symbol_10); + float4 const x_98 = *(tint_symbol_8); float2 const x_101 = x_20.resolution; lin = (float2(x_98.x, x_98.y) / x_101); float2 const x_103 = lin; lin = floor((x_103 * 32.0f)); float2 const x_106 = lin; param_2 = x_106; - float4 const x_107 = match_vf2_(&(param_2), tint_symbol_10); - *(tint_symbol_11) = x_107; + float4 const x_107 = match_vf2_(&(param_2), tint_symbol_8); + *(tint_symbol_9) = x_107; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) { - thread float4 tint_symbol_12 = 0.0f; - thread float4 tint_symbol_13 = 0.0f; - tint_symbol_12 = gl_FragCoord_param; - main_1(x_20, &(tint_symbol_12), &(tint_symbol_13)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13}; - tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_8; +main_out tint_symbol_inner(constant buf0& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { + *(tint_symbol_10) = gl_FragCoord_param; + main_1(x_20, tint_symbol_10, tint_symbol_11); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_11)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) { + thread float4 tint_symbol_12 = 0.0f; + thread float4 tint_symbol_13 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_20, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.hlsl index 4b03ca900b..e9c78542d4 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.hlsl @@ -133,11 +133,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.msl index 43a265bac2..e876cbc203 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -110,13 +110,13 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(thread float2* const p, thread float2* cons return x_173; } -void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_24, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 pos = 0.0f; float2 param_6 = 0.0f; float2 param_7 = 0.0f; float2 param_8 = 0.0f; float2 param_9 = 0.0f; - float4 const x_67 = *(tint_symbol_5); + float4 const x_67 = *(tint_symbol_3); float2 const x_70 = x_24.resolution; float2 const x_71 = (float2(x_67.x, x_67.y) / x_70); pos = x_71; @@ -126,20 +126,26 @@ void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread floa param_9 = float2(0.100000001f, 0.400000006f); int const x_72 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9)); if ((x_72 == 1)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_24, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_24, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_24, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_24, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.hlsl index fd9d668103..b3d0880541 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.hlsl @@ -149,11 +149,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.msl index c8cbf19939..7cbe87b224 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -110,13 +110,13 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(thread float2* const p, thread float2* cons return x_173; } -void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_24, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 pos = 0.0f; float2 param_6 = 0.0f; float2 param_7 = 0.0f; float2 param_8 = 0.0f; float2 param_9 = 0.0f; - float4 const x_67 = *(tint_symbol_5); + float4 const x_67 = *(tint_symbol_3); float2 const x_70 = x_24.resolution; float2 const x_71 = (float2(x_67.x, x_67.y) / x_70); pos = x_71; @@ -126,20 +126,26 @@ void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread floa param_9 = float2(0.100000001f, 0.400000006f); int const x_72 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9)); if ((x_72 == 1)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_24, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_24, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_24, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_24, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.hlsl index 6a8726939a..1bf883a3c8 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.hlsl @@ -115,11 +115,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.msl index 2285b7eabf..10810070c2 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -100,13 +100,13 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(thread float2* const p, thread float2* cons return 1; } -void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_24, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 pos = 0.0f; float2 param_6 = 0.0f; float2 param_7 = 0.0f; float2 param_8 = 0.0f; float2 param_9 = 0.0f; - float4 const x_63 = *(tint_symbol_5); + float4 const x_63 = *(tint_symbol_3); float2 const x_66 = x_24.resolution; pos = (float2(x_63.x, x_63.y) / x_66); float2 const x_68 = pos; @@ -116,20 +116,26 @@ void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread floa param_9 = float2(0.100000001f, 0.400000006f); int const x_69 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9)); if ((x_69 == 1)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_24, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_24, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_24, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_24, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.hlsl index 421b7ed216..3579c25adf 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.hlsl @@ -131,11 +131,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.msl index ed7f0784eb..e07a9ab6c7 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -100,13 +100,13 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(thread float2* const p, thread float2* cons return 1; } -void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_24, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 pos = 0.0f; float2 param_6 = 0.0f; float2 param_7 = 0.0f; float2 param_8 = 0.0f; float2 param_9 = 0.0f; - float4 const x_63 = *(tint_symbol_5); + float4 const x_63 = *(tint_symbol_3); float2 const x_66 = x_24.resolution; pos = (float2(x_63.x, x_63.y) / x_66); float2 const x_68 = pos; @@ -116,20 +116,26 @@ void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread floa param_9 = float2(0.100000001f, 0.400000006f); int const x_69 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9)); if ((x_69 == 1)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_24, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_24, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_24, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_24, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.hlsl index 2c4cd16ef0..870fcb0572 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.hlsl @@ -142,11 +142,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.msl index 75d95c298f..c038002374 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -129,13 +129,13 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf0& x_15, thread float2* const p return 1; } -void main_1(constant buf0& x_15, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_15, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 pos = 0.0f; float2 param_6 = 0.0f; float2 param_7 = 0.0f; float2 param_8 = 0.0f; float2 param_9 = 0.0f; - float4 const x_72 = *(tint_symbol_5); + float4 const x_72 = *(tint_symbol_3); float2 const x_75 = x_15.resolution; pos = (float2(x_72.x, x_72.y) / x_75); float2 const x_77 = pos; @@ -145,20 +145,26 @@ void main_1(constant buf0& x_15, thread float4* const tint_symbol_5, thread floa param_9 = float2(0.100000001f, 0.400000006f); int const x_78 = pointInTriangle_vf2_vf2_vf2_vf2_(x_15, &(param_6), &(param_7), &(param_8), &(param_9)); if ((x_78 == 1)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_15 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_15, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_15, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_15, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_15 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_15, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.hlsl index 75aaaf62a4..9e43c5ffd5 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.hlsl @@ -158,11 +158,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.msl index d0400d8b0a..e847253bc2 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -129,13 +129,13 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf0& x_15, thread float2* const p return 1; } -void main_1(constant buf0& x_15, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_15, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 pos = 0.0f; float2 param_6 = 0.0f; float2 param_7 = 0.0f; float2 param_8 = 0.0f; float2 param_9 = 0.0f; - float4 const x_72 = *(tint_symbol_5); + float4 const x_72 = *(tint_symbol_3); float2 const x_75 = x_15.resolution; pos = (float2(x_72.x, x_72.y) / x_75); float2 const x_77 = pos; @@ -145,20 +145,26 @@ void main_1(constant buf0& x_15, thread float4* const tint_symbol_5, thread floa param_9 = float2(0.100000001f, 0.400000006f); int const x_78 = pointInTriangle_vf2_vf2_vf2_vf2_(x_15, &(param_6), &(param_7), &(param_8), &(param_9)); if ((x_78 == 1)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_15 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_15, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_15, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_15, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_15 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_15, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.hlsl index 55c6a35a1b..bac141a4f0 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.hlsl @@ -115,11 +115,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.msl index 9d7d4bb236..8cecda9f0b 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -100,13 +100,13 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(thread float2* const p, thread float2* cons return 1; } -void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_24, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 pos = 0.0f; float2 param_6 = 0.0f; float2 param_7 = 0.0f; float2 param_8 = 0.0f; float2 param_9 = 0.0f; - float4 const x_63 = *(tint_symbol_5); + float4 const x_63 = *(tint_symbol_3); float2 const x_66 = x_24.resolution; pos = (float2(x_63.x, x_63.y) / x_66); float2 const x_68 = pos; @@ -116,20 +116,26 @@ void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread floa param_9 = float2(0.100000001f, 0.400000006f); int const x_69 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9)); if ((x_69 == 1)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_24, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_24, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_24, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_24, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.hlsl index f228156100..62ce0ec2a7 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.hlsl @@ -131,11 +131,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.msl index 8d1f7be31c..1c1d52740f 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -100,13 +100,13 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(thread float2* const p, thread float2* cons return 1; } -void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_24, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 pos = 0.0f; float2 param_6 = 0.0f; float2 param_7 = 0.0f; float2 param_8 = 0.0f; float2 param_9 = 0.0f; - float4 const x_63 = *(tint_symbol_5); + float4 const x_63 = *(tint_symbol_3); float2 const x_66 = x_24.resolution; pos = (float2(x_63.x, x_63.y) / x_66); float2 const x_68 = pos; @@ -116,20 +116,26 @@ void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread floa param_9 = float2(0.100000001f, 0.400000006f); int const x_69 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9)); if ((x_69 == 1)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_24, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_24, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_24, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_24, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.hlsl index 8f680e0ae6..22b028b952 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.hlsl @@ -118,11 +118,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.msl index 5b5a4a7527..c9cce2f0f5 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -97,12 +97,12 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(thread float2* const p, thread float2* cons return 1; } -void main_1(constant buf0& x_17, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_17, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 param_6 = 0.0f; float2 param_7 = 0.0f; float2 param_8 = 0.0f; float2 param_9 = 0.0f; - float4 const x_55 = *(tint_symbol_5); + float4 const x_55 = *(tint_symbol_3); float2 const x_58 = x_17.resolution; param_6 = (float2(x_55.x, x_55.y) / x_58); param_7 = float2(0.699999988f, 0.300000012f); @@ -110,20 +110,26 @@ void main_1(constant buf0& x_17, thread float4* const tint_symbol_5, thread floa param_9 = float2(0.100000001f, 0.400000006f); int const x_60 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9)); if ((x_60 == 1)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_17 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_17, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_17, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_17, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_17 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_17, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.hlsl index c32dae7f7f..6d8725a96a 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.hlsl @@ -134,11 +134,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.msl index fc78937c7a..d048adaa02 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -97,12 +97,12 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(thread float2* const p, thread float2* cons return 1; } -void main_1(constant buf0& x_17, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_17, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float2 param_6 = 0.0f; float2 param_7 = 0.0f; float2 param_8 = 0.0f; float2 param_9 = 0.0f; - float4 const x_55 = *(tint_symbol_5); + float4 const x_55 = *(tint_symbol_3); float2 const x_58 = x_17.resolution; param_6 = (float2(x_55.x, x_55.y) / x_58); param_7 = float2(0.699999988f, 0.300000012f); @@ -110,20 +110,26 @@ void main_1(constant buf0& x_17, thread float4* const tint_symbol_5, thread floa param_9 = float2(0.100000001f, 0.400000006f); int const x_60 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9)); if ((x_60 == 1)) { - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_17 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_17, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_17, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_17, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_17 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_17, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.hlsl index 159359844a..3f249ae3ff 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.hlsl @@ -157,11 +157,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl index 40e2a56bc8..cb0746badc 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl @@ -10,11 +10,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p, thread float2* const a, thread float2* const b, thread float2* const c, thread float4* const tint_symbol_5) { +int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p, thread float2* const a, thread float2* const b, thread float2* const c, thread float4* const tint_symbol_3) { float x_78 = 0.0f; float x_79 = 0.0f; float x_80 = 0.0f; @@ -81,7 +81,7 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p } else { break; } - *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); x_164_phi = 0; while (true) { int x_165 = 0; @@ -90,7 +90,7 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p } else { break; } - *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); { x_165 = as_type((as_type(x_164) + as_type(1))); x_164_phi = x_165; @@ -132,37 +132,43 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p return 1; } -void main_1(constant buf0& x_19, constant buf1& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_19, constant buf1& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { float2 param_6 = 0.0f; float2 param_7 = 0.0f; float2 param_8 = 0.0f; float2 param_9 = 0.0f; - float4 const x_60 = *(tint_symbol_6); + float4 const x_60 = *(tint_symbol_4); float2 const x_63 = x_19.resolution; param_6 = (float2(x_60.x, x_60.y) / x_63); param_7 = float2(0.699999988f, 0.300000012f); param_8 = float2(0.5f, 0.899999976f); param_9 = float2(0.100000001f, 0.400000006f); - int const x_65 = pointInTriangle_vf2_vf2_vf2_vf2_(x_11, &(param_6), &(param_7), &(param_8), &(param_9), tint_symbol_7); + int const x_65 = pointInTriangle_vf2_vf2_vf2_vf2_(x_11, &(param_6), &(param_7), &(param_8), &(param_9), tint_symbol_5); if ((x_65 == 1)) { float const x_71 = x_11.injectionSwitch.y; float const x_73 = x_11.injectionSwitch.x; if ((x_71 >= x_73)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); } } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_19 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_19, x_11, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_19, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_19, x_11, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_19 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_19, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.hlsl index 1e6b252bb4..f9a1fa7ca3 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.hlsl @@ -173,11 +173,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.msl index 17d0242df0..0026d068dd 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.msl @@ -10,11 +10,11 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p, thread float2* const a, thread float2* const b, thread float2* const c, thread float4* const tint_symbol_5) { +int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p, thread float2* const a, thread float2* const b, thread float2* const c, thread float4* const tint_symbol_3) { float x_78 = 0.0f; float x_79 = 0.0f; float x_80 = 0.0f; @@ -81,7 +81,7 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p } else { break; } - *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); x_164_phi = 0; while (true) { int x_165 = 0; @@ -90,7 +90,7 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p } else { break; } - *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); { x_165 = as_type((as_type(x_164) + as_type(1))); x_164_phi = x_165; @@ -132,37 +132,43 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p return 1; } -void main_1(constant buf0& x_19, constant buf1& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_19, constant buf1& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { float2 param_6 = 0.0f; float2 param_7 = 0.0f; float2 param_8 = 0.0f; float2 param_9 = 0.0f; - float4 const x_60 = *(tint_symbol_6); + float4 const x_60 = *(tint_symbol_4); float2 const x_63 = x_19.resolution; param_6 = (float2(x_60.x, x_60.y) / x_63); param_7 = float2(0.699999988f, 0.300000012f); param_8 = float2(0.5f, 0.899999976f); param_9 = float2(0.100000001f, 0.400000006f); - int const x_65 = pointInTriangle_vf2_vf2_vf2_vf2_(x_11, &(param_6), &(param_7), &(param_8), &(param_9), tint_symbol_7); + int const x_65 = pointInTriangle_vf2_vf2_vf2_vf2_(x_11, &(param_6), &(param_7), &(param_8), &(param_9), tint_symbol_5); if ((x_65 == 1)) { float const x_71 = x_11.injectionSwitch.y; float const x_73 = x_11.injectionSwitch.x; if ((x_71 >= x_73)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); } } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_19 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_19, x_11, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_19, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_19, x_11, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_19 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_19, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.hlsl index f6f974f7fc..3fcb79563e 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.hlsl @@ -36,9 +36,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.msl index 0c4598037d..663148564e 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.msl @@ -21,7 +21,7 @@ void makeTreeNode_struct_BST_i1_i1_i11_(thread BST* const tree) { return; } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { tint_array_wrapper tree_1 = {}; BST param = {}; tint_array_wrapper const x_37 = tree_1; @@ -40,15 +40,21 @@ void main_1(thread float4* const tint_symbol_4) { return; } tint_array_wrapper const x_12 = tree_1; - *(tint_symbol_4) = float4(float(x_12.arr[0u].rightIndex), 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(float(x_12.arr[0u].rightIndex), 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.hlsl index f6f974f7fc..3fcb79563e 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.hlsl @@ -36,9 +36,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.msl index 0c4598037d..663148564e 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.msl @@ -21,7 +21,7 @@ void makeTreeNode_struct_BST_i1_i1_i11_(thread BST* const tree) { return; } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { tint_array_wrapper tree_1 = {}; BST param = {}; tint_array_wrapper const x_37 = tree_1; @@ -40,15 +40,21 @@ void main_1(thread float4* const tint_symbol_4) { return; } tint_array_wrapper const x_12 = tree_1; - *(tint_symbol_4) = float4(float(x_12.arr[0u].rightIndex), 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(float(x_12.arr[0u].rightIndex), 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.hlsl index a1dacbe77f..c7913b7356 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.hlsl @@ -12,11 +12,11 @@ static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); void main_1() { int index = 0; + const struct_base tint_symbol_2 = {1, 1, 1}; const struct_base tint_symbol_3 = {1, 1, 1}; const struct_base tint_symbol_4 = {1, 1, 1}; - const struct_base tint_symbol_5 = {1, 1, 1}; - const struct_base tint_symbol_6[3] = {tint_symbol_3, tint_symbol_4, tint_symbol_5}; - struct_array = tint_symbol_6; + const struct_base tint_symbol_5[3] = {tint_symbol_2, tint_symbol_3, tint_symbol_4}; + struct_array = tint_symbol_5; index = 1; struct_array[1].rightIndex = 1; const int x_39 = struct_array[1].leftIndex; @@ -45,9 +45,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_7 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.msl index 0f1196e766..72d12712cc 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.msl @@ -19,40 +19,46 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_8, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { int index = 0; + struct_base const tint_symbol_2 = {.data=1, .leftIndex=1, .rightIndex=1}; struct_base const tint_symbol_3 = {.data=1, .leftIndex=1, .rightIndex=1}; struct_base const tint_symbol_4 = {.data=1, .leftIndex=1, .rightIndex=1}; - struct_base const tint_symbol_5 = {.data=1, .leftIndex=1, .rightIndex=1}; - tint_array_wrapper const tint_symbol_6 = {.arr={tint_symbol_3, tint_symbol_4, tint_symbol_5}}; - *(tint_symbol_8) = tint_symbol_6; + tint_array_wrapper const tint_symbol_5 = {.arr={tint_symbol_2, tint_symbol_3, tint_symbol_4}}; + *(tint_symbol_7) = tint_symbol_5; index = 1; - (*(tint_symbol_8)).arr[1].rightIndex = 1; - int const x_39 = (*(tint_symbol_8)).arr[1].leftIndex; + (*(tint_symbol_7)).arr[1].rightIndex = 1; + int const x_39 = (*(tint_symbol_7)).arr[1].leftIndex; if ((x_39 == 1)) { float const x_45 = x_8.injectionSwitch.x; - int const x_48 = (*(tint_symbol_8)).arr[int(x_45)].rightIndex; + int const x_48 = (*(tint_symbol_7)).arr[int(x_45)].rightIndex; index = x_48; } else { float const x_50 = x_8.injectionSwitch.y; - int const x_53 = (*(tint_symbol_8)).arr[int(x_50)].leftIndex; + int const x_53 = (*(tint_symbol_7)).arr[int(x_50)].leftIndex; index = x_53; } - int const x_55 = (*(tint_symbol_8)).arr[1].leftIndex; + int const x_55 = (*(tint_symbol_7)).arr[1].leftIndex; if ((x_55 == 1)) { - *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_8) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_9) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_8) = float4(1.0f, 1.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread tint_array_wrapper tint_symbol_10 = {}; - thread float4 tint_symbol_11 = 0.0f; - main_1(x_8, &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_11}; - tint_symbol_1 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) { + main_1(x_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread tint_array_wrapper tint_symbol_11 = {}; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.hlsl index a1dacbe77f..c7913b7356 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.hlsl @@ -12,11 +12,11 @@ static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); void main_1() { int index = 0; + const struct_base tint_symbol_2 = {1, 1, 1}; const struct_base tint_symbol_3 = {1, 1, 1}; const struct_base tint_symbol_4 = {1, 1, 1}; - const struct_base tint_symbol_5 = {1, 1, 1}; - const struct_base tint_symbol_6[3] = {tint_symbol_3, tint_symbol_4, tint_symbol_5}; - struct_array = tint_symbol_6; + const struct_base tint_symbol_5[3] = {tint_symbol_2, tint_symbol_3, tint_symbol_4}; + struct_array = tint_symbol_5; index = 1; struct_array[1].rightIndex = 1; const int x_39 = struct_array[1].leftIndex; @@ -45,9 +45,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_7 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_7; + const main_out tint_symbol_6 = {x_GLF_color}; + return tint_symbol_6; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.msl index 0f1196e766..72d12712cc 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.msl @@ -19,40 +19,46 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9) { +void main_1(constant buf0& x_8, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) { int index = 0; + struct_base const tint_symbol_2 = {.data=1, .leftIndex=1, .rightIndex=1}; struct_base const tint_symbol_3 = {.data=1, .leftIndex=1, .rightIndex=1}; struct_base const tint_symbol_4 = {.data=1, .leftIndex=1, .rightIndex=1}; - struct_base const tint_symbol_5 = {.data=1, .leftIndex=1, .rightIndex=1}; - tint_array_wrapper const tint_symbol_6 = {.arr={tint_symbol_3, tint_symbol_4, tint_symbol_5}}; - *(tint_symbol_8) = tint_symbol_6; + tint_array_wrapper const tint_symbol_5 = {.arr={tint_symbol_2, tint_symbol_3, tint_symbol_4}}; + *(tint_symbol_7) = tint_symbol_5; index = 1; - (*(tint_symbol_8)).arr[1].rightIndex = 1; - int const x_39 = (*(tint_symbol_8)).arr[1].leftIndex; + (*(tint_symbol_7)).arr[1].rightIndex = 1; + int const x_39 = (*(tint_symbol_7)).arr[1].leftIndex; if ((x_39 == 1)) { float const x_45 = x_8.injectionSwitch.x; - int const x_48 = (*(tint_symbol_8)).arr[int(x_45)].rightIndex; + int const x_48 = (*(tint_symbol_7)).arr[int(x_45)].rightIndex; index = x_48; } else { float const x_50 = x_8.injectionSwitch.y; - int const x_53 = (*(tint_symbol_8)).arr[int(x_50)].leftIndex; + int const x_53 = (*(tint_symbol_7)).arr[int(x_50)].leftIndex; index = x_53; } - int const x_55 = (*(tint_symbol_8)).arr[1].leftIndex; + int const x_55 = (*(tint_symbol_7)).arr[1].leftIndex; if ((x_55 == 1)) { - *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_8) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_9) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_8) = float4(1.0f, 1.0f, 1.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { - thread tint_array_wrapper tint_symbol_10 = {}; - thread float4 tint_symbol_11 = 0.0f; - main_1(x_8, &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_11}; - tint_symbol_1 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_7; +main_out tint_symbol_inner(constant buf0& x_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) { + main_1(x_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)}; + return tint_symbol_6; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { + thread tint_array_wrapper tint_symbol_11 = {}; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_11), &(tint_symbol_12)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.hlsl index ba4731728e..e93a1afe42 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.hlsl @@ -11,8 +11,8 @@ static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); void main_1() { S ll = (S)0; float sums[9] = (float[9])0; - const S tint_symbol_3 = {0, bool3(true, true, true)}; - ll = tint_symbol_3; + const S tint_symbol_2 = {0, bool3(true, true, true)}; + ll = tint_symbol_2; while (true) { const S x_12 = ll; const float x_45 = asfloat(x_7[0].y); @@ -41,9 +41,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.msl index 61dfc81055..afc2ac2574 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.msl @@ -18,11 +18,11 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { S ll = {}; tint_array_wrapper sums = {}; - S const tint_symbol_3 = {.f0=0, .f1=bool3(true, true, true)}; - ll = tint_symbol_3; + S const tint_symbol_2 = {.f0=0, .f1=bool3(true, true, true)}; + ll = tint_symbol_2; while (true) { S const x_12 = ll; float const x_45 = x_7.injectionSwitch.y; @@ -42,15 +42,21 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { } float const x_53 = sums.arr[0]; float2 const x_54 = float2(x_53, x_53); - *(tint_symbol_5) = float4(1.0f, x_54.x, x_54.y, 1.0f); + *(tint_symbol_4) = float4(1.0f, x_54.x, x_54.y, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) { + main_1(x_7, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { thread float4 tint_symbol_6 = 0.0f; - main_1(x_7, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.hlsl index ba4731728e..e93a1afe42 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.hlsl @@ -11,8 +11,8 @@ static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); void main_1() { S ll = (S)0; float sums[9] = (float[9])0; - const S tint_symbol_3 = {0, bool3(true, true, true)}; - ll = tint_symbol_3; + const S tint_symbol_2 = {0, bool3(true, true, true)}; + ll = tint_symbol_2; while (true) { const S x_12 = ll; const float x_45 = asfloat(x_7[0].y); @@ -41,9 +41,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.msl index 61dfc81055..afc2ac2574 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.msl @@ -18,11 +18,11 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { S ll = {}; tint_array_wrapper sums = {}; - S const tint_symbol_3 = {.f0=0, .f1=bool3(true, true, true)}; - ll = tint_symbol_3; + S const tint_symbol_2 = {.f0=0, .f1=bool3(true, true, true)}; + ll = tint_symbol_2; while (true) { S const x_12 = ll; float const x_45 = x_7.injectionSwitch.y; @@ -42,15 +42,21 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { } float const x_53 = sums.arr[0]; float2 const x_54 = float2(x_53, x_53); - *(tint_symbol_5) = float4(1.0f, x_54.x, x_54.y, 1.0f); + *(tint_symbol_4) = float4(1.0f, x_54.x, x_54.y, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) { + main_1(x_7, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { thread float4 tint_symbol_6 = 0.0f; - main_1(x_7, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.hlsl index 82d98ae397..889d38af53 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_3_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_3}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_3_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_3}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_3_1 = inner_result.x_3_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.msl index c1935072c0..4e2f0d0fab 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.msl @@ -14,20 +14,26 @@ struct tint_symbol_1 { float4 x_3_1 [[color(0)]]; }; -void main_1(constant S& x_5, thread float4* const tint_symbol_4) { +void main_1(constant S& x_5, thread float4* const tint_symbol_3) { float4 const x_20 = x_5.field0; S_1 x_21_1 = {.field0=float4(0.0f, 0.0f, 0.0f, 0.0f)}; x_21_1.field0 = x_20; S_1 const x_21 = x_21_1; - *(tint_symbol_4) = x_21.field0; + *(tint_symbol_3) = x_21.field0; return; } +main_out tint_symbol_inner(constant S& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_3_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant S& x_5 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_3_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_3_1=tint_symbol_2.x_3_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_3_1 = inner_result.x_3_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.hlsl index 82d98ae397..889d38af53 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_3_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_3}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_3_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_3}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_3_1 = inner_result.x_3_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.msl index c1935072c0..4e2f0d0fab 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.msl @@ -14,20 +14,26 @@ struct tint_symbol_1 { float4 x_3_1 [[color(0)]]; }; -void main_1(constant S& x_5, thread float4* const tint_symbol_4) { +void main_1(constant S& x_5, thread float4* const tint_symbol_3) { float4 const x_20 = x_5.field0; S_1 x_21_1 = {.field0=float4(0.0f, 0.0f, 0.0f, 0.0f)}; x_21_1.field0 = x_20; S_1 const x_21 = x_21_1; - *(tint_symbol_4) = x_21.field0; + *(tint_symbol_3) = x_21.field0; return; } +main_out tint_symbol_inner(constant S& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_3_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant S& x_5 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_3_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_3_1=tint_symbol_2.x_3_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_3_1 = inner_result.x_3_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.hlsl index 89dad7e3e9..4ae6c7c998 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.hlsl @@ -29,9 +29,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.msl index e06f14d238..c7ed117a72 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float const x_25 = x_5.injectionSwitch.y; switch(int(x_25)) { case -1: { @@ -26,15 +26,21 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { break; } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.hlsl index 89dad7e3e9..4ae6c7c998 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.hlsl @@ -29,9 +29,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.msl index e06f14d238..c7ed117a72 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float const x_25 = x_5.injectionSwitch.y; switch(int(x_25)) { case -1: { @@ -26,15 +26,21 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { break; } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.hlsl index 804140c5c7..6e4aa390de 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.hlsl @@ -46,9 +46,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.msl index e33cab57c4..0ade69ee45 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.msl @@ -19,9 +19,9 @@ int merge_(constant buf0& x_6) { return 0; } -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int res = 0; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); while (true) { float const x_32 = x_6.zero; switch(int(x_32)) { @@ -44,15 +44,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { res = x_8; int const x_9 = res; float const x_36 = float(x_9); - *(tint_symbol_4) = float4(x_36, x_36, x_36, x_36); + *(tint_symbol_3) = float4(x_36, x_36, x_36, x_36); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.hlsl index 804140c5c7..6e4aa390de 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.hlsl @@ -46,9 +46,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.msl index e33cab57c4..0ade69ee45 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.msl @@ -19,9 +19,9 @@ int merge_(constant buf0& x_6) { return 0; } -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int res = 0; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); while (true) { float const x_32 = x_6.zero; switch(int(x_32)) { @@ -44,15 +44,21 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { res = x_8; int const x_9 = res; float const x_36 = float(x_9); - *(tint_symbol_4) = float4(x_36, x_36, x_36, x_36); + *(tint_symbol_3) = float4(x_36, x_36, x_36, x_36); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.spvasm.expected.msl index b2d8ae508d..992eceb400 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; float const x_51 = x_6.injectionSwitch.x; i = int(x_51); @@ -69,18 +69,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } int const x_22 = i; if ((x_22 == -2)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl.expected.msl index b2d8ae508d..992eceb400 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; float const x_51 = x_6.injectionSwitch.x; i = int(x_51); @@ -69,18 +69,24 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } int const x_22 = i; if ((x_22 == -2)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.hlsl index 3d1073726b..7abe1c8271 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.msl index 0c08cdc001..bcf0061dd4 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { switch(0) { case 0: { if (false) { @@ -19,15 +19,21 @@ void main_1(thread float4* const tint_symbol_4) { break; } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.hlsl index 3d1073726b..7abe1c8271 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.hlsl @@ -22,9 +22,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.msl index 0c08cdc001..bcf0061dd4 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { switch(0) { case 0: { if (false) { @@ -19,15 +19,21 @@ void main_1(thread float4* const tint_symbol_4) { break; } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.hlsl index 2e3da9b13d..b91405879a 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.hlsl @@ -96,9 +96,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.msl index 3f25a16688..1be3886e00 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; int value = 0; float y = 0.0f; @@ -51,7 +51,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { case 2: { float const x_46 = x_46_phi; if ((x_46 == 1.0f)) { - *(tint_symbol_4) = float4(float(as_type((as_type(x_31) + as_type(1)))), 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(float(as_type((as_type(x_31) + as_type(1)))), 0.0f, 0.0f, 1.0f); return; } break; @@ -66,11 +66,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.hlsl index 2e3da9b13d..b91405879a 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.hlsl @@ -96,9 +96,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.msl index 3f25a16688..1be3886e00 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int i = 0; int value = 0; float y = 0.0f; @@ -51,7 +51,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { case 2: { float const x_46 = x_46_phi; if ((x_46 == 1.0f)) { - *(tint_symbol_4) = float4(float(as_type((as_type(x_31) + as_type(1)))), 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(float(as_type((as_type(x_31) + as_type(1)))), 0.0f, 0.0f, 1.0f); return; } break; @@ -66,11 +66,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.hlsl index 2999e7dbad..4a7a33dadc 100644 --- a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.hlsl @@ -36,11 +36,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.msl index f58d0acd2d..35079dab41 100644 --- a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.msl @@ -4,15 +4,15 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float4x3 x_37 = float4x3(0.0f); float4x3 x_38_phi = float4x3(0.0f); float3 x_48_phi = 0.0f; - float const x_32 = (*(tint_symbol_5)).y; + float const x_32 = (*(tint_symbol_3)).y; if ((x_32 < 1.0f)) { x_38_phi = float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f)); } else { @@ -30,17 +30,23 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol break; } float3 const x_48 = x_48_phi; - *(tint_symbol_6) = float4(x_48.x, x_48.y, x_48.z, 1.0f); + *(tint_symbol_4) = float4(x_48.x, x_48.y, x_48.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.hlsl index 2999e7dbad..4a7a33dadc 100644 --- a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.hlsl @@ -36,11 +36,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.msl index f58d0acd2d..35079dab41 100644 --- a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.msl @@ -4,15 +4,15 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float4x3 x_37 = float4x3(0.0f); float4x3 x_38_phi = float4x3(0.0f); float3 x_48_phi = 0.0f; - float const x_32 = (*(tint_symbol_5)).y; + float const x_32 = (*(tint_symbol_3)).y; if ((x_32 < 1.0f)) { x_38_phi = float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f)); } else { @@ -30,17 +30,23 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol break; } float3 const x_48 = x_48_phi; - *(tint_symbol_6) = float4(x_48.x, x_48.y, x_48.z, 1.0f); + *(tint_symbol_4) = float4(x_48.x, x_48.y, x_48.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.hlsl index e97beb75ee..d0d6cae5ce 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.hlsl @@ -86,11 +86,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.msl index a21c19e77b..b2a9e1d56e 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.msl @@ -7,23 +7,23 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int odd_index = 0; int even_index = 0; int j = 0; int ll = 0; bool x_59 = false; bool x_60_phi = false; - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); - float const x_53 = (*(tint_symbol_6)).x; + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); + float const x_53 = (*(tint_symbol_4)).x; bool const x_54 = (x_53 < 128.0f); x_60_phi = x_54; if (x_54) { - float const x_58 = (*(tint_symbol_6)).y; + float const x_58 = (*(tint_symbol_4)).y; x_59 = (x_58 < 128.0f); x_60_phi = x_59; } @@ -38,8 +38,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } else { break; } - float const x_70 = (*(tint_symbol_5)).x; - (*(tint_symbol_5)).x = (x_70 + 0.25f); + float const x_70 = (*(tint_symbol_3)).x; + (*(tint_symbol_3)).x = (x_70 + 0.25f); int const x_12 = odd_index; odd_index = as_type((as_type(x_12) + as_type(1))); } @@ -50,8 +50,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } else { break; } - float const x_80 = (*(tint_symbol_5)).x; - (*(tint_symbol_5)).x = (x_80 + 0.25f); + float const x_80 = (*(tint_symbol_3)).x; + (*(tint_symbol_3)).x = (x_80 + 0.25f); float const x_84 = x_8.injectionSwitch.x; float const x_86 = x_8.injectionSwitch.y; if ((x_84 > x_86)) { @@ -94,7 +94,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float float const x_113 = x_8.injectionSwitch.x; float const x_115 = x_8.injectionSwitch.y; if ((x_113 > x_115)) { - *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); } int const x_22 = even_index; even_index = as_type((as_type(x_22) - as_type(1))); @@ -102,13 +102,19 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.hlsl index e97beb75ee..d0d6cae5ce 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.hlsl @@ -86,11 +86,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.msl index a21c19e77b..b2a9e1d56e 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.msl @@ -7,23 +7,23 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int odd_index = 0; int even_index = 0; int j = 0; int ll = 0; bool x_59 = false; bool x_60_phi = false; - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); - float const x_53 = (*(tint_symbol_6)).x; + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); + float const x_53 = (*(tint_symbol_4)).x; bool const x_54 = (x_53 < 128.0f); x_60_phi = x_54; if (x_54) { - float const x_58 = (*(tint_symbol_6)).y; + float const x_58 = (*(tint_symbol_4)).y; x_59 = (x_58 < 128.0f); x_60_phi = x_59; } @@ -38,8 +38,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } else { break; } - float const x_70 = (*(tint_symbol_5)).x; - (*(tint_symbol_5)).x = (x_70 + 0.25f); + float const x_70 = (*(tint_symbol_3)).x; + (*(tint_symbol_3)).x = (x_70 + 0.25f); int const x_12 = odd_index; odd_index = as_type((as_type(x_12) + as_type(1))); } @@ -50,8 +50,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } else { break; } - float const x_80 = (*(tint_symbol_5)).x; - (*(tint_symbol_5)).x = (x_80 + 0.25f); + float const x_80 = (*(tint_symbol_3)).x; + (*(tint_symbol_3)).x = (x_80 + 0.25f); float const x_84 = x_8.injectionSwitch.x; float const x_86 = x_8.injectionSwitch.y; if ((x_84 > x_86)) { @@ -94,7 +94,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float float const x_113 = x_8.injectionSwitch.x; float const x_115 = x_8.injectionSwitch.y; if ((x_113 > x_115)) { - *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); } int const x_22 = even_index; even_index = as_type((as_type(x_22) - as_type(1))); @@ -102,13 +102,19 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_8, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_8, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.hlsl index 807ea01a4e..9fc8bfb365 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.hlsl @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.msl index 4958a8e4f5..001e8eefb3 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { int x = 0; float4 matrix_u = 0.0f; int b = 0; @@ -55,15 +55,21 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { b = as_type((as_type(x_16) - as_type(1))); } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.hlsl index 807ea01a4e..9fc8bfb365 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.hlsl @@ -50,9 +50,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.msl index 4958a8e4f5..001e8eefb3 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) { int x = 0; float4 matrix_u = 0.0f; int b = 0; @@ -55,15 +55,21 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { b = as_type((as_type(x_16) - as_type(1))); } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) { + main_1(x_8, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_8, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.hlsl index 3a00c148ad..459dc1beca 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.hlsl @@ -16,8 +16,8 @@ void main_1() { int x_9_phi = 0; StructType x_42_phi = (StructType)0; int x_10_phi = 0; - const StructType tint_symbol_3 = {float3(0.0f, 0.0f, 0.0f), bool4(false, false, false, false)}; - x_33_phi = tint_symbol_3; + const StructType tint_symbol_2 = {float3(0.0f, 0.0f, 0.0f), bool4(false, false, false, false)}; + x_33_phi = tint_symbol_2; x_9_phi = 0; while (true) { StructType x_34 = (StructType)0; @@ -69,9 +69,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.msl index 80928888ad..8357dafb79 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.msl @@ -15,7 +15,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { StructType x_33 = {}; int x_38 = 0; StructType x_42 = {}; @@ -23,8 +23,8 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_5) { int x_9_phi = 0; StructType x_42_phi = {}; int x_10_phi = 0; - StructType const tint_symbol_3 = {.col=float3(0.0f, 0.0f, 0.0f), .bbbb=bool4(false, false, false, false)}; - x_33_phi = tint_symbol_3; + StructType const tint_symbol_2 = {.col=float3(0.0f, 0.0f, 0.0f), .bbbb=bool4(false, false, false, false)}; + x_33_phi = tint_symbol_2; x_9_phi = 0; while (true) { StructType x_34 = {}; @@ -65,15 +65,21 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_5) { } } float3 const x_47 = x_42.col; - *(tint_symbol_5) = float4(x_47.x, x_47.y, x_47.z, 1.0f); + *(tint_symbol_4) = float4(x_47.x, x_47.y, x_47.z, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_5) { + main_1(x_5, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { thread float4 tint_symbol_6 = 0.0f; - main_1(x_5, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.hlsl index 3a00c148ad..459dc1beca 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.hlsl @@ -16,8 +16,8 @@ void main_1() { int x_9_phi = 0; StructType x_42_phi = (StructType)0; int x_10_phi = 0; - const StructType tint_symbol_3 = {float3(0.0f, 0.0f, 0.0f), bool4(false, false, false, false)}; - x_33_phi = tint_symbol_3; + const StructType tint_symbol_2 = {float3(0.0f, 0.0f, 0.0f), bool4(false, false, false, false)}; + x_33_phi = tint_symbol_2; x_9_phi = 0; while (true) { StructType x_34 = (StructType)0; @@ -69,9 +69,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_4; + const main_out tint_symbol_3 = {x_GLF_color}; + return tint_symbol_3; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.msl index 80928888ad..8357dafb79 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.msl @@ -15,7 +15,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_5) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { StructType x_33 = {}; int x_38 = 0; StructType x_42 = {}; @@ -23,8 +23,8 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_5) { int x_9_phi = 0; StructType x_42_phi = {}; int x_10_phi = 0; - StructType const tint_symbol_3 = {.col=float3(0.0f, 0.0f, 0.0f), .bbbb=bool4(false, false, false, false)}; - x_33_phi = tint_symbol_3; + StructType const tint_symbol_2 = {.col=float3(0.0f, 0.0f, 0.0f), .bbbb=bool4(false, false, false, false)}; + x_33_phi = tint_symbol_2; x_9_phi = 0; while (true) { StructType x_34 = {}; @@ -65,15 +65,21 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_5) { } } float3 const x_47 = x_42.col; - *(tint_symbol_5) = float4(x_47.x, x_47.y, x_47.z, 1.0f); + *(tint_symbol_4) = float4(x_47.x, x_47.y, x_47.z, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_5) { + main_1(x_5, tint_symbol_5); + main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_3; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { thread float4 tint_symbol_6 = 0.0f; - main_1(x_5, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_4; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.hlsl index 55bac3a760..88ec1bba6c 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.hlsl @@ -46,9 +46,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.msl index 0cb64a4728..3d21748384 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float4 GLF_live15c = 0.0f; int GLF_live15i = 0; float4 GLF_live15d = 0.0f; @@ -57,15 +57,21 @@ void main_1(thread float4* const tint_symbol_4) { GLF_live15i_1 = as_type((as_type(x_16) + as_type(1))); } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.hlsl index 55bac3a760..88ec1bba6c 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.hlsl @@ -46,9 +46,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.msl index 0cb64a4728..3d21748384 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float4 GLF_live15c = 0.0f; int GLF_live15i = 0; float4 GLF_live15d = 0.0f; @@ -57,15 +57,21 @@ void main_1(thread float4* const tint_symbol_4) { GLF_live15i_1 = as_type((as_type(x_16) + as_type(1))); } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.hlsl index 47412bc214..a05b43e771 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.hlsl @@ -66,11 +66,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.msl index d76e41a348..c13a2f2961 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.msl @@ -7,21 +7,21 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; int i_1 = 0; int i_2 = 0; - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); i = 0; float const x_35 = x_7.injectionSwitch.y; if ((x_35 < 0.0f)) { } else { bool x_42 = false; - float const x_41 = (*(tint_symbol_6)).y; + float const x_41 = (*(tint_symbol_4)).y; x_42 = (x_41 < -1.0f); if (x_42) { } else { @@ -82,13 +82,19 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.hlsl index 47412bc214..a05b43e771 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.hlsl @@ -66,11 +66,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.msl index d76e41a348..c13a2f2961 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.msl @@ -7,21 +7,21 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { int i = 0; int i_1 = 0; int i_2 = 0; - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); i = 0; float const x_35 = x_7.injectionSwitch.y; if ((x_35 < 0.0f)) { } else { bool x_42 = false; - float const x_41 = (*(tint_symbol_6)).y; + float const x_41 = (*(tint_symbol_4)).y; x_42 = (x_41 < -1.0f); if (x_42) { } else { @@ -82,13 +82,19 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.spvasm.expected.msl index 82947bc766..4acc343940 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.spvasm.expected.msl @@ -24,7 +24,7 @@ float3 mand_() { return float3(1.0f, 1.0f, 1.0f); } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int j = 0; float const x_37 = x_7.injectionSwitch.x; float const x_39 = x_7.injectionSwitch.y; @@ -40,15 +40,21 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.wgsl.expected.msl index 82947bc766..4acc343940 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.wgsl.expected.msl @@ -24,7 +24,7 @@ float3 mand_() { return float3(1.0f, 1.0f, 1.0f); } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) { int j = 0; float const x_37 = x_7.injectionSwitch.x; float const x_39 = x_7.injectionSwitch.y; @@ -40,15 +40,21 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } } } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) { + main_1(x_7, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_7, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.spvasm.expected.msl index 3986db2c36..6fc3bb7686 100644 --- a/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.spvasm.expected.msl @@ -14,11 +14,11 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int GLF_dead6index = 0; int GLF_dead6currentNode = 0; tint_array_wrapper donor_replacementGLF_dead6tree = {}; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); GLF_dead6index = 0; float const x_34 = x_6.injectionSwitch.y; if ((x_34 < 0.0f)) { @@ -37,11 +37,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.wgsl.expected.msl index 3986db2c36..6fc3bb7686 100644 --- a/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.wgsl.expected.msl @@ -14,11 +14,11 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int GLF_dead6index = 0; int GLF_dead6currentNode = 0; tint_array_wrapper donor_replacementGLF_dead6tree = {}; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); GLF_dead6index = 0; float const x_34 = x_6.injectionSwitch.y; if ((x_34 < 0.0f)) { @@ -37,11 +37,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.hlsl index 301c3755e4..e683960708 100644 --- a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.hlsl @@ -78,9 +78,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.msl index 4c1cf9d75d..1d7bf38aa9 100644 --- a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.msl @@ -11,12 +11,12 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -int performPartition_(constant buf0& x_6, thread float4* const tint_symbol_4) { +int performPartition_(constant buf0& x_6, thread float4* const tint_symbol_3) { int GLF_live0i = 0; int i = 0; int x_11 = 0; int x_10_phi = 0; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); x_10_phi = 0; while (true) { int x_11_phi = 0; @@ -74,16 +74,22 @@ int performPartition_(constant buf0& x_6, thread float4* const tint_symbol_4) { return x_11; } -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { - int const x_9 = performPartition_(x_6, tint_symbol_5); +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { + int const x_9 = performPartition_(x_6, tint_symbol_4); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) { + main_1(x_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.hlsl index 301c3755e4..e683960708 100644 --- a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.hlsl @@ -78,9 +78,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.msl index 4c1cf9d75d..1d7bf38aa9 100644 --- a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.msl @@ -11,12 +11,12 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -int performPartition_(constant buf0& x_6, thread float4* const tint_symbol_4) { +int performPartition_(constant buf0& x_6, thread float4* const tint_symbol_3) { int GLF_live0i = 0; int i = 0; int x_11 = 0; int x_10_phi = 0; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); x_10_phi = 0; while (true) { int x_11_phi = 0; @@ -74,16 +74,22 @@ int performPartition_(constant buf0& x_6, thread float4* const tint_symbol_4) { return x_11; } -void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { - int const x_9 = performPartition_(x_6, tint_symbol_5); +void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { + int const x_9 = performPartition_(x_6, tint_symbol_4); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) { + main_1(x_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_6 = 0.0f; - main_1(x_6, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.hlsl index 704ebff464..7fadd484ef 100644 --- a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.hlsl @@ -36,9 +36,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.msl index f3bfdd29ce..58a69c7c8a 100644 --- a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float x_30 = 0.0f; float x_32_phi = 0.0f; x_32_phi = 0.0f; @@ -23,7 +23,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { float const x_39 = x_5.injectionSwitch.x; float const x_41 = x_5.injectionSwitch.y; if ((x_39 < x_41)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } else { { @@ -38,11 +38,17 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.hlsl index 704ebff464..7fadd484ef 100644 --- a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.hlsl @@ -36,9 +36,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.msl index f3bfdd29ce..58a69c7c8a 100644 --- a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { float x_30 = 0.0f; float x_32_phi = 0.0f; x_32_phi = 0.0f; @@ -23,7 +23,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { float const x_39 = x_5.injectionSwitch.x; float const x_41 = x_5.injectionSwitch.y; if ((x_39 < x_41)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } else { { @@ -38,11 +38,17 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.hlsl index 9722e0dc86..e5df2ff25a 100644 --- a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.hlsl @@ -28,11 +28,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.msl index a3f6ec635c..1a14fee22c 100644 --- a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.msl @@ -4,17 +4,17 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float x_30 = 0.0f; uint foo = 0u; - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); - float const x_32 = (*(tint_symbol_6)).x; + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); + float const x_32 = (*(tint_symbol_4)).x; if ((x_32 > -1.0f)) { - float const x_38 = (*(tint_symbol_5)).x; + float const x_38 = (*(tint_symbol_3)).x; x_30 = x_38; } else { uint const x_6 = foo; @@ -23,17 +23,23 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol x_30 = float((178493u + x_7)); } float const x_40 = x_30; - (*(tint_symbol_5)).x = x_40; + (*(tint_symbol_3)).x = x_40; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.hlsl index 9722e0dc86..e5df2ff25a 100644 --- a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.hlsl @@ -28,11 +28,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.msl index a3f6ec635c..1a14fee22c 100644 --- a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.msl @@ -4,17 +4,17 @@ using namespace metal; struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { float x_30 = 0.0f; uint foo = 0u; - *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); - float const x_32 = (*(tint_symbol_6)).x; + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); + float const x_32 = (*(tint_symbol_4)).x; if ((x_32 > -1.0f)) { - float const x_38 = (*(tint_symbol_5)).x; + float const x_38 = (*(tint_symbol_3)).x; x_30 = x_38; } else { uint const x_6 = foo; @@ -23,17 +23,23 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol x_30 = float((178493u + x_7)); } float const x_40 = x_30; - (*(tint_symbol_5)).x = x_40; + (*(tint_symbol_3)).x = x_40; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_8), &(tint_symbol_7)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_6, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.hlsl index 47ae9f1c86..6b88e19b40 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.hlsl @@ -98,10 +98,13 @@ struct tint_symbol_1 { uint3 gl_GlobalInvocationID_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 gl_GlobalInvocationID_param = tint_symbol.gl_GlobalInvocationID_param; +void main_inner(uint3 gl_GlobalInvocationID_param) { gl_GlobalInvocationID = gl_GlobalInvocationID_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.gl_GlobalInvocationID_param); return; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl index 7138b3ef71..1efbb499be 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl @@ -14,7 +14,7 @@ struct tint_array_wrapper { float arr[1]; }; -void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15, thread uint3* const tint_symbol_2) { +void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15, thread uint3* const tint_symbol_1) { tint_array_wrapper A = {}; int i = 0; float4 value = 0.0f; @@ -41,7 +41,7 @@ void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15 } } while (true) { - uint const x_80 = (*(tint_symbol_2)).x; + uint const x_80 = (*(tint_symbol_1)).x; if ((x_80 < 100u)) { value = float4(0.0f, 0.0f, 0.0f, 1.0f); m = 0; @@ -91,7 +91,7 @@ void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15 } } } else { - uint const x_127 = (*(tint_symbol_2)).x; + uint const x_127 = (*(tint_symbol_1)).x; if ((x_127 < 120u)) { float const x_133 = A.arr[0]; float const x_135 = x_13.resolution.x; @@ -130,10 +130,14 @@ void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15 return; } +void tint_symbol_inner(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15, uint3 gl_GlobalInvocationID_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = gl_GlobalInvocationID_param; + main_1(x_10, x_13, x_15, tint_symbol_2); +} + kernel void tint_symbol(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], constant buf1& x_10 [[buffer(1)]], constant buf2& x_13 [[buffer(2)]], device doesNotMatter& x_15 [[buffer(0)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = gl_GlobalInvocationID_param; - main_1(x_10, x_13, x_15, &(tint_symbol_3)); + tint_symbol_inner(x_10, x_13, x_15, gl_GlobalInvocationID_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.hlsl index 47ae9f1c86..6b88e19b40 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.hlsl @@ -98,10 +98,13 @@ struct tint_symbol_1 { uint3 gl_GlobalInvocationID_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 gl_GlobalInvocationID_param = tint_symbol.gl_GlobalInvocationID_param; +void main_inner(uint3 gl_GlobalInvocationID_param) { gl_GlobalInvocationID = gl_GlobalInvocationID_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.gl_GlobalInvocationID_param); return; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl index 7138b3ef71..1efbb499be 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl @@ -14,7 +14,7 @@ struct tint_array_wrapper { float arr[1]; }; -void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15, thread uint3* const tint_symbol_2) { +void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15, thread uint3* const tint_symbol_1) { tint_array_wrapper A = {}; int i = 0; float4 value = 0.0f; @@ -41,7 +41,7 @@ void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15 } } while (true) { - uint const x_80 = (*(tint_symbol_2)).x; + uint const x_80 = (*(tint_symbol_1)).x; if ((x_80 < 100u)) { value = float4(0.0f, 0.0f, 0.0f, 1.0f); m = 0; @@ -91,7 +91,7 @@ void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15 } } } else { - uint const x_127 = (*(tint_symbol_2)).x; + uint const x_127 = (*(tint_symbol_1)).x; if ((x_127 < 120u)) { float const x_133 = A.arr[0]; float const x_135 = x_13.resolution.x; @@ -130,10 +130,14 @@ void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15 return; } +void tint_symbol_inner(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15, uint3 gl_GlobalInvocationID_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = gl_GlobalInvocationID_param; + main_1(x_10, x_13, x_15, tint_symbol_2); +} + kernel void tint_symbol(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], constant buf1& x_10 [[buffer(1)]], constant buf2& x_13 [[buffer(2)]], device doesNotMatter& x_15 [[buffer(0)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = gl_GlobalInvocationID_param; - main_1(x_10, x_13, x_15, &(tint_symbol_3)); + tint_symbol_inner(x_10, x_13, x_15, gl_GlobalInvocationID_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.hlsl index 701d8d9dc1..3c44a6cc12 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.hlsl @@ -35,9 +35,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.msl index ac448be949..83386e546c 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.msl @@ -11,9 +11,9 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float3 computeColor_(constant buf0& x_7, thread float4* const tint_symbol_4) { +float3 computeColor_(constant buf0& x_7, thread float4* const tint_symbol_3) { int x_injected_loop_counter = 0; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); x_injected_loop_counter = 1; while (true) { float const x_38 = x_7.injectionSwitch.x; @@ -31,16 +31,22 @@ float3 computeColor_(constant buf0& x_7, thread float4* const tint_symbol_4) { return float3(0.0f, 0.0f, 0.0f); } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { - float3 const x_31 = computeColor_(x_7, tint_symbol_5); +void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { + float3 const x_31 = computeColor_(x_7, tint_symbol_4); return; } +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) { + main_1(x_7, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { thread float4 tint_symbol_6 = 0.0f; - main_1(x_7, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.hlsl index 701d8d9dc1..3c44a6cc12 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.hlsl @@ -35,9 +35,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.msl index ac448be949..83386e546c 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.msl @@ -11,9 +11,9 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float3 computeColor_(constant buf0& x_7, thread float4* const tint_symbol_4) { +float3 computeColor_(constant buf0& x_7, thread float4* const tint_symbol_3) { int x_injected_loop_counter = 0; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); x_injected_loop_counter = 1; while (true) { float const x_38 = x_7.injectionSwitch.x; @@ -31,16 +31,22 @@ float3 computeColor_(constant buf0& x_7, thread float4* const tint_symbol_4) { return float3(0.0f, 0.0f, 0.0f); } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { - float3 const x_31 = computeColor_(x_7, tint_symbol_5); +void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { + float3 const x_31 = computeColor_(x_7, tint_symbol_4); return; } +main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) { + main_1(x_7, tint_symbol_5); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) { thread float4 tint_symbol_6 = 0.0f; - main_1(x_7, &(tint_symbol_6)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.hlsl index ccaa9603e1..3afde97a73 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.hlsl @@ -40,11 +40,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.msl index d52c896021..4a64335ff4 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -20,30 +20,36 @@ float3 computePoint_(constant buf0& x_7) { return float3(0.0f, 0.0f, 0.0f); } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { bool x_34 = false; while (true) { float3 const x_36 = computePoint_(x_7); - float const x_41 = (*(tint_symbol_5)).x; + float const x_41 = (*(tint_symbol_3)).x; if ((x_41 < 0.0f)) { x_34 = true; break; } float3 const x_45 = computePoint_(x_7); - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); x_34 = true; break; } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.hlsl index ccaa9603e1..3afde97a73 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.hlsl @@ -40,11 +40,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.msl index d52c896021..4a64335ff4 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.msl @@ -7,7 +7,7 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -20,30 +20,36 @@ float3 computePoint_(constant buf0& x_7) { return float3(0.0f, 0.0f, 0.0f); } -void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { +void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { bool x_34 = false; while (true) { float3 const x_36 = computePoint_(x_7); - float const x_41 = (*(tint_symbol_5)).x; + float const x_41 = (*(tint_symbol_3)).x; if ((x_41 < 0.0f)) { x_34 = true; break; } float3 const x_45 = computePoint_(x_7); - *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); x_34 = true; break; } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(x_7, &(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(x_7, tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.hlsl index a06fe40f57..ac1e10ce7f 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.hlsl @@ -47,9 +47,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.msl index e65fcde9fd..e2334b4474 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.msl @@ -34,9 +34,9 @@ float3 mand_() { return x_52; } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int i = 0; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); i = 0; while (true) { int const x_8 = i; @@ -53,11 +53,17 @@ void main_1(thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.hlsl index a06fe40f57..ac1e10ce7f 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.hlsl @@ -47,9 +47,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.msl index e65fcde9fd..e2334b4474 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.msl @@ -34,9 +34,9 @@ float3 mand_() { return x_52; } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int i = 0; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); i = 0; while (true) { int const x_8 = i; @@ -53,11 +53,17 @@ void main_1(thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.hlsl index e10a3b8cff..2d66c64361 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.hlsl @@ -51,9 +51,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.msl index 58160d1e63..2ca222ec48 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.msl @@ -11,10 +11,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int i = 0; tint_array_wrapper data = {}; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); i = 0; while (true) { int const x_6 = i; @@ -60,11 +60,17 @@ void main_1(thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.hlsl index e10a3b8cff..2d66c64361 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.hlsl @@ -51,9 +51,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.msl index 58160d1e63..2ca222ec48 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.msl @@ -11,10 +11,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int i = 0; tint_array_wrapper data = {}; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); i = 0; while (true) { int const x_6 = i; @@ -60,11 +60,17 @@ void main_1(thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.spvasm.expected.msl index da051cdb0d..53a077e636 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.spvasm.expected.msl @@ -11,9 +11,9 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int m = 0; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); float const x_30 = x_5.injected.x; float const x_32 = x_5.injected.y; if ((x_30 > x_32)) { @@ -31,17 +31,23 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } else { break; } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.wgsl.expected.msl index da051cdb0d..53a077e636 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.wgsl.expected.msl @@ -11,9 +11,9 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) { int m = 0; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); float const x_30 = x_5.injected.x; float const x_32 = x_5.injected.y; if ((x_30 > x_32)) { @@ -31,17 +31,23 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { } else { break; } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } } return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_5, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) { + main_1(x_5, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.spvasm.expected.msl index 1daa9605c4..1adaed3158 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { bool x_21_phi = false; x_21_phi = false; while (true) { @@ -34,7 +34,7 @@ void main_1(thread float4* const tint_symbol_4) { if (x_30) { break; } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); break; { x_21_phi = false; @@ -43,11 +43,17 @@ void main_1(thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.wgsl.expected.msl index 1daa9605c4..1adaed3158 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { bool x_21_phi = false; x_21_phi = false; while (true) { @@ -34,7 +34,7 @@ void main_1(thread float4* const tint_symbol_4) { if (x_30) { break; } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); break; { x_21_phi = false; @@ -43,11 +43,17 @@ void main_1(thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.hlsl index 49c10a453a..d7508b2a57 100644 --- a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.hlsl @@ -40,9 +40,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.msl index 7da427321c..92961afeb7 100644 --- a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { bool c1 = false; float2 uv = 0.0f; int i = 0; @@ -28,7 +28,7 @@ void main_1(thread float4* const tint_symbol_4) { } else { break; } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; { int const x_7 = i; @@ -43,11 +43,17 @@ void main_1(thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.hlsl index 49c10a453a..d7508b2a57 100644 --- a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.hlsl @@ -40,9 +40,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.msl index 7da427321c..92961afeb7 100644 --- a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.msl @@ -8,7 +8,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { bool c1 = false; float2 uv = 0.0f; int i = 0; @@ -28,7 +28,7 @@ void main_1(thread float4* const tint_symbol_4) { } else { break; } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; { int const x_7 = i; @@ -43,11 +43,17 @@ void main_1(thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.hlsl index f65360e6ad..1488543881 100644 --- a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.hlsl @@ -94,11 +94,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.msl index 58c2140023..ce8bb27e90 100644 --- a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.msl @@ -7,18 +7,18 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_(constant buf0& x_10, thread float4* const tint_symbol_5) { +float func_(constant buf0& x_10, thread float4* const tint_symbol_3) { bool alwaysFalse = false; float4 value = 0.0f; float2 a = 0.0f; int i = 0; bool x_121 = false; bool x_122_phi = false; - float const x_71 = (*(tint_symbol_5)).x; + float const x_71 = (*(tint_symbol_3)).x; alwaysFalse = (x_71 < -1.0f); bool const x_73 = alwaysFalse; if (x_73) { @@ -32,7 +32,7 @@ float func_(constant buf0& x_10, thread float4* const tint_symbol_5) { float4 const x_85 = value; value = float4(x_84.x, x_84.y, x_85.z, x_85.w); } - float4 const x_87 = *(tint_symbol_5); + float4 const x_87 = *(tint_symbol_3); float4 const x_89 = value; float4 const x_93 = value; float2 const x_95 = (((float2(x_87.x, x_87.y) * float2(x_89.x, x_89.y)) * float2(2.0f, 2.0f)) + float2(x_93.x, x_93.y)); @@ -70,7 +70,7 @@ float func_(constant buf0& x_10, thread float4* const tint_symbol_5) { return 0.0f; } -void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { int count = 0; int i_1 = 0; count = 0; @@ -82,7 +82,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa } else { break; } - float const x_58 = func_(x_10, tint_symbol_6); + float const x_58 = func_(x_10, tint_symbol_4); int const x_60 = count; count = as_type((as_type(x_60) + as_type(int(x_58)))); { @@ -92,20 +92,26 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa } int const x_64 = count; if ((x_64 == 2)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_10, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_10, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.hlsl index f65360e6ad..1488543881 100644 --- a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.hlsl @@ -94,11 +94,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_6; + const main_out tint_symbol_5 = {x_GLF_color}; + return tint_symbol_5; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.msl index 58c2140023..ce8bb27e90 100644 --- a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.msl @@ -7,18 +7,18 @@ struct buf0 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -float func_(constant buf0& x_10, thread float4* const tint_symbol_5) { +float func_(constant buf0& x_10, thread float4* const tint_symbol_3) { bool alwaysFalse = false; float4 value = 0.0f; float2 a = 0.0f; int i = 0; bool x_121 = false; bool x_122_phi = false; - float const x_71 = (*(tint_symbol_5)).x; + float const x_71 = (*(tint_symbol_3)).x; alwaysFalse = (x_71 < -1.0f); bool const x_73 = alwaysFalse; if (x_73) { @@ -32,7 +32,7 @@ float func_(constant buf0& x_10, thread float4* const tint_symbol_5) { float4 const x_85 = value; value = float4(x_84.x, x_84.y, x_85.z, x_85.w); } - float4 const x_87 = *(tint_symbol_5); + float4 const x_87 = *(tint_symbol_3); float4 const x_89 = value; float4 const x_93 = value; float2 const x_95 = (((float2(x_87.x, x_87.y) * float2(x_89.x, x_89.y)) * float2(2.0f, 2.0f)) + float2(x_93.x, x_93.y)); @@ -70,7 +70,7 @@ float func_(constant buf0& x_10, thread float4* const tint_symbol_5) { return 0.0f; } -void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { +void main_1(constant buf0& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { int count = 0; int i_1 = 0; count = 0; @@ -82,7 +82,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa } else { break; } - float const x_58 = func_(x_10, tint_symbol_6); + float const x_58 = func_(x_10, tint_symbol_4); int const x_60 = count; count = as_type((as_type(x_60) + as_type(int(x_58)))); { @@ -92,20 +92,26 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa } int const x_64 = count; if ((x_64 == 2)) { - *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(x_10, &(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(x_10, tint_symbol_6, tint_symbol_7); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) { + thread float4 tint_symbol_8 = 0.0f; + thread float4 tint_symbol_9 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.hlsl index 10510034ab..8fef5fdf41 100644 --- a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.hlsl @@ -35,9 +35,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.msl index ed94dc2241..9b783f21c4 100644 --- a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.msl @@ -29,21 +29,27 @@ int func_() { return 1; } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int const x_9 = func_(); if ((x_9 == 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.hlsl index 10510034ab..8fef5fdf41 100644 --- a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.hlsl @@ -35,9 +35,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.msl index ed94dc2241..9b783f21c4 100644 --- a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.msl @@ -29,21 +29,27 @@ int func_() { return 1; } -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { int const x_9 = func_(); if ((x_9 == 1)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f); } return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.hlsl index 257e1e6110..6576af4773 100644 --- a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.hlsl @@ -36,9 +36,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.msl index 042f1771d1..c300c39c97 100644 --- a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.msl @@ -11,10 +11,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int j = 0; float x_41 = 0.0f; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); while (true) { float const x_32 = x_6.injectionSwitch.x; j = int(x_32); @@ -38,11 +38,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.hlsl index 257e1e6110..6576af4773 100644 --- a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.hlsl @@ -36,9 +36,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.msl index 042f1771d1..c300c39c97 100644 --- a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.msl @@ -11,10 +11,10 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { int j = 0; float x_41 = 0.0f; - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); while (true) { float const x_32 = x_6.injectionSwitch.x; j = int(x_32); @@ -38,11 +38,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl index 1c6f19b6ab..bea72e56cb 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) { int idx = 0; float4x3 m43 = float4x3(0.0f); int ll_1 = 0; @@ -35,7 +35,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { int const x_18 = ll_1; int const x_19 = x_9.injected; if ((x_18 >= x_19)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); break; } int const x_20 = ll_1; @@ -99,11 +99,17 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl.expected.msl index cbdb09fa3b..4075e248b5 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) { int idx = 0; float4x3 m43 = float4x3(0.0f); int ll_1 = 0; @@ -35,7 +35,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { int const x_18 = ll_1; int const x_19 = x_9.injected; if ((x_18 >= x_19)) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); break; } int const x_20 = ll_1; @@ -99,11 +99,17 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { - thread float4 tint_symbol_5 = 0.0f; - main_1(x_9, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) { + main_1(x_9, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.hlsl index b703400577..38a37c9ba7 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.hlsl @@ -342,11 +342,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl index 6ef3d6fedf..2912538439 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl @@ -25,7 +25,7 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -37,7 +37,7 @@ void makeTreeNode_struct_BST_i1_i1_i11_i1_(thread BST* const tree, thread int* c return; } -void insert_i1_i1_(constant buf0& x_27, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_5) { +void insert_i1_i1_(constant buf0& x_27, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_3) { int baseIndex = 0; BST param = {}; int param_1 = 0; @@ -55,44 +55,44 @@ void insert_i1_i1_(constant buf0& x_27, thread int* const treeIndex, thread int* } int const x_77 = *(data_1); int const x_78 = baseIndex; - int const x_79 = (*(tint_symbol_5)).arr[x_78].data; + int const x_79 = (*(tint_symbol_3)).arr[x_78].data; if ((x_77 <= x_79)) { int const x_80 = baseIndex; - int const x_81 = (*(tint_symbol_5)).arr[x_80].leftIndex; + int const x_81 = (*(tint_symbol_3)).arr[x_80].leftIndex; if ((x_81 == -1)) { int const x_82 = baseIndex; int const x_83 = *(treeIndex); - (*(tint_symbol_5)).arr[x_82].leftIndex = x_83; + (*(tint_symbol_3)).arr[x_82].leftIndex = x_83; int const x_84 = *(treeIndex); - BST const x_350 = (*(tint_symbol_5)).arr[x_84]; + BST const x_350 = (*(tint_symbol_3)).arr[x_84]; param = x_350; int const x_85 = *(data_1); param_1 = x_85; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1)); BST const x_352 = param; - (*(tint_symbol_5)).arr[x_84] = x_352; + (*(tint_symbol_3)).arr[x_84] = x_352; return; } else { int const x_86 = baseIndex; - int const x_87 = (*(tint_symbol_5)).arr[x_86].leftIndex; + int const x_87 = (*(tint_symbol_3)).arr[x_86].leftIndex; baseIndex = x_87; continue; } } else { int const x_88 = baseIndex; - int const x_89 = (*(tint_symbol_5)).arr[x_88].rightIndex; + int const x_89 = (*(tint_symbol_3)).arr[x_88].rightIndex; if ((x_89 == -1)) { int const x_90 = baseIndex; int const x_91 = *(treeIndex); - (*(tint_symbol_5)).arr[x_90].rightIndex = x_91; + (*(tint_symbol_3)).arr[x_90].rightIndex = x_91; int const x_92 = *(treeIndex); - BST const x_362 = (*(tint_symbol_5)).arr[x_92]; + BST const x_362 = (*(tint_symbol_3)).arr[x_92]; param_2 = x_362; int const x_93 = *(data_1); param_3 = x_93; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3)); BST const x_364 = param_2; - (*(tint_symbol_5)).arr[x_92] = x_364; + (*(tint_symbol_3)).arr[x_92] = x_364; return; } else { GLF_live8i = 1; @@ -105,7 +105,7 @@ void insert_i1_i1_(constant buf0& x_27, thread int* const treeIndex, thread int* GLF_live8A.arr[x_369] = (x_373 + x_371); while (true) { int const x_97 = baseIndex; - int const x_98 = (*(tint_symbol_5)).arr[x_97].rightIndex; + int const x_98 = (*(tint_symbol_3)).arr[x_97].rightIndex; baseIndex = x_98; { float const x_382 = x_27.injectionSwitch.x; @@ -123,7 +123,7 @@ void insert_i1_i1_(constant buf0& x_27, thread int* const treeIndex, thread int* return; } -int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_6) { +int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_4) { int index = 0; BST currentNode = {}; int x_387 = 0; @@ -135,7 +135,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint break; } int const x_100 = index; - BST const x_395 = (*(tint_symbol_6)).arr[x_100]; + BST const x_395 = (*(tint_symbol_4)).arr[x_100]; currentNode = x_395; int const x_101 = currentNode.data; int const x_102 = *(target); @@ -158,7 +158,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint return -1; } -float makeFrame_f1_(thread float* const v, thread tint_array_wrapper_1* const tint_symbol_7) { +float makeFrame_f1_(thread float* const v, thread tint_array_wrapper_1* const tint_symbol_5) { int param_5 = 0; int param_6 = 0; int param_7 = 0; @@ -167,7 +167,7 @@ float makeFrame_f1_(thread float* const v, thread tint_array_wrapper_1* const ti float const x_420 = *(v); if ((x_420 < 1.5f)) { param_5 = 100; - int const x_110 = search_i1_(&(param_5), tint_symbol_7); + int const x_110 = search_i1_(&(param_5), tint_symbol_5); return float(x_110); } float const x_425 = *(v); @@ -176,27 +176,27 @@ float makeFrame_f1_(thread float* const v, thread tint_array_wrapper_1* const ti } float const x_429 = *(v); param_6 = 6; - int const x_111 = search_i1_(&(param_6), tint_symbol_7); + int const x_111 = search_i1_(&(param_6), tint_symbol_5); if ((x_429 < float(x_111))) { return 1.0f; } param_7 = 30; - int const x_112 = search_i1_(&(param_7), tint_symbol_7); + int const x_112 = search_i1_(&(param_7), tint_symbol_5); return (10.0f + float(x_112)); } -float3 hueColor_f1_(thread float* const angle, thread tint_array_wrapper_1* const tint_symbol_8) { +float3 hueColor_f1_(thread float* const angle, thread tint_array_wrapper_1* const tint_symbol_6) { float nodeData = 0.0f; int param_4 = 0; param_4 = 15; - int const x_109 = search_i1_(&(param_4), tint_symbol_8); + int const x_109 = search_i1_(&(param_4), tint_symbol_6); nodeData = float(x_109); float const x_409 = *(angle); float const x_410 = nodeData; return ((float3(30.0f, 30.0f, 30.0f) + (float3(1.0f, 5.0f, x_410) * x_409)) / float3(50.0f, 50.0f, 50.0f)); } -void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { +void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { int treeIndex_1 = 0; BST param_8 = {}; int param_9 = 0; @@ -237,18 +237,18 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ float3 x_235 = 0.0f; float param_31 = 0.0f; treeIndex_1 = 0; - BST const x_237 = (*(tint_symbol_9)).arr[0]; + BST const x_237 = (*(tint_symbol_7)).arr[0]; param_8 = x_237; param_9 = 9; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_8), &(param_9)); BST const x_239 = param_8; - (*(tint_symbol_9)).arr[0] = x_239; + (*(tint_symbol_7)).arr[0] = x_239; int const x_113 = treeIndex_1; treeIndex_1 = as_type((as_type(x_113) + as_type(1))); int const x_115 = treeIndex_1; param_10 = x_115; param_11 = 5; - insert_i1_i1_(x_27, &(param_10), &(param_11), tint_symbol_9); + insert_i1_i1_(x_27, &(param_10), &(param_11), tint_symbol_7); int const x_116 = treeIndex_1; treeIndex_1 = as_type((as_type(x_116) + as_type(1))); GLF_live1_looplimiter2 = 0; @@ -272,37 +272,37 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ int const x_123 = treeIndex_1; param_12 = x_123; param_13 = 12; - insert_i1_i1_(x_27, &(param_12), &(param_13), tint_symbol_9); + insert_i1_i1_(x_27, &(param_12), &(param_13), tint_symbol_7); int const x_124 = treeIndex_1; treeIndex_1 = as_type((as_type(x_124) + as_type(1))); int const x_126 = treeIndex_1; param_14 = x_126; param_15 = 15; - insert_i1_i1_(x_27, &(param_14), &(param_15), tint_symbol_9); + insert_i1_i1_(x_27, &(param_14), &(param_15), tint_symbol_7); int const x_127 = treeIndex_1; treeIndex_1 = as_type((as_type(x_127) + as_type(1))); int const x_129 = treeIndex_1; param_16 = x_129; param_17 = 7; - insert_i1_i1_(x_27, &(param_16), &(param_17), tint_symbol_9); + insert_i1_i1_(x_27, &(param_16), &(param_17), tint_symbol_7); int const x_130 = treeIndex_1; treeIndex_1 = as_type((as_type(x_130) + as_type(1))); int const x_132 = treeIndex_1; param_18 = x_132; param_19 = 8; - insert_i1_i1_(x_27, &(param_18), &(param_19), tint_symbol_9); + insert_i1_i1_(x_27, &(param_18), &(param_19), tint_symbol_7); int const x_133 = treeIndex_1; treeIndex_1 = as_type((as_type(x_133) + as_type(1))); int const x_135 = treeIndex_1; param_20 = x_135; param_21 = 2; - insert_i1_i1_(x_27, &(param_20), &(param_21), tint_symbol_9); + insert_i1_i1_(x_27, &(param_20), &(param_21), tint_symbol_7); int const x_136 = treeIndex_1; treeIndex_1 = as_type((as_type(x_136) + as_type(1))); int const x_138 = treeIndex_1; param_22 = x_138; param_23 = 6; - insert_i1_i1_(x_27, &(param_22), &(param_23), tint_symbol_9); + insert_i1_i1_(x_27, &(param_22), &(param_23), tint_symbol_7); int const x_139 = treeIndex_1; treeIndex_1 = as_type((as_type(x_139) + as_type(1))); GLF_live4_looplimiter3 = 0; @@ -336,7 +336,7 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ int const x_152 = treeIndex_1; param_24 = x_152; param_25 = 17; - insert_i1_i1_(x_27, &(param_24), &(param_25), tint_symbol_9); + insert_i1_i1_(x_27, &(param_24), &(param_25), tint_symbol_7); float const x_278 = x_27.injectionSwitch.x; float const x_280 = x_27.injectionSwitch.y; if ((x_278 > x_280)) { @@ -347,16 +347,16 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ int const x_155 = treeIndex_1; param_26 = x_155; param_27 = 13; - insert_i1_i1_(x_27, &(param_26), &(param_27), tint_symbol_9); - float4 const x_285 = *(tint_symbol_10); + insert_i1_i1_(x_27, &(param_26), &(param_27), tint_symbol_7); + float4 const x_285 = *(tint_symbol_8); z = (float2(x_285.y, x_285.x) / float2(256.0f, 256.0f)); float const x_289 = z.x; param_28 = x_289; - float const x_290 = makeFrame_f1_(&(param_28), tint_symbol_9); + float const x_290 = makeFrame_f1_(&(param_28), tint_symbol_7); x_1 = x_290; float const x_292 = z.y; param_29 = x_292; - float const x_293 = makeFrame_f1_(&(param_29), tint_symbol_9); + float const x_293 = makeFrame_f1_(&(param_29), tint_symbol_7); y_1 = x_293; sum = -100; target_1 = 0; @@ -368,7 +368,7 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ } int const x_157 = target_1; param_30 = x_157; - int const x_158 = search_i1_(&(param_30), tint_symbol_9); + int const x_158 = search_i1_(&(param_30), tint_symbol_7); result = x_158; int const x_159 = result; if ((x_159 > 0)) { @@ -405,22 +405,28 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ } else { float const x_320 = a; param_31 = x_320; - float3 const x_321 = hueColor_f1_(&(param_31), tint_symbol_9); + float3 const x_321 = hueColor_f1_(&(param_31), tint_symbol_7); x_235 = x_321; } float3 const x_322 = x_235; - *(tint_symbol_11) = float4(x_322.x, x_322.y, x_322.z, 1.0f); + *(tint_symbol_9) = float4(x_322.x, x_322.y, x_322.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_27 [[buffer(0)]]) { - thread float4 tint_symbol_12 = 0.0f; - thread tint_array_wrapper_1 tint_symbol_13 = {}; - thread float4 tint_symbol_14 = 0.0f; - tint_symbol_12 = gl_FragCoord_param; - main_1(x_27, &(tint_symbol_13), &(tint_symbol_12), &(tint_symbol_14)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_14}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_27, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread tint_array_wrapper_1* const tint_symbol_11, thread float4* const tint_symbol_12) { + *(tint_symbol_10) = gl_FragCoord_param; + main_1(x_27, tint_symbol_11, tint_symbol_10, tint_symbol_12); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_12)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_27 [[buffer(0)]]) { + thread float4 tint_symbol_13 = 0.0f; + thread tint_array_wrapper_1 tint_symbol_14 = {}; + thread float4 tint_symbol_15 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_27, gl_FragCoord_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.hlsl index 4e1c940777..4e34538dda 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.hlsl @@ -354,11 +354,16 @@ struct tint_symbol_2 { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); - const main_out tint_symbol_3 = {x_GLF_color}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_GLF_color}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.msl index fae9d9d465..843cdb2ee6 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.msl @@ -25,7 +25,7 @@ struct tint_array_wrapper_2 { struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; @@ -37,7 +37,7 @@ void makeTreeNode_struct_BST_i1_i1_i11_i1_(thread BST* const tree, thread int* c return; } -void insert_i1_i1_(constant buf0& x_27, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_5) { +void insert_i1_i1_(constant buf0& x_27, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_3) { int baseIndex = 0; BST param = {}; int param_1 = 0; @@ -55,44 +55,44 @@ void insert_i1_i1_(constant buf0& x_27, thread int* const treeIndex, thread int* } int const x_77 = *(data_1); int const x_78 = baseIndex; - int const x_79 = (*(tint_symbol_5)).arr[x_78].data; + int const x_79 = (*(tint_symbol_3)).arr[x_78].data; if ((x_77 <= x_79)) { int const x_80 = baseIndex; - int const x_81 = (*(tint_symbol_5)).arr[x_80].leftIndex; + int const x_81 = (*(tint_symbol_3)).arr[x_80].leftIndex; if ((x_81 == -1)) { int const x_82 = baseIndex; int const x_83 = *(treeIndex); - (*(tint_symbol_5)).arr[x_82].leftIndex = x_83; + (*(tint_symbol_3)).arr[x_82].leftIndex = x_83; int const x_84 = *(treeIndex); - BST const x_350 = (*(tint_symbol_5)).arr[x_84]; + BST const x_350 = (*(tint_symbol_3)).arr[x_84]; param = x_350; int const x_85 = *(data_1); param_1 = x_85; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1)); BST const x_352 = param; - (*(tint_symbol_5)).arr[x_84] = x_352; + (*(tint_symbol_3)).arr[x_84] = x_352; return; } else { int const x_86 = baseIndex; - int const x_87 = (*(tint_symbol_5)).arr[x_86].leftIndex; + int const x_87 = (*(tint_symbol_3)).arr[x_86].leftIndex; baseIndex = x_87; continue; } } else { int const x_88 = baseIndex; - int const x_89 = (*(tint_symbol_5)).arr[x_88].rightIndex; + int const x_89 = (*(tint_symbol_3)).arr[x_88].rightIndex; if ((x_89 == -1)) { int const x_90 = baseIndex; int const x_91 = *(treeIndex); - (*(tint_symbol_5)).arr[x_90].rightIndex = x_91; + (*(tint_symbol_3)).arr[x_90].rightIndex = x_91; int const x_92 = *(treeIndex); - BST const x_362 = (*(tint_symbol_5)).arr[x_92]; + BST const x_362 = (*(tint_symbol_3)).arr[x_92]; param_2 = x_362; int const x_93 = *(data_1); param_3 = x_93; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3)); BST const x_364 = param_2; - (*(tint_symbol_5)).arr[x_92] = x_364; + (*(tint_symbol_3)).arr[x_92] = x_364; return; } else { GLF_live8i = 1; @@ -105,7 +105,7 @@ void insert_i1_i1_(constant buf0& x_27, thread int* const treeIndex, thread int* GLF_live8A.arr[x_369] = (x_373 + x_371); while (true) { int const x_97 = baseIndex; - int const x_98 = (*(tint_symbol_5)).arr[x_97].rightIndex; + int const x_98 = (*(tint_symbol_3)).arr[x_97].rightIndex; baseIndex = x_98; { float const x_382 = x_27.injectionSwitch.x; @@ -123,7 +123,7 @@ void insert_i1_i1_(constant buf0& x_27, thread int* const treeIndex, thread int* return; } -int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_6) { +int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_4) { int index = 0; BST currentNode = {}; int x_387 = 0; @@ -135,7 +135,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint break; } int const x_100 = index; - BST const x_395 = (*(tint_symbol_6)).arr[x_100]; + BST const x_395 = (*(tint_symbol_4)).arr[x_100]; currentNode = x_395; int const x_101 = currentNode.data; int const x_102 = *(target); @@ -158,7 +158,7 @@ int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint return -1; } -float makeFrame_f1_(thread float* const v, thread tint_array_wrapper_1* const tint_symbol_7) { +float makeFrame_f1_(thread float* const v, thread tint_array_wrapper_1* const tint_symbol_5) { int param_5 = 0; int param_6 = 0; int param_7 = 0; @@ -167,7 +167,7 @@ float makeFrame_f1_(thread float* const v, thread tint_array_wrapper_1* const ti float const x_420 = *(v); if ((x_420 < 1.5f)) { param_5 = 100; - int const x_110 = search_i1_(&(param_5), tint_symbol_7); + int const x_110 = search_i1_(&(param_5), tint_symbol_5); return float(x_110); } float const x_425 = *(v); @@ -176,27 +176,27 @@ float makeFrame_f1_(thread float* const v, thread tint_array_wrapper_1* const ti } float const x_429 = *(v); param_6 = 6; - int const x_111 = search_i1_(&(param_6), tint_symbol_7); + int const x_111 = search_i1_(&(param_6), tint_symbol_5); if ((x_429 < float(x_111))) { return 1.0f; } param_7 = 30; - int const x_112 = search_i1_(&(param_7), tint_symbol_7); + int const x_112 = search_i1_(&(param_7), tint_symbol_5); return (10.0f + float(x_112)); } -float3 hueColor_f1_(thread float* const angle, thread tint_array_wrapper_1* const tint_symbol_8) { +float3 hueColor_f1_(thread float* const angle, thread tint_array_wrapper_1* const tint_symbol_6) { float nodeData = 0.0f; int param_4 = 0; param_4 = 15; - int const x_109 = search_i1_(&(param_4), tint_symbol_8); + int const x_109 = search_i1_(&(param_4), tint_symbol_6); nodeData = float(x_109); float const x_409 = *(angle); float const x_410 = nodeData; return ((float3(30.0f, 30.0f, 30.0f) + (float3(1.0f, 5.0f, x_410) * x_409)) / float3(50.0f, 50.0f, 50.0f)); } -void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) { +void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) { int treeIndex_1 = 0; BST param_8 = {}; int param_9 = 0; @@ -237,18 +237,18 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ float3 x_235 = 0.0f; float param_31 = 0.0f; treeIndex_1 = 0; - BST const x_237 = (*(tint_symbol_9)).arr[0]; + BST const x_237 = (*(tint_symbol_7)).arr[0]; param_8 = x_237; param_9 = 9; makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_8), &(param_9)); BST const x_239 = param_8; - (*(tint_symbol_9)).arr[0] = x_239; + (*(tint_symbol_7)).arr[0] = x_239; int const x_113 = treeIndex_1; treeIndex_1 = as_type((as_type(x_113) + as_type(1))); int const x_115 = treeIndex_1; param_10 = x_115; param_11 = 5; - insert_i1_i1_(x_27, &(param_10), &(param_11), tint_symbol_9); + insert_i1_i1_(x_27, &(param_10), &(param_11), tint_symbol_7); int const x_116 = treeIndex_1; treeIndex_1 = as_type((as_type(x_116) + as_type(1))); GLF_live1_looplimiter2 = 0; @@ -272,37 +272,37 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ int const x_123 = treeIndex_1; param_12 = x_123; param_13 = 12; - insert_i1_i1_(x_27, &(param_12), &(param_13), tint_symbol_9); + insert_i1_i1_(x_27, &(param_12), &(param_13), tint_symbol_7); int const x_124 = treeIndex_1; treeIndex_1 = as_type((as_type(x_124) + as_type(1))); int const x_126 = treeIndex_1; param_14 = x_126; param_15 = 15; - insert_i1_i1_(x_27, &(param_14), &(param_15), tint_symbol_9); + insert_i1_i1_(x_27, &(param_14), &(param_15), tint_symbol_7); int const x_127 = treeIndex_1; treeIndex_1 = as_type((as_type(x_127) + as_type(1))); int const x_129 = treeIndex_1; param_16 = x_129; param_17 = 7; - insert_i1_i1_(x_27, &(param_16), &(param_17), tint_symbol_9); + insert_i1_i1_(x_27, &(param_16), &(param_17), tint_symbol_7); int const x_130 = treeIndex_1; treeIndex_1 = as_type((as_type(x_130) + as_type(1))); int const x_132 = treeIndex_1; param_18 = x_132; param_19 = 8; - insert_i1_i1_(x_27, &(param_18), &(param_19), tint_symbol_9); + insert_i1_i1_(x_27, &(param_18), &(param_19), tint_symbol_7); int const x_133 = treeIndex_1; treeIndex_1 = as_type((as_type(x_133) + as_type(1))); int const x_135 = treeIndex_1; param_20 = x_135; param_21 = 2; - insert_i1_i1_(x_27, &(param_20), &(param_21), tint_symbol_9); + insert_i1_i1_(x_27, &(param_20), &(param_21), tint_symbol_7); int const x_136 = treeIndex_1; treeIndex_1 = as_type((as_type(x_136) + as_type(1))); int const x_138 = treeIndex_1; param_22 = x_138; param_23 = 6; - insert_i1_i1_(x_27, &(param_22), &(param_23), tint_symbol_9); + insert_i1_i1_(x_27, &(param_22), &(param_23), tint_symbol_7); int const x_139 = treeIndex_1; treeIndex_1 = as_type((as_type(x_139) + as_type(1))); GLF_live4_looplimiter3 = 0; @@ -336,7 +336,7 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ int const x_152 = treeIndex_1; param_24 = x_152; param_25 = 17; - insert_i1_i1_(x_27, &(param_24), &(param_25), tint_symbol_9); + insert_i1_i1_(x_27, &(param_24), &(param_25), tint_symbol_7); float const x_278 = x_27.injectionSwitch.x; float const x_280 = x_27.injectionSwitch.y; if ((x_278 > x_280)) { @@ -347,16 +347,16 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ int const x_155 = treeIndex_1; param_26 = x_155; param_27 = 13; - insert_i1_i1_(x_27, &(param_26), &(param_27), tint_symbol_9); - float4 const x_285 = *(tint_symbol_10); + insert_i1_i1_(x_27, &(param_26), &(param_27), tint_symbol_7); + float4 const x_285 = *(tint_symbol_8); z = (float2(x_285.y, x_285.x) / float2(256.0f, 256.0f)); float const x_289 = z.x; param_28 = x_289; - float const x_290 = makeFrame_f1_(&(param_28), tint_symbol_9); + float const x_290 = makeFrame_f1_(&(param_28), tint_symbol_7); x_1 = x_290; float const x_292 = z.y; param_29 = x_292; - float const x_293 = makeFrame_f1_(&(param_29), tint_symbol_9); + float const x_293 = makeFrame_f1_(&(param_29), tint_symbol_7); y_1 = x_293; sum = -100; target_1 = 0; @@ -368,7 +368,7 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ } int const x_157 = target_1; param_30 = x_157; - int const x_158 = search_i1_(&(param_30), tint_symbol_9); + int const x_158 = search_i1_(&(param_30), tint_symbol_7); result = x_158; int const x_159 = result; if ((x_159 > 0)) { @@ -405,22 +405,28 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ } else { float const x_320 = a; param_31 = x_320; - float3 const x_321 = hueColor_f1_(&(param_31), tint_symbol_9); + float3 const x_321 = hueColor_f1_(&(param_31), tint_symbol_7); x_235 = x_321; } float3 const x_322 = x_235; - *(tint_symbol_11) = float4(x_322.x, x_322.y, x_322.z, 1.0f); + *(tint_symbol_9) = float4(x_322.x, x_322.y, x_322.z, 1.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_27 [[buffer(0)]]) { - thread float4 tint_symbol_12 = 0.0f; - thread tint_array_wrapper_1 tint_symbol_13 = {}; - thread float4 tint_symbol_14 = 0.0f; - tint_symbol_12 = gl_FragCoord_param; - main_1(x_27, &(tint_symbol_13), &(tint_symbol_12), &(tint_symbol_14)); - main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_14}; - tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1}; - return tint_symbol_4; +main_out tint_symbol_inner(constant buf0& x_27, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread tint_array_wrapper_1* const tint_symbol_11, thread float4* const tint_symbol_12) { + *(tint_symbol_10) = gl_FragCoord_param; + main_1(x_27, tint_symbol_11, tint_symbol_10, tint_symbol_12); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_12)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_27 [[buffer(0)]]) { + thread float4 tint_symbol_13 = 0.0f; + thread tint_array_wrapper_1 tint_symbol_14 = {}; + thread float4 tint_symbol_15 = 0.0f; + main_out const inner_result = tint_symbol_inner(x_27, gl_FragCoord_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.hlsl index f40061ca18..60103654f7 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.hlsl @@ -65,9 +65,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl index 970164540b..45a90de5d1 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float4x3 m43 = float4x3(0.0f); int ll1 = 0; int rows = 0; @@ -32,7 +32,7 @@ void main_1(thread float4* const tint_symbol_4) { } else { break; } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); int const x_16 = ll1; if ((x_16 >= 5)) { break; @@ -95,11 +95,17 @@ void main_1(thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.hlsl index 26a0704d05..44330e55f8 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.hlsl @@ -77,9 +77,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.msl index 4900c8c983..3187e52349 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.msl @@ -11,7 +11,7 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { +void main_1(thread float4* const tint_symbol_3) { float4x3 m43 = float4x3(0.0f); int ll1 = 0; int rows = 0; @@ -32,7 +32,7 @@ void main_1(thread float4* const tint_symbol_4) { } else { break; } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); int const x_16 = ll1; if ((x_16 >= 5)) { break; @@ -95,11 +95,17 @@ void main_1(thread float4* const tint_symbol_4) { return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_5 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.hlsl index c608e007a3..f7d01ba246 100644 --- a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.hlsl @@ -21,9 +21,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.msl index 25fe33c25e..c44d2d755b 100644 --- a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.msl @@ -11,23 +11,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float height = 0.0f; height = 256.0f; float const x_40 = x_6.injectionSwitch.y; if ((x_40 < 0.0f)) { float const x_44 = height; - *(tint_symbol_4) = mix(float4(30.180000305f, 8840.0f, 469.970001221f, 18.239999771f), float4(9.899999619f, 0.100000001f, 1169.538696289f, 55.790000916f), float4(7612.9453125f, 797.010986328f, x_44, 9.0f)); + *(tint_symbol_3) = mix(float4(30.180000305f, 8840.0f, 469.970001221f, 18.239999771f), float4(9.899999619f, 0.100000001f, 1169.538696289f, 55.790000916f), float4(7612.9453125f, 797.010986328f, x_44, 9.0f)); } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.hlsl index c608e007a3..f7d01ba246 100644 --- a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.hlsl @@ -21,9 +21,15 @@ struct tint_symbol { float4 x_GLF_color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); - const main_out tint_symbol_1 = {x_GLF_color}; - const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1}; - return tint_symbol_3; + const main_out tint_symbol_2 = {x_GLF_color}; + return tint_symbol_2; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.msl index 25fe33c25e..c44d2d755b 100644 --- a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.msl @@ -11,23 +11,29 @@ struct tint_symbol_1 { float4 x_GLF_color_1 [[color(0)]]; }; -void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { +void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) { float height = 0.0f; height = 256.0f; float const x_40 = x_6.injectionSwitch.y; if ((x_40 < 0.0f)) { float const x_44 = height; - *(tint_symbol_4) = mix(float4(30.180000305f, 8840.0f, 469.970001221f, 18.239999771f), float4(9.899999619f, 0.100000001f, 1169.538696289f, 55.790000916f), float4(7612.9453125f, 797.010986328f, x_44, 9.0f)); + *(tint_symbol_3) = mix(float4(30.180000305f, 8840.0f, 469.970001221f, 18.239999771f), float4(9.899999619f, 0.100000001f, 1169.538696289f, 55.790000916f), float4(7612.9453125f, 797.010986328f, x_44, 9.0f)); } - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); return; } +main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) { + main_1(x_6, tint_symbol_4); + main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) { thread float4 tint_symbol_5 = 0.0f; - main_1(x_6, &(tint_symbol_5)); - main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.hlsl index 14fc121456..c1ab9af02a 100644 --- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.hlsl @@ -60,10 +60,13 @@ struct tint_symbol_1 { uint3 gl_WorkGroupID_param : SV_GroupID; }; -[numthreads(4, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 gl_WorkGroupID_param = tint_symbol.gl_WorkGroupID_param; +void main_inner(uint3 gl_WorkGroupID_param) { gl_WorkGroupID = gl_WorkGroupID_param; main_1(); +} + +[numthreads(4, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.gl_WorkGroupID_param); return; } diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl index d0db5166f2..393cfd1116 100644 --- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl @@ -23,7 +23,7 @@ struct In0 { /* 0x0000 */ tint_array_wrapper_2 data_in0; }; -void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, const device In0& x_19, thread uint3* const tint_symbol_2) { +void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, const device In0& x_19, thread uint3* const tint_symbol_1) { uint base_index_in = 0u; uint base_index_out = 0u; int index_in0 = 0; @@ -34,9 +34,9 @@ void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, c int i = 0; int temp0 = 0; int temp1 = 0; - uint const x_58 = (*(tint_symbol_2)).x; + uint const x_58 = (*(tint_symbol_1)).x; base_index_in = (128u * x_58); - uint const x_61 = (*(tint_symbol_2)).x; + uint const x_61 = (*(tint_symbol_1)).x; base_index_out = (256u * x_61); index_in0 = 127; index_in1 = 383; @@ -99,10 +99,14 @@ void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, c return; } +void tint_symbol_inner(const device In2& x_13, const device In1& x_17, device Out0& x_15, const device In0& x_19, uint3 gl_WorkGroupID_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = gl_WorkGroupID_param; + main_1(x_13, x_17, x_15, x_19, tint_symbol_2); +} + kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(2)]], const device In1& x_17 [[buffer(1)]], device Out0& x_15 [[buffer(3)]], const device In0& x_19 [[buffer(0)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = gl_WorkGroupID_param; - main_1(x_13, x_17, x_15, x_19, &(tint_symbol_3)); + tint_symbol_inner(x_13, x_17, x_15, x_19, gl_WorkGroupID_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.hlsl index 14fc121456..c1ab9af02a 100644 --- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.hlsl @@ -60,10 +60,13 @@ struct tint_symbol_1 { uint3 gl_WorkGroupID_param : SV_GroupID; }; -[numthreads(4, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 gl_WorkGroupID_param = tint_symbol.gl_WorkGroupID_param; +void main_inner(uint3 gl_WorkGroupID_param) { gl_WorkGroupID = gl_WorkGroupID_param; main_1(); +} + +[numthreads(4, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.gl_WorkGroupID_param); return; } diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl index d0db5166f2..393cfd1116 100644 --- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl @@ -23,7 +23,7 @@ struct In0 { /* 0x0000 */ tint_array_wrapper_2 data_in0; }; -void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, const device In0& x_19, thread uint3* const tint_symbol_2) { +void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, const device In0& x_19, thread uint3* const tint_symbol_1) { uint base_index_in = 0u; uint base_index_out = 0u; int index_in0 = 0; @@ -34,9 +34,9 @@ void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, c int i = 0; int temp0 = 0; int temp1 = 0; - uint const x_58 = (*(tint_symbol_2)).x; + uint const x_58 = (*(tint_symbol_1)).x; base_index_in = (128u * x_58); - uint const x_61 = (*(tint_symbol_2)).x; + uint const x_61 = (*(tint_symbol_1)).x; base_index_out = (256u * x_61); index_in0 = 127; index_in1 = 383; @@ -99,10 +99,14 @@ void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, c return; } +void tint_symbol_inner(const device In2& x_13, const device In1& x_17, device Out0& x_15, const device In0& x_19, uint3 gl_WorkGroupID_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = gl_WorkGroupID_param; + main_1(x_13, x_17, x_15, x_19, tint_symbol_2); +} + kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(2)]], const device In1& x_17 [[buffer(1)]], device Out0& x_15 [[buffer(3)]], const device In0& x_19 [[buffer(0)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = gl_WorkGroupID_param; - main_1(x_13, x_17, x_15, x_19, &(tint_symbol_3)); + tint_symbol_inner(x_13, x_17, x_15, x_19, gl_WorkGroupID_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.hlsl index df55b6b7fa..9f68c5dc25 100644 --- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.hlsl @@ -60,10 +60,13 @@ struct tint_symbol_1 { uint3 gl_WorkGroupID_param : SV_GroupID; }; -[numthreads(4, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 gl_WorkGroupID_param = tint_symbol.gl_WorkGroupID_param; +void main_inner(uint3 gl_WorkGroupID_param) { gl_WorkGroupID = gl_WorkGroupID_param; main_1(); +} + +[numthreads(4, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.gl_WorkGroupID_param); return; } diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl index 5063da4c8b..c91975f7e5 100644 --- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl @@ -23,7 +23,7 @@ struct In1 { /* 0x0000 */ tint_array_wrapper_2 data_in1; }; -void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, const device In1& x_19, thread uint3* const tint_symbol_2) { +void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, const device In1& x_19, thread uint3* const tint_symbol_1) { uint base_index_in = 0u; uint base_index_out = 0u; int index_in0 = 0; @@ -34,9 +34,9 @@ void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, c int i = 0; int temp0 = 0; int temp1 = 0; - uint const x_56 = (*(tint_symbol_2)).x; + uint const x_56 = (*(tint_symbol_1)).x; base_index_in = (128u * x_56); - uint const x_59 = (*(tint_symbol_2)).x; + uint const x_59 = (*(tint_symbol_1)).x; base_index_out = (256u * x_59); index_in0 = 0; index_in1 = -128; @@ -99,10 +99,14 @@ void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, c return; } +void tint_symbol_inner(const device In2& x_13, const device In0& x_17, device Out0& x_15, const device In1& x_19, uint3 gl_WorkGroupID_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = gl_WorkGroupID_param; + main_1(x_13, x_17, x_15, x_19, tint_symbol_2); +} + kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(2)]], const device In0& x_17 [[buffer(0)]], device Out0& x_15 [[buffer(3)]], const device In1& x_19 [[buffer(1)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = gl_WorkGroupID_param; - main_1(x_13, x_17, x_15, x_19, &(tint_symbol_3)); + tint_symbol_inner(x_13, x_17, x_15, x_19, gl_WorkGroupID_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.hlsl index df55b6b7fa..9f68c5dc25 100644 --- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.hlsl @@ -60,10 +60,13 @@ struct tint_symbol_1 { uint3 gl_WorkGroupID_param : SV_GroupID; }; -[numthreads(4, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 gl_WorkGroupID_param = tint_symbol.gl_WorkGroupID_param; +void main_inner(uint3 gl_WorkGroupID_param) { gl_WorkGroupID = gl_WorkGroupID_param; main_1(); +} + +[numthreads(4, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.gl_WorkGroupID_param); return; } diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl index 5063da4c8b..c91975f7e5 100644 --- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl @@ -23,7 +23,7 @@ struct In1 { /* 0x0000 */ tint_array_wrapper_2 data_in1; }; -void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, const device In1& x_19, thread uint3* const tint_symbol_2) { +void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, const device In1& x_19, thread uint3* const tint_symbol_1) { uint base_index_in = 0u; uint base_index_out = 0u; int index_in0 = 0; @@ -34,9 +34,9 @@ void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, c int i = 0; int temp0 = 0; int temp1 = 0; - uint const x_56 = (*(tint_symbol_2)).x; + uint const x_56 = (*(tint_symbol_1)).x; base_index_in = (128u * x_56); - uint const x_59 = (*(tint_symbol_2)).x; + uint const x_59 = (*(tint_symbol_1)).x; base_index_out = (256u * x_59); index_in0 = 0; index_in1 = -128; @@ -99,10 +99,14 @@ void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, c return; } +void tint_symbol_inner(const device In2& x_13, const device In0& x_17, device Out0& x_15, const device In1& x_19, uint3 gl_WorkGroupID_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = gl_WorkGroupID_param; + main_1(x_13, x_17, x_15, x_19, tint_symbol_2); +} + kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(2)]], const device In0& x_17 [[buffer(0)]], device Out0& x_15 [[buffer(3)]], const device In1& x_19 [[buffer(1)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = gl_WorkGroupID_param; - main_1(x_13, x_17, x_15, x_19, &(tint_symbol_3)); + tint_symbol_inner(x_13, x_17, x_15, x_19, gl_WorkGroupID_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.hlsl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.hlsl index bd7ca9ffef..3a4d9896b8 100644 --- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { float4 color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.color_1 = inner_result.color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.msl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.msl index 8c9629d15c..1bd22a2572 100644 --- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.msl +++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.msl @@ -8,16 +8,22 @@ struct tint_symbol_1 { float4 color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); +void main_1(thread float4* const tint_symbol_3) { + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.color_1=tint_symbol_2.color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.color_1 = inner_result.color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.hlsl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.hlsl index bd7ca9ffef..3a4d9896b8 100644 --- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.hlsl @@ -12,9 +12,15 @@ struct tint_symbol { float4 color_1 : SV_Target0; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {color}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.color_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.color_1 = inner_result.color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.msl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.msl index 8c9629d15c..1bd22a2572 100644 --- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.msl +++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.msl @@ -8,16 +8,22 @@ struct tint_symbol_1 { float4 color_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_4) { - *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f); +void main_1(thread float4* const tint_symbol_3) { + *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; } +main_out tint_symbol_inner(thread float4* const tint_symbol_4) { + main_1(tint_symbol_4); + main_out const tint_symbol_2 = {.color_1=*(tint_symbol_4)}; + return tint_symbol_2; +} + fragment tint_symbol_1 tint_symbol() { thread float4 tint_symbol_5 = 0.0f; - main_1(&(tint_symbol_5)); - main_out const tint_symbol_2 = {.color_1=tint_symbol_5}; - tint_symbol_1 const tint_symbol_3 = {.color_1=tint_symbol_2.color_1}; - return tint_symbol_3; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.color_1 = inner_result.color_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.hlsl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.hlsl index 23e415ca10..b1179b41a7 100644 --- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.hlsl @@ -20,11 +20,16 @@ struct tint_symbol_3 { float4 color_out_1 : SV_Target0; }; -tint_symbol_3 main(tint_symbol_2 tint_symbol_1) { - const float4 gl_FragCoord_param = tint_symbol_1.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_4 = {color_out}; - const tint_symbol_3 tint_symbol_5 = {tint_symbol_4.color_out_1}; - return tint_symbol_5; + return tint_symbol_4; +} + +tint_symbol_3 main(tint_symbol_2 tint_symbol_1) { + const main_out inner_result = main_inner(tint_symbol_1.gl_FragCoord_param); + tint_symbol_3 wrapper_result = (tint_symbol_3)0; + wrapper_result.color_out_1 = inner_result.color_out_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.msl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.msl index 320d767ca5..6992835a61 100644 --- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.msl +++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.msl @@ -5,24 +5,30 @@ using namespace metal; struct main_out { float4 color_out_1; }; -struct tint_symbol_3 { +struct tint_symbol_2 { float4 color_out_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, texture2d tint_symbol_7, thread float4* const tint_symbol_8) { - float4 const x_19 = *(tint_symbol_6); - float4 const x_22 = tint_symbol_7.read(uint2(int2(float2(x_19.x, x_19.y)))); - *(tint_symbol_8) = x_22; +void main_1(thread float4* const tint_symbol_4, texture2d tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_19 = *(tint_symbol_4); + float4 const x_22 = tint_symbol_5.read(uint2(int2(float2(x_19.x, x_19.y)))); + *(tint_symbol_6) = x_22; return; } -fragment tint_symbol_3 tint_symbol_1(texture2d tint_symbol_10 [[texture(0)]], float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(&(tint_symbol_9), tint_symbol_10, &(tint_symbol_11)); - main_out const tint_symbol_4 = {.color_out_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.color_out_1=tint_symbol_4.color_out_1}; - return tint_symbol_5; +main_out tint_symbol_1_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_7, texture2d tint_symbol_8, thread float4* const tint_symbol_9) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(tint_symbol_7, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_3 = {.color_out_1=*(tint_symbol_9)}; + return tint_symbol_3; +} + +fragment tint_symbol_2 tint_symbol_1(texture2d tint_symbol_11 [[texture(0)]], float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_10 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_1_inner(gl_FragCoord_param, &(tint_symbol_10), tint_symbol_11, &(tint_symbol_12)); + tint_symbol_2 wrapper_result = {}; + wrapper_result.color_out_1 = inner_result.color_out_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.hlsl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.hlsl index 52377145d1..7edab18ffe 100644 --- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.hlsl @@ -23,11 +23,16 @@ struct tint_symbol_3 { float4 color_out_1 : SV_Target0; }; -tint_symbol_3 main(tint_symbol_2 tint_symbol_1) { - const float4 gl_FragCoord_param = tint_symbol_1.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_4 = {color_out}; - const tint_symbol_3 tint_symbol_5 = {tint_symbol_4.color_out_1}; - return tint_symbol_5; + return tint_symbol_4; +} + +tint_symbol_3 main(tint_symbol_2 tint_symbol_1) { + const main_out inner_result = main_inner(tint_symbol_1.gl_FragCoord_param); + tint_symbol_3 wrapper_result = (tint_symbol_3)0; + wrapper_result.color_out_1 = inner_result.color_out_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.msl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.msl index 838f1dec5e..a1b603f597 100644 --- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.msl +++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.msl @@ -8,24 +8,30 @@ using namespace metal; struct main_out { float4 color_out_1; }; -struct tint_symbol_3 { +struct tint_symbol_2 { float4 color_out_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, texture2d tint_symbol_7, thread float4* const tint_symbol_8) { - float4 const x_19 = *(tint_symbol_6); - float4 const x_22 = tint_symbol_7.read(uint2(int2(float2(x_19.x, x_19.y)))); - *(tint_symbol_8) = x_22; +void main_1(thread float4* const tint_symbol_4, texture2d tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_19 = *(tint_symbol_4); + float4 const x_22 = tint_symbol_5.read(uint2(int2(float2(x_19.x, x_19.y)))); + *(tint_symbol_6) = x_22; return; } -fragment tint_symbol_3 tint_symbol_1(texture2d tint_symbol_10 [[texture(0)]], float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_11 = 0.0f; - tint_symbol_9 = gl_FragCoord_param; - main_1(&(tint_symbol_9), tint_symbol_10, &(tint_symbol_11)); - main_out const tint_symbol_4 = {.color_out_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.color_out_1=tint_symbol_4.color_out_1}; - return tint_symbol_5; +main_out tint_symbol_1_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_7, texture2d tint_symbol_8, thread float4* const tint_symbol_9) { + *(tint_symbol_7) = gl_FragCoord_param; + main_1(tint_symbol_7, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_3 = {.color_out_1=*(tint_symbol_9)}; + return tint_symbol_3; +} + +fragment tint_symbol_2 tint_symbol_1(texture2d tint_symbol_11 [[texture(0)]], float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_10 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + main_out const inner_result = tint_symbol_1_inner(gl_FragCoord_param, &(tint_symbol_10), tint_symbol_11, &(tint_symbol_12)); + tint_symbol_2 wrapper_result = {}; + wrapper_result.color_out_1 = inner_result.color_out_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.hlsl index 666291eb07..964750716b 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.hlsl @@ -15,10 +15,13 @@ struct tint_symbol_1 { uint3 x_2_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_2_param = tint_symbol.x_2_param; +void main_inner(uint3 x_2_param) { x_2 = x_2_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_2_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.msl index 5a1dc97870..05c7a3184f 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.msl @@ -5,18 +5,22 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) { - uint const x_21 = (*(tint_symbol_2)).x; +void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) { + uint const x_21 = (*(tint_symbol_1)).x; uint const x_23 = x_5.field0[x_21]; uint const x_25 = x_6.field0[x_21]; x_7.field0[x_21] = select(0u, 1u, (as_type(x_23) > as_type(x_25))); return; } +void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_2_param; + main_1(x_5, x_6, x_7, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_2_param; - main_1(x_5, x_6, x_7, &(tint_symbol_3)); + tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.hlsl index 666291eb07..964750716b 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.hlsl @@ -15,10 +15,13 @@ struct tint_symbol_1 { uint3 x_2_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_2_param = tint_symbol.x_2_param; +void main_inner(uint3 x_2_param) { x_2 = x_2_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_2_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.msl index 5a1dc97870..05c7a3184f 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.msl @@ -5,18 +5,22 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) { - uint const x_21 = (*(tint_symbol_2)).x; +void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) { + uint const x_21 = (*(tint_symbol_1)).x; uint const x_23 = x_5.field0[x_21]; uint const x_25 = x_6.field0[x_21]; x_7.field0[x_21] = select(0u, 1u, (as_type(x_23) > as_type(x_25))); return; } +void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_2_param; + main_1(x_5, x_6, x_7, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_2_param; - main_1(x_5, x_6, x_7, &(tint_symbol_3)); + tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.hlsl index 95f5645480..5eaf81fab7 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.hlsl @@ -15,10 +15,13 @@ struct tint_symbol_1 { uint3 x_2_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_2_param = tint_symbol.x_2_param; +void main_inner(uint3 x_2_param) { x_2 = x_2_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_2_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.msl index 459deef2fe..06202825cb 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.msl @@ -5,18 +5,22 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) { - uint const x_21 = (*(tint_symbol_2)).x; +void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) { + uint const x_21 = (*(tint_symbol_1)).x; uint const x_23 = x_5.field0[x_21]; uint const x_25 = x_6.field0[x_21]; x_7.field0[x_21] = select(0u, 1u, (as_type(x_23) >= as_type(x_25))); return; } +void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_2_param; + main_1(x_5, x_6, x_7, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_2_param; - main_1(x_5, x_6, x_7, &(tint_symbol_3)); + tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.hlsl index 95f5645480..5eaf81fab7 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.hlsl @@ -15,10 +15,13 @@ struct tint_symbol_1 { uint3 x_2_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_2_param = tint_symbol.x_2_param; +void main_inner(uint3 x_2_param) { x_2 = x_2_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_2_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.msl index 459deef2fe..06202825cb 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.msl @@ -5,18 +5,22 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) { - uint const x_21 = (*(tint_symbol_2)).x; +void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) { + uint const x_21 = (*(tint_symbol_1)).x; uint const x_23 = x_5.field0[x_21]; uint const x_25 = x_6.field0[x_21]; x_7.field0[x_21] = select(0u, 1u, (as_type(x_23) >= as_type(x_25))); return; } +void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_2_param; + main_1(x_5, x_6, x_7, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_2_param; - main_1(x_5, x_6, x_7, &(tint_symbol_3)); + tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.hlsl index 03594c8f46..4523f9af36 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.hlsl @@ -15,10 +15,13 @@ struct tint_symbol_1 { uint3 x_2_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_2_param = tint_symbol.x_2_param; +void main_inner(uint3 x_2_param) { x_2 = x_2_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_2_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.msl index 169d49e21e..5ca55a558c 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.msl @@ -5,18 +5,22 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) { - uint const x_21 = (*(tint_symbol_2)).x; +void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) { + uint const x_21 = (*(tint_symbol_1)).x; uint const x_23 = x_5.field0[x_21]; uint const x_25 = x_6.field0[x_21]; x_7.field0[x_21] = select(0u, 1u, (as_type(x_23) < as_type(x_25))); return; } +void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_2_param; + main_1(x_5, x_6, x_7, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_2_param; - main_1(x_5, x_6, x_7, &(tint_symbol_3)); + tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.hlsl index 03594c8f46..4523f9af36 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.hlsl @@ -15,10 +15,13 @@ struct tint_symbol_1 { uint3 x_2_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_2_param = tint_symbol.x_2_param; +void main_inner(uint3 x_2_param) { x_2 = x_2_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_2_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.msl index 169d49e21e..5ca55a558c 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.msl @@ -5,18 +5,22 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) { - uint const x_21 = (*(tint_symbol_2)).x; +void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) { + uint const x_21 = (*(tint_symbol_1)).x; uint const x_23 = x_5.field0[x_21]; uint const x_25 = x_6.field0[x_21]; x_7.field0[x_21] = select(0u, 1u, (as_type(x_23) < as_type(x_25))); return; } +void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_2_param; + main_1(x_5, x_6, x_7, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_2_param; - main_1(x_5, x_6, x_7, &(tint_symbol_3)); + tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.hlsl index 65e9ee6005..5a28ab593f 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.hlsl @@ -15,10 +15,13 @@ struct tint_symbol_1 { uint3 x_2_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_2_param = tint_symbol.x_2_param; +void main_inner(uint3 x_2_param) { x_2 = x_2_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_2_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.msl index 7ae0315e4e..6e1788b4a2 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.msl @@ -5,18 +5,22 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) { - uint const x_21 = (*(tint_symbol_2)).x; +void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) { + uint const x_21 = (*(tint_symbol_1)).x; uint const x_23 = x_5.field0[x_21]; uint const x_25 = x_6.field0[x_21]; x_7.field0[x_21] = select(0u, 1u, (as_type(x_23) <= as_type(x_25))); return; } +void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_2_param; + main_1(x_5, x_6, x_7, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_2_param; - main_1(x_5, x_6, x_7, &(tint_symbol_3)); + tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.hlsl index 65e9ee6005..5a28ab593f 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.hlsl @@ -15,10 +15,13 @@ struct tint_symbol_1 { uint3 x_2_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_2_param = tint_symbol.x_2_param; +void main_inner(uint3 x_2_param) { x_2 = x_2_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_2_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.msl index 7ae0315e4e..6e1788b4a2 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.msl @@ -5,18 +5,22 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) { - uint const x_21 = (*(tint_symbol_2)).x; +void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) { + uint const x_21 = (*(tint_symbol_1)).x; uint const x_23 = x_5.field0[x_21]; uint const x_25 = x_6.field0[x_21]; x_7.field0[x_21] = select(0u, 1u, (as_type(x_23) <= as_type(x_25))); return; } +void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_2_param; + main_1(x_5, x_6, x_7, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_2_param; - main_1(x_5, x_6, x_7, &(tint_symbol_3)); + tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.hlsl index 09ae3b9ddd..c13ebb0754 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.hlsl @@ -17,10 +17,13 @@ struct tint_symbol_1 { uint3 x_3_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_3_param = tint_symbol.x_3_param; +void main_inner(uint3 x_3_param) { x_3 = x_3_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_3_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.msl index ef9ae4b503..128a186483 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.msl @@ -5,8 +5,8 @@ struct S { /* 0x0000 */ int field0[1]; }; -void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_2) { - uint const x_26 = (*(tint_symbol_2)).x; +void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_1) { + uint const x_26 = (*(tint_symbol_1)).x; int const x_28 = x_6.field0[x_26]; int const x_30 = x_7.field0[x_26]; int const x_32 = x_8.field0[x_26]; @@ -14,10 +14,14 @@ void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread u return; } +void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, device S& x_9, uint3 x_3_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_3_param; + main_1(x_6, x_7, x_8, x_9, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]], device S& x_9 [[buffer(3)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_3_param; - main_1(x_6, x_7, x_8, x_9, &(tint_symbol_3)); + tint_symbol_inner(x_6, x_7, x_8, x_9, x_3_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.hlsl index 09ae3b9ddd..c13ebb0754 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.hlsl @@ -17,10 +17,13 @@ struct tint_symbol_1 { uint3 x_3_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_3_param = tint_symbol.x_3_param; +void main_inner(uint3 x_3_param) { x_3 = x_3_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_3_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.msl index ef9ae4b503..128a186483 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.msl @@ -5,8 +5,8 @@ struct S { /* 0x0000 */ int field0[1]; }; -void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_2) { - uint const x_26 = (*(tint_symbol_2)).x; +void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_1) { + uint const x_26 = (*(tint_symbol_1)).x; int const x_28 = x_6.field0[x_26]; int const x_30 = x_7.field0[x_26]; int const x_32 = x_8.field0[x_26]; @@ -14,10 +14,14 @@ void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread u return; } +void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, device S& x_9, uint3 x_3_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_3_param; + main_1(x_6, x_7, x_8, x_9, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]], device S& x_9 [[buffer(3)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_3_param; - main_1(x_6, x_7, x_8, x_9, &(tint_symbol_3)); + tint_symbol_inner(x_6, x_7, x_8, x_9, x_3_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.hlsl index fd7b050fae..86f9413eb8 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.hlsl @@ -13,10 +13,13 @@ struct tint_symbol_1 { uint3 x_3_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_3_param = tint_symbol.x_3_param; +void main_inner(uint3 x_3_param) { x_3 = x_3_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_3_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.msl index dd60856f81..e2a3991dda 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.msl @@ -5,17 +5,21 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) { - uint const x_21 = (*(tint_symbol_2)).x; +void main_1(device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) { + uint const x_21 = (*(tint_symbol_1)).x; uint const x_23 = x_6.field0[x_21]; x_7.field0[x_21] = as_type(abs(as_type(x_23))); return; } +void tint_symbol_inner(device S& x_6, device S& x_7, uint3 x_3_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_3_param; + main_1(x_6, x_7, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_3_param; - main_1(x_6, x_7, &(tint_symbol_3)); + tint_symbol_inner(x_6, x_7, x_3_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.hlsl index fd7b050fae..86f9413eb8 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.hlsl @@ -13,10 +13,13 @@ struct tint_symbol_1 { uint3 x_3_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_3_param = tint_symbol.x_3_param; +void main_inner(uint3 x_3_param) { x_3 = x_3_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_3_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.msl index dd60856f81..e2a3991dda 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.msl @@ -5,17 +5,21 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) { - uint const x_21 = (*(tint_symbol_2)).x; +void main_1(device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) { + uint const x_21 = (*(tint_symbol_1)).x; uint const x_23 = x_6.field0[x_21]; x_7.field0[x_21] = as_type(abs(as_type(x_23))); return; } +void tint_symbol_inner(device S& x_6, device S& x_7, uint3 x_3_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_3_param; + main_1(x_6, x_7, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_3_param; - main_1(x_6, x_7, &(tint_symbol_3)); + tint_symbol_inner(x_6, x_7, x_3_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.hlsl index 55f55f52d4..4a2880ea3b 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.hlsl @@ -17,10 +17,13 @@ struct tint_symbol_1 { uint3 x_3_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_3_param = tint_symbol.x_3_param; +void main_inner(uint3 x_3_param) { x_3 = x_3_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_3_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.msl index f8e42e1abf..ecdf99e072 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.msl @@ -5,8 +5,8 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_2) { - uint const x_23 = (*(tint_symbol_2)).x; +void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_1) { + uint const x_23 = (*(tint_symbol_1)).x; uint const x_25 = x_6.field0[x_23]; uint const x_27 = x_7.field0[x_23]; uint const x_29 = x_8.field0[x_23]; @@ -14,10 +14,14 @@ void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread u return; } +void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, device S& x_9, uint3 x_3_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_3_param; + main_1(x_6, x_7, x_8, x_9, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]], device S& x_9 [[buffer(3)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_3_param; - main_1(x_6, x_7, x_8, x_9, &(tint_symbol_3)); + tint_symbol_inner(x_6, x_7, x_8, x_9, x_3_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.hlsl index 55f55f52d4..4a2880ea3b 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.hlsl @@ -17,10 +17,13 @@ struct tint_symbol_1 { uint3 x_3_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_3_param = tint_symbol.x_3_param; +void main_inner(uint3 x_3_param) { x_3 = x_3_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_3_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.msl index f8e42e1abf..ecdf99e072 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.msl @@ -5,8 +5,8 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_2) { - uint const x_23 = (*(tint_symbol_2)).x; +void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_1) { + uint const x_23 = (*(tint_symbol_1)).x; uint const x_25 = x_6.field0[x_23]; uint const x_27 = x_7.field0[x_23]; uint const x_29 = x_8.field0[x_23]; @@ -14,10 +14,14 @@ void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread u return; } +void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, device S& x_9, uint3 x_3_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_3_param; + main_1(x_6, x_7, x_8, x_9, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]], device S& x_9 [[buffer(3)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_3_param; - main_1(x_6, x_7, x_8, x_9, &(tint_symbol_3)); + tint_symbol_inner(x_6, x_7, x_8, x_9, x_3_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.hlsl index 31dbd68538..60e8412ff9 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.hlsl @@ -15,10 +15,13 @@ struct tint_symbol_1 { uint3 x_3_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_3_param = tint_symbol.x_3_param; +void main_inner(uint3 x_3_param) { x_3 = x_3_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_3_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.msl index d2e3922aac..f31bb6f7a4 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.msl @@ -5,18 +5,22 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_2) { - uint const x_21 = (*(tint_symbol_2)).x; +void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_1) { + uint const x_21 = (*(tint_symbol_1)).x; uint const x_23 = x_6.field0[x_21]; uint const x_25 = x_7.field0[x_21]; x_8.field0[x_21] = as_type(max(as_type(x_23), as_type(x_25))); return; } +void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, uint3 x_3_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_3_param; + main_1(x_6, x_7, x_8, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_3_param; - main_1(x_6, x_7, x_8, &(tint_symbol_3)); + tint_symbol_inner(x_6, x_7, x_8, x_3_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.hlsl index 31dbd68538..60e8412ff9 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.hlsl @@ -15,10 +15,13 @@ struct tint_symbol_1 { uint3 x_3_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_3_param = tint_symbol.x_3_param; +void main_inner(uint3 x_3_param) { x_3 = x_3_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_3_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.msl index d2e3922aac..f31bb6f7a4 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.msl @@ -5,18 +5,22 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_2) { - uint const x_21 = (*(tint_symbol_2)).x; +void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_1) { + uint const x_21 = (*(tint_symbol_1)).x; uint const x_23 = x_6.field0[x_21]; uint const x_25 = x_7.field0[x_21]; x_8.field0[x_21] = as_type(max(as_type(x_23), as_type(x_25))); return; } +void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, uint3 x_3_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_3_param; + main_1(x_6, x_7, x_8, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_3_param; - main_1(x_6, x_7, x_8, &(tint_symbol_3)); + tint_symbol_inner(x_6, x_7, x_8, x_3_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.hlsl index 12b249cbf9..00a6492f80 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.hlsl @@ -15,10 +15,13 @@ struct tint_symbol_1 { uint3 x_3_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_3_param = tint_symbol.x_3_param; +void main_inner(uint3 x_3_param) { x_3 = x_3_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_3_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.msl index aa0d2805d8..2eb6a5de93 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.msl @@ -5,18 +5,22 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_2) { - uint const x_21 = (*(tint_symbol_2)).x; +void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_1) { + uint const x_21 = (*(tint_symbol_1)).x; uint const x_23 = x_6.field0[x_21]; uint const x_25 = x_7.field0[x_21]; x_8.field0[x_21] = as_type(min(as_type(x_23), as_type(x_25))); return; } +void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, uint3 x_3_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_3_param; + main_1(x_6, x_7, x_8, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_3_param; - main_1(x_6, x_7, x_8, &(tint_symbol_3)); + tint_symbol_inner(x_6, x_7, x_8, x_3_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.hlsl index 12b249cbf9..00a6492f80 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.hlsl @@ -15,10 +15,13 @@ struct tint_symbol_1 { uint3 x_3_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_3_param = tint_symbol.x_3_param; +void main_inner(uint3 x_3_param) { x_3 = x_3_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_3_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.msl index aa0d2805d8..2eb6a5de93 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.msl @@ -5,18 +5,22 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_2) { - uint const x_21 = (*(tint_symbol_2)).x; +void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_1) { + uint const x_21 = (*(tint_symbol_1)).x; uint const x_23 = x_6.field0[x_21]; uint const x_25 = x_7.field0[x_21]; x_8.field0[x_21] = as_type(min(as_type(x_23), as_type(x_25))); return; } +void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, uint3 x_3_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_3_param; + main_1(x_6, x_7, x_8, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_3_param; - main_1(x_6, x_7, x_8, &(tint_symbol_3)); + tint_symbol_inner(x_6, x_7, x_8, x_3_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.hlsl index 0533d3d36c..f049f3f186 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.hlsl @@ -15,10 +15,13 @@ struct tint_symbol_1 { uint3 x_2_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_2_param = tint_symbol.x_2_param; +void main_inner(uint3 x_2_param) { x_2 = x_2_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_2_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.msl index df3eba3114..9ecbc0fa3c 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.msl @@ -5,18 +5,22 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) { - uint const x_20 = (*(tint_symbol_2)).x; +void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) { + uint const x_20 = (*(tint_symbol_1)).x; uint const x_22 = x_5.field0[x_20]; uint const x_24 = x_6.field0[x_20]; x_7.field0[x_20] = as_type((as_type(x_22) / as_type(x_24))); return; } +void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_2_param; + main_1(x_5, x_6, x_7, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_2_param; - main_1(x_5, x_6, x_7, &(tint_symbol_3)); + tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.hlsl index 0533d3d36c..f049f3f186 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.hlsl @@ -15,10 +15,13 @@ struct tint_symbol_1 { uint3 x_2_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_2_param = tint_symbol.x_2_param; +void main_inner(uint3 x_2_param) { x_2 = x_2_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_2_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.msl index df3eba3114..9ecbc0fa3c 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.msl @@ -5,18 +5,22 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) { - uint const x_20 = (*(tint_symbol_2)).x; +void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) { + uint const x_20 = (*(tint_symbol_1)).x; uint const x_22 = x_5.field0[x_20]; uint const x_24 = x_6.field0[x_20]; x_7.field0[x_20] = as_type((as_type(x_22) / as_type(x_24))); return; } +void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_2_param; + main_1(x_5, x_6, x_7, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_2_param; - main_1(x_5, x_6, x_7, &(tint_symbol_3)); + tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.hlsl index 35858e0617..b99e5731ce 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.hlsl @@ -13,10 +13,13 @@ struct tint_symbol_1 { uint3 x_2_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_2_param = tint_symbol.x_2_param; +void main_inner(uint3 x_2_param) { x_2 = x_2_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_2_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.msl index d0c4825f35..4e6d9bd4bf 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.msl @@ -10,17 +10,21 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_5, device S& x_6, thread uint3* const tint_symbol_2) { - uint const x_20 = (*(tint_symbol_2)).x; +void main_1(device S& x_5, device S& x_6, thread uint3* const tint_symbol_1) { + uint const x_20 = (*(tint_symbol_1)).x; uint const x_22 = x_5.field0[x_20]; x_6.field0[x_20] = as_type(tint_unary_minus(as_type(x_22))); return; } +void tint_symbol_inner(device S& x_5, device S& x_6, uint3 x_2_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_2_param; + main_1(x_5, x_6, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_2_param; - main_1(x_5, x_6, &(tint_symbol_3)); + tint_symbol_inner(x_5, x_6, x_2_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.hlsl index 35858e0617..b99e5731ce 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.hlsl @@ -13,10 +13,13 @@ struct tint_symbol_1 { uint3 x_2_param : SV_DispatchThreadID; }; -[numthreads(1, 1, 1)] -void main(tint_symbol_1 tint_symbol) { - const uint3 x_2_param = tint_symbol.x_2_param; +void main_inner(uint3 x_2_param) { x_2 = x_2_param; main_1(); +} + +[numthreads(1, 1, 1)] +void main(tint_symbol_1 tint_symbol) { + main_inner(tint_symbol.x_2_param); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.msl index d0c4825f35..4e6d9bd4bf 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.msl @@ -10,17 +10,21 @@ struct S { /* 0x0000 */ uint field0[1]; }; -void main_1(device S& x_5, device S& x_6, thread uint3* const tint_symbol_2) { - uint const x_20 = (*(tint_symbol_2)).x; +void main_1(device S& x_5, device S& x_6, thread uint3* const tint_symbol_1) { + uint const x_20 = (*(tint_symbol_1)).x; uint const x_22 = x_5.field0[x_20]; x_6.field0[x_20] = as_type(tint_unary_minus(as_type(x_22))); return; } +void tint_symbol_inner(device S& x_5, device S& x_6, uint3 x_2_param, thread uint3* const tint_symbol_2) { + *(tint_symbol_2) = x_2_param; + main_1(x_5, x_6, tint_symbol_2); +} + kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]]) { thread uint3 tint_symbol_3 = 0u; - tint_symbol_3 = x_2_param; - main_1(x_5, x_6, &(tint_symbol_3)); + tint_symbol_inner(x_5, x_6, x_2_param, &(tint_symbol_3)); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.hlsl index 1e05739fb1..000a6ee40b 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.hlsl @@ -23,11 +23,17 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float2 x_3_param = tint_symbol.x_3_param; +main_out main_inner(float2 x_3_param) { x_3 = x_3_param; main_1(); const main_out tint_symbol_3 = {x_4, gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1, tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.msl index 7bcd3c26f3..95eaa19913 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.msl @@ -13,24 +13,30 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float2* const tint_symbol_6, thread uint* const tint_symbol_7, thread float4* const tint_symbol_8) { - float const x_30 = (*(tint_symbol_6)).x; - float const x_36 = (*(tint_symbol_6)).y; - *(tint_symbol_7) = (uint((((x_30 + 1.027777791f) * 18.0f) - 1.0f)) + (uint((((x_36 + 1.027777791f) * 18.0f) - 1.0f)) * 36u)); - float2 const x_43 = *(tint_symbol_6); - *(tint_symbol_8) = float4(x_43.x, x_43.y, 0.0f, 1.0f); +void main_1(thread float2* const tint_symbol_5, thread uint* const tint_symbol_6, thread float4* const tint_symbol_7) { + float const x_30 = (*(tint_symbol_5)).x; + float const x_36 = (*(tint_symbol_5)).y; + *(tint_symbol_6) = (uint((((x_30 + 1.027777791f) * 18.0f) - 1.0f)) + (uint((((x_36 + 1.027777791f) * 18.0f) - 1.0f)) * 36u)); + float2 const x_43 = *(tint_symbol_5); + *(tint_symbol_7) = float4(x_43.x, x_43.y, 0.0f, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float2 tint_symbol_9 = 0.0f; - thread uint tint_symbol_10 = 0u; - thread float4 tint_symbol_11 = 0.0f; - float2 const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_9 = x_3_param; - main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_10, .gl_Position=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float2 x_3_param, thread float2* const tint_symbol_8, thread uint* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_8) = x_3_param; + main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_9), .gl_Position=*(tint_symbol_10)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float2 tint_symbol_11 = 0.0f; + thread uint tint_symbol_12 = 0u; + thread float4 tint_symbol_13 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.hlsl index 1e05739fb1..000a6ee40b 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.hlsl @@ -23,11 +23,17 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float2 x_3_param = tint_symbol.x_3_param; +main_out main_inner(float2 x_3_param) { x_3 = x_3_param; main_1(); const main_out tint_symbol_3 = {x_4, gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1, tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.msl index 7bcd3c26f3..95eaa19913 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.msl @@ -13,24 +13,30 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float2* const tint_symbol_6, thread uint* const tint_symbol_7, thread float4* const tint_symbol_8) { - float const x_30 = (*(tint_symbol_6)).x; - float const x_36 = (*(tint_symbol_6)).y; - *(tint_symbol_7) = (uint((((x_30 + 1.027777791f) * 18.0f) - 1.0f)) + (uint((((x_36 + 1.027777791f) * 18.0f) - 1.0f)) * 36u)); - float2 const x_43 = *(tint_symbol_6); - *(tint_symbol_8) = float4(x_43.x, x_43.y, 0.0f, 1.0f); +void main_1(thread float2* const tint_symbol_5, thread uint* const tint_symbol_6, thread float4* const tint_symbol_7) { + float const x_30 = (*(tint_symbol_5)).x; + float const x_36 = (*(tint_symbol_5)).y; + *(tint_symbol_6) = (uint((((x_30 + 1.027777791f) * 18.0f) - 1.0f)) + (uint((((x_36 + 1.027777791f) * 18.0f) - 1.0f)) * 36u)); + float2 const x_43 = *(tint_symbol_5); + *(tint_symbol_7) = float4(x_43.x, x_43.y, 0.0f, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float2 tint_symbol_9 = 0.0f; - thread uint tint_symbol_10 = 0u; - thread float4 tint_symbol_11 = 0.0f; - float2 const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_9 = x_3_param; - main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_10, .gl_Position=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float2 x_3_param, thread float2* const tint_symbol_8, thread uint* const tint_symbol_9, thread float4* const tint_symbol_10) { + *(tint_symbol_8) = x_3_param; + main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_9), .gl_Position=*(tint_symbol_10)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float2 tint_symbol_11 = 0.0f; + thread uint tint_symbol_12 = 0u; + thread float4 tint_symbol_13 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.hlsl index 067c7f0458..1d2fad3031 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.hlsl @@ -18,11 +18,16 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.msl index f6543149fb..632dea031d 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.msl @@ -11,21 +11,26 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_22 = *(tint_symbol_6); +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_22 = *(tint_symbol_5); float2 const x_23 = float2(x_22.x, x_22.y); - *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.5f, 1.0f); + *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.5f, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_8 = position_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = position_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.hlsl index 067c7f0458..1d2fad3031 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.hlsl @@ -18,11 +18,16 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.msl index f6543149fb..632dea031d 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.msl @@ -11,21 +11,26 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_22 = *(tint_symbol_6); +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_22 = *(tint_symbol_5); float2 const x_23 = float2(x_22.x, x_22.y); - *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.5f, 1.0f); + *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.5f, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_8 = position_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = position_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.hlsl index 25aecc7b1d..c8a4ba6782 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {color_out, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.msl index d3a44441db..228d014ebc 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); - *(tint_symbol_5) = 0.300000012f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = 0.300000012f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.hlsl index 25aecc7b1d..c8a4ba6782 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {color_out, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.msl index d3a44441db..228d014ebc 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); - *(tint_symbol_5) = 0.300000012f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = 0.300000012f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.hlsl index 224ce12c82..f0f4322801 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.hlsl @@ -18,11 +18,16 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.msl index ccc433eab1..e57b9046f1 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.msl @@ -11,21 +11,26 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_22 = *(tint_symbol_6); +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_22 = *(tint_symbol_5); float2 const x_23 = float2(x_22.x, x_22.y); - *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.600000024f, 1.0f); + *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.600000024f, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_8 = position_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = position_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.hlsl index 224ce12c82..f0f4322801 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.hlsl @@ -18,11 +18,16 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.msl index ccc433eab1..e57b9046f1 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.msl @@ -11,21 +11,26 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_22 = *(tint_symbol_6); +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_22 = *(tint_symbol_5); float2 const x_23 = float2(x_22.x, x_22.y); - *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.600000024f, 1.0f); + *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.600000024f, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_8 = position_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = position_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.hlsl index 4e8b74db24..22d54fa55f 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {color_out, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.msl index 01893070d2..e4a6bc2e06 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); - *(tint_symbol_5) = 0.400000006f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = 0.400000006f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.hlsl index 4e8b74db24..22d54fa55f 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {color_out, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.msl index 01893070d2..e4a6bc2e06 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); - *(tint_symbol_5) = 0.400000006f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = 0.400000006f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.hlsl index 2f5b031312..557eaf1f78 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.hlsl @@ -18,11 +18,16 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.msl index 0f220e3275..46d663f81c 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.msl @@ -11,21 +11,26 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_22 = *(tint_symbol_6); +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_22 = *(tint_symbol_5); float2 const x_23 = float2(x_22.x, x_22.y); - *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.400000006f, 1.0f); + *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.400000006f, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_8 = position_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = position_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.hlsl index 2f5b031312..557eaf1f78 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.hlsl @@ -18,11 +18,16 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.msl index 0f220e3275..46d663f81c 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.msl @@ -11,21 +11,26 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_22 = *(tint_symbol_6); +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_22 = *(tint_symbol_5); float2 const x_23 = float2(x_22.x, x_22.y); - *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.400000006f, 1.0f); + *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.400000006f, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_8 = position_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = position_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.hlsl index 47aefbb5ab..5c6665b6c4 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {color_out, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.msl index 842cf9d0ca..242a626f14 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); - *(tint_symbol_5) = 0.699999988f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = 0.699999988f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.hlsl index 47aefbb5ab..5c6665b6c4 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {color_out, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.msl index 842cf9d0ca..242a626f14 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); - *(tint_symbol_5) = 0.699999988f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = 0.699999988f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.hlsl index c0bd655f3a..1efaec9a16 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.hlsl @@ -18,11 +18,16 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.msl index 771a789d44..08f92dc2ab 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.msl @@ -11,21 +11,26 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_22 = *(tint_symbol_6); +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_22 = *(tint_symbol_5); float2 const x_23 = float2(x_22.x, x_22.y); - *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.300000012f, 1.0f); + *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.300000012f, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_8 = position_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = position_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.hlsl index c0bd655f3a..1efaec9a16 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.hlsl @@ -18,11 +18,16 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.msl index 771a789d44..08f92dc2ab 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.msl @@ -11,21 +11,26 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_22 = *(tint_symbol_6); +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_22 = *(tint_symbol_5); float2 const x_23 = float2(x_22.x, x_22.y); - *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.300000012f, 1.0f); + *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.300000012f, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_8 = position_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = position_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.hlsl index 434319539f..394204a111 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {color_out, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.msl index ed4b69c082..006be2c26b 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); - *(tint_symbol_5) = 0.5f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = 0.5f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.hlsl index 434319539f..394204a111 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {color_out, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.msl index ed4b69c082..006be2c26b 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); - *(tint_symbol_5) = 0.5f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = 0.5f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.color_out_1 = inner_result.color_out_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.hlsl index bf017e3047..7fb044e699 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.hlsl @@ -18,11 +18,16 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.msl index 0c5e876727..98cbda3916 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.msl @@ -11,21 +11,26 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_22 = *(tint_symbol_6); +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_22 = *(tint_symbol_5); float2 const x_23 = float2(x_22.x, x_22.y); - *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.699999988f, 1.0f); + *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.699999988f, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_8 = position_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = position_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.hlsl index bf017e3047..7fb044e699 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.hlsl @@ -18,11 +18,16 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.msl index 0c5e876727..98cbda3916 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.msl @@ -11,21 +11,26 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_22 = *(tint_symbol_6); +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_22 = *(tint_symbol_5); float2 const x_23 = float2(x_22.x, x_22.y); - *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.699999988f, 1.0f); + *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.699999988f, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_8 = position_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = position_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.hlsl index 0ae955521b..6408262d8a 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.hlsl @@ -18,11 +18,16 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.msl index 94ed6c12c0..ac1e5434bc 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.msl @@ -11,21 +11,26 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_22 = *(tint_symbol_6); +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_22 = *(tint_symbol_5); float2 const x_23 = float2(x_22.x, x_22.y); - *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.200000003f, 1.0f); + *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.200000003f, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_8 = position_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = position_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.hlsl index 0ae955521b..6408262d8a 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.hlsl @@ -18,11 +18,16 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.msl index 94ed6c12c0..ac1e5434bc 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.msl @@ -11,21 +11,26 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_22 = *(tint_symbol_6); +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_22 = *(tint_symbol_5); float2 const x_23 = float2(x_22.x, x_22.y); - *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.200000003f, 1.0f); + *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.200000003f, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_8 = position_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = position_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.hlsl index 5cb181313c..9de36ca5df 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {outColor, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.msl index 620803a4f0..8dce2e27c8 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); - *(tint_symbol_5) = 0.300000012f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = 0.300000012f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.hlsl index 5cb181313c..9de36ca5df 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {outColor, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.msl index 620803a4f0..8dce2e27c8 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); - *(tint_symbol_5) = 0.300000012f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = 0.300000012f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.hlsl index 195740d4e3..cba38b5855 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {outColor, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.msl index 1f7be87d42..347959bd26 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); - *(tint_symbol_5) = 0.100000001f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = 0.100000001f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.hlsl index 195740d4e3..cba38b5855 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {outColor, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.msl index 1f7be87d42..347959bd26 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); - *(tint_symbol_5) = 0.100000001f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = 0.100000001f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.hlsl index d098fd2556..d452ed795a 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {outColor, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.msl index ea4a1fc9cf..0189aa6737 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); - *(tint_symbol_5) = 0.600000024f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = 0.600000024f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.hlsl index d098fd2556..d452ed795a 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {outColor, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.msl index ea4a1fc9cf..0189aa6737 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); - *(tint_symbol_5) = 0.600000024f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = 0.600000024f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.hlsl index 9aee57cc1a..c913f71c02 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.hlsl @@ -21,11 +21,17 @@ struct tint_symbol_2 { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {outColor, gl_FragDepth}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.outColor_1, tint_symbol_3.gl_FragDepth_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.msl index b08a200516..fa4eb0b2d2 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.msl @@ -5,26 +5,33 @@ struct main_out { float4 outColor_1; float gl_FragDepth_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 outColor_1 [[color(0)]]; float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread float* const tint_symbol_7) { - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); - float const x_20 = (*(tint_symbol_6)).z; - *(tint_symbol_7) = x_20; +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); + float const x_20 = (*(tint_symbol_4)).z; + *(tint_symbol_5) = x_20; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - thread float tint_symbol_10 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(&(tint_symbol_9), &(tint_symbol_8), &(tint_symbol_10)); - main_out const tint_symbol_3 = {.outColor_1=tint_symbol_9, .gl_FragDepth_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_4 = {.outColor_1=tint_symbol_3.outColor_1, .gl_FragDepth_1=tint_symbol_3.gl_FragDepth_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread float* const tint_symbol_8) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(tint_symbol_7, tint_symbol_6, tint_symbol_8); + main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_7), .gl_FragDepth_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + thread float tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.hlsl index 9aee57cc1a..c913f71c02 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.hlsl @@ -21,11 +21,17 @@ struct tint_symbol_2 { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {outColor, gl_FragDepth}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.outColor_1, tint_symbol_3.gl_FragDepth_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.msl index b08a200516..fa4eb0b2d2 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.msl @@ -5,26 +5,33 @@ struct main_out { float4 outColor_1; float gl_FragDepth_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 outColor_1 [[color(0)]]; float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread float* const tint_symbol_7) { - *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); - float const x_20 = (*(tint_symbol_6)).z; - *(tint_symbol_7) = x_20; +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); + float const x_20 = (*(tint_symbol_4)).z; + *(tint_symbol_5) = x_20; return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - thread float tint_symbol_10 = 0.0f; - tint_symbol_8 = gl_FragCoord_param; - main_1(&(tint_symbol_9), &(tint_symbol_8), &(tint_symbol_10)); - main_out const tint_symbol_3 = {.outColor_1=tint_symbol_9, .gl_FragDepth_1=tint_symbol_10}; - tint_symbol_2 const tint_symbol_4 = {.outColor_1=tint_symbol_3.outColor_1, .gl_FragDepth_1=tint_symbol_3.gl_FragDepth_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread float* const tint_symbol_8) { + *(tint_symbol_6) = gl_FragCoord_param; + main_1(tint_symbol_7, tint_symbol_6, tint_symbol_8); + main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_7), .gl_FragDepth_1=*(tint_symbol_8)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + thread float tint_symbol_11 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.hlsl index 2776dc2003..ed109b41f7 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {outColor, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.msl index a3796dc735..e3b4625be0 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); - *(tint_symbol_5) = 0.699999988f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = 0.699999988f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.hlsl index 2776dc2003..ed109b41f7 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {outColor, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.msl index a3796dc735..e3b4625be0 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); - *(tint_symbol_5) = 0.699999988f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = 0.699999988f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.hlsl index 7047d54407..45f2a5a654 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {outColor, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.msl index 99a77a3fec..5b7630993a 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); - *(tint_symbol_5) = 0.400000006f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = 0.400000006f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.hlsl index 7047d54407..45f2a5a654 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.hlsl @@ -16,9 +16,16 @@ struct tint_symbol { float gl_FragDepth_1 : SV_Depth; }; -tint_symbol main() { +main_out main_inner() { main_1(); const main_out tint_symbol_1 = {outColor, gl_FragDepth}; - const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1}; - return tint_symbol_2; + return tint_symbol_1; +} + +tint_symbol main() { + const main_out inner_result = main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.msl index 99a77a3fec..5b7630993a 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.msl @@ -10,18 +10,25 @@ struct tint_symbol_1 { float gl_FragDepth_1 [[depth(any)]]; }; -void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) { - *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); - *(tint_symbol_5) = 0.400000006f; +void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) { + *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); + *(tint_symbol_4) = 0.400000006f; return; } -fragment tint_symbol_1 tint_symbol() { - thread float4 tint_symbol_6 = 0.0f; - thread float tint_symbol_7 = 0.0f; - main_1(&(tint_symbol_6), &(tint_symbol_7)); - main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7}; - tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1}; - return tint_symbol_3; +main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) { + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol() { + thread float4 tint_symbol_7 = 0.0f; + thread float tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.outColor_1 = inner_result.outColor_1; + wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.hlsl index b121d9e595..1e0df3fbd3 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.hlsl @@ -20,11 +20,17 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position, pos}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.pos_1, tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + wrapper_result.pos_1 = inner_result.pos_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.msl index 5a99a8eaf6..44d4a1f841 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.msl @@ -13,22 +13,28 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread uint* const tint_symbol_8) { - float4 const x_22 = *(tint_symbol_6); - *(tint_symbol_7) = x_22; - *(tint_symbol_8) = 0u; +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread uint* const tint_symbol_7) { + float4 const x_22 = *(tint_symbol_5); + *(tint_symbol_6) = x_22; + *(tint_symbol_7) = 0u; return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - thread uint tint_symbol_11 = 0u; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_9 = position_param; - main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_10, .pos_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.pos_1=tint_symbol_4.pos_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread uint* const tint_symbol_10) { + *(tint_symbol_8) = position_param; + main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_9), .pos_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + thread uint tint_symbol_13 = 0u; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + wrapper_result.pos_1 = inner_result.pos_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.hlsl index b121d9e595..1e0df3fbd3 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.hlsl @@ -20,11 +20,17 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 position_param = tint_symbol.position_param; +main_out main_inner(float4 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position, pos}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.pos_1, tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + wrapper_result.pos_1 = inner_result.pos_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.msl index 5a99a8eaf6..44d4a1f841 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.msl @@ -13,22 +13,28 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread uint* const tint_symbol_8) { - float4 const x_22 = *(tint_symbol_6); - *(tint_symbol_7) = x_22; - *(tint_symbol_8) = 0u; +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread uint* const tint_symbol_7) { + float4 const x_22 = *(tint_symbol_5); + *(tint_symbol_6) = x_22; + *(tint_symbol_7) = 0u; return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_9 = 0.0f; - thread float4 tint_symbol_10 = 0.0f; - thread uint tint_symbol_11 = 0u; - float4 const position_param = tint_symbol_1.position_param; - tint_symbol_9 = position_param; - main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_10, .pos_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.pos_1=tint_symbol_4.pos_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread uint* const tint_symbol_10) { + *(tint_symbol_8) = position_param; + main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_9), .pos_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_11 = 0.0f; + thread float4 tint_symbol_12 = 0.0f; + thread uint tint_symbol_13 = 0u; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + wrapper_result.pos_1 = inner_result.pos_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.hlsl index 4d470f29a4..a4751f1555 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.hlsl @@ -22,13 +22,18 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float3 x_2_param = tint_symbol.x_2_param; - const int x_3_param = tint_symbol.x_3_param; +main_out main_inner(float3 x_2_param, int x_3_param) { x_2 = x_2_param; x_3 = x_3_param; main_1(); const main_out tint_symbol_3 = {x_4, gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1, tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.msl index fcba4ccff0..0dfb3a1f2e 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.msl @@ -14,25 +14,30 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float3* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8, thread int* const tint_symbol_9) { - float3 const x_22 = *(tint_symbol_6); - *(tint_symbol_7) = float4(x_22, 1.0f); - *(tint_symbol_8) = *(tint_symbol_9); +void main_1(thread float3* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) { + float3 const x_22 = *(tint_symbol_5); + *(tint_symbol_6) = float4(x_22, 1.0f); + *(tint_symbol_7) = *(tint_symbol_8); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float3 tint_symbol_10 = 0.0f; - thread int tint_symbol_11 = 0; - thread float4 tint_symbol_12 = 0.0f; - thread int tint_symbol_13 = 0; - float3 const x_2_param = tint_symbol_1.x_2_param; - int const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_10 = x_2_param; - tint_symbol_11 = x_3_param; - main_1(&(tint_symbol_10), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_13, .gl_Position=tint_symbol_12}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float3 x_2_param, int x_3_param, thread float3* const tint_symbol_9, thread int* const tint_symbol_10, thread float4* const tint_symbol_11, thread int* const tint_symbol_12) { + *(tint_symbol_9) = x_2_param; + *(tint_symbol_10) = x_3_param; + main_1(tint_symbol_9, tint_symbol_11, tint_symbol_12, tint_symbol_10); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_12), .gl_Position=*(tint_symbol_11)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float3 tint_symbol_13 = 0.0f; + thread int tint_symbol_14 = 0; + thread float4 tint_symbol_15 = 0.0f; + thread int tint_symbol_16 = 0; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.hlsl index 4d470f29a4..a4751f1555 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.hlsl @@ -22,13 +22,18 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float3 x_2_param = tint_symbol.x_2_param; - const int x_3_param = tint_symbol.x_3_param; +main_out main_inner(float3 x_2_param, int x_3_param) { x_2 = x_2_param; x_3 = x_3_param; main_1(); const main_out tint_symbol_3 = {x_4, gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1, tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.msl index fcba4ccff0..0dfb3a1f2e 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.msl @@ -14,25 +14,30 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float3* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8, thread int* const tint_symbol_9) { - float3 const x_22 = *(tint_symbol_6); - *(tint_symbol_7) = float4(x_22, 1.0f); - *(tint_symbol_8) = *(tint_symbol_9); +void main_1(thread float3* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) { + float3 const x_22 = *(tint_symbol_5); + *(tint_symbol_6) = float4(x_22, 1.0f); + *(tint_symbol_7) = *(tint_symbol_8); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float3 tint_symbol_10 = 0.0f; - thread int tint_symbol_11 = 0; - thread float4 tint_symbol_12 = 0.0f; - thread int tint_symbol_13 = 0; - float3 const x_2_param = tint_symbol_1.x_2_param; - int const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_10 = x_2_param; - tint_symbol_11 = x_3_param; - main_1(&(tint_symbol_10), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_13, .gl_Position=tint_symbol_12}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1, .gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float3 x_2_param, int x_3_param, thread float3* const tint_symbol_9, thread int* const tint_symbol_10, thread float4* const tint_symbol_11, thread int* const tint_symbol_12) { + *(tint_symbol_9) = x_2_param; + *(tint_symbol_10) = x_3_param; + main_1(tint_symbol_9, tint_symbol_11, tint_symbol_12, tint_symbol_10); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_12), .gl_Position=*(tint_symbol_11)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float3 tint_symbol_13 = 0.0f; + thread int tint_symbol_14 = 0; + thread float4 tint_symbol_15 = 0.0f; + thread int tint_symbol_16 = 0; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.hlsl index 0097cb232c..05960c1435 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.hlsl @@ -25,13 +25,17 @@ struct tint_symbol_2 { int x_4_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_2_param = tint_symbol.x_2_param; - const int x_3_param = tint_symbol.x_3_param; +main_out main_inner(float4 x_2_param, int x_3_param) { x_2 = x_2_param; x_3 = x_3_param; main_1(); const main_out tint_symbol_3 = {x_4}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.msl index 7f6fbb6f6e..061fbbecea 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.msl @@ -11,28 +11,33 @@ struct tint_symbol_3 { int x_4_1 [[color(0)]]; }; -void main_1(thread int* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8, texture2d tint_symbol_9) { - *(tint_symbol_6) = 1; - float4 const x_23 = *(tint_symbol_7); +void main_1(thread int* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7, texture2d tint_symbol_8) { + *(tint_symbol_5) = 1; + float4 const x_23 = *(tint_symbol_6); int const x_27 = int(x_23.x); int const x_28 = int(x_23.y); - int const x_33 = *(tint_symbol_8); + int const x_33 = *(tint_symbol_7); if ((as_type((as_type(as_type((as_type((x_27 & 1)) + as_type((x_28 & 1))))) + as_type(x_33))) == int(x_23.z))) { } - tint_symbol_9.write(int4(x_27, 0, 0, 0), uint2(int2(x_27, x_28))); + tint_symbol_8.write(int4(x_27, 0, 0, 0), uint2(int2(x_27, x_28))); return; } -fragment tint_symbol_3 tint_symbol(texture2d tint_symbol_13 [[texture(0)]], float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_10 = 0.0f; - thread int tint_symbol_11 = 0; - thread int tint_symbol_12 = 0; - int const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_10 = x_2_param; - tint_symbol_11 = x_3_param; - main_1(&(tint_symbol_12), &(tint_symbol_10), &(tint_symbol_11), tint_symbol_13); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_12}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_9, thread int* const tint_symbol_10, thread int* const tint_symbol_11, texture2d tint_symbol_12) { + *(tint_symbol_9) = x_2_param; + *(tint_symbol_10) = x_3_param; + main_1(tint_symbol_11, tint_symbol_9, tint_symbol_10, tint_symbol_12); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_11)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(texture2d tint_symbol_16 [[texture(0)]], float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_13 = 0.0f; + thread int tint_symbol_14 = 0; + thread int tint_symbol_15 = 0; + main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), tint_symbol_16); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.hlsl index 0097cb232c..05960c1435 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.hlsl @@ -25,13 +25,17 @@ struct tint_symbol_2 { int x_4_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_2_param = tint_symbol.x_2_param; - const int x_3_param = tint_symbol.x_3_param; +main_out main_inner(float4 x_2_param, int x_3_param) { x_2 = x_2_param; x_3 = x_3_param; main_1(); const main_out tint_symbol_3 = {x_4}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.msl index 7f6fbb6f6e..061fbbecea 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.msl @@ -11,28 +11,33 @@ struct tint_symbol_3 { int x_4_1 [[color(0)]]; }; -void main_1(thread int* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8, texture2d tint_symbol_9) { - *(tint_symbol_6) = 1; - float4 const x_23 = *(tint_symbol_7); +void main_1(thread int* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7, texture2d tint_symbol_8) { + *(tint_symbol_5) = 1; + float4 const x_23 = *(tint_symbol_6); int const x_27 = int(x_23.x); int const x_28 = int(x_23.y); - int const x_33 = *(tint_symbol_8); + int const x_33 = *(tint_symbol_7); if ((as_type((as_type(as_type((as_type((x_27 & 1)) + as_type((x_28 & 1))))) + as_type(x_33))) == int(x_23.z))) { } - tint_symbol_9.write(int4(x_27, 0, 0, 0), uint2(int2(x_27, x_28))); + tint_symbol_8.write(int4(x_27, 0, 0, 0), uint2(int2(x_27, x_28))); return; } -fragment tint_symbol_3 tint_symbol(texture2d tint_symbol_13 [[texture(0)]], float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_10 = 0.0f; - thread int tint_symbol_11 = 0; - thread int tint_symbol_12 = 0; - int const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_10 = x_2_param; - tint_symbol_11 = x_3_param; - main_1(&(tint_symbol_12), &(tint_symbol_10), &(tint_symbol_11), tint_symbol_13); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_12}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_9, thread int* const tint_symbol_10, thread int* const tint_symbol_11, texture2d tint_symbol_12) { + *(tint_symbol_9) = x_2_param; + *(tint_symbol_10) = x_3_param; + main_1(tint_symbol_11, tint_symbol_9, tint_symbol_10, tint_symbol_12); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_11)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(texture2d tint_symbol_16 [[texture(0)]], float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_13 = 0.0f; + thread int tint_symbol_14 = 0; + thread int tint_symbol_15 = 0; + main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), tint_symbol_16); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.hlsl index a97b541ec0..8f93c9824f 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.hlsl @@ -21,13 +21,17 @@ struct tint_symbol_2 { int x_4_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_2_param = tint_symbol.x_2_param; - const int x_3_param = tint_symbol.x_3_param; +main_out main_inner(float4 x_2_param, int x_3_param) { x_2 = x_2_param; x_3 = x_3_param; main_1(); const main_out tint_symbol_3 = {x_4}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.msl index a50bd6e24f..55115190e7 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.msl @@ -11,25 +11,30 @@ struct tint_symbol_3 { int x_4_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) { - float4 const x_16 = *(tint_symbol_6); - int const x_26 = *(tint_symbol_7); +void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6, thread int* const tint_symbol_7) { + float4 const x_16 = *(tint_symbol_5); + int const x_26 = *(tint_symbol_6); if ((as_type((as_type(as_type((as_type((int(x_16.x) & 1)) + as_type((int(x_16.y) & 1))))) + as_type(x_26))) == int(x_16.z))) { } - *(tint_symbol_8) = 1; + *(tint_symbol_7) = 1; return; } -fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_9 = 0.0f; - thread int tint_symbol_10 = 0; - thread int tint_symbol_11 = 0; - int const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_9 = x_2_param; - tint_symbol_10 = x_3_param; - main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) { + *(tint_symbol_8) = x_2_param; + *(tint_symbol_9) = x_3_param; + main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_11 = 0.0f; + thread int tint_symbol_12 = 0; + thread int tint_symbol_13 = 0; + main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.hlsl index a97b541ec0..8f93c9824f 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.hlsl @@ -21,13 +21,17 @@ struct tint_symbol_2 { int x_4_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_2_param = tint_symbol.x_2_param; - const int x_3_param = tint_symbol.x_3_param; +main_out main_inner(float4 x_2_param, int x_3_param) { x_2 = x_2_param; x_3 = x_3_param; main_1(); const main_out tint_symbol_3 = {x_4}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.msl index a50bd6e24f..55115190e7 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.msl @@ -11,25 +11,30 @@ struct tint_symbol_3 { int x_4_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) { - float4 const x_16 = *(tint_symbol_6); - int const x_26 = *(tint_symbol_7); +void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6, thread int* const tint_symbol_7) { + float4 const x_16 = *(tint_symbol_5); + int const x_26 = *(tint_symbol_6); if ((as_type((as_type(as_type((as_type((int(x_16.x) & 1)) + as_type((int(x_16.y) & 1))))) + as_type(x_26))) == int(x_16.z))) { } - *(tint_symbol_8) = 1; + *(tint_symbol_7) = 1; return; } -fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_9 = 0.0f; - thread int tint_symbol_10 = 0; - thread int tint_symbol_11 = 0; - int const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_9 = x_2_param; - tint_symbol_10 = x_3_param; - main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) { + *(tint_symbol_8) = x_2_param; + *(tint_symbol_9) = x_3_param; + main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_11 = 0.0f; + thread int tint_symbol_12 = 0; + thread int tint_symbol_13 = 0; + main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.hlsl index c94c14d3f1..be97366d13 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.hlsl @@ -22,11 +22,16 @@ struct tint_symbol_2 { int out_data_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {out_data}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.out_data_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.out_data_1 = inner_result.out_data_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.msl index 9d51ceded7..33340cd5d0 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.msl @@ -4,30 +4,36 @@ using namespace metal; struct main_out { int out_data_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { int out_data_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread int* const tint_symbol_4) { bool x_is_odd = false; bool y_is_odd = false; - float const x_24 = (*(tint_symbol_5)).x; + float const x_24 = (*(tint_symbol_3)).x; x_is_odd = ((int(x_24) & 1) == 1); - float const x_29 = (*(tint_symbol_5)).y; + float const x_29 = (*(tint_symbol_3)).y; y_is_odd = ((int(x_29) & 1) == 1); bool const x_33 = x_is_odd; bool const x_34 = y_is_odd; - *(tint_symbol_6) = select(0, 1, (x_33 | x_34)); + *(tint_symbol_4) = select(0, 1, (x_33 | x_34)); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread int tint_symbol_8 = 0; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.out_data_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.out_data_1=tint_symbol_3.out_data_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread int* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.out_data_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread int tint_symbol_8 = 0; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.out_data_1 = inner_result.out_data_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.hlsl index 1ad88d2698..ee7668f1bd 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.hlsl @@ -26,11 +26,16 @@ struct tint_symbol_2 { int out_data_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {out_data}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.out_data_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.out_data_1 = inner_result.out_data_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.msl index a2b97bfc87..104e4629c4 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.msl @@ -4,30 +4,36 @@ using namespace metal; struct main_out { int out_data_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { int out_data_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread int* const tint_symbol_4) { bool x_is_odd = false; bool y_is_odd = false; - float const x_24 = (*(tint_symbol_5)).x; + float const x_24 = (*(tint_symbol_3)).x; x_is_odd = ((int(x_24) & 1) == 1); - float const x_29 = (*(tint_symbol_5)).y; + float const x_29 = (*(tint_symbol_3)).y; y_is_odd = ((int(x_29) & 1) == 1); bool const x_33 = x_is_odd; bool const x_34 = y_is_odd; - *(tint_symbol_6) = select(0, 1, (x_33 || x_34)); + *(tint_symbol_4) = select(0, 1, (x_33 || x_34)); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread int tint_symbol_8 = 0; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.out_data_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.out_data_1=tint_symbol_3.out_data_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread int* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.out_data_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread int tint_symbol_8 = 0; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.out_data_1 = inner_result.out_data_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.hlsl index e3d1bee52f..c728eaeb58 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.hlsl @@ -22,13 +22,17 @@ struct tint_symbol_2 { int x_4_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_2_param = tint_symbol.x_2_param; - const int x_3_param = tint_symbol.x_3_param; +main_out main_inner(float4 x_2_param, int x_3_param) { x_2 = x_2_param; x_3 = x_3_param; main_1(); const main_out tint_symbol_3 = {x_4}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.msl index 5a727de487..f7875f8f44 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.msl @@ -11,25 +11,30 @@ struct tint_symbol_3 { int x_4_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) { - float4 const x_16 = *(tint_symbol_6); - int const x_26 = *(tint_symbol_7); - *(tint_symbol_8) = 1; +void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6, thread int* const tint_symbol_7) { + float4 const x_16 = *(tint_symbol_5); + int const x_26 = *(tint_symbol_6); + *(tint_symbol_7) = 1; if ((as_type((as_type(as_type((as_type((int(x_16.x) & 1)) + as_type((int(x_16.y) & 1))))) + as_type(x_26))) == int(x_16.z))) { } return; } -fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_9 = 0.0f; - thread int tint_symbol_10 = 0; - thread int tint_symbol_11 = 0; - int const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_9 = x_2_param; - tint_symbol_10 = x_3_param; - main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) { + *(tint_symbol_8) = x_2_param; + *(tint_symbol_9) = x_3_param; + main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_11 = 0.0f; + thread int tint_symbol_12 = 0; + thread int tint_symbol_13 = 0; + main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.hlsl index e3d1bee52f..c728eaeb58 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.hlsl @@ -22,13 +22,17 @@ struct tint_symbol_2 { int x_4_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_2_param = tint_symbol.x_2_param; - const int x_3_param = tint_symbol.x_3_param; +main_out main_inner(float4 x_2_param, int x_3_param) { x_2 = x_2_param; x_3 = x_3_param; main_1(); const main_out tint_symbol_3 = {x_4}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.msl index 5a727de487..f7875f8f44 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.msl @@ -11,25 +11,30 @@ struct tint_symbol_3 { int x_4_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) { - float4 const x_16 = *(tint_symbol_6); - int const x_26 = *(tint_symbol_7); - *(tint_symbol_8) = 1; +void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6, thread int* const tint_symbol_7) { + float4 const x_16 = *(tint_symbol_5); + int const x_26 = *(tint_symbol_6); + *(tint_symbol_7) = 1; if ((as_type((as_type(as_type((as_type((int(x_16.x) & 1)) + as_type((int(x_16.y) & 1))))) + as_type(x_26))) == int(x_16.z))) { } return; } -fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_9 = 0.0f; - thread int tint_symbol_10 = 0; - thread int tint_symbol_11 = 0; - int const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_9 = x_2_param; - tint_symbol_10 = x_3_param; - main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) { + *(tint_symbol_8) = x_2_param; + *(tint_symbol_9) = x_3_param; + main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_11 = 0.0f; + thread int tint_symbol_12 = 0; + thread int tint_symbol_13 = 0; + main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.hlsl index ad10f80944..36856ff7ef 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.hlsl @@ -25,13 +25,17 @@ struct tint_symbol_2 { int x_4_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_2_param = tint_symbol.x_2_param; - const int x_3_param = tint_symbol.x_3_param; +main_out main_inner(float4 x_2_param, int x_3_param) { x_2 = x_2_param; x_3 = x_3_param; main_1(); - const main_out tint_symbol_3 = {x_4}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_4_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_4}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.msl index b8e78d874e..8d43f0f581 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.msl @@ -14,28 +14,33 @@ struct tint_symbol_3 { int x_4_1 [[color(0)]]; }; -void main_1(device S& x_5, thread int* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8) { - *(tint_symbol_6) = 1; - float4 const x_23 = *(tint_symbol_7); +void main_1(device S& x_5, thread int* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7) { + *(tint_symbol_5) = 1; + float4 const x_23 = *(tint_symbol_6); int const x_27 = int(x_23.x); int const x_28 = int(x_23.y); - int const x_33 = *(tint_symbol_8); + int const x_33 = *(tint_symbol_7); if ((as_type((as_type(as_type((as_type((x_27 & 1)) + as_type((x_28 & 1))))) + as_type(x_33))) == int(x_23.z))) { } x_5.field0[as_type((as_type(x_27) + as_type(as_type((as_type(x_28) * as_type(8))))))] = x_27; return; } -fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]], device S& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread int tint_symbol_10 = 0; - thread int tint_symbol_11 = 0; - int const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_9 = x_2_param; - tint_symbol_10 = x_3_param; - main_1(x_5, &(tint_symbol_11), &(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1}; - return tint_symbol_5; +main_out tint_symbol_inner(device S& x_5, float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) { + *(tint_symbol_8) = x_2_param; + *(tint_symbol_9) = x_3_param; + main_1(x_5, tint_symbol_10, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]], device S& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread int tint_symbol_12 = 0; + thread int tint_symbol_13 = 0; + main_out const inner_result = tint_symbol_inner(x_5, x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.hlsl index ad10f80944..36856ff7ef 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.hlsl @@ -25,13 +25,17 @@ struct tint_symbol_2 { int x_4_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_2_param = tint_symbol.x_2_param; - const int x_3_param = tint_symbol.x_3_param; +main_out main_inner(float4 x_2_param, int x_3_param) { x_2 = x_2_param; x_3 = x_3_param; main_1(); - const main_out tint_symbol_3 = {x_4}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_4_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_4}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.msl index b8e78d874e..8d43f0f581 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.msl @@ -14,28 +14,33 @@ struct tint_symbol_3 { int x_4_1 [[color(0)]]; }; -void main_1(device S& x_5, thread int* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8) { - *(tint_symbol_6) = 1; - float4 const x_23 = *(tint_symbol_7); +void main_1(device S& x_5, thread int* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7) { + *(tint_symbol_5) = 1; + float4 const x_23 = *(tint_symbol_6); int const x_27 = int(x_23.x); int const x_28 = int(x_23.y); - int const x_33 = *(tint_symbol_8); + int const x_33 = *(tint_symbol_7); if ((as_type((as_type(as_type((as_type((x_27 & 1)) + as_type((x_28 & 1))))) + as_type(x_33))) == int(x_23.z))) { } x_5.field0[as_type((as_type(x_27) + as_type(as_type((as_type(x_28) * as_type(8))))))] = x_27; return; } -fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]], device S& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread int tint_symbol_10 = 0; - thread int tint_symbol_11 = 0; - int const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_9 = x_2_param; - tint_symbol_10 = x_3_param; - main_1(x_5, &(tint_symbol_11), &(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1}; - return tint_symbol_5; +main_out tint_symbol_inner(device S& x_5, float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) { + *(tint_symbol_8) = x_2_param; + *(tint_symbol_9) = x_3_param; + main_1(x_5, tint_symbol_10, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]], device S& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread int tint_symbol_12 = 0; + thread int tint_symbol_13 = 0; + main_out const inner_result = tint_symbol_inner(x_5, x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.hlsl index bb7ac26acf..6740df5a62 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.hlsl @@ -26,13 +26,17 @@ struct tint_symbol_2 { int x_4_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_2_param = tint_symbol.x_2_param; - const int x_3_param = tint_symbol.x_3_param; +main_out main_inner(float4 x_2_param, int x_3_param) { x_2 = x_2_param; x_3 = x_3_param; main_1(); - const main_out tint_symbol_3 = {x_4}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_4_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_4}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.msl index 59d9bdb993..1358df18fb 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.msl @@ -14,28 +14,33 @@ struct tint_symbol_3 { int x_4_1 [[color(0)]]; }; -void main_1(device S& x_5, thread int* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8) { - *(tint_symbol_6) = 1; - float4 const x_23 = *(tint_symbol_7); +void main_1(device S& x_5, thread int* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7) { + *(tint_symbol_5) = 1; + float4 const x_23 = *(tint_symbol_6); int const x_27 = int(x_23.x); int const x_28 = int(x_23.y); - int const x_33 = *(tint_symbol_8); + int const x_33 = *(tint_symbol_7); x_5.field0[as_type((as_type(x_27) + as_type(as_type((as_type(x_28) * as_type(8))))))] = x_27; if ((as_type((as_type(as_type((as_type((x_27 & 1)) + as_type((x_28 & 1))))) + as_type(x_33))) == int(x_23.z))) { } return; } -fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]], device S& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread int tint_symbol_10 = 0; - thread int tint_symbol_11 = 0; - int const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_9 = x_2_param; - tint_symbol_10 = x_3_param; - main_1(x_5, &(tint_symbol_11), &(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1}; - return tint_symbol_5; +main_out tint_symbol_inner(device S& x_5, float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) { + *(tint_symbol_8) = x_2_param; + *(tint_symbol_9) = x_3_param; + main_1(x_5, tint_symbol_10, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]], device S& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread int tint_symbol_12 = 0; + thread int tint_symbol_13 = 0; + main_out const inner_result = tint_symbol_inner(x_5, x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.hlsl index bb7ac26acf..6740df5a62 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.hlsl @@ -26,13 +26,17 @@ struct tint_symbol_2 { int x_4_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_2_param = tint_symbol.x_2_param; - const int x_3_param = tint_symbol.x_3_param; +main_out main_inner(float4 x_2_param, int x_3_param) { x_2 = x_2_param; x_3 = x_3_param; main_1(); - const main_out tint_symbol_3 = {x_4}; - const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_4_1}; - return tint_symbol_5; + const main_out tint_symbol_4 = {x_4}; + return tint_symbol_4; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.msl index 59d9bdb993..1358df18fb 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.msl @@ -14,28 +14,33 @@ struct tint_symbol_3 { int x_4_1 [[color(0)]]; }; -void main_1(device S& x_5, thread int* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8) { - *(tint_symbol_6) = 1; - float4 const x_23 = *(tint_symbol_7); +void main_1(device S& x_5, thread int* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7) { + *(tint_symbol_5) = 1; + float4 const x_23 = *(tint_symbol_6); int const x_27 = int(x_23.x); int const x_28 = int(x_23.y); - int const x_33 = *(tint_symbol_8); + int const x_33 = *(tint_symbol_7); x_5.field0[as_type((as_type(x_27) + as_type(as_type((as_type(x_28) * as_type(8))))))] = x_27; if ((as_type((as_type(as_type((as_type((x_27 & 1)) + as_type((x_28 & 1))))) + as_type(x_33))) == int(x_23.z))) { } return; } -fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]], device S& x_5 [[buffer(0)]]) { - thread float4 tint_symbol_9 = 0.0f; - thread int tint_symbol_10 = 0; - thread int tint_symbol_11 = 0; - int const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_9 = x_2_param; - tint_symbol_10 = x_3_param; - main_1(x_5, &(tint_symbol_11), &(tint_symbol_9), &(tint_symbol_10)); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1}; - return tint_symbol_5; +main_out tint_symbol_inner(device S& x_5, float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) { + *(tint_symbol_8) = x_2_param; + *(tint_symbol_9) = x_3_param; + main_1(x_5, tint_symbol_10, tint_symbol_8, tint_symbol_9); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]], device S& x_5 [[buffer(0)]]) { + thread float4 tint_symbol_11 = 0.0f; + thread int tint_symbol_12 = 0; + thread int tint_symbol_13 = 0; + main_out const inner_result = tint_symbol_inner(x_5, x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.hlsl index e1ac82b81f..184a98b32a 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.hlsl @@ -36,13 +36,17 @@ struct tint_symbol_2 { int x_4_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_2_param = tint_symbol.x_2_param; - const int x_3_param = tint_symbol.x_3_param; +main_out main_inner(float4 x_2_param, int x_3_param) { x_2 = x_2_param; x_3 = x_3_param; main_1(); const main_out tint_symbol_3 = {x_4}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.msl index 2715be4c3d..89bd13ccd2 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.msl @@ -11,10 +11,10 @@ struct tint_symbol_3 { int x_4_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) { +void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6, thread int* const tint_symbol_7) { int x_33_phi = 0; - float4 const x_18 = *(tint_symbol_6); - int const x_28 = *(tint_symbol_7); + float4 const x_18 = *(tint_symbol_5); + int const x_28 = *(tint_symbol_6); x_33_phi = 0; if ((as_type((as_type(as_type((as_type((int(x_18.x) & 1)) + as_type((int(x_18.y) & 1))))) + as_type(x_28))) == int(x_18.z))) { while (true) { @@ -30,20 +30,25 @@ void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, } } } - *(tint_symbol_8) = 1; + *(tint_symbol_7) = 1; return; } -fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_9 = 0.0f; - thread int tint_symbol_10 = 0; - thread int tint_symbol_11 = 0; - int const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_9 = x_2_param; - tint_symbol_10 = x_3_param; - main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) { + *(tint_symbol_8) = x_2_param; + *(tint_symbol_9) = x_3_param; + main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_11 = 0.0f; + thread int tint_symbol_12 = 0; + thread int tint_symbol_13 = 0; + main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.hlsl index e1ac82b81f..184a98b32a 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.hlsl @@ -36,13 +36,17 @@ struct tint_symbol_2 { int x_4_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 x_2_param = tint_symbol.x_2_param; - const int x_3_param = tint_symbol.x_3_param; +main_out main_inner(float4 x_2_param, int x_3_param) { x_2 = x_2_param; x_3 = x_3_param; main_1(); const main_out tint_symbol_3 = {x_4}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.msl index 2715be4c3d..89bd13ccd2 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.msl @@ -11,10 +11,10 @@ struct tint_symbol_3 { int x_4_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) { +void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6, thread int* const tint_symbol_7) { int x_33_phi = 0; - float4 const x_18 = *(tint_symbol_6); - int const x_28 = *(tint_symbol_7); + float4 const x_18 = *(tint_symbol_5); + int const x_28 = *(tint_symbol_6); x_33_phi = 0; if ((as_type((as_type(as_type((as_type((int(x_18.x) & 1)) + as_type((int(x_18.y) & 1))))) + as_type(x_28))) == int(x_18.z))) { while (true) { @@ -30,20 +30,25 @@ void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, } } } - *(tint_symbol_8) = 1; + *(tint_symbol_7) = 1; return; } -fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_9 = 0.0f; - thread int tint_symbol_10 = 0; - thread int tint_symbol_11 = 0; - int const x_3_param = tint_symbol_1.x_3_param; - tint_symbol_9 = x_2_param; - tint_symbol_10 = x_3_param; - main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11)); - main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11}; - tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) { + *(tint_symbol_8) = x_2_param; + *(tint_symbol_9) = x_3_param; + main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10); + main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_11 = 0.0f; + thread int tint_symbol_12 = 0; + thread int tint_symbol_13 = 0; + main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.x_4_1 = inner_result.x_4_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.hlsl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.hlsl index 5d7eab8504..909ad799e9 100644 --- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.hlsl +++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.hlsl @@ -17,11 +17,16 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float3 position_param = tint_symbol.position_param; +main_out main_inner(float3 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.msl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.msl index 87dbf224c6..7ef967c029 100644 --- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.msl +++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.msl @@ -11,20 +11,25 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float3* const tint_symbol_6, thread float4* const tint_symbol_7) { - float3 const x_21 = *(tint_symbol_6); - *(tint_symbol_7) = float4(x_21.x, x_21.y, x_21.z, 1.0f); +void main_1(thread float3* const tint_symbol_5, thread float4* const tint_symbol_6) { + float3 const x_21 = *(tint_symbol_5); + *(tint_symbol_6) = float4(x_21.x, x_21.y, x_21.z, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float3 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float3 const position_param = tint_symbol_1.position_param; - tint_symbol_8 = position_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float3 position_param, thread float3* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = position_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float3 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.hlsl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.hlsl index 5d7eab8504..909ad799e9 100644 --- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.hlsl +++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.hlsl @@ -17,11 +17,16 @@ struct tint_symbol_2 { float4 gl_Position : SV_Position; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float3 position_param = tint_symbol.position_param; +main_out main_inner(float3 position_param) { position = position_param; main_1(); const main_out tint_symbol_3 = {gl_Position}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.position_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.msl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.msl index 87dbf224c6..7ef967c029 100644 --- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.msl +++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.msl @@ -11,20 +11,25 @@ struct tint_symbol_3 { float4 gl_Position [[position]]; }; -void main_1(thread float3* const tint_symbol_6, thread float4* const tint_symbol_7) { - float3 const x_21 = *(tint_symbol_6); - *(tint_symbol_7) = float4(x_21.x, x_21.y, x_21.z, 1.0f); +void main_1(thread float3* const tint_symbol_5, thread float4* const tint_symbol_6) { + float3 const x_21 = *(tint_symbol_5); + *(tint_symbol_6) = float4(x_21.x, x_21.y, x_21.z, 1.0f); return; } -vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float3 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float3 const position_param = tint_symbol_1.position_param; - tint_symbol_8 = position_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position}; - return tint_symbol_5; +main_out tint_symbol_inner(float3 position_param, thread float3* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = position_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)}; + return tint_symbol_4; +} + +vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float3 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.gl_Position = inner_result.gl_Position; + return wrapper_result; } diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.hlsl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.hlsl index 72a9fa898a..25f61b0901 100644 --- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.hlsl @@ -28,11 +28,16 @@ struct tint_symbol_2 { int expect_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {expect}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.expect_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.expect_1 = inner_result.expect_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.msl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.msl index f604d95314..49c13b0ce0 100644 --- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.msl @@ -4,36 +4,42 @@ using namespace metal; struct main_out { int expect_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { int expect_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread int* const tint_symbol_4) { bool inbounds = false; bool x_31 = false; bool x_32_phi = false; - float const x_24 = (*(tint_symbol_5)).x; + float const x_24 = (*(tint_symbol_3)).x; bool const x_25 = (x_24 < 128.0f); x_32_phi = x_25; if (!(x_25)) { - float const x_30 = (*(tint_symbol_5)).y; + float const x_30 = (*(tint_symbol_3)).y; x_31 = (x_30 < 128.0f); x_32_phi = x_31; } bool const x_32 = x_32_phi; inbounds = x_32; bool const x_33 = inbounds; - *(tint_symbol_6) = select(-1, 1, x_33); + *(tint_symbol_4) = select(-1, 1, x_33); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread int tint_symbol_8 = 0; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.expect_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.expect_1=tint_symbol_3.expect_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread int* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.expect_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread int tint_symbol_8 = 0; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.expect_1 = inner_result.expect_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.hlsl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.hlsl index 72a9fa898a..25f61b0901 100644 --- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.hlsl @@ -28,11 +28,16 @@ struct tint_symbol_2 { int expect_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {expect}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.expect_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.expect_1 = inner_result.expect_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.msl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.msl index f604d95314..49c13b0ce0 100644 --- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.msl @@ -4,36 +4,42 @@ using namespace metal; struct main_out { int expect_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { int expect_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6) { +void main_1(thread float4* const tint_symbol_3, thread int* const tint_symbol_4) { bool inbounds = false; bool x_31 = false; bool x_32_phi = false; - float const x_24 = (*(tint_symbol_5)).x; + float const x_24 = (*(tint_symbol_3)).x; bool const x_25 = (x_24 < 128.0f); x_32_phi = x_25; if (!(x_25)) { - float const x_30 = (*(tint_symbol_5)).y; + float const x_30 = (*(tint_symbol_3)).y; x_31 = (x_30 < 128.0f); x_32_phi = x_31; } bool const x_32 = x_32_phi; inbounds = x_32; bool const x_33 = inbounds; - *(tint_symbol_6) = select(-1, 1, x_33); + *(tint_symbol_4) = select(-1, 1, x_33); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread int tint_symbol_8 = 0; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.expect_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.expect_1=tint_symbol_3.expect_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread int* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.expect_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread int tint_symbol_8 = 0; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.expect_1 = inner_result.expect_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.hlsl b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.hlsl index c1e727e999..7dac578047 100644 --- a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.hlsl +++ b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 color_out_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 color_in_param = tint_symbol.color_in_param; +main_out main_inner(float4 color_in_param) { color_in = color_in_param; main_1(); const main_out tint_symbol_3 = {color_out}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.color_out_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.color_in_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.color_out_1 = inner_result.color_out_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.msl b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.msl index dad0955905..2b0c4f2cb1 100644 --- a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.msl +++ b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.msl @@ -11,20 +11,25 @@ struct tint_symbol_3 { float4 color_out_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_12 = *(tint_symbol_6); - *(tint_symbol_7) = x_12; +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_12 = *(tint_symbol_5); + *(tint_symbol_6) = x_12; return; } -fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const color_in_param = tint_symbol_1.color_in_param; - tint_symbol_8 = color_in_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.color_out_1=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.color_out_1=tint_symbol_4.color_out_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 color_in_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = color_in_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.color_out_1=*(tint_symbol_8)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.color_in_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.color_out_1 = inner_result.color_out_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.hlsl b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.hlsl index c1e727e999..7dac578047 100644 --- a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.hlsl +++ b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.hlsl @@ -16,11 +16,16 @@ struct tint_symbol_2 { float4 color_out_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 color_in_param = tint_symbol.color_in_param; +main_out main_inner(float4 color_in_param) { color_in = color_in_param; main_1(); const main_out tint_symbol_3 = {color_out}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.color_out_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.color_in_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.color_out_1 = inner_result.color_out_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.msl b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.msl index dad0955905..2b0c4f2cb1 100644 --- a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.msl +++ b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.msl @@ -11,20 +11,25 @@ struct tint_symbol_3 { float4 color_out_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { - float4 const x_12 = *(tint_symbol_6); - *(tint_symbol_7) = x_12; +void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + float4 const x_12 = *(tint_symbol_5); + *(tint_symbol_6) = x_12; return; } -fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { - thread float4 tint_symbol_8 = 0.0f; - thread float4 tint_symbol_9 = 0.0f; - float4 const color_in_param = tint_symbol_1.color_in_param; - tint_symbol_8 = color_in_param; - main_1(&(tint_symbol_8), &(tint_symbol_9)); - main_out const tint_symbol_4 = {.color_out_1=tint_symbol_9}; - tint_symbol_3 const tint_symbol_5 = {.color_out_1=tint_symbol_4.color_out_1}; - return tint_symbol_5; +main_out tint_symbol_inner(float4 color_in_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { + *(tint_symbol_7) = color_in_param; + main_1(tint_symbol_7, tint_symbol_8); + main_out const tint_symbol_4 = {.color_out_1=*(tint_symbol_8)}; + return tint_symbol_4; +} + +fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { + thread float4 tint_symbol_9 = 0.0f; + thread float4 tint_symbol_10 = 0.0f; + main_out const inner_result = tint_symbol_inner(tint_symbol_1.color_in_param, &(tint_symbol_9), &(tint_symbol_10)); + tint_symbol_3 wrapper_result = {}; + wrapper_result.color_out_1 = inner_result.color_out_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.hlsl index 6b9138bba3..d0664b3d4d 100644 --- a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.hlsl +++ b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.hlsl @@ -18,11 +18,16 @@ struct tint_symbol_2 { float4 result_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {result}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.result_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.result_1 = inner_result.result_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.msl b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.msl index 6f93315a3e..6a977de8fc 100644 --- a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.msl @@ -4,24 +4,30 @@ using namespace metal; struct main_out { float4 result_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 result_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - float const x_19 = (*(tint_symbol_5)).x; - float const x_23 = (*(tint_symbol_5)).y; - *(tint_symbol_6) = float4((floor(x_19) / 255.0f), (floor(x_23) / 255.0f), 0.0f, 0.0f); +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + float const x_19 = (*(tint_symbol_3)).x; + float const x_23 = (*(tint_symbol_3)).y; + *(tint_symbol_4) = float4((floor(x_19) / 255.0f), (floor(x_23) / 255.0f), 0.0f, 0.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.result_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.result_1=tint_symbol_3.result_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.result_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.result_1 = inner_result.result_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.hlsl index 6b9138bba3..d0664b3d4d 100644 --- a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.hlsl +++ b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.hlsl @@ -18,11 +18,16 @@ struct tint_symbol_2 { float4 result_1 : SV_Target0; }; -tint_symbol_2 main(tint_symbol_1 tint_symbol) { - const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param; +main_out main_inner(float4 gl_FragCoord_param) { gl_FragCoord = gl_FragCoord_param; main_1(); const main_out tint_symbol_3 = {result}; - const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.result_1}; - return tint_symbol_4; + return tint_symbol_3; +} + +tint_symbol_2 main(tint_symbol_1 tint_symbol) { + const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param); + tint_symbol_2 wrapper_result = (tint_symbol_2)0; + wrapper_result.result_1 = inner_result.result_1; + return wrapper_result; } diff --git a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.msl b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.msl index 6f93315a3e..6a977de8fc 100644 --- a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.msl @@ -4,24 +4,30 @@ using namespace metal; struct main_out { float4 result_1; }; -struct tint_symbol_2 { +struct tint_symbol_1 { float4 result_1 [[color(0)]]; }; -void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { - float const x_19 = (*(tint_symbol_5)).x; - float const x_23 = (*(tint_symbol_5)).y; - *(tint_symbol_6) = float4((floor(x_19) / 255.0f), (floor(x_23) / 255.0f), 0.0f, 0.0f); +void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { + float const x_19 = (*(tint_symbol_3)).x; + float const x_23 = (*(tint_symbol_3)).y; + *(tint_symbol_4) = float4((floor(x_19) / 255.0f), (floor(x_23) / 255.0f), 0.0f, 0.0f); return; } -fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_7 = 0.0f; - thread float4 tint_symbol_8 = 0.0f; - tint_symbol_7 = gl_FragCoord_param; - main_1(&(tint_symbol_7), &(tint_symbol_8)); - main_out const tint_symbol_3 = {.result_1=tint_symbol_8}; - tint_symbol_2 const tint_symbol_4 = {.result_1=tint_symbol_3.result_1}; - return tint_symbol_4; +main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { + *(tint_symbol_5) = gl_FragCoord_param; + main_1(tint_symbol_5, tint_symbol_6); + main_out const tint_symbol_2 = {.result_1=*(tint_symbol_6)}; + return tint_symbol_2; +} + +fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { + thread float4 tint_symbol_7 = 0.0f; + thread float4 tint_symbol_8 = 0.0f; + main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8)); + tint_symbol_1 wrapper_result = {}; + wrapper_result.result_1 = inner_result.result_1; + return wrapper_result; }