Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
castor::ImageLayout Struct Reference

#include <ImageLayout.hpp>

Public Types

enum  Type : uint8_t {
  e1D = 0 , e2D = 1 , e3D = 2 , eCube = 3 ,
  e1DArray = 4 , e2DArray = 5 , eCubeArray = 6 , Type_COUNT ,
  Type_MIN = e1D
}
 
using Buffer = ByteArrayView
 
using ConstBuffer = ConstByteArrayView
 
using DeviceSize = uint64_t
 
using SubresourceRange = Range< DeviceSize >
 

Public Member Functions

 ImageLayout (Type type=e2D, PixelFormat format=PixelFormat::eR8G8B8A8_UNORM, Point3ui extent={ 1u, 1u, 1u }, uint32_t baseLayer=0u, uint32_t layers=1u, uint32_t baseLevel=0u, uint32_t levels=1u, uint32_t alignment=1u)
 
 ImageLayout (PxBufferBase const &buffer)
 
 ImageLayout (Type type, PxBufferBase const &buffer)
 
Size dimensions () const noexcept
 
Size dimensions (uint32_t level) const noexcept
 
uint32_t depthLayers () const noexcept
 
CU_API SubresourceRange range () const noexcept
 
CU_API SubresourceRange slice (uint32_t index) const noexcept
 
CU_API SubresourceRange sliceMip (uint32_t index, uint32_t level) const noexcept
 
CU_API DeviceSize size () const noexcept
 
CU_API DeviceSize sliceSize () const noexcept
 
CU_API DeviceSize sliceMipSize (uint32_t level) const noexcept
 
CU_API DeviceSize offset () const noexcept
 
CU_API DeviceSize sliceOffset (uint32_t index) const noexcept
 
CU_API DeviceSize sliceMipOffset (uint32_t index, uint32_t level) const noexcept
 
CU_API Buffer buffer (PxBufferBase &buffer) const noexcept
 
CU_API Buffer sliceBuffer (PxBufferBase &buffer, uint32_t index) const noexcept
 
CU_API Buffer sliceMipBuffer (PxBufferBase &buffer, uint32_t index, uint32_t level) const noexcept
 
CU_API ConstBuffer buffer (PxBufferBase const &buffer) const noexcept
 
CU_API ConstBuffer sliceBuffer (PxBufferBase const &buffer, uint32_t index) const noexcept
 
CU_API ConstBuffer sliceMipBuffer (PxBufferBase const &buffer, uint32_t index, uint32_t level) const noexcept
 
CU_API bool hasBuffer (PxBufferBase const &buffer) const noexcept
 
CU_API bool hasSliceBuffer (PxBufferBase const &buffer, uint32_t index) const noexcept
 
CU_API bool hasSliceMipBuffer (PxBufferBase const &buffer, uint32_t index, uint32_t level) const noexcept
 
SubresourceRange layer (uint32_t index) const noexcept
 
SubresourceRange layerMip (uint32_t index, uint32_t level) const noexcept
 
DeviceSize layerSize () const noexcept
 
DeviceSize layerMipSize (uint32_t level) const noexcept
 
DeviceSize layerOffset (uint32_t index) const noexcept
 
DeviceSize layerMipOffset (uint32_t index, uint32_t level) const noexcept
 
Buffer layerBuffer (PxBufferBase &buffer, uint32_t index) const noexcept
 
Buffer layerMipBuffer (PxBufferBase &buffer, uint32_t index, uint32_t level) const noexcept
 
ConstBuffer layerBuffer (PxBufferBase const &buffer, uint32_t index) const noexcept
 
ConstBuffer layerMipBuffer (PxBufferBase const &buffer, uint32_t index, uint32_t level) const noexcept
 
bool hasLayerBuffer (PxBufferBase const &buffer, uint32_t index) const noexcept
 
bool hasLayerMipBuffer (PxBufferBase const &buffer, uint32_t index, uint32_t level) const noexcept
 

Static Public Member Functions

static StringView getName (Type t)
 
static Type getType (PxBufferBase const &buffer)
 

Public Attributes

Type type
 
PixelFormat format
 
Point3ui extent
 
uint32_t baseLayer
 
uint32_t layers
 
uint32_t baseLevel
 
uint32_t levels
 
uint32_t alignment
 

Member Typedef Documentation

◆ Buffer

using castor::ImageLayout::Buffer = ByteArrayView

◆ ConstBuffer

using castor::ImageLayout::ConstBuffer = ConstByteArrayView

◆ DeviceSize

◆ SubresourceRange

Member Enumeration Documentation

◆ Type

enum castor::ImageLayout::Type : uint8_t
Enumerator
e1D 
e2D 
e3D 
eCube 
e1DArray 
e2DArray 
eCubeArray 
Type_COUNT 
Type_MIN 

Constructor & Destructor Documentation

◆ ImageLayout() [1/3]

castor::ImageLayout::ImageLayout ( Type type = e2D,
PixelFormat format = PixelFormat::eR8G8B8A8_UNORM,
Point3ui extent = { 1u, 1u, 1u },
uint32_t baseLayer = 0u,
uint32_t layers = 1u,
uint32_t baseLevel = 0u,
uint32_t levels = 1u,
uint32_t alignment = 1u )
inlineexplicit

◆ ImageLayout() [2/3]

castor::ImageLayout::ImageLayout ( PxBufferBase const & buffer)
inlineexplicit

◆ ImageLayout() [3/3]

castor::ImageLayout::ImageLayout ( Type type,
PxBufferBase const & buffer )
inlineexplicit

Member Function Documentation

◆ buffer() [1/2]

CU_API Buffer castor::ImageLayout::buffer ( PxBufferBase & buffer) const
noexcept

◆ buffer() [2/2]

CU_API ConstBuffer castor::ImageLayout::buffer ( PxBufferBase const & buffer) const
noexcept

◆ depthLayers()

uint32_t castor::ImageLayout::depthLayers ( ) const
inlinenoexcept

References extent, and layers.

◆ dimensions() [1/2]

Size castor::ImageLayout::dimensions ( ) const
inlinenoexcept

References extent.

Referenced by dimensions().

Here is the caller graph for this function:

◆ dimensions() [2/2]

Size castor::ImageLayout::dimensions ( uint32_t level) const
inlinenoexcept

References dimensions().

Here is the call graph for this function:

◆ getName()

static StringView castor::ImageLayout::getName ( Type t)
inlinestatic

References cuT, e1D, e1DArray, e2D, e2DArray, e3D, eCube, and eCubeArray.

◆ getType()

static Type castor::ImageLayout::getType ( PxBufferBase const & buffer)
inlinestatic

References buffer(), e1D, e1DArray, e2D, and e2DArray.

Here is the call graph for this function:

◆ hasBuffer()

CU_API bool castor::ImageLayout::hasBuffer ( PxBufferBase const & buffer) const
noexcept

Referenced by castor3d::TextureSource::hasBuffer().

Here is the caller graph for this function:

◆ hasLayerBuffer()

bool castor::ImageLayout::hasLayerBuffer ( PxBufferBase const & buffer,
uint32_t index ) const
inlinenoexcept

References buffer(), and hasSliceBuffer().

Referenced by castor::hasLayerBuffer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasLayerMipBuffer()

bool castor::ImageLayout::hasLayerMipBuffer ( PxBufferBase const & buffer,
uint32_t index,
uint32_t level ) const
inlinenoexcept

References buffer(), and hasSliceMipBuffer().

Referenced by castor::hasLayerMipBuffer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasSliceBuffer()

CU_API bool castor::ImageLayout::hasSliceBuffer ( PxBufferBase const & buffer,
uint32_t index ) const
noexcept

Referenced by hasLayerBuffer(), and castor::hasSliceBuffer().

Here is the caller graph for this function:

◆ hasSliceMipBuffer()

CU_API bool castor::ImageLayout::hasSliceMipBuffer ( PxBufferBase const & buffer,
uint32_t index,
uint32_t level ) const
noexcept

Referenced by hasLayerMipBuffer(), and castor::hasSliceMipBuffer().

Here is the caller graph for this function:

◆ layer()

SubresourceRange castor::ImageLayout::layer ( uint32_t index) const
inlinenoexcept

References slice().

Here is the call graph for this function:

◆ layerBuffer() [1/2]

Buffer castor::ImageLayout::layerBuffer ( PxBufferBase & buffer,
uint32_t index ) const
inlinenoexcept

References buffer(), and sliceBuffer().

Referenced by castor::getLayerBuffer(), and castor::getLayerBuffer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layerBuffer() [2/2]

ConstBuffer castor::ImageLayout::layerBuffer ( PxBufferBase const & buffer,
uint32_t index ) const
inlinenoexcept

References buffer(), and sliceBuffer().

Here is the call graph for this function:

◆ layerMip()

SubresourceRange castor::ImageLayout::layerMip ( uint32_t index,
uint32_t level ) const
inlinenoexcept

References sliceMip().

Here is the call graph for this function:

◆ layerMipBuffer() [1/2]

Buffer castor::ImageLayout::layerMipBuffer ( PxBufferBase & buffer,
uint32_t index,
uint32_t level ) const
inlinenoexcept

References buffer(), and sliceMipBuffer().

Referenced by castor::getLayerMipBuffer(), and castor::getLayerMipBuffer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layerMipBuffer() [2/2]

ConstBuffer castor::ImageLayout::layerMipBuffer ( PxBufferBase const & buffer,
uint32_t index,
uint32_t level ) const
inlinenoexcept

References buffer(), and sliceMipBuffer().

Here is the call graph for this function:

◆ layerMipOffset()

DeviceSize castor::ImageLayout::layerMipOffset ( uint32_t index,
uint32_t level ) const
inlinenoexcept

References sliceMipOffset().

Referenced by castor::getLayerMipOffset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layerMipSize()

DeviceSize castor::ImageLayout::layerMipSize ( uint32_t level) const
inlinenoexcept

References sliceMipSize().

Referenced by castor::getLayerMipSize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layerOffset()

DeviceSize castor::ImageLayout::layerOffset ( uint32_t index) const
inlinenoexcept

References sliceOffset().

Referenced by castor::getLayerOffset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layerSize()

DeviceSize castor::ImageLayout::layerSize ( ) const
inlinenoexcept

References sliceSize().

Referenced by castor::getLayerSize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ offset()

CU_API DeviceSize castor::ImageLayout::offset ( ) const
noexcept

◆ range()

CU_API SubresourceRange castor::ImageLayout::range ( ) const
noexcept

◆ size()

CU_API DeviceSize castor::ImageLayout::size ( ) const
noexcept

◆ slice()

CU_API SubresourceRange castor::ImageLayout::slice ( uint32_t index) const
noexcept

Referenced by layer().

Here is the caller graph for this function:

◆ sliceBuffer() [1/2]

CU_API Buffer castor::ImageLayout::sliceBuffer ( PxBufferBase & buffer,
uint32_t index ) const
noexcept

Referenced by castor::getSliceBuffer(), castor::getSliceBuffer(), layerBuffer(), and layerBuffer().

Here is the caller graph for this function:

◆ sliceBuffer() [2/2]

CU_API ConstBuffer castor::ImageLayout::sliceBuffer ( PxBufferBase const & buffer,
uint32_t index ) const
noexcept

◆ sliceMip()

CU_API SubresourceRange castor::ImageLayout::sliceMip ( uint32_t index,
uint32_t level ) const
noexcept

Referenced by layerMip().

Here is the caller graph for this function:

◆ sliceMipBuffer() [1/2]

CU_API Buffer castor::ImageLayout::sliceMipBuffer ( PxBufferBase & buffer,
uint32_t index,
uint32_t level ) const
noexcept

Referenced by castor::getSliceMipBuffer(), castor::getSliceMipBuffer(), layerMipBuffer(), and layerMipBuffer().

Here is the caller graph for this function:

◆ sliceMipBuffer() [2/2]

CU_API ConstBuffer castor::ImageLayout::sliceMipBuffer ( PxBufferBase const & buffer,
uint32_t index,
uint32_t level ) const
noexcept

◆ sliceMipOffset()

CU_API DeviceSize castor::ImageLayout::sliceMipOffset ( uint32_t index,
uint32_t level ) const
noexcept

Referenced by castor::getSliceMipOffset(), and layerMipOffset().

Here is the caller graph for this function:

◆ sliceMipSize()

CU_API DeviceSize castor::ImageLayout::sliceMipSize ( uint32_t level) const
noexcept

Referenced by castor::getSliceMipSize(), and layerMipSize().

Here is the caller graph for this function:

◆ sliceOffset()

CU_API DeviceSize castor::ImageLayout::sliceOffset ( uint32_t index) const
noexcept

Referenced by castor::getSliceOffset(), and layerOffset().

Here is the caller graph for this function:

◆ sliceSize()

CU_API DeviceSize castor::ImageLayout::sliceSize ( ) const
noexcept

Referenced by castor::getSliceSize(), and layerSize().

Here is the caller graph for this function:

Member Data Documentation

◆ alignment

uint32_t castor::ImageLayout::alignment

◆ baseLayer

uint32_t castor::ImageLayout::baseLayer

◆ baseLevel

uint32_t castor::ImageLayout::baseLevel

◆ extent

Point3ui castor::ImageLayout::extent

◆ format

PixelFormat castor::ImageLayout::format

◆ layers

uint32_t castor::ImageLayout::layers

◆ levels

uint32_t castor::ImageLayout::levels

◆ type

Type castor::ImageLayout::type

The documentation for this struct was generated from the following file: