Plasma Engine  2.0
Loading...
Searching...
No Matches
FallbackResourcesVulkan.h
1#pragma once
2#include <RendererFoundation/Descriptors/Descriptors.h>
3#include <RendererFoundation/RendererFoundationDLL.h>
4
5#include <vulkan/vulkan.hpp>
6
12
16{
17public:
23 static const plGALTextureResourceViewVulkan* GetFallbackTextureResourceView(plGALShaderResourceType::Enum descriptorType, plGALShaderTextureType::Enum textureType, bool bDepth);
24 static const plGALBufferResourceViewVulkan* GetFallbackBufferResourceView(plGALShaderResourceType::Enum descriptorType);
25 static const plGALTextureUnorderedAccessViewVulkan* GetFallbackTextureUnorderedAccessView(plGALShaderResourceType::Enum descriptorType, plGALShaderTextureType::Enum textureType);
26 static const plGALBufferUnorderedAccessViewVulkan* GetFallbackBufferUnorderedAccessView(plGALShaderResourceType::Enum descriptorType);
27
28private:
29 PL_MAKE_SUBSYSTEM_STARTUP_FRIEND(RendererVulkan, FallbackResourcesVulkan)
30 static void GALDeviceEventHandler(const plGALDeviceEvent& e);
31 static void Initialize();
32 static void DeInitialize();
33
34 static plGALDevice* s_pDevice;
35 static plEventSubscriptionID s_EventID;
36
37 struct Key
38 {
39 PL_DECLARE_POD_TYPE();
42 bool m_bDepth = false;
43 };
44
45 struct KeyHash
46 {
47 static plUInt32 Hash(const Key& a);
48 static bool Equal(const Key& a, const Key& b);
49
50 static plUInt32 Hash(const plEnum<plGALShaderResourceType>& a);
51 static bool Equal(const plEnum<plGALShaderResourceType>& a, const plEnum<plGALShaderResourceType>& b);
52 };
53
58
59 static plDynamicArray<plGALBufferHandle> m_Buffers;
60 static plDynamicArray<plGALTextureHandle> m_Textures;
61};
Definition DynamicArray.h:81
Creates fallback resources in case the high-level renderer did not map a resource to a descriptor slo...
Definition FallbackResourcesVulkan.h:16
static const plGALTextureResourceViewVulkan * GetFallbackTextureResourceView(plGALShaderResourceType::Enum descriptorType, plGALShaderTextureType::Enum textureType, bool bDepth)
Definition FallbackResourcesVulkan.cpp:227
Definition RendererFoundationDLL.h:432
Definition ResourceViewVulkan.h:33
Definition RendererFoundationDLL.h:446
Definition UnorderedAccessViewVulkan.h:34
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 ResourceViewVulkan.h:12
Definition UnorderedAccessViewVulkan.h:11
Definition HashTable.h:333
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
Type for important GAL events.
Definition Descriptors.h:253
Enum
Definition Enumerations.h:12