Formatted EVERYTHING
This commit is contained in:
@@ -1,40 +1,30 @@
|
||||
#include "Shader.h"
|
||||
#include "Graphics.h"
|
||||
#include "Graphics/slang-compile.h"
|
||||
#include "slang.h"
|
||||
#include "slang-com-ptr.h"
|
||||
#include "slang.h"
|
||||
#include "stdlib.h"
|
||||
#include <fmt/core.h>
|
||||
|
||||
|
||||
using namespace Seele;
|
||||
using namespace Seele::Vulkan;
|
||||
|
||||
Shader::Shader(PGraphics graphics, VkShaderStageFlags stage)
|
||||
: graphics(graphics)
|
||||
, stage(stage)
|
||||
{
|
||||
}
|
||||
Shader::Shader(PGraphics graphics, VkShaderStageFlags stage) : graphics(graphics), stage(stage) {}
|
||||
|
||||
Shader::~Shader()
|
||||
{
|
||||
if (module != VK_NULL_HANDLE)
|
||||
{
|
||||
Shader::~Shader() {
|
||||
if (module != VK_NULL_HANDLE) {
|
||||
vkDestroyShaderModule(graphics->getDevice(), module, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
uint32 Seele::Vulkan::Shader::getShaderHash() const
|
||||
{
|
||||
return hash;
|
||||
}
|
||||
uint32 Seele::Vulkan::Shader::getShaderHash() const { return hash; }
|
||||
|
||||
void Shader::create(ShaderCreateInfo createInfo)
|
||||
{
|
||||
void Shader::create(ShaderCreateInfo createInfo) {
|
||||
Map<std::string, uint32> paramMapping;
|
||||
Slang::ComPtr<slang::IBlob> kernelBlob = generateShader(createInfo, SLANG_SPIRV, paramMapping);
|
||||
createInfo.rootSignature->addMapping(paramMapping);
|
||||
VkShaderModuleCreateInfo moduleInfo =
|
||||
{
|
||||
VkShaderModuleCreateInfo moduleInfo = {
|
||||
.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO,
|
||||
.pNext = nullptr,
|
||||
.flags = 0,
|
||||
|
||||
Reference in New Issue
Block a user