1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-22 03:57:45 +00:00
novus/renderer/include/shadermanager.h
Joshua Goins 3b8b867a02 Make glslang dependency optional
This is only needed for additional GLSL debug information, and is
definitely not required.
2024-05-18 17:31:14 +00:00

28 lines
No EOL
669 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 <physis.hpp>
#include <spirv.hpp>
#include <spirv_glsl.hpp>
#include <vulkan/vulkan.h>
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(std::string_view sourceString, ShaderStage stage);
Device &m_device;
};