![]() |
Vireo
0.0
Vireo 3D Rendering Hardware Interface
|
A render pass is the process of recording then executing multiple command lists and using pipelines.
There is no "render pass object" or data structure : a render pass consists of a series of commands that ends with a submission.
In a render pass we generally find :
Starting and stopping the commands recording session is done with vireo::CommandList::begin and vireo::CommandList::end, barriers are recorded with vireo::CommandList::barrier and submission of command lists is done with vireo::SubmitQueue::submit. A graphic rendering pass starts with vireo::CommandList::beginRendering and ends with vireo::CommandList::endRendering :
You can have multiple graphic rendering pass in a render pass, in this case you need to synchronize the color and depth attachments with pipeline barriers.
If you have multiple render passes (multiple command submissions) you need to synchronize them with semaphores.
The graphic rendering pass must be configured with a vireo::RenderingConfiguration structure with the following parameters :
colorRenderTargets
: an array of vireo::RenderTargetDesc with the descriptions of the images used as color attachments. Must have the same number of elements and the same image formats as the colorRenderFormats
of the corresponding graphic pipeline.depthStencilRenderTarget
: the depth and stencil attachment. Must have the same format as the depthStencilImageFormat
of the corresponding graphic pipeline.multisampledDepthStencilRenderTarget
: the multisampled depth and stencil attachment if the msaa
field of the graphic pipeline is different from vireo::MSAA::NONE.depthTestEnable
: true
if the depth and stencil attachment is used for depth testing.stencilTestEnable
: true
if the depth and stencil attachment is used for stencil testing.clearDepthStencil
: set to true
to clear the depth and stencil attachment at the start of the pass.depthStencilClearValue
: values used to clear the depth and stencil attachment.discardDepthStencilAfterRender
: if true
the depth and stencil attachment content can be discarded by the driver if needed.For each color attachment of the colorRenderTargets
array the parameters are described in a vireo::RenderTargetDesc structure :
swapChain
: if set, use the swap chain as color attachment.renderTarget
: if set, use this image as color attachment. The swapchain
field is evaluated first.multisampledRenderTarget
: the multisampled color attachment if the msaa
field of the graphic pipeline is different from vireo::MSAA::NONE.clear
: set to true
to clear the color attachment at the start of the pass.clearValue
: values used to clear the color attachment.discardAfterRender
: if true
the color attachment content can be discarded by the driver if needed.