3#include <Foundation/Basics.h>
4#include <Foundation/Reflection/Reflection.h>
5#include <Foundation/Types/Id.h>
6#include <Foundation/Types/RefCounted.h>
9#if PL_ENABLED(PL_COMPILE_ENGINE_AS_DLL)
10# ifdef BUILDSYSTEM_BUILDING_RENDERERFOUNDATION_LIB
11# define PL_RENDERERFOUNDATION_DLL PL_DECL_EXPORT
13# define PL_RENDERERFOUNDATION_DLL PL_DECL_IMPORT
16# define PL_RENDERERFOUNDATION_DLL
20#define PL_GAL_MAX_CONSTANT_BUFFER_COUNT 16
21#define PL_GAL_MAX_SAMPLER_COUNT 16
24#define PL_GAL_MAX_VERTEX_BUFFER_COUNT 16
25#define PL_GAL_MAX_RENDERTARGET_COUNT 8
69 using StorageType = plUInt8;
80 static plUInt32 VerticesPerPrimitive(plGALPrimitiveTopology::Enum e) {
return (plUInt32)e + 1; }
96 static plUInt8
GetSize(plGALIndexType::Enum format) {
return s_Size[format]; }
99 static const plUInt8 s_Size[plGALIndexType::ENUM_COUNT];
106 using StorageType = plUInt8;
127 Default = VertexShader
130 static const char* Names[ENUM_COUNT];
137 using StorageType = plUInt16;
141 VertexShader = PL_BIT(0),
142 HullShader = PL_BIT(1),
143 DomainShader = PL_BIT(2),
144 GeometryShader = PL_BIT(3),
145 PixelShader = PL_BIT(4),
146 ComputeShader = PL_BIT(5),
162 StorageType VertexShader : 1;
163 StorageType HullShader : 1;
164 StorageType DomainShader : 1;
165 StorageType GeometryShader : 1;
166 StorageType PixelShader : 1;
167 StorageType ComputeShader : 1;
170 inline static plGALShaderStageFlags::Enum MakeFromShaderStage(plGALShaderStage::Enum stage)
172 return static_cast<plGALShaderStageFlags::Enum
>(PL_BIT(stage));
180 using StorageType = plUInt8;
197 using StorageType = plUInt8;
216 using StorageType = plUInt8;
242 using StorageType = plUInt8;
259 using StorageType = plUInt8;
280 using StorageType = plUInt8;
302 using StorageType = plUInt8;
321 using StorageType = plUInt8;
346 using StorageType = plUInt8;
360 plUInt32 m_uiMipLevel = 0;
361 plUInt32 m_uiArraySlice = 0;
366 void* m_pData =
nullptr;
367 plUInt32 m_uiRowPitch = 0;
368 plUInt32 m_uiSlicePitch = 0;
372template <
typename CreationDescription>
376 plGALObject(
const CreationDescription& description)
377 : m_Description(description)
381 PL_ALWAYS_INLINE
const CreationDescription& GetDescription()
const {
return m_Description; }
384 const CreationDescription m_Description;
497using plGALFenceHandle = plUInt64;
503 PL_ALWAYS_INLINE
void Reset()
505 m_uiMin = plInvalidIndex;
509 PL_FORCE_INLINE
void SetToIncludeValue(plUInt32 value)
515 PL_FORCE_INLINE
void SetToIncludeRange(plUInt32 uiMin, plUInt32 uiMax)
521 PL_ALWAYS_INLINE
bool IsValid()
const {
return m_uiMin <= m_uiMax; }
523 PL_ALWAYS_INLINE plUInt32 GetCount()
const {
return m_uiMax - m_uiMin + 1; }
525 plUInt32 m_uiMin = plInvalidIndex;
526 plUInt32 m_uiMax = 0;
Definition RendererFoundationDLL.h:467
Definition RendererFoundationDLL.h:418
Definition RendererFoundationDLL.h:432
Definition ResourceView.h:30
Definition RendererFoundationDLL.h:446
Definition UnorderedAccesView.h:28
Definition CommandEncoder.h:11
Definition RendererFoundationDLL.h:460
The plRenderDevice class is the primary interface for interactions with rendering APIs It contains a ...
Definition Device.h:19
Base class for GAL objects, stores a creation description of the object and also allows for reference...
Definition RendererFoundationDLL.h:374
Definition RendererFoundationDLL.h:474
Definition RenderTargetSetup.h:19
Definition RendererFoundationDLL.h:453
Definition RenderTargetView.h:8
Definition RendererFoundationDLL.h:481
Definition RendererFoundationDLL.h:404
Optional interface for plGALTexture if it was created via plGALDevice::CreateSharedTexture....
Definition Texture.h:33
Definition RendererFoundationDLL.h:397
Definition SwapChain.h:11
Definition RendererFoundationDLL.h:411
Definition RendererFoundationDLL.h:425
Definition ResourceView.h:11
Definition RendererFoundationDLL.h:439
Definition UnorderedAccesView.h:11
Definition RendererFoundationDLL.h:488
Definition VertexDeclaration.h:8
Base class for reference counted objects.
Definition RefCounted.h:52
constexpr PL_ALWAYS_INLINE T Min(T f1, T f2)
Returns the smaller value, f1 or f2.
Definition Math_inl.h:27
constexpr PL_ALWAYS_INLINE T Max(T f1, T f2)
Returns the greater value, f1 or f2.
Definition Math_inl.h:39
Definition RendererFoundationDLL.h:502
The current state of an async operations in the renderer.
Definition RendererFoundationDLL.h:345
Enum
Definition RendererFoundationDLL.h:349
@ Pending
The async operation is still running, retry later.
Definition RendererFoundationDLL.h:351
@ Ready
The async operation has finished and the result is ready.
Definition RendererFoundationDLL.h:350
@ Expired
The async operation is too old and the result was thrown away. Pending results should be queried ever...
Definition RendererFoundationDLL.h:352
Definition RendererFoundationDLL.h:215
Definition RendererFoundationDLL.h:241
Definition Descriptors.h:70
Definition Descriptors.h:169
Definition Descriptors.h:211
Definition Descriptors.h:243
Definition RendererFoundationDLL.h:279
Defines which sides of a polygon gets culled by the graphics card.
Definition RendererFoundationDLL.h:301
Enum
Defines which sides of a polygon gets culled by the graphics card.
Definition RendererFoundationDLL.h:306
@ Front
Definition RendererFoundationDLL.h:308
@ Back
Definition RendererFoundationDLL.h:310
@ None
Triangles do not get culled.
Definition RendererFoundationDLL.h:307
Definition Descriptors.h:88
Definition Descriptors.h:39
Definition RendererFoundationDLL.h:84
static plUInt8 GetSize(plGALIndexType::Enum format)
The size in bytes of a single element of the given index format.
Definition RendererFoundationDLL.h:96
Definition RendererFoundationDLL.h:179
Definition RendererFoundationDLL.h:68
Describes the settings for a new rasterizer state. See plGALDevice::CreateRasterizerState.
Definition Descriptors.h:105
Definition Descriptors.h:220
Definition Descriptors.h:118
Definition Descriptors.h:44
Definition RendererFoundationDLL.h:161
A set of shader stages.
Definition RendererFoundationDLL.h:136
The stage of a shader. A complete shader can consist of multiple stages.
Definition RendererFoundationDLL.h:105
Definition RendererFoundationDLL.h:258
Definition Descriptors.h:34
Definition RendererFoundationDLL.h:365
Definition Descriptors.h:177
Definition RendererFoundationDLL.h:320
Definition Descriptors.h:201
Definition RendererFoundationDLL.h:359
Definition RendererFoundationDLL.h:196
Definition Descriptors.h:234
Definition RendererFoundationDLL.h:334
Enum
Definition RendererFoundationDLL.h:336
@ NoOverwrite
User is responsible for synchronizing access between GPU and CPU.
Definition RendererFoundationDLL.h:338
@ CopyToTempStorage
Upload to temp buffer, then buffer to buffer transfer at the current time in the command buffer.
Definition RendererFoundationDLL.h:339
@ Discard
Buffer must be completely overwritten. No old data will be read. Data will not persist across frames.
Definition RendererFoundationDLL.h:337
Definition Descriptors.h:153
Definition Descriptors.h:20
A generic id class that holds an id combined of an instance index and a generation counter.
Definition Id.h:52