runtime pipeline
This commit is contained in:
parent
75c9ae5087
commit
415e523a45
20 changed files with 480 additions and 45 deletions
|
|
@ -26,11 +26,23 @@ export module Crafter.Graphics:ShaderBindingTableVulkan;
|
|||
import std;
|
||||
import :VulkanDevice;
|
||||
import :VulkanBuffer;
|
||||
import :ShaderVulkan;
|
||||
import :Types;
|
||||
|
||||
export namespace Crafter {
|
||||
template <typename Shaders>
|
||||
class ShaderBindingTableVulkan {
|
||||
public:
|
||||
std::vector<VkPipelineShaderStageCreateInfo> shaderStages;
|
||||
void Init(std::span<VulkanShader> shaders) {
|
||||
shaderStages.reserve(shaders.size());
|
||||
for(const VulkanShader& shader: shaders) {
|
||||
shaderStages.emplace_back(VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, nullptr, 0, shader.stage, shader.shader, shader.entrypoint.c_str(), nullptr);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Shaders>
|
||||
class ShaderBindingTableVulkanConst {
|
||||
public:
|
||||
inline static std::array<VkPipelineShaderStageCreateInfo, std::tuple_size_v<Shaders>> shaderStages;
|
||||
static void Init() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue