7#include <vulkan/vulkan.h>
30 VkCullModeFlagBits
cullMode = VkCullModeFlagBits::VK_CULL_MODE_NONE;
62 virtual std::vector<VkSpecializationMapEntry>
getMapEntries()
const = 0;
139 :
data{screenWidth, screenHeight} {}
157#if !defined(HEADLESS) && !defined(COMPUTE_DEBUG)
160 VkPipelineLayout pipelineLayout,
161 VkRenderPass renderPass,
162 const std::string& meshShaderFilename,
163 const std::string& fragmentShaderFilename,
164 const std::vector<VkVertexInputBindingDescription>& vertexInputBindingDescriptions,
165 const std::vector<VkVertexInputAttributeDescription>& vertexInputAttributeDescriptions,
167 std::optional<const MeshShaderSpecializationData*> meshShaderSpecialization = std::nullopt,
168 VkFormat colorFormat = VK_FORMAT_R8G8B8A8_UNORM
174 VkPipelineLayout pipelineLayout,
175 VkRenderPass renderPass,
176 const std::string& vertexShaderName,
177 const std::string& fragmentShaderName
182 void bind(VkCommandBuffer commandBuffer)
const;
219 std::string shaderFilename,
220 std::optional<const PipelineSpecializationData *> pSpecializationData
228 void bind(VkCommandBuffer commandBuffer);
244 VkPipelineLayout
layout = VK_NULL_HANDLE;
The application context is the core class which stores the basic openxr and vulkan objects.
const void * getData() const override
Gets a pointer for the data for the specialization data.
struct Engine::Rendering::ComputePipelineSpecializationData::Data data
std::vector< VkSpecializationMapEntry > getMapEntries() const override
Gets the specialization data which will be uploaded to a shader.
virtual uint32_t getThreadCount() const
Getter for how man threads the compute shader this specialization is applied to should have.
ComputePipelineSpecializationData(uint32_t threadCount)
Constructor.
size_t getDataSize() const override
Gets the size of the data stored in the result of getData()
VkPipeline get() const
Getter for the raw vulkan pipeline.
Core::ComputeShader * computeShader
void bind(VkCommandBuffer commandBuffer)
Binds this pipeline to an arbitrary command buffer.
ComputePipeline(VkDevice device, VkPipelineLayout layout, std::string shaderFilename, std::optional< const PipelineSpecializationData * > pSpecializationData)
void cleanup()
Cleans up all the resource handles of this object.
uint32_t getThreadCount() const
struct Engine::Rendering::DispatcherComputePipelineSpecializationData::Data data
const void * getData() const override
Getter for data pointer.
std::vector< VkSpecializationMapEntry > getMapEntries() const override
Creates the list of specialization map entries which are applied to a shader.
DispatcherComputePipelineSpecializationData(uint32_t threadCount, uint32_t nextStageThreadCount)
size_t getDataSize() const override
Getter for the size at the data pointer.
uint32_t getNextStageThreadCount() const
std::string fragShaderName
VkSampleCountFlagBits multisampling
const PipelineMaterialPayload & getPipelineMaterialData() const
std::string meshShaderName
GraphicsPipeline(VkDevice device, VkSampleCountFlagBits multisampling, VkPipelineLayout pipelineLayout, VkRenderPass renderPass, const std::string &meshShaderFilename, const std::string &fragmentShaderFilename, const std::vector< VkVertexInputBindingDescription > &vertexInputBindingDescriptions, const std::vector< VkVertexInputAttributeDescription > &vertexInputAttributeDescriptions, PipelineMaterialPayload pipelineData, std::optional< const MeshShaderSpecializationData * > meshShaderSpecialization=std::nullopt, VkFormat colorFormat=VK_FORMAT_R8G8B8A8_UNORM)
const Core::ApplicationContext * context
PipelineMaterialPayload pipelineData
bool isValid() const
Checks if the object is fully constructed.
const std::string getFragShaderName() const
const std::string getMeshShaderName() const
void bind(VkCommandBuffer commandBuffer) const
bool operator==(const GraphicsPipeline &other) const
struct Engine::Rendering::MeshShaderSpecializationData::Data data
const void * getData() const override
Getter for data pointer.
float getScreenHeight() const
float getScreenWidth() const
std::vector< VkSpecializationMapEntry > getMapEntries() const override
Creates the list of specialization map entries which are applied to a shader.
MeshShaderSpecializationData(float screenWidth, float screenHeight)
size_t getDataSize() const override
Getter for the size at the data pointer.
Base class which defines the interface for pipeline specialization data. This can be thread count....
virtual ~PipelineSpecializationData()=default
virtual size_t getDataSize() const =0
Getter for the size at the data pointer.
virtual const void * getData() const =0
Getter for data pointer.
virtual std::vector< VkSpecializationMapEntry > getMapEntries() const =0
Creates the list of specialization map entries which are applied to a shader.
Core audio subsystem owning the miniaudio engine and managing playback.
uint32_t nextStageThreadCount
bool operator==(const PipelineMaterialPayload &other) const
VkBlendFactor srcAlphaBlendFactor
VkBlendFactor dstAlphaBlendFactor
VkCullModeFlagBits cullMode
VkBlendFactor dstColorBlendFactor
VkBlendFactor srcColorBlendFactor