31 const std::string&
name
46 const VkPipelineLayoutCreateInfo * pPipelineLayoutCreateInfo,
47 const VkDescriptorSetLayoutCreateInfo * pDescriptorSetLayoutCreateInfo,
48 std::string shaderName,
49 std::optional<const PipelineSpecializationData *> pSpecializationData
108 void createDescriptorSet(VkDevice device, uint32_t frameInFlightIndex, VkDescriptorPool descriptorPool);
128 [[nodiscard]] VkDescriptorSet
getDescriptorSet(uint32_t frameInFlightIndex)
const;
168 std::string
name =
"Generic Compute";
174 std::array<VkDescriptorSet, MAX_FRAMES_IN_FLIGHT>
descriptorSet {VK_NULL_HANDLE};
The application context is the core class which stores the basic openxr and vulkan objects.
std::array< VkDescriptorSet, MAX_FRAMES_IN_FLIGHT > descriptorSet
VkDescriptorSetLayout descriptorSetLayout
void createDescriptorSet(VkDevice device, uint32_t frameInFlightIndex, VkDescriptorPool descriptorPool)
Creates a vulkan descriptor set resource for a frame in flight into a specified descriptor pool.
DescriptorSetUpdater & updateDescriptorSet(uint32_t frameInFlightIndex)
Creates a descriptor set updater which is used to batch update descriptor set resources.
DescriptorSetUpdater descriptorSetBuilder
std::string getName() const
virtual void extractSpecializationData(std::optional< const PipelineSpecializationData * > pSpecializationData)
uint32_t getThreadCount() const
Gets the amount of threads this compute shader is running on on the GPU.
void bindDescriptorSets(VkCommandBuffer commandBuffer, uint32_t frameInFlightIndex)
Binds the descriptor set of a frame in flight.
virtual ~ComputePass()=default
void create(VkDevice device, const VkPipelineLayoutCreateInfo *pPipelineLayoutCreateInfo, const VkDescriptorSetLayoutCreateInfo *pDescriptorSetLayoutCreateInfo, std::string shaderName, std::optional< const PipelineSpecializationData * > pSpecializationData)
Creates a whole compute pass with a layout and everything. This is one of two steps needed to create ...
ComputePass(const std::string &name)
VkPipelineLayout & getPipelineLayout()
Gets the layout of this compute pipeline.
VkPipelineLayout pipelineLayout
VkPushConstantsInfo createPushConstantsInfo(uint32_t size, const void *pValues) const
Used to create preconfigured push constants where you only pass in the size of the push constant and ...
ComputePipeline * computePipeline
void cleanup(VkDevice device)
Cleanup of owned resources using direct VkDevice handle.
VkDescriptorSet getDescriptorSet(uint32_t frameInFlightIndex) const
Getter for the descriptor set of this pipeline.
VkDescriptorSetLayout & getDescriptorSetLayout()
Gets the descriptor set layout associated with this pipeline.
ComputePipeline * getComputePipeline()
Getter for the raw compute pipeline.
A wrapper for vulkan pipeline resources. In this case a typesafe compute pipeline.
The Descriptor set updater is used to create a list of descriptor set writes which are executed with ...
void extractSpecializationData(std::optional< const PipelineSpecializationData * > pSpecializationData) override
DispatcherComputePass(const std::string &name)
uint32_t targetThreadCount
uint32_t getTargetThreadCount() const
Log category system implementation.