1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-21 19:57:44 +00:00
novus/renderer/include/shadermanager.h

29 lines
No EOL
729 B
C++

// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <string_view>
#include <vector>
#include <glslang/Public/ShaderLang.h>
#include <spirv.hpp>
#include <spirv_glsl.hpp>
#include <vulkan/vulkan.h>
struct physis_Shader;
class Device;
class ShaderManager
{
public:
explicit ShaderManager(Device &device);
spirv_cross::CompilerGLSL getShaderModuleResources(const physis_Shader &shader);
VkShaderModule convertShaderModule(const physis_Shader &shader, spv::ExecutionModel executionModel);
private:
std::vector<uint32_t> compileGLSL(const std::string_view sourceString, const EShLanguage sourceLanguage);
Device &m_device;
};