Nebula
Loading...
Searching...
No Matches
pass.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
11//------------------------------------------------------------------------------
12#include "ids/id.h"
13#include "ids/idpool.h"
14#include "ids/idallocator.h"
17
18namespace Shared
19{
20struct RenderTargetParameters;
21}
22
23namespace CoreGraphics
24{
25
26struct ResourceTableId;
27struct TextureView;
29
31{
32 NoFlags = 0,
33 Clear = N_BIT(0),
35 Load = N_BIT(2),
36 LoadStencil = N_BIT(3),
37 Store = N_BIT(4),
39 Discard = N_BIT(7),
41};
44
47{
48 Util::Array<Util::String> bits = string.Tokenize("|");
49
51 for (IndexT i = 0; i < bits.Size(); i++)
52 {
53 if (bits[i] == "Load") ret |= AttachmentFlagBits::Load;
54 else if (bits[i] == "LoadStencil") ret |= AttachmentFlagBits::LoadStencil;
55 else if (bits[i] == "Store") ret |= AttachmentFlagBits::Store;
56 else if (bits[i] == "StoreStencil") ret |= AttachmentFlagBits::StoreStencil;
57 else if (bits[i] == "Discard") ret |= AttachmentFlagBits::Discard;
58 else if (bits[i] == "DiscardStencil") ret |= AttachmentFlagBits::DiscardStencil;
59 }
60 return ret;
61};
62
76
90
92{
93 Record,
96};
97
99const PassId CreatePass(const PassCreateInfo& info);
101void DestroyPass(const PassId id);
102
104void PassWindowResizeCallback(const PassId id);
107
110
112const uint32_t PassGetNumSubpassAttachments(const CoreGraphics::PassId id, const IndexT subpass);
115
118
119} // namespace CoreGraphics
120
Nebula's dynamic array class.
Definition array.h:60
Implements a fixed size one-dimensional array.
Definition fixedarray.h:20
A StringAtom.
Definition stringatom.h:22
#define ID_24_8_TYPE(x)
Definition id.h:132
Acceleration structures are used to enable ray tracing on the GPU by dividing the scene into a BVH.
Definition accelerationstructure.h:24
AttachmentFlagBits
Definition pass.h:31
PassRecordMode
Definition pass.h:92
@ NoFlags
Definition accelerationstructure.h:58
const PassId CreatePass(const PassCreateInfo &info)
create pass
Definition vkpass.cc:647
const Util::StringAtom PassGetName(const CoreGraphics::PassId id)
get name
Definition vkpass.cc:775
const uint32_t PassGetNumSubpassAttachments(const CoreGraphics::PassId id, const IndexT subpass)
get number of color attachments for a subpass
Definition vkpass.cc:756
void PassWindowResizeCallback(const PassId id)
called when window is resized
Definition vkpass.cc:717
void PassSetRenderTargetParameters(const PassId id, const Util::FixedArray< Shared::RenderTargetParameters > &viewports)
Set viewports.
Definition vkpass.cc:737
static AttachmentFlagBits AttachmentFlagsFromString(const Util::String &string)
Definition pass.h:46
const Util::Array< CoreGraphics::TextureViewId > & PassGetAttachments(const CoreGraphics::PassId id)
get number of color attachments for entire pass (attachment list)
Definition vkpass.cc:747
const CoreGraphics::ResourceTableId PassGetResourceTable(const CoreGraphics::PassId id)
Get pass resource table.
Definition vkpass.cc:765
void DestroyPass(const PassId id)
discard pass
Definition vkpass.cc:696
Definition pass.h:19
#define __ImplementEnumComparisonOperators(type)
#define __ImplementEnumBitOperators(type)
Definition pass.h:78
Util::Array< Math::vec4 > attachmentClears
Definition pass.h:83
Util::Array< CoreGraphics::TextureViewId > attachments
Definition pass.h:81
Util::Array< AttachmentFlagBits > attachmentFlags
Definition pass.h:82
Util::Array< Subpass > subpasses
Definition pass.h:86
Util::Array< bool > attachmentDepthStencil
Definition pass.h:84
Util::StringAtom name
Definition pass.h:79
PassCreateInfo()
Definition pass.h:88
Definition pass.h:28
Definition resourcetable.h:95
Definition pass.h:64
IndexT depth
Definition pass.h:70
Subpass()
Definition pass.h:74
SizeT numViewports
Definition pass.h:71
Util::Array< IndexT > attachments
Definition pass.h:65
Util::Array< IndexT > resolves
Definition pass.h:66
Util::Array< IndexT > dependencies
Definition pass.h:67
Util::Array< IndexT > inputs
Definition pass.h:68
SizeT numScissors
Definition pass.h:72
IndexT depthResolve
Definition pass.h:69
Nebula's universal string class.
Definition string.h:50
uint8_t uint8
Definition types.h:42
static const int InvalidIndex
Definition types.h:54
#define N_BIT(x)
Definition types.h:86
int SizeT
Definition types.h:49
uint16_t uint16
Definition types.h:40
int IndexT
Definition types.h:48