struct render::GpuRenderTargetBarrier

Inherits: GpuSurfaceBarrier

Describes a barrier for a RenderTarget.

This is functionally equivalent to specifying GpuTextureBarrier on the color or depth/stencil textures of the render target. However, it is necessary for issuing barriers on swap chain images, which cannot be accessed as standalone textures.

Public

Constructors

GpuRenderTargetBarrier

GpuRenderTargetBarrier(const SPtr<RenderTarget> &object, RenderSurfaceMaskBits surfaceMask, GpuResourceUseFlags destinationUsage, GpuAccessFlags destinationAccess, const GpuTextureSubresourceRange &subresourceRange = GpuTextureSubresourceRange::AllSubresources())

GpuRenderTargetBarrier

GpuRenderTargetBarrier(const SPtr<RenderTarget> &object, RenderSurfaceMaskBits surfaceMask, GpuResourceUseFlags destinationUsage, GpuAccessFlags destinationAccess, ImageLayout sourceLayout, ImageLayout destinationLayout, const GpuTextureSubresourceRange &subresourceRange = GpuTextureSubresourceRange::AllSubresources())

GpuRenderTargetBarrier

GpuRenderTargetBarrier(const SPtr<RenderTarget> &object, RenderSurfaceMaskBits surfaceMask, GpuResourceUseFlags sourceUsage, GpuAccessFlags sourceAccess, GpuResourceUseFlags destinationUsage, GpuAccessFlags destinationAccess, const GpuTextureSubresourceRange &subresourceRange = GpuTextureSubresourceRange::AllSubresources())

GpuRenderTargetBarrier

GpuRenderTargetBarrier(const SPtr<RenderTarget> &object, RenderSurfaceMaskBits surfaceMask, GpuResourceUseFlags sourceUsage, GpuAccessFlags sourceAccess, GpuResourceUseFlags destinationUsage, GpuAccessFlags destinationAccess, ImageLayout sourceLayout, ImageLayout destinationLayout, const GpuTextureSubresourceRange &subresourceRange = GpuTextureSubresourceRange::AllSubresources())

Fields

Object

SPtr<RenderTarget> Object

SurfaceMask

Specifies which surface of the render target the barrier applies to.

Must be a single bit.

SubresourceRange

Subresources (mips, array levels) of the textures to apply the barrier to.

SourceLayout

ImageLayout SourceLayout

Source image layout.

If usage is set to undefined, layout is determined from the current usage of the texture object, otherwise it must be provided.

DestinationLayout

ImageLayout DestinationLayout

Destination image layout.

If set to Undefined, no layout transition will be performed.

SourceUsage

GpuResourceUseFlags SourceUsage

Determines how was resource used before the barrier.

Barrier will only work for provided accesses. If undefined, source usage, access and layout is automatically deduced based on current buffer use.

SourceAccess

GpuAccessFlags SourceAccess

Determines if the resource was read or written before the barrier.

DestinationUsage

GpuResourceUseFlags DestinationUsage

Determines how was resource will be used after the barrier.

Barrier will only work for provided accesses. Images will transition to a layout compatible for this usage - incompatible usages are not allowed.

DestinationAccess

GpuAccessFlags DestinationAccess

Determines if the resource will be read or written after the barrier.