Plasma Engine  2.0
Loading...
Searching...
No Matches
ShaderVulkan.h
1
2#pragma once
3
4#include <RendererVulkan/RendererVulkanDLL.h>
5
6#include <RendererFoundation/RendererFoundationDLL.h>
7#include <RendererFoundation/Shader/Shader.h>
8
9#include <RendererCore/Shader/ShaderStageBinary.h>
10#include <vulkan/vulkan.hpp>
11
12class PL_RENDERERVULKAN_DLL plGALShaderVulkan : public plGALShader
13{
14public:
17 {
18 mutable plUInt32 m_uiHash = 0;
20 void ComputeHash();
21 };
22
23 void SetDebugName(const char* szName) const override;
24
25 PL_ALWAYS_INLINE vk::ShaderModule GetShader(plGALShaderStage::Enum stage) const;
26 PL_ALWAYS_INLINE plUInt32 GetSetCount() const;
27 PL_ALWAYS_INLINE vk::DescriptorSetLayout GetDescriptorSetLayout(plUInt32 uiSet = 0) const;
28 PL_ALWAYS_INLINE plArrayPtr<const plShaderResourceBinding> GetBindings(plUInt32 uiSet = 0) const;
29 PL_ALWAYS_INLINE vk::PushConstantRange GetPushConstantRange() const;
30
31protected:
32 friend class plGALDeviceVulkan;
33 friend class plMemoryUtils;
34
36 virtual ~plGALShaderVulkan();
37
38 virtual plResult InitPlatform(plGALDevice* pDevice) override;
39 virtual plResult DeInitPlatform(plGALDevice* pDevice) override;
40
41private:
42 vk::PushConstantRange m_pushConstants;
45 vk::ShaderModule m_Shaders[plGALShaderStage::ENUM_COUNT];
46};
47
48#include <RendererVulkan/Shader/Implementation/ShaderVulkan_inl.h>
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
The plRenderDevice class is the primary interface for interactions with rendering APIs It contains a ...
Definition Device.h:19
The Vulkan device implementation of the graphics abstraction layer.
Definition DeviceVulkan.h:58
Definition Shader.h:7
Definition ShaderVulkan.h:13
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
This class provides functions to work on raw memory.
Definition MemoryUtils.h:26
Definition Descriptors.h:44
Used as input to plResourceCacheVulkan::RequestDescriptorSetLayout to create a vk::DescriptorSetLayou...
Definition ShaderVulkan.h:17
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54