Plasma Engine  2.0
Loading...
Searching...
No Matches
DeviceCapabilities.h
1#pragma once
2
3#include <RendererFoundation/RendererFoundationDLL.h>
4
5#include <Foundation/Types/Bitflags.h>
6
10{
11 using StorageType = plUInt8;
12
13 enum Enum
14 {
15 None = 0,
16 Texture = PL_BIT(0),
17 RenderTarget = PL_BIT(1),
18 TextureRW = PL_BIT(2),
19 MSAA2x = PL_BIT(3),
20 MSAA4x = PL_BIT(4),
21 MSAA8x = PL_BIT(5),
22 VertexAttribute = PL_BIT(6),
23 Default = 0
24 };
25
26 struct Bits
27 {
28 StorageType Texture : 1;
29 StorageType RenderTarget : 1;
30 StorageType TextureRW : 1;
31 StorageType MSAA2x : 1;
32 StorageType MSAA4x : 1;
33 StorageType MSAA8x : 1;
34 StorageType VertexAttribute : 1;
35 };
36};
37PL_DECLARE_FLAGS_OPERATORS(plGALResourceFormatSupport);
38
41struct PL_RENDERERFOUNDATION_DLL plGALDeviceCapabilities
42{
43 // Device description
44 plString m_sAdapterName = "Unknown";
45 plUInt64 m_uiDedicatedVRAM = 0;
46 plUInt64 m_uiDedicatedSystemRAM = 0;
47 plUInt64 m_uiSharedSystemRAM = 0;
48 bool m_bHardwareAccelerated = false;
49
50 // General capabilities
51 bool m_bMultithreadedResourceCreation = false;
52 bool m_bNoOverwriteBufferUpdate = false;
53
54 // Draw related capabilities
55 bool m_bShaderStageSupported[plGALShaderStage::ENUM_COUNT] = {};
56 bool m_bInstancing = false;
57 bool m_b32BitIndices = false;
58 bool m_bIndirectDraw = false;
59 bool m_bConservativeRasterization = false;
60 bool m_bVertexShaderRenderTargetArrayIndex = false;
61 plUInt16 m_uiMaxConstantBuffers = 0;
62 plUInt16 m_uiMaxPushConstantsSize = 0;
63
64
65 // Texture related capabilities
66 bool m_bTextureArrays = false;
67 bool m_bCubemapArrays = false;
68 bool m_bSharedTextures = false;
69 plUInt16 m_uiMaxTextureDimension = 0;
70 plUInt16 m_uiMaxCubemapDimension = 0;
71 plUInt16 m_uiMax3DTextureDimension = 0;
72 plUInt16 m_uiMaxAnisotropy = 0;
74
75 // Output related capabilities
76 plUInt16 m_uiMaxRendertargets = 0;
77 plUInt16 m_uiUAVCount = 0;
78 bool m_bAlphaToCoverage = false;
79};
Definition DynamicArray.h:81
This struct holds information about the rendering device capabilities (e.g. what shader stages are su...
Definition DeviceCapabilities.h:42
Definition DeviceCapabilities.h:27
Defines which operations can be performed on an plGALResourceFormat.
Definition DeviceCapabilities.h:10
Enum
Definition DeviceCapabilities.h:14
@ MSAA2x
The format supports 2x MSAA.
Definition DeviceCapabilities.h:19
@ TextureRW
Can be used as a texture and bound to a plGALShaderResourceType::TextureRW slot.
Definition DeviceCapabilities.h:18
@ MSAA8x
The format supports 8x MSAA.
Definition DeviceCapabilities.h:21
@ MSAA4x
The format supports 4x MSAA.
Definition DeviceCapabilities.h:20
@ VertexAttribute
The format can be used as a vertex attribute.
Definition DeviceCapabilities.h:22
@ RenderTarget
Can be used as a texture and bound as a render target.
Definition DeviceCapabilities.h:17
@ Texture
Can be used as a texture and bound to a plGALShaderResourceType::Texture slot.
Definition DeviceCapabilities.h:16