/* * Copyright (c) 2022, Stephan Unverwerth * * SPDX-License-Identifier: BSD-2-Clause */ #include namespace GLSL { ErrorOr> Linker::link(Vector const&) { // FIXME: implement this function m_messages = {}; GPU::IR::Shader shader; auto input_name = TRY("input0"_string); auto output_name = TRY("output0"_string); TRY(shader.inputs.try_append({ move(input_name), GPU::IR::StorageType::Vector4 })); TRY(shader.outputs.try_append({ move(output_name), GPU::IR::StorageType::Vector4 })); GPU::IR::Instruction instruction { GPU::IR::Opcode::Move, { { GPU::IR::StorageLocation::Input, 0 } }, { GPU::IR::StorageLocation::Output, 0 } }; TRY(shader.instructions.try_append(instruction)); return try_make(shader); } }