// SPDX-License-Identifier: MPL-2.0 // Copyright © 2021 Skyline Team and Contributors (https://github.com/skyline-emu/) #pragma once #include #include #include #include #include #include #include #include #include namespace skyline::gpu { /** * @brief The Shader Manager is responsible for caching and looking up shaders alongside handling compilation of shaders when not found in any cache */ class ShaderManager { private: GPU &gpu; Shader::ObjectPool flowBlockPool; Shader::ObjectPool instPool; Shader::ObjectPool blockPool; Shader::HostTranslateInfo hostTranslateInfo; Shader::Profile profile; public: ShaderManager(const DeviceState& state, GPU &gpu); /** * @note `runtimeInfo::previous_stage_stores` will automatically be updated for the next stage */ vk::raii::ShaderModule CompileGraphicsShader(const std::vector &binary, Shader::Stage stage, u32 baseOffset, Shader::RuntimeInfo& runtimeInfo); }; }