Fixing slang compilation temporarily, renaming vertexfactory
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#include "VulkanAllocator.h"
|
||||
#include "VulkanGraphics.h"
|
||||
#include "VulkanInitializer.h"
|
||||
#include "Math/MemCRC.h"
|
||||
|
||||
using namespace Seele::Vulkan;
|
||||
|
||||
|
||||
@@ -69,7 +69,9 @@ void PipelineLayout::create()
|
||||
createInfo.pPushConstantRanges = vkPushConstants.data();
|
||||
VK_CHECK(vkCreatePipelineLayout(graphics->getDevice(), &createInfo, nullptr, &layoutHandle));
|
||||
|
||||
layoutHash = memCrc32(&createInfo, sizeof(VkPipelineLayoutCreateInfo), 0);
|
||||
boost::crc_32_type result;
|
||||
result.process_bytes(&createInfo, sizeof(VkPipelineLayoutCreateInfo));
|
||||
layoutHash = result.checksum();
|
||||
}
|
||||
|
||||
void PipelineLayout::reset()
|
||||
|
||||
@@ -41,7 +41,9 @@ Framebuffer::Framebuffer(PGraphics graphics, PRenderPass renderPass, Gfx::PRende
|
||||
1);
|
||||
VK_CHECK(vkCreateFramebuffer(graphics->getDevice(), &createInfo, nullptr, &handle));
|
||||
|
||||
hash = memCrc32(&description, sizeof(FramebufferDescription));
|
||||
boost::crc_32_type result;
|
||||
result.process_bytes(&description, sizeof(FramebufferDescription));
|
||||
hash = result.checksum();
|
||||
}
|
||||
|
||||
Framebuffer::~Framebuffer()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include "Graphics/GraphicsEnums.h"
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <iostream>
|
||||
|
||||
#define VK_CHECK(f) \
|
||||
{ \
|
||||
|
||||
@@ -124,5 +124,7 @@ uint32 RenderPass::getFramebufferHash()
|
||||
PTexture2D tex = layout->depthAttachment->getTexture().cast<Texture2D>();
|
||||
description.depthAttachment = tex->getView();
|
||||
}
|
||||
return memCrc32(&description, sizeof(FramebufferDescription));
|
||||
boost::crc_32_type result;
|
||||
result.process_bytes(&description, sizeof(FramebufferDescription));
|
||||
return result.checksum();
|
||||
}
|
||||
@@ -58,12 +58,15 @@ void Shader::create(const ShaderCreateInfo& createInfo)
|
||||
|
||||
int translationUnitIndex = spAddTranslationUnit(request, SLANG_SOURCE_LANGUAGE_SLANG, "");
|
||||
|
||||
spAddTranslationUnitSourceString(
|
||||
request,
|
||||
translationUnitIndex,
|
||||
entryPointName.c_str(),
|
||||
createInfo.code.c_str()
|
||||
);
|
||||
for(auto code : createInfo.shaderCode)
|
||||
{
|
||||
spAddTranslationUnitSourceString(
|
||||
request,
|
||||
translationUnitIndex,
|
||||
entryPointName.c_str(),
|
||||
code.data()
|
||||
);
|
||||
}
|
||||
spAddSearchPath(request, "shaders/lib/");
|
||||
|
||||
spSetGlobalGenericArgs(request, createInfo.typeParameter.size(), createInfo.typeParameter.data());
|
||||
|
||||
Reference in New Issue
Block a user