|
luna engine
software engine
|
vulkan pipline implementation class. More...
#include <vulkanPipeline.h>


Classes | |
| struct | drawCommand |
| struct | shaderStage |
| struct | Vertex |
| struct | vertexInputDescription |
Public Member Functions | |
| vulkanPipeline (const renderer::pipelineLayout &layout) | |
| creates a vulkan pipeline. More... | |
| virtual | ~vulkanPipeline () |
| pipeline destructor. More... | |
| virtual void | createPipeline (const renderer::pipelineLayout &layout) override |
| creates the vulkan pipeline. More... | |
| virtual void | destroyPipeline () override |
| destroys the vulkan pipeline. More... | |
| virtual void | createCommands () override |
| creates the renderer commands for the pipeline. More... | |
| virtual void | begin () override |
| starts recording the pipline input. More... | |
| virtual void | end () const override |
| ends recording the pipline input. More... | |
| virtual void | flush () override |
| executes the pipeline commands. More... | |
| virtual void | bindTextures (const std::vector< uint64_t > textureHandles, const uint64_t indexSet) override |
| binds vulkan textures in to there respective textureArrays. More... | |
| virtual void | clear () override |
| clears all the vulkan pipeline draw commands. More... | |
| VkRenderPass | getRenderPass () |
| return the pipeline renderpass. More... | |
| virtual void | drawIndexed (const ref< renderer::vertexArray > &vertexArray, std::vector< uint64_t > textures, int indexCount=0) override |
| draw a vertexArray indexed. More... | |
Public Member Functions inherited from luna::renderer::pipeline | |
| virtual | ~pipeline () |
| virtual void | createPipeline (const pipelineLayout &layout)=0 |
| creates graphics a pipeline. More... | |
| virtual void | destroyPipeline ()=0 |
| destroys the graphics pipeline. More... | |
| virtual void | createCommands ()=0 |
| creates platform specific commands for the rendererPipeline using engine drawCommands. More... | |
| virtual void | begin ()=0 |
| starts recording pipeline input. More... | |
| virtual void | end () const =0 |
| ends recording end. More... | |
| virtual void | flush ()=0 |
| flush the renderer pipline and render a frame. More... | |
| virtual void | drawIndexed (const ref< vertexArray > &vertexArray, std::vector< uint64_t > textures, int indexCount)=0 |
| draw vertexBuffer with and indexBuffer. More... | |
| virtual void | bindTextures (const std::vector< uint64_t > textureHandles, const uint64_t indexSet)=0 |
| binds textures in to there respective textureArrays. More... | |
| virtual void | clear ()=0 |
| clears all drawCommands. More... | |
| glm::vec2 | getDimensions () |
| glm::vec2 | getWindowMousePos () |
Public Attributes | |
| renderer::pipelineLayout | layout |
| uint32_t | maxFramesInFlight = 0 |
Public Attributes inherited from luna::renderer::pipeline | |
| int | test |
Private Member Functions | |
| void | createPipeLineLayout () |
| creates the pipeline layout. More... | |
| VkResult | buildPipeline (VkDevice device, VkRenderPass pass) |
| build the vulkan pipline. More... | |
| void | createShaderStages () |
| creates the shader stages to be used in the pipeline. More... | |
| void | createInputStates () |
| creates the vertex input. More... | |
| VkPipelineVertexInputStateCreateInfo | createVertexInputState (const ref< renderer::shader > shader) |
| creates the vertex input state for a single shader. More... | |
| void | createBindingDescription (const ref< renderer::shader > shader) |
| creates the binding descriptio for a single shader. More... | |
| void | createAttributeDescription (const ref< renderer::shader > shader) |
| creates the attribute description for a single shader. More... | |
| VkResult | createShaderModule (ref< renderer::shader > shader, VkShaderModule *shaderModule) |
| creates a shader module from a shader ref. More... | |
| VkFormat | getResourceFormat (renderer::typeId resourceType) |
| returns the corresponding resource type for a given . More... | |
| VkPipelineInputAssemblyStateCreateInfo | inputAssemblyCreateInfo (VkPrimitiveTopology topology) |
| creates the input Assembly More... | |
| VkPipelineRasterizationStateCreateInfo | rasterizationStateCreateInfo (VkPolygonMode polygonMode) |
| creates the rasterizer state create info. More... | |
| VkPipelineMultisampleStateCreateInfo | multisamplingStateCreateInfo () |
| creates the multisampling info. More... | |
| VkPipelineColorBlendAttachmentState | colorBlendAttachmentState () |
| the color blend attachment state(color writemask). More... | |
| VkPipelineLayoutCreateInfo | pipelineLayoutCreateInfo () |
| creates the pipeline layout info. More... | |
| void | initDefaultRenderpass () |
| initialzes the dafault pipeline renderPass. More... | |
| void | initSyncStructures () |
| initializes the the pipeline syncronization structures. (VkFence and VkSemaphore) More... | |
| void | destroySyncStructures () |
| destroys all pipeline sync structures. (VkFence and VkSemaphore) More... | |
| void | transitionImageLayout (VkImage image, VkFormat format, VkImageLayout oldLayout, VkImageLayout newLayout, VkCommandBuffer commandBufffer) |
| transitions the image layout. More... | |
| void | fnDrawIndexed (const ref< renderer::vertexArray > &vertexArray, const uint64_t &descriptorIndex, const std::vector< uint64_t > &textures, const int &indexCount) |
| executes draw command. More... | |
| VkResult | createDescriptorSetLayout () |
| VkAccessFlags | getAccessFlag (VkImageLayout layout) |
| VkPipelineStageFlags | getStageFlag (VkImageLayout layout) |
Private Attributes | |
| ref< renderer::vulkanSampler > | sampler |
| VkRenderPass | renderPass |
| VkRenderPass | imGuiRenderPass |
| VkPipelineLayout | pipelineLayout |
| VkPipeline | pipeline |
| std::vector< VkPipelineShaderStageCreateInfo > | shaderStages |
| std::vector< VkShaderModule > | shaderModules |
| std::unordered_map< std::string, vertexInputDescription > | inputDescriptions |
| std::vector< VkPipelineVertexInputStateCreateInfo > | vertexInputStates |
| VkPipelineInputAssemblyStateCreateInfo | inputAssemblyStateCreateInfo |
| VkPipelineRasterizationStateCreateInfo | pipelineRasterizationStateCreateInfo |
| VkPipelineMultisampleStateCreateInfo | pipelineMultisampleStateCreateInfo |
| VkPipelineColorBlendAttachmentState | pipelineColorBlendAttachementState |
| std::vector< VkSemaphore > | imageAvailableSemaphores |
| std::vector< VkSemaphore > | renderFinishedSemaphores |
| std::vector< VkFence > | inFlightFences |
| std::vector< VkFence > | imagesInFlight |
| ref< vulkanCmdPool > | commandPool = nullptr |
| std::vector< virtualCmdBuffer > | commandBuffers |
| uint32_t | swapchainImageIndex = 0 |
| uint32_t | currentFrame = 0 |
| uint32_t | prevFrame = 0 |
| VkQueue | presentQueue |
| uint64_t | _frameNumber = 0 |
| bool | justResized = false |
| std::vector< drawCommand > | drawCommands |
| ref< utils::vulkanDescriptorPool > | descriptorPool |
| std::vector< ref< utils::vulkanDescriptorSet > > | descriptorSets |
| uint64_t | descriptorsetIndex = 1 |
Additional Inherited Members | |
Protected Attributes inherited from luna::renderer::pipeline | |
| glm::vec2 | windowMousePos |
| glm::vec2 | windowDimensions |
vulkan pipline implementation class.
| luna::vulkan::vulkanPipeline::vulkanPipeline | ( | const renderer::pipelineLayout & | layout | ) |
creates a vulkan pipeline.
| renderer::pipelineLayout | layout struct |
|
inlinevirtual |
pipeline destructor.
|
overridevirtual |
starts recording the pipline input.
Implements luna::renderer::pipeline.
|
overridevirtual |
binds vulkan textures in to there respective textureArrays.
| textureHandles | |
| indexSet |
Implements luna::renderer::pipeline.
|
private |
build the vulkan pipline.
| VkDevice | device |
| VkRenderPass | pass |
|
overridevirtual |
clears all the vulkan pipeline draw commands.
Implements luna::renderer::pipeline.
|
private |
the color blend attachment state(color writemask).
|
private |
creates the attribute description for a single shader.
| ref<renderer::shader> | shader reference to a valid shader |
|
private |
creates the binding descriptio for a single shader.
| ref<renderer::shader> | shader reference to a valid shader |
|
overridevirtual |
creates the renderer commands for the pipeline.
Implements luna::renderer::pipeline.
|
private |
|
private |
creates the vertex input.
|
overridevirtual |
creates the vulkan pipeline.
| renderer::pipelineLayout | layout struct |
Implements luna::renderer::pipeline.
|
private |
creates the pipeline layout.
|
private |
creates a shader module from a shader ref.
| ref<renderer::shader> | shader the source shader |
| shaderModule | pointer to the vulkan shaderModule |
|
private |
creates the shader stages to be used in the pipeline.
|
private |
creates the vertex input state for a single shader.
| ref<renderer::shader> | shader reference to a valid shader |
|
overridevirtual |
destroys the vulkan pipeline.
Implements luna::renderer::pipeline.
|
private |
destroys all pipeline sync structures. (VkFence and VkSemaphore)
|
overridevirtual |
draw a vertexArray indexed.
| const | ref<renderer::vertexArray>& vertexArray vertexArray to render |
| int | indexCount the indices count to render; |
|
overridevirtual |
ends recording the pipline input.
Implements luna::renderer::pipeline.
|
overridevirtual |
executes the pipeline commands.
Implements luna::renderer::pipeline.
|
private |
executes draw command.
|
private |
|
inline |
return the pipeline renderpass.
|
private |
returns the corresponding resource type for a given .
| renderer::typeId | resourceType |
|
private |
|
private |
initialzes the dafault pipeline renderPass.
|
private |
initializes the the pipeline syncronization structures. (VkFence and VkSemaphore)
|
private |
creates the input Assembly
| topology |
|
private |
creates the multisampling info.
|
private |
creates the pipeline layout info.
|
private |
creates the rasterizer state create info.
| polygonMode |
|
private |
transitions the image layout.
| VkImage | image imageHandle |
| VkFormat | format |
| VkImageLayout | oldLayout |
| VkImageLayout | newLayout |
| VkCommandBuffer | commandBufffer |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| renderer::pipelineLayout luna::vulkan::vulkanPipeline::layout |
| uint32_t luna::vulkan::vulkanPipeline::maxFramesInFlight = 0 |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |