|
|
|
@ -4,6 +4,7 @@ |
|
|
|
#include <core/utils.h> |
|
|
|
|
|
|
|
#include <vk/forward.h> |
|
|
|
#include <vk/Wrapper.h> |
|
|
|
|
|
|
|
#include <vulkan/vulkan.h> |
|
|
|
|
|
|
|
@ -11,7 +12,7 @@ |
|
|
|
namespace vk { |
|
|
|
|
|
|
|
|
|
|
|
class PipelineLayout { |
|
|
|
class PipelineLayout: public Wrapper { |
|
|
|
public: |
|
|
|
PipelineLayout() noexcept; |
|
|
|
PipelineLayout( |
|
|
|
@ -19,11 +20,11 @@ public: |
|
|
|
Array<const VkDescriptorSetLayout> set_layouts, |
|
|
|
Array<const VkPushConstantRange> push_constant_ranges={} |
|
|
|
); |
|
|
|
PipelineLayout(const PipelineLayout&) = delete; |
|
|
|
PipelineLayout(const PipelineLayout&) = default; |
|
|
|
PipelineLayout(PipelineLayout&& other) noexcept; |
|
|
|
~PipelineLayout() noexcept; |
|
|
|
|
|
|
|
PipelineLayout& operator=(const PipelineLayout&) = delete; |
|
|
|
PipelineLayout& operator=(const PipelineLayout&) = default; |
|
|
|
PipelineLayout& operator=(PipelineLayout&& other) noexcept; |
|
|
|
|
|
|
|
explicit inline operator bool() const noexcept { |
|
|
|
@ -34,14 +35,6 @@ public: |
|
|
|
return m_pipeline_layout == VK_NULL_HANDLE; |
|
|
|
} |
|
|
|
|
|
|
|
inline const Context* context() const noexcept { |
|
|
|
return m_context; |
|
|
|
} |
|
|
|
|
|
|
|
inline Context* context() noexcept { |
|
|
|
return m_context; |
|
|
|
} |
|
|
|
|
|
|
|
inline operator VkPipelineLayout() noexcept { |
|
|
|
return m_pipeline_layout; |
|
|
|
} |
|
|
|
@ -50,16 +43,19 @@ public: |
|
|
|
return m_pipeline_layout; |
|
|
|
} |
|
|
|
|
|
|
|
friend inline void swap(PipelineLayout& pipeline_layout_0, PipelineLayout& pipeline_layout_1) noexcept { |
|
|
|
inline void swap(PipelineLayout& other) noexcept { |
|
|
|
using std::swap; |
|
|
|
swap(pipeline_layout_0.m_context, pipeline_layout_1.m_context); |
|
|
|
swap(pipeline_layout_0.m_pipeline_layout, pipeline_layout_1.m_pipeline_layout); |
|
|
|
Wrapper::swap(other); |
|
|
|
swap(m_pipeline_layout, other.m_pipeline_layout); |
|
|
|
} |
|
|
|
|
|
|
|
friend inline void swap(PipelineLayout& pipeline_layout_0, PipelineLayout& pipeline_layout_1) noexcept { |
|
|
|
pipeline_layout_0.swap(pipeline_layout_1); |
|
|
|
} |
|
|
|
|
|
|
|
void destroy() noexcept; |
|
|
|
|
|
|
|
private: |
|
|
|
Context* m_context = nullptr; |
|
|
|
VkPipelineLayout m_pipeline_layout = VK_NULL_HANDLE; |
|
|
|
}; |
|
|
|
|
|
|
|
|