|
Foundation
|
Core functionalities for rendering, including the Frame Graph implementation. More...
Classes | |
| struct | ExecuteResources |
| Helper class containing runtime resources either imported, or created by the Renderer. More... | |
| struct | FRecordDefault |
| Default "no-op" functor for Record() More... | |
| struct | FSetupDefault |
| Default "no-op" functor for Setup() More... | |
| struct | FSkipDefault |
| Default "not skipped" functor for IsSkipped() More... | |
| struct | LambdaPass |
| Functional wrapper for a render pass. More... | |
| class | Renderer |
| Renderer implementing a Frame Graph system with automatic resource tracking and synchronization. More... | |
| struct | RendererDesc |
| Parameters for Renderer creation. More... | |
| class | RenderPass |
| Interface for a render pass. More... | |
| class | Shader |
| Runtime reflection data for a shader module. More... | |
| struct | TrackedPass |
| Internal tracking information for a render pass in the frame graph. More... | |
| struct | TrackedResource |
| Internal tracking information for a resource in the frame graph. More... | |
Typedefs | |
| using | PassHandle = size_t |
| using | ResourceHandle = size_t |
| using | ResourceDefinition = Variant< RHIBufferDesc, RHITextureDesc, RHIDeviceObjectHandle< RHIBuffer >, RHIDeviceObjectHandle< RHITexture >, RHIBuffer *, RHITexture * > |
Functions | |
| ENUM_NAME (Undefined) | |
| ENUM_NAME (Setup) | |
| ENUM_NAME (PostSetup) | |
| ENUM_NAME (Execute) | |
| ENUM_NAME_CONV_END () | |
| template<typename T > | |
| ResourceHandle | createResource (Renderer *r, StringView name, T const &desc) |
| Convenient functional wrapper to create a resource. | |
| ResourceHandle | createSampler (Renderer *r, RHIDeviceSampler::SamplerDesc const &desc) |
| Convenient functional wrapper to create a sampler. | |
| template<typename T , typename... Args> requires std::is_base_of_v<RenderPass, T> | |
| T * | createPassImplPriority (Renderer *r, StringView name, RHIDeviceQueueType queue, size_t priority, Args &&... args) |
| Convenient functional wrapper to create a pass from a RenderPass* implementation with custom priority. | |
| template<typename T , typename... Args> requires std::is_base_of_v<RenderPass, T> | |
| T * | createPassImpl (Renderer *r, StringView name, RHIDeviceQueueType queue, Args &&... args) |
| Convenient functional wrapper to create a pass from a RenderPass* implementation. | |
| template<typename FSetup , typename FRecord , typename FSkip = FSkipDefault> | |
| LambdaPass< FSetup, FRecord, FSkip > * | createPassPriority (Renderer *r, StringView name, RHIDeviceQueueType queue, size_t priority, FSetup &&setup, FRecord &&record, FSkip &&skip={}) |
| Convenient functional wrapper to create a pass from Setup/Record lambdas with custom priority. | |
| template<typename FSetup , typename FRecord , typename FSkip = FSkipDefault> | |
| LambdaPass< FSetup, FRecord, FSkip > * | createPass (Renderer *r, StringView name, RHIDeviceQueueType queue, FSetup &&setup, FRecord &&record, FSkip &&skip={}) |
| Convenient functional wrapper to create a pass from Setup/Record lambdas. | |
Variables | |
| constexpr size_t | kMaxRenderPasses = 1024 |
| constexpr size_t | kMaxCommandListsPerThread = kMaxRenderPasses |
| constexpr size_t | kExecuteArenaSize = 16 * (1 << 20) |
| const String | kBindpointIgnored = "<ignored>" |
| const RHIPipelineStage | kComputeStagesMask |
| const RHIResourceAccessBits | kAllShaderWrites |
| const RHIResourceAccessBits | kAllShaderReads |
| const size_t | kTextureAspectCount = 3 |
Core functionalities for rendering, including the Frame Graph implementation.
| using Foundation::RenderCore::ResourceDefinition = typedef Variant<RHIBufferDesc, RHITextureDesc, RHIDeviceObjectHandle<RHIBuffer>, RHIDeviceObjectHandle<RHITexture>, RHIBuffer*, RHITexture*> |
| LambdaPass< FSetup, FRecord, FSkip > * Foundation::RenderCore::createPass | ( | Renderer * | r, |
| StringView | name, | ||
| RHIDeviceQueueType | queue, | ||
| FSetup && | setup, | ||
| FRecord && | record, | ||
| FSkip && | skip = {} |
||
| ) |
Convenient functional wrapper to create a pass from Setup/Record lambdas.
This is equivalent to calling createPassPriority with priority 0 for Graphics passes, and priority kMaxRenderPasses for Compute passes, which schedules all Compute passes first with the best effort.
this or [&]), as resource lifetimes could be much involved and unpredictable. Coupled with how passes may be scheduled on different threads - refrain from shooting yourself in the foot. Prefer using stateless captures (i.e. [=]) or no captures at all, unless the states are trivial, and you really know what you're doing.| queue | Queue to prefer running this pass in - this is a hint, and might be ignored if async compute is disabled. |
| setup | Lambda of type void(PassHandle self, Renderer*) called at Setup time. |
| record | Lambda of type void(PassHandel self, Renderer*, RHICommandList*) called at Record time. |
| skip | (Optional) Lambda of type bool(PassHandle self, Renderer*) called at Record time to determine whether this pass should be skipped if true. This is by default always false. |
| T * Foundation::RenderCore::createPassImpl | ( | Renderer * | r, |
| StringView | name, | ||
| RHIDeviceQueueType | queue, | ||
| Args &&... | args | ||
| ) |
Convenient functional wrapper to create a pass from a RenderPass* implementation.
This is equivalent to calling createPassPriority with priority 0 for Graphics passes, and priority kMaxRenderPasses for Compute passes, which schedules all Compute passes first with the best effort.
| T | Type of RenderPass to create. |
| queue | Queue to prefer running this pass in - this is a hint, and might be ignored if async compute is disabled. |
| T * Foundation::RenderCore::createPassImplPriority | ( | Renderer * | r, |
| StringView | name, | ||
| RHIDeviceQueueType | queue, | ||
| size_t | priority, | ||
| Args &&... | args | ||
| ) |
Convenient functional wrapper to create a pass from a RenderPass* implementation with custom priority.
This is equivalent to calling Renderer::CreatePassImpl
| T | Type of RenderPass to create. |
| queue | Queue to prefer running this pass in - this is a hint, and might be ignored if async compute is disabled. |
| priority | Priority of this pass. Higher priority passes are scheduled earlier. |
| LambdaPass< FSetup, FRecord, FSkip > * Foundation::RenderCore::createPassPriority | ( | Renderer * | r, |
| StringView | name, | ||
| RHIDeviceQueueType | queue, | ||
| size_t | priority, | ||
| FSetup && | setup, | ||
| FRecord && | record, | ||
| FSkip && | skip = {} |
||
| ) |
Convenient functional wrapper to create a pass from Setup/Record lambdas with custom priority.
This is equivalent to calling Renderer::CreatePass
this or [&]), as resource lifetimes could be much involved and unpredictable. Coupled with how passes may be scheduled on different threads - refrain from shooting yourself in the foot. Prefer using stateless captures (i.e. [=]) or no captures at all, unless the states are trivial, and you really know what you're doing.| queue | Queue to prefer running this pass in - this is a hint, and might be ignored if async compute is disabled. |
| priority | Priority of this pass. Higher priority passes are scheduled earlier. |
| setup | Lambda of type void(PassHandle self, Renderer*) called at Setup time. |
| record | Lambda of type void(PassHandel self, Renderer*, RHICommandList*) called at Record time. |
| skip | (Optional) Lambda of type bool(PassHandle self, Renderer*) called at Record time to determine whether this pass should be skipped if true. This is by default always false. |
| ResourceHandle Foundation::RenderCore::createResource | ( | Renderer * | r, |
| StringView | name, | ||
| T const & | desc | ||
| ) |
Convenient functional wrapper to create a resource.
This is equivalent to calling CreateResource(name, desc);
| desc | Resources can be created by passing in RHIBufferDesc, RHITextureDesc, and can be imported by passing in RHIDeviceObjectHandle<RHIBuffer>, RHIDeviceObjectHandle<RHITexture>, or raw, pinned pointers RHIBuffer*, or RHITexture* |
|
inline |
Convenient functional wrapper to create a sampler.
This is equivalent to calling CreateSampler(name, desc);
| Foundation::RenderCore::ENUM_NAME | ( | Execute | ) |
| Foundation::RenderCore::ENUM_NAME | ( | PostSetup | ) |
| Foundation::RenderCore::ENUM_NAME | ( | Setup | ) |
| Foundation::RenderCore::ENUM_NAME | ( | Undefined | ) |
| Foundation::RenderCore::ENUM_NAME_CONV_END | ( | ) |
| const RHIResourceAccessBits Foundation::RenderCore::kAllShaderReads |
| const RHIResourceAccessBits Foundation::RenderCore::kAllShaderWrites |
| const RHIPipelineStage Foundation::RenderCore::kComputeStagesMask |
|
constexpr |