Adding DXC

This commit is contained in:
Dynamitos
2024-04-12 09:27:30 +02:00
parent 4dc2df800a
commit efb2c0e169
17 changed files with 164 additions and 76 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
},
{
"name": "Editor (Mac)",
"type": "cppdbg",
"type": "lldb",
"request": "launch",
"program": "${workspaceRoot}/bin/Editor",
"args": [],
+15 -1
View File
@@ -75,9 +75,12 @@ target_link_libraries(Engine PUBLIC fmt::fmt)
target_link_libraries(Engine PUBLIC GPUOpen::VulkanMemoryAllocator)
target_link_libraries(Engine PUBLIC shader-slang)
if(APPLE)
target_link_directories(Engine PUBLIC /usr/local/lib)
target_link_libraries(Engine PUBLIC /usr/local/lib/libmetalirconverter.dylib)
target_link_libraries(Engine PUBLIC metal)
SET(CMAKE_OSX_DEPLOYMENT_TARGET 14.3)
install(FILES
${EXTERNAL_ROOT}/dxc
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
endif()
if(UNIX)
target_link_libraries(Engine PUBLIC Threads::Threads)
@@ -111,6 +114,11 @@ else()
target_link_options(Engine PUBLIC -fsanitize=address)
target_link_options(Editor PUBLIC -fsanitize=address)
endif()
if(APPLE)
#Metal lib throws that internally for some reason
target_compile_options(Engine PUBLIC -Wno-gnu-anonymous-struct)
target_compile_options(Editor PUBLIC -Wno-gnu-anonymous-struct)
endif()
target_compile_options(Engine PUBLIC "$<$<CONFIG:DEBUG>:-DENABLE_VALIDATION>")
target_compile_options(Engine PUBLIC "$<$<CONFIG:DEBUG>:-DSEELE_DEBUG>")
@@ -122,6 +130,12 @@ if(WIN32)
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_RUNTIME_DLLS:Engine> $<TARGET_FILE_DIR:Editor>
COMMAND_EXPAND_LISTS
DEPENDS Editor)
elseif(APPLE)
add_custom_target(dll_copy ALL
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SLANG_ROOT}bin/libslang.dylib $<TARGET_FILE_DIR:Editor>
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${EXTERNAL_ROOT}/dxc $<TARGET_FILE_DIR:Editor>
COMMAND_EXPAND_LISTS
DEPENDS Editor)
else()
add_custom_target(dll_copy ALL
COMMAND ${CMAKE_COMMAND} -E true)
+1 -1
View File
@@ -19,7 +19,7 @@ if(WIN32)
${SLANG_ROOT}/lib/slang.lib
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
elseif(APPLE)
set(SLANG_ROOT ${EXTERNAL_ROOT}/vcpkg/packages/shader-slang_${CMAKE_PLATFORM}-osx)
set(SLANG_ROOT ${EXTERNAL_ROOT}/vcpkg/packages/shader-slang_arm64-osx/)
set_target_properties(shader-slang-glslang PROPERTIES IMPORTED_LOCATION ${SLANG_ROOT}/bin/libslang-glslang.dylib)
set_target_properties(shader-slang PROPERTIES IMPORTED_LOCATION ${SLANG_ROOT}/bin/libslang.dylib)
target_link_libraries(shader-slang INTERFACE shader-slang-glslang)
Vendored Executable
BIN
View File
Binary file not shown.
+1 -1
+7
View File
@@ -1,3 +1,4 @@
#include "Graphics/Initializer.h"
#include "Graphics/Metal/Graphics.h"
#include "Window/WindowManager.h"
#include "Window/SceneView.h"
@@ -47,6 +48,12 @@ int main()
#endif
GraphicsInitializer initializer;
graphics->init(initializer);
graphics->createComputeShader(ShaderCreateInfo {
.entryPoint = "cullLights",
.mainModule = "LightCulling",
.additionalModules = {"LightCulling"},
.name = "Test",
});
StaticMeshVertexData* vd = StaticMeshVertexData::getInstance();
vd->init(graphics);
OWindowManager windowManager = new WindowManager();
+4 -4
View File
@@ -1,5 +1,6 @@
#pragma once
#include "Graphics/Command.h"
#include "Metal/MTLCommandBuffer.hpp"
#include "RenderPass.h"
#include "Resources.h"
@@ -12,7 +13,7 @@ DECLARE_REF(Graphics)
class Command
{
public:
Command(PGraphics graphics, PCommandQueue owner);
Command(PGraphics graphics, MTL::CommandBuffer* cmdBuffer);
~Command();
void beginRenderPass(PRenderPass renderPass);
void endRenderPass();
@@ -32,7 +33,6 @@ public:
}
private:
PGraphics graphics;
PCommandQueue owner;
OEvent completed;
MTL::CommandBuffer* cmdBuffer;
MTL::ParallelRenderCommandEncoder* renderEncoder;
@@ -82,7 +82,7 @@ public:
{
return queue;
}
PCommand getCommands();
PCommand getCommands() {return activeCommand;} //TODO
ORenderCommand getRenderCommand(const std::string& name);
OComputeCommand getComputeCommand(const std::string& name);
void submitCommands(PEvent signal = nullptr);
@@ -100,7 +100,7 @@ public:
{
return queue;
}
PCommand getCommands();
PCommand getCommands() {return activeCommand;} // TODO
void submitCommands(PEvent signal = nullptr);
private:
PGraphics graphics;
+28 -27
View File
@@ -1,6 +1,7 @@
#include "Command.h"
#include "Graphics/Graphics.h"
#include "Graphics/Metal/Resources.h"
#include "Metal/MTLCommandBuffer.hpp"
#include "Metal/MTLIOCommandQueue.hpp"
#include "Metal/MTLRenderCommandEncoder.hpp"
#include "Window.h"
@@ -8,9 +9,9 @@
using namespace Seele;
using namespace Seele::Metal;
Command::Command(PGraphics graphics, PCommandQueue owner)
: graphics(graphics), owner(owner), completed(new Event(graphics)),
cmdBuffer(owner->getHandle()->commandBuffer()), renderEncoder(nullptr) {}
Command::Command(PGraphics graphics, MTL::CommandBuffer* cmdBuffer)
: graphics(graphics), completed(new Event(graphics)),
cmdBuffer(cmdBuffer), renderEncoder(nullptr) {}
Command::~Command() { cmdBuffer->release(); }
@@ -77,48 +78,48 @@ void RenderCommand::setViewport(Gfx::PViewport viewport) {
}
void RenderCommand::bindPipeline(Gfx::PGraphicsPipeline pipeline) {
encoder->setRenderPipelineState(
pipeline.cast<GraphicsPipeline>()->getState());
// encoder->setRenderPipelineState(
// pipeline.cast<GraphicsPipeline>()->getState());
}
void RenderCommand::bindDescriptor(Gfx::PDescriptorSet descriptorSet) {
encoder->set ? ? ? ? ?
}
void RenderCommand::bindDescriptor(
const Array<Gfx::PDescriptorSet> &descriptorSets) {
encoder->set ? ? ? ? ?
// encoder->set ? ? ? ? ?
}
void RenderCommand::bindVertexBuffer(const Array<Gfx::PVertexBuffer> &buffers) {
encoder->setVertexBuffers();
// encoder->setVertexBuffers();
}
void RenderCommand::bindIndexBuffer(Gfx::PIndexBuffer indexBuffer) {
encoder->setObjectBuffer(??, NS::UInteger offset, NS::UInteger index)
// encoder->setObjectBuffer(??, NS::UInteger offset, NS::UInteger index)
}
void RenderCommand::pushConstants(Gfx::PPipelineLayout layout,
Gfx::SeShaderStageFlags stage, uint32 offset,
uint32 size, const void *data) {
? ? ?
// ? ? ?
}
void RenderCommand::draw(uint32 vertexCount, uint32 instanceCount,
int32 firstVertex, uint32 firstInstance) {
encoder->drawPrimitives(???, firstVertex, vertexCount, instanceCount, firstInstance);
// encoder->drawPrimitives(???, firstVertex, vertexCount, instanceCount, firstInstance);
}
void RenderCommand::drawIndexed(uint32 indexCount, uint32 instanceCount,
int32 firstIndex, uint32 vertexOffset,
uint32 firstInstance) {
encoder->drawIndexedPrimitives(???, indexCount, indexbuffer->getType(), indexBuffer->getBuffer(), firstIndex, instanceCount, vertexOffset, firstInstance);
// encoder->drawIndexedPrimitives(???, indexCount, indexbuffer->getType(), indexBuffer->getBuffer(), firstIndex, instanceCount, vertexOffset, firstInstance);
}
void RenderCommand::drawMesh(uint32 groupX, uint32 groupY, uint32 groupZ){
encoder->drawMeshThreads(MTL::Size threadsPerGrid,
MTL::Size threadsPerObjectThreadgroup,
MTL::Size threadsPerMeshThreadgroup)}
// encoder->drawMeshThreads(MTL::Size threadsPerGrid,
// MTL::Size threadsPerObjectThreadgroup,
// MTL::Size threadsPerMeshThreadgroup)
}
ComputeCommand::ComputeCommand(MTL::ComputeCommandEncoder *encoder)
: encoder(encoder) {}
@@ -128,30 +129,30 @@ ComputeCommand::~ComputeCommand() { encoder->release(); }
void ComputeCommand::end() { encoder->endEncoding(); }
void ComputeCommand::bindPipeline(Gfx::PComputePipeline pipeline) {
encoder->setComputePipelineState(pipeline.cast<ComputePipeline>());
// encoder->setComputePipelineState(pipeline.cast<ComputePipeline>());
}
void ComputeCommand::bindDescriptor(Gfx::PDescriptorSet set) {
encoder->set ? ? ?
// encoder->set ? ? ?
}
void ComputeCommand::bindDescriptor(const Array<Gfx::PDescriptorSet> &sets) {
encoder->set ? ? ?
// encoder->set ? ? ?
}
void ComputeCommand::pushConstants(Gfx::PPipelineLayout layout,
Gfx::SeShaderStageFlags stage, uint32 offset,
uint32 size, const void *data) {
? ? ?
// ? ? ?
}
void ComputeCommand::dispatch(uint32 threadX, uint32 threadY, uint32 threadZ) {
encoder->dispatchThreadgroups(???);
// encoder->dispatchThreadgroups(???);
}
CommandQueue::CommandQueue(PGraphics graphics) : graphics(graphics) {
queue = graphics->getDevice()->newCommandQueue();
activeCommand = new Command(graphics, this);
activeCommand = new Command(graphics, queue->commandBuffer());
}
CommandQueue::~CommandQueue() { queue->release(); }
@@ -166,8 +167,8 @@ OComputeCommand CommandQueue::getComputeCommand(const std::string &name) {
void CommandQueue::submitCommands(PEvent signalSemaphore) {
activeCommand->end(signalSemaphore);
MTL::Event *prevCmdEvent = activeCommand->getCompletedEvent();
activeCommand = new Command(graphics, this);
PEvent prevCmdEvent = activeCommand->getCompletedEvent();
activeCommand = new Command(graphics, queue->commandBuffer());
activeCommand->waitForEvent(prevCmdEvent);
}
@@ -175,8 +176,8 @@ IOCommandQueue::IOCommandQueue(PGraphics graphics) : graphics(graphics) {
MTL::IOCommandQueueDescriptor* desc = MTL::IOCommandQueueDescriptor::alloc()->init();
desc->setType(MTL::IOCommandQueueTypeConcurrent);
desc->setPriority(MTL::IOPriorityNormal);
queue = graphics->getDevice()->newIOCommandQueue(desc);
activeCommand = new Command(graphics, this);
queue = graphics->getDevice()->newIOCommandQueue(desc, nullptr);
//activeCommand = new Command(graphics, queue->commandBuffer());
desc->release();
}
@@ -185,7 +186,7 @@ IOCommandQueue::~IOCommandQueue() { queue->release(); }
void IOCommandQueue::submitCommands(PEvent signalSemaphore) {
//TODO: scratch buffer
activeCommand->end(signalSemaphore);
MTL::Event *prevCmdEvent = activeCommand->getCompletedEvent();
activeCommand = new Command(graphics, this);
PEvent prevCmdEvent = activeCommand->getCompletedEvent();
//activeCommand = new Command(graphics, queue->commandBuffer());
activeCommand->waitForEvent(prevCmdEvent);
}
+37 -19
View File
@@ -1,53 +1,71 @@
#pragma once
#include "Foundation/NSArray.hpp"
#include "Graphics/Descriptor.h"
#include "Graphics/Initializer.h"
#include "Metal/MTLArgumentEncoder.hpp"
#include "MinimalEngine.h"
namespace Seele {
namespace Metal {
DECLARE_REF(Graphics)
DECLARE_REF(DescriptorPool)
class DescriptorLayout : public Gfx::DescriptorLayout
{
class DescriptorLayout : public Gfx::DescriptorLayout {
public:
DescriptorLayout(PGraphics graphics, const std::string& name);
DescriptorLayout(PGraphics graphics, const std::string &name);
virtual ~DescriptorLayout();
virtual void create() override;
NS::Array* getArguments() const
{
return arguments;
}
private:
PGraphics graphics;
NS::Array* arguments;
};
class PipelineLayout : public Gfx::PipelineLayout
{
class PipelineLayout : public Gfx::PipelineLayout {
public:
PipelineLayout(PGraphics graphics, Gfx::PPipelineLayout baseLayout)
: Gfx::PipelineLayout(baseLayout)
, graphics(graphics)
{}
: Gfx::PipelineLayout(baseLayout), graphics(graphics) {}
private:
PGraphics graphics;
};
DEFINE_REF(PipelineLayout)
class DescriptorSet : public Gfx::DescriptorSet
{
class DescriptorSet : public Gfx::DescriptorSet {
public:
DescriptorSet(PGraphics graphics, PDescriptorPool owner)
: graphics(graphics)
, owner(owner)
{}
DescriptorSet(PGraphics graphics, PDescriptorPool owner);
virtual ~DescriptorSet();
virtual void writeChanges();
virtual void updateBuffer(uint32_t binding,
Gfx::PUniformBuffer uniformBuffer);
virtual void updateBuffer(uint32_t binding, Gfx::PShaderBuffer uniformBuffer);
virtual void updateSampler(uint32_t binding, Gfx::PSampler samplerState);
virtual void updateTexture(uint32_t binding, Gfx::PTexture texture,
Gfx::PSampler sampler = nullptr);
virtual void updateTextureArray(uint32_t binding,
Array<Gfx::PTexture> texture);
virtual bool operator<(Gfx::PDescriptorSet other);
private:
PGraphics graphics;
PDescriptorPool owner;
MTL::Buffer* buffer;
MTL::ArgumentEncoder* encoder;
};
DEFINE_REF(DescriptorSet)
class DescriptorPool : public Gfx::DescriptorPool
{
class DescriptorPool : public Gfx::DescriptorPool {
public:
DescriptorPool(PGraphics graphics);
DescriptorPool(PGraphics graphics, DescriptorLayout& layout);
virtual ~DescriptorPool();
NS::Array* getArguments() const
{
return layout.getArguments();
}
private:
PGraphics graphics;
DescriptorLayout& layout;
};
}
}
} // namespace Metal
} // namespace Seele
+28
View File
@@ -0,0 +1,28 @@
#include "Descriptor.h"
#include "Graphics.h"
using namespace Seele;
using namespace Seele::Metal;
DescriptorSet::DescriptorSet(PGraphics graphics, PDescriptorPool owner)
: graphics(graphics)
, owner(owner)
{
encoder = graphics->getDevice()->newArgumentEncoder(owner->getArguments());
}
DescriptorSet::~DescriptorSet()
{
}
void DescriptorSet::writeChanges()
{
}
void DescriptorSet::updateBuffer(uint32_t binding,
Gfx::PUniformBuffer uniformBuffer){}
void DescriptorSet::updateBuffer(uint32_t binding, Gfx::PShaderBuffer uniformBuffer){}
void DescriptorSet::updateSampler(uint32_t binding, Gfx::PSampler samplerState){}
void DescriptorSet::updateTexture(uint32_t binding, Gfx::PTexture texture,
Gfx::PSampler sampler){}
void DescriptorSet::updateTextureArray(uint32_t binding,
Array<Gfx::PTexture> texture){}
bool DescriptorSet::operator<(Gfx::PDescriptorSet other){return this < other.getHandle();}
-1
View File
@@ -59,7 +59,6 @@ public:
PIOCommandQueue getIOQueue() const { return ioQueue; }
protected:
MTL::Device* device;
MTL::Library* library;
OCommandQueue queue;
OIOCommandQueue ioQueue;
};
+8 -4
View File
@@ -1,4 +1,5 @@
#include "Graphics.h"
#include "Graphics/Metal/Shader.h"
#include "RenderPass.h"
#include "Command.h"
#include "Window.h"
@@ -19,8 +20,6 @@ Graphics::~Graphics()
void Graphics::init(GraphicsInitializer)
{
device = MTL::CreateSystemDefaultDevice();
library = device->newDefaultLibrary();
assert(library);
queue = new CommandQueue(this);
ioQueue = new IOCommandQueue(this);
}
@@ -121,11 +120,16 @@ Gfx::OFragmentShader Graphics::createFragmentShader(const ShaderCreateInfo& crea
}
Gfx::OComputeShader Graphics::createComputeShader(const ShaderCreateInfo& createInfo)
{
OComputeShader result = new ComputeShader(this);
result->create(createInfo);
return result;
}
Gfx::OMeshShader Graphics::createMeshShader(const ShaderCreateInfo& createInfo)
{
OMeshShader result = new MeshShader(this);
result->create(createInfo);
return result;
}
Gfx::OTaskShader Graphics::createTaskShader(const ShaderCreateInfo& createInfo)
{
+13 -2
View File
@@ -2,8 +2,8 @@
#include "Graphics.h"
#include "Graphics/Enums.h"
#include "Graphics/slang-compile.h"
#include "Metal/MTLLibrary.hpp"
#include "metal_irconverter/metal_irconverter.h"
#include <iostream>
#include </usr/local/include/metal_irconverter/metal_irconverter.h>
#include <slang.h>
using namespace Seele;
@@ -55,6 +55,17 @@ void Shader::create(const ShaderCreateInfo &createInfo) {
uint8_t *metallib = new uint8_t[metallibSize];
IRMetalLibGetBytecode(pMetallib, metallib);
IRShaderReflection* reflection = IRShaderReflectionCreate();
IRObjectGetReflection(pOutIR, irStage, reflection);
Array<IRResourceLocation> locations(
IRShaderReflectionGetResourceCount(reflection));
IRShaderReflectionGetResourceLocations(reflection, locations.data());
for(auto l : locations)
{
std::cout << "Resource " << l.resourceName << " Type " << l.resourceType << " size " << l.sizeBytes << " slot " << l.slot << " space " << l.space << " offset " << l.topLevelOffset << std::endl;
}
IRShaderReflectionDestroy(reflection);
// Store the metallib to custom format or disk, or use to create a MTLLibrary.
NS::Error *__autoreleasing error = nil;
dispatch_data_t data = dispatch_data_create(metallib, metallibSize,
+12 -6
View File
@@ -82,7 +82,7 @@ void Command::endRenderPass()
state = State::Begin;
}
void Command::executeCommands(const Array<Gfx::ORenderCommand>& commands)
void Command::executeCommands(Array<Gfx::ORenderCommand> commands)
{
assert(state == State::RenderPass);
if(commands.size() == 0)
@@ -95,18 +95,18 @@ void Command::executeCommands(const Array<Gfx::ORenderCommand>& commands)
{
auto command = Gfx::PRenderCommand(commands[i]).cast<RenderCommand>();
command->end();
executingRenders.add(command);
for(auto& descriptor : command->boundDescriptors)
{
boundDescriptors.add(descriptor);
//std::cout << "Cmd " << handle << " bound descriptor " << descriptor->getHandle() << std::endl;
}
cmdBuffers[i] = command->getHandle();
executingRenders.add(std::move(commands[i]));
}
vkCmdExecuteCommands(handle, (uint32)cmdBuffers.size(), cmdBuffers.data());
}
void Command::executeCommands(const Array<Gfx::OComputeCommand>& commands)
void Command::executeCommands(Array<Gfx::OComputeCommand> commands)
{
if(commands.size() == 0)
{
@@ -117,13 +117,13 @@ void Command::executeCommands(const Array<Gfx::OComputeCommand>& commands)
{
auto command = Gfx::PComputeCommand(commands[i]).cast<ComputeCommand>();
command->end();
executingComputes.add(command);
for(auto& descriptor : command->boundDescriptors)
{
boundDescriptors.add(descriptor);
//std::cout << "Cmd " << handle << " bound descriptor " << descriptor->getHandle() << std::endl;
}
cmdBuffers[i] = command->getHandle();
executingComputes.add(std::move(commands[i]));
}
vkCmdExecuteCommands(handle, (uint32)cmdBuffers.size(), cmdBuffers.data());
}
@@ -487,12 +487,18 @@ PCommand CommandPool::getCommands()
}
void CommandPool::cacheCommands(Array<ORenderCommand> commands)
{
allocatedRenderCommands.addAll(commands);
for(auto&& command : commands)
{
allocatedRenderCommands.add(std::move(command));
}
}
void CommandPool::cacheCommands(Array<OComputeCommand> commands)
{
allocatedComputeCommands.addAll(commands);
for(auto&& command : commands)
{
allocatedComputeCommands.add(std::move(command));
}
}
ORenderCommand CommandPool::createRenderCommand(const std::string& name)
+5 -5
View File
@@ -22,8 +22,8 @@ public:
void end();
void beginRenderPass(PRenderPass renderPass, PFramebuffer framebuffer);
void endRenderPass();
void executeCommands(const Array<Gfx::ORenderCommand> &secondaryCommands);
void executeCommands(const Array<Gfx::OComputeCommand> &secondaryCommands);
void executeCommands(Array<Gfx::ORenderCommand> secondaryCommands);
void executeCommands(Array<Gfx::OComputeCommand> secondaryCommands);
void waitForSemaphore(VkPipelineStageFlags stages, PSemaphore waitSemaphore);
void checkFence();
void waitForCommand(uint32 timeToWait = 1000000u);
@@ -50,8 +50,8 @@ private:
PFramebuffer boundFramebuffer;
Array<PSemaphore> waitSemaphores;
Array<VkPipelineStageFlags> waitFlags;
Array<PRenderCommand> executingRenders;
Array<PComputeCommand> executingComputes;
Array<ORenderCommand> executingRenders;
Array<OComputeCommand> executingComputes;
Array<PDescriptorSet> boundDescriptors;
friend class RenderCommand;
friend class CommandPool;
@@ -123,7 +123,7 @@ public:
private:
PComputePipeline pipeline;
bool ready;
Array<DescriptorSet *> boundDescriptors;
Array<PDescriptorSet> boundDescriptors;
VkViewport currentViewport;
VkRect2D currentScissor;
PGraphics graphics;
+2 -2
View File
@@ -118,12 +118,12 @@ void Graphics::waitDeviceIdle()
void Graphics::executeCommands(Array<Gfx::ORenderCommand> commands)
{
getGraphicsCommands()->getCommands()->executeCommands(commands);
getGraphicsCommands()->getCommands()->executeCommands(std::move(commands));
}
void Graphics::executeCommands(Array<Gfx::OComputeCommand> commands)
{
getComputeCommands()->getCommands()->executeCommands(commands);
getComputeCommands()->getCommands()->executeCommands(std::move(commands));
}
Gfx::OTexture2D Graphics::createTexture2D(const TextureCreateInfo &createInfo)
+2 -2
View File
@@ -1,5 +1,6 @@
#include "Shader.h"
#include "Graphics.h"
#include "Graphics/slang-compile.h"
#include "slang.h"
#include "slang-com-ptr.h"
#include "stdlib.h"
@@ -29,7 +30,7 @@ uint32 Seele::Vulkan::Shader::getShaderHash() const
void Shader::create(const ShaderCreateInfo& createInfo)
{
Slang::ComPtr<slang::IBlob> kernelBlob = generateShader(createInfo, SLANG_SPIRV);
VkShaderModuleCreateInfo moduleInfo =
{
.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO,
@@ -40,7 +41,6 @@ void Shader::create(const ShaderCreateInfo& createInfo)
};
VK_CHECK(vkCreateShaderModule(graphics->getDevice(), &moduleInfo, nullptr, &module));
hash = CRC::Calculate(entryPointName.data(), entryPointName.size(), CRC::CRC_32());
hash = CRC::Calculate(kernelBlob->getBufferPointer(), kernelBlob->getBufferSize(), CRC::CRC_32(), hash);
/*
specializedComponent->getEntryPointCode(