Formatted EVERYTHING
This commit is contained in:
@@ -1,37 +1,29 @@
|
||||
#pragma once
|
||||
#include "Resources.h"
|
||||
#include "Enums.h"
|
||||
#include "Graphics/Shader.h"
|
||||
#include "Resources.h"
|
||||
|
||||
namespace Seele
|
||||
{
|
||||
namespace Vulkan
|
||||
{
|
||||
|
||||
namespace Seele {
|
||||
namespace Vulkan {
|
||||
DECLARE_REF(Graphics)
|
||||
DECLARE_REF(DescriptorLayout)
|
||||
class Shader
|
||||
{
|
||||
public:
|
||||
class Shader {
|
||||
public:
|
||||
Shader(PGraphics graphics, VkShaderStageFlags stage);
|
||||
virtual ~Shader();
|
||||
|
||||
void create(ShaderCreateInfo createInfo);
|
||||
|
||||
constexpr VkShaderModule getModuleHandle() const
|
||||
{
|
||||
return module;
|
||||
}
|
||||
constexpr const char* getEntryPointName() const
|
||||
{
|
||||
//SLang renames all entry points to main, so we dont need that
|
||||
return "main";//entryPointName.c_str();
|
||||
}
|
||||
constexpr VkShaderStageFlags getStage() const
|
||||
{
|
||||
return stage;
|
||||
constexpr VkShaderModule getModuleHandle() const { return module; }
|
||||
constexpr const char* getEntryPointName() const {
|
||||
// SLang renames all entry points to main, so we dont need that
|
||||
return "main"; // entryPointName.c_str();
|
||||
}
|
||||
constexpr VkShaderStageFlags getStage() const { return stage; }
|
||||
uint32 getShaderHash() const;
|
||||
private:
|
||||
|
||||
private:
|
||||
PGraphics graphics;
|
||||
VkShaderModule module;
|
||||
VkShaderStageFlags stage;
|
||||
@@ -39,17 +31,10 @@ private:
|
||||
};
|
||||
DEFINE_REF(Shader)
|
||||
|
||||
template <typename Base, VkShaderStageFlags stageFlags>
|
||||
class ShaderBase : public Base, public Shader
|
||||
{
|
||||
public:
|
||||
ShaderBase(PGraphics graphics)
|
||||
: Shader(graphics, stageFlags)
|
||||
{
|
||||
}
|
||||
virtual ~ShaderBase()
|
||||
{
|
||||
}
|
||||
template <typename Base, VkShaderStageFlags stageFlags> class ShaderBase : public Base, public Shader {
|
||||
public:
|
||||
ShaderBase(PGraphics graphics) : Shader(graphics, stageFlags) {}
|
||||
virtual ~ShaderBase() {}
|
||||
};
|
||||
using VertexShader = ShaderBase<Gfx::VertexShader, VK_SHADER_STAGE_VERTEX_BIT>;
|
||||
using FragmentShader = ShaderBase<Gfx::FragmentShader, VK_SHADER_STAGE_FRAGMENT_BIT>;
|
||||
@@ -63,4 +48,4 @@ DEFINE_REF(ComputeShader)
|
||||
DEFINE_REF(TaskShader)
|
||||
DEFINE_REF(MeshShader)
|
||||
} // namespace Vulkan
|
||||
}
|
||||
} // namespace Seele
|
||||
Reference in New Issue
Block a user