![]() |
VPP
0.8
A high-level modern C++ API for Vulkan
|
Utility base class for barrier classes. More...
#include <vppBarriers.hpp>
Public Types | |
enum | EStage { NONE, INDIRECT, VTXIN, VSHADER, VERTEX, TCSHADER, TESHADER, GSHADER, GEOMETRY, FSHADER, FRAGMENT, EDEPTH, LDEPTH, CLROUT, CSHADER, COMPUTE, TRANSFER, HOST } |
Enumeration specifying how the resource was (or will be) accessed. More... | |
Utility base class for barrier classes.
Contains some type definitions. Do not use directly.
enum vpp::Bar::EStage |
Enumeration specifying how the resource was (or will be) accessed.
Enumerator | |
---|---|
NONE | Resource has never been accessed before, or its content does not matter. This is valid only for source stages when specifying image barriers. The purpose is to trigger initializing a layout from undefined layout. This operation is performed automatically by VPP during e.g. clearing an image. You will rarely need to use this. |
INDIRECT | Resource is accessed during processing of indirect draw commands. This is valid only for indirect command buffers. The resource should be a buffer with Buf::INDIRECT usage enabled. Also it makes sense only as a barrier destination stage, where the buffer is being read. Nothing can be written during indirect command processing. It is a fixed pipeline stage. |
VTXIN | Resource is accessed during gathering vertices for a draw command. This is valid only for vertex and index buffers. The resource should be a buffer with Buf::VERTEX or Buf::INDEX usage enabled. Also it makes sense only as a barrier destination stage, where the buffer is being read. Nothing can be written during vertex processing. It is a fixed pipeline stage. |
VSHADER | Resource is accessed during vertex shader execution. Can be any buffer or image. For barrier source stage, where the resource is being written, it must not be read-only. |
VERTEX | Same as VSHADER. |
TCSHADER | Resource is accessed during tessellation control shader execution. Can be any buffer or image. For barrier source stage, where the resource is being written, it must not be read-only. |
TESHADER | Resource is accessed during tessellation evaluation shader execution. Can be any buffer or image. For barrier source stage, where the resource is being written, it must not be read-only. |
GSHADER | Resource is accessed during geometry shader execution. Can be any buffer or image. For barrier source stage, where the resource is being written, it must not be read-only. |
GEOMETRY | Same as GSHADER. |
FSHADER | Resource is accessed during fragment shader execution. Can be any buffer or image. For barrier source stage, where the resource is being written, it must not be read-only. Note that this is not the stage where depth or color attachments are being processed. There are separate stages for that. This stage covers only shader code execution. |
FRAGMENT | Same as FSHADER. |
EDEPTH | Resource is accessed during early fragment tests. Resource must be an image with Img::DEPTH usage enabled. The only access possible during this stage is reading (and possibly modification) of a depth/stencil image. Other types of resources make no sense here and are forbidden. |
LDEPTH | Resource is accessed during late fragment tests. Resource must be an image with Img::DEPTH usage enabled. The only access possible during this stage is reading (and possibly modification) of a depth/stencil image. Other types of resources make no sense here and are forbidden. |
CLROUT | Resource is accessed during color output. Resource must be an image with Img::COLOR usage enabled. The only access possible during this stage is reading/writing of a color image. Other types of resources make no sense here and are forbidden. |
CSHADER | Resource is accessed during compute shader execution. Can be any buffer or image. For barrier source stage, where the resource is being written, it must not be read-only. |
COMPUTE | Same as CSHADER. |
TRANSFER | Resource is accessed during data transfer. Data transfer usage covers various transfer, clear, fill and resolve operations on images and buffers (including commits and loads on vpp::gvector objects). The resource can be any buffer or image. For barrier source stage, where the resource is being written, it must not be read-only. |
HOST | Resource is accessed from the CPU side. This covers scenarios where the image or buffer has been allocated in memory shared between CPU and GPU and is being accessed from both sides. The barrier ensures proper synchronization between to sides. For non-coherent memory blocks, additional call to flush / invalidate memory routine might be necessary (vkFlushMappedMemoryRanges or vkInvalidateMappedMemoryRanges). The vpp::gvector container does it automatically. The resource can be any buffer or image. For barrier source stage, where the resource is being written, it must not be read-only. |