8#ifdef VISUTWIN_HAS_VULKAN
11#include <unordered_map>
12#include <vulkan/vulkan.h>
20 class VulkanGraphicsDevice;
29 explicit VulkanRenderPipeline(VulkanGraphicsDevice* device);
30 ~VulkanRenderPipeline()
override;
32 VkPipeline get(
const Primitive& primitive,
33 const std::shared_ptr<VertexFormat>& vertexFormat,
34 const std::shared_ptr<VulkanShader>& shader,
35 const std::shared_ptr<BlendState>& blendState,
36 const std::shared_ptr<DepthState>& depthState,
39 VkFormat depthFormat);
41 [[nodiscard]] VkPipelineLayout pipelineLayout()
const {
return _pipelineLayout; }
42 [[nodiscard]] VkDescriptorSetLayout materialSetLayout()
const {
return _materialSetLayout; }
43 [[nodiscard]] VkDescriptorSetLayout textureSetLayout()
const {
return _textureSetLayout; }
46 VkPipeline create(
const Primitive& primitive,
47 const std::shared_ptr<VertexFormat>& vertexFormat,
48 const std::shared_ptr<VulkanShader>& shader,
49 const std::shared_ptr<BlendState>& blendState,
50 const std::shared_ptr<DepthState>& depthState,
53 VkFormat depthFormat);
57 VulkanGraphicsDevice* _device;
58 VkPipelineLayout _pipelineLayout = VK_NULL_HANDLE;
59 VkDescriptorSetLayout _materialSetLayout = VK_NULL_HANDLE;
60 VkDescriptorSetLayout _textureSetLayout = VK_NULL_HANDLE;
62 std::unordered_map<uint64_t, VkPipeline> _cache;
Describes how vertex and index data should be interpreted for a draw call.