Diligent Engine
 
Loading...
Searching...
No Matches
GraphicsAccessories.hpp File Reference
#include <vector>
#include <cstring>
#include "../../GraphicsEngine/interface/GraphicsTypes.h"
#include "../../GraphicsEngine/interface/Shader.h"
#include "../../GraphicsEngine/interface/Texture.h"
#include "../../GraphicsEngine/interface/Buffer.h"
#include "../../GraphicsEngine/interface/RenderDevice.h"
#include "../../Archiver/interface/Archiver.h"
#include "../../../Common/interface/BasicMath.hpp"
#include "../../../Platforms/Basic/interface/DebugUtilities.hpp"
#include "../../../Platforms/interface/PlatformMisc.hpp"

Classes

struct  Diligent::VALUE_TYPE2CType< ValType >
 Template structure to convert VALUE_TYPE enumeration into C-type. More...
 
struct  Diligent::VALUE_TYPE2CType< VT_INT8 >
 VALUE_TYPE2CType<> template specialization for 8-bit integer value type. More...
 
struct  Diligent::VALUE_TYPE2CType< VT_INT16 >
 VALUE_TYPE2CType<> template specialization for 16-bit integer value type. More...
 
struct  Diligent::VALUE_TYPE2CType< VT_INT32 >
 VALUE_TYPE2CType<> template specialization for 32-bit integer value type. More...
 
struct  Diligent::VALUE_TYPE2CType< VT_UINT8 >
 VALUE_TYPE2CType<> template specialization for 8-bit unsigned-integer value type. More...
 
struct  Diligent::VALUE_TYPE2CType< VT_UINT16 >
 VALUE_TYPE2CType<> template specialization for 16-bit unsigned-integer value type. More...
 
struct  Diligent::VALUE_TYPE2CType< VT_UINT32 >
 VALUE_TYPE2CType<> template specialization for 32-bit unsigned-integer value type. More...
 
struct  Diligent::VALUE_TYPE2CType< VT_FLOAT16 >
 VALUE_TYPE2CType<> template specialization for half-precision 16-bit floating-point value type. More...
 
struct  Diligent::VALUE_TYPE2CType< VT_FLOAT32 >
 VALUE_TYPE2CType<> template specialization for full-precision 32-bit floating-point value type. More...
 
struct  Diligent::VALUE_TYPE2CType< VT_FLOAT64 >
 VALUE_TYPE2CType<> template specialization for double-precision 64-bit floating-point value type. More...
 
struct  Diligent::MipLevelProperties
 Describes the mip level properties. More...
 
struct  Diligent::BufferToTextureCopyInfo
 Information required to perform a copy operation between a buffer and a texture. More...
 

Namespaces

namespace  Diligent
 Graphics engine namespace.
 

Functions

Uint32 Diligent::GetValueSize (VALUE_TYPE Val)
 Returns the size of the specified value type.
 
const Char * Diligent::GetValueTypeString (VALUE_TYPE Val)
 Returns the string representing the specified value type.
 
const TextureFormatAttribsDiligent::GetTextureFormatAttribs (TEXTURE_FORMAT Format)
 Returns invariant texture format attributes, see TextureFormatAttribs for details.
 
COMPONENT_TYPE Diligent::ValueTypeToComponentType (VALUE_TYPE ValType, bool IsNormalized, bool IsSRGB)
 Converts value type to component type.
 
VALUE_TYPE Diligent::ComponentTypeToValueType (COMPONENT_TYPE CompType, Uint32 Size)
 Converts component type and size to value type.
 
TEXTURE_FORMAT Diligent::TextureComponentAttribsToTextureFormat (COMPONENT_TYPE CompType, Uint32 ComponentSize, Uint32 NumComponents)
 Returns texture format for the specified component type, size and number of components.
 
TEXTURE_FORMAT Diligent::GetDefaultTextureViewFormat (TEXTURE_FORMAT TextureFormat, TEXTURE_VIEW_TYPE ViewType, Uint32 BindFlags)
 Returns the default format for a specified texture view type.
 
TEXTURE_FORMAT Diligent::GetDefaultTextureViewFormat (const TextureDesc &TexDesc, TEXTURE_VIEW_TYPE ViewType)
 Returns the default format for a specified texture view type.
 
const Char * Diligent::GetTexViewTypeLiteralName (TEXTURE_VIEW_TYPE ViewType)
 
const Char * Diligent::GetBufferViewTypeLiteralName (BUFFER_VIEW_TYPE ViewType)
 
const Char * Diligent::GetShaderTypeLiteralName (SHADER_TYPE ShaderType)
 
String Diligent::GetShaderStagesString (SHADER_TYPE ShaderStages)
 
const Char * Diligent::GetShaderVariableTypeLiteralName (SHADER_RESOURCE_VARIABLE_TYPE VarType, bool bGetFullName=false)
 
const Char * Diligent::GetShaderResourceTypeLiteralName (SHADER_RESOURCE_TYPE ResourceType, bool bGetFullName=false)
 
const Char * Diligent::GetViewTypeLiteralName (TEXTURE_VIEW_TYPE TexViewType)
 
const Char * Diligent::GetViewTypeLiteralName (BUFFER_VIEW_TYPE BuffViewType)
 
const Char * Diligent::GetFilterTypeLiteralName (FILTER_TYPE FilterType, bool bGetFullName)
 
const Char * Diligent::GetTextureAddressModeLiteralName (TEXTURE_ADDRESS_MODE AddressMode, bool bGetFullName)
 
const Char * Diligent::GetComparisonFunctionLiteralName (COMPARISON_FUNCTION ComparisonFunc, bool bGetFullName)
 
const Char * Diligent::GetStencilOpLiteralName (STENCIL_OP StencilOp)
 Returns the literal name of a stencil operation.
 
const Char * Diligent::GetBlendFactorLiteralName (BLEND_FACTOR BlendFactor)
 Returns the literal name of a blend factor.
 
const Char * Diligent::GetBlendOperationLiteralName (BLEND_OPERATION BlendOp)
 Returns the literal name of a blend operation.
 
const Char * Diligent::GetFillModeLiteralName (FILL_MODE FillMode)
 Returns the literal name of a fill mode.
 
const Char * Diligent::GetCullModeLiteralName (CULL_MODE CullMode, bool GetEnumString=false)
 Returns the literal name of a cull mode.
 
const Char * Diligent::GetMapTypeString (MAP_TYPE MapType)
 Returns the string containing the map type.
 
const Char * Diligent::GetUsageString (USAGE Usage)
 Returns the string containing the usage.
 
const Char * Diligent::GetResourceDimString (RESOURCE_DIMENSION TexType)
 Returns the string containing the texture type.
 
const Char * Diligent::GetBindFlagString (Uint32 BindFlag)
 Returns the string containing single bind flag.
 
String Diligent::GetBindFlagsString (Uint32 BindFlags, const char *Delimiter="|")
 Returns the string containing the bind flags.
 
String Diligent::GetCPUAccessFlagsString (Uint32 CpuAccessFlags)
 Returns the string containing the CPU access flags.
 
String Diligent::GetTextureDescString (const TextureDesc &Desc)
 Returns the string containing the texture description.
 
String Diligent::GetBufferFormatString (const BufferFormat &Fmt)
 Returns the string containing the buffer format description.
 
const Char * Diligent::GetBufferModeString (BUFFER_MODE Mode)
 Returns the string containing the buffer mode description.
 
String Diligent::GetBufferDescString (const BufferDesc &Desc)
 Returns the string containing the buffer description.
 
String Diligent::GetShaderDescString (const ShaderDesc &Desc)
 Returns the string containing the shader description.
 
const Char * Diligent::GetResourceStateFlagString (RESOURCE_STATE State)
 Returns the string containing the buffer mode description.
 
String Diligent::GetCommandQueueTypeString (COMMAND_QUEUE_TYPE Type)
 Returns the string containing the command queue type.
 
const Char * Diligent::GetFenceTypeString (FENCE_TYPE Type)
 Returns the string containing the fence type.
 
const Char * Diligent::GetShaderStatusString (SHADER_STATUS ShaderStatus, bool GetEnumString=false)
 
const Char * Diligent::GetPipelineStateStatusString (PIPELINE_STATE_STATUS PipelineStatus, bool GetEnumString=false)
 
template<typename TObjectDescType>
String Diligent::GetObjectDescString (const TObjectDescType &)
 Helper template function that converts object description into a string.
 
template<>
String Diligent::GetObjectDescString (const TextureDesc &TexDesc)
 Template specialization for texture description.
 
template<>
String Diligent::GetObjectDescString (const BufferDesc &BuffDesc)
 Template specialization for buffer description.
 
const char * Diligent::GetQueryTypeString (QUERY_TYPE QueryType)
 Returns the string representation of the QUERY_TYPE enum value (e.g. "QUERY_TYPE_OCCLUSION")
 
const char * Diligent::GetSurfaceTransformString (SURFACE_TRANSFORM SrfTransform)
 Returns the string representation of the SURFACE_TRANSFORM enum value (e.g. "SURFACE_TRANSFORM_ROTATE_90")
 
const char * Diligent::GetPipelineTypeString (PIPELINE_TYPE PipelineType)
 Returns the string representation of the PIPELINE_TYPE enum value (e.g. "PIPELINE_TYPE_COMPUTE")
 
const char * Diligent::GetShaderCompilerTypeString (SHADER_COMPILER Compiler)
 Returns the string representation of the SHADER_COMPILER enum value (e.g. "SHADER_COMPILER_GLSLANG")
 
const char * Diligent::GetArchiveDeviceDataFlagString (ARCHIVE_DEVICE_DATA_FLAGS Flag, bool bGetFullName=false)
 Returns the string representation of the ARCHIVE_DEVICE_DATA_FLAGS enum value.
 
const char * Diligent::GetDeviceFeatureStateString (DEVICE_FEATURE_STATE State, bool bGetFullName=false)
 Returns the string representation of the DEVICE_FEATURE_STATE enum value.
 
const char * Diligent::GetRenderDeviceTypeString (RENDER_DEVICE_TYPE DeviceType, bool GetEnumString=false)
 
const char * Diligent::GetRenderDeviceTypeShortString (RENDER_DEVICE_TYPE DeviceType, bool Capital=false)
 
String Diligent::GetShaderCodeBufferDescString (const ShaderCodeBufferDesc &Desc, size_t GlobalIdent=0, size_t MemberIdent=2)
 Returns the string containing the shader buffer description.
 
String Diligent::GetShaderCodeVariableDescString (const ShaderCodeVariableDesc &Desc, size_t GlobalIdent=0, size_t MemberIdent=2)
 Returns the string containing the shader code variable description.
 
const char * Diligent::GetInputElementFrequencyString (INPUT_ELEMENT_FREQUENCY Frequency)
 Returns the string representation of the input element frequency (e.g. "undefined")
 
String Diligent::GetLayoutElementString (const LayoutElement &Element)
 Returns the string containing the layout element description.
 
PIPELINE_RESOURCE_FLAGS Diligent::GetValidPipelineResourceFlags (SHADER_RESOURCE_TYPE ResourceType)
 Returns valid pipeline resource flags for the specified shader resource type.
 
PIPELINE_RESOURCE_FLAGS Diligent::ShaderVariableFlagsToPipelineResourceFlags (SHADER_VARIABLE_FLAGS Flags)
 Converts shader variable flags to corresponding pipeline resource flags.
 
BIND_FLAGS Diligent::SwapChainUsageFlagsToBindFlags (SWAP_CHAIN_USAGE_FLAGS SwapChainUsage)
 Returns bind flags for the specified swap chain usage flags.
 
Uint32 Diligent::ComputeMipLevelsCount (Uint32 Width)
 Returns the number of mip levels for the specified texture dimensions.
 
Uint32 Diligent::ComputeMipLevelsCount (Uint32 Width, Uint32 Height)
 Returns the number of mip levels for the specified texture dimensions.
 
Uint32 Diligent::ComputeMipLevelsCount (Uint32 Width, Uint32 Height, Uint32 Depth)
 Returns the number of mip levels for the specified texture dimensions.
 
bool Diligent::IsComparisonFilter (FILTER_TYPE FilterType)
 Checks if the specified filter type is a point filter.
 
bool Diligent::IsAnisotropicFilter (FILTER_TYPE FilterType)
 Checks if the specified filter type is an anisotropic filter.
 
MipLevelProperties Diligent::GetMipLevelProperties (const TextureDesc &TexDesc, Uint32 MipLevel)
 Returns mip level properties for the specified texture description and mip level.
 
Uint64 Diligent::GetStagingTextureLocationOffset (const TextureDesc &TexDesc, Uint32 ArraySlice, Uint32 MipLevel, Uint32 Alignment, Uint32 LocationX, Uint32 LocationY, Uint32 LocationZ)
 
Uint64 Diligent::GetStagingTextureSubresourceOffset (const TextureDesc &TexDesc, Uint32 ArraySlice, Uint32 MipLevel, Uint32 Alignment)
 
Uint64 Diligent::GetStagingTextureDataSize (const TextureDesc &TexDesc, Uint32 Alignment=4)
 Returns the total memory size required to store the staging texture data.
 
void Diligent::CopyTextureSubresource (const TextureSubResData &SrcSubres, Uint32 NumRows, Uint32 NumDepthSlices, Uint64 RowSize, void *pDstData, Uint64 DstRowStride, Uint64 DstDepthStride)
 Copies texture subresource data on the CPU.
 
TEXTURE_FORMAT Diligent::UnormFormatToSRGB (TEXTURE_FORMAT Fmt)
 Converts UNORM format to a corresponding SRGB format.
 
TEXTURE_FORMAT Diligent::SRGBFormatToUnorm (TEXTURE_FORMAT Fmt)
 Converts SRGB format to a corresponding UNORM format.
 
TEXTURE_FORMAT Diligent::BCFormatToUncompressed (TEXTURE_FORMAT Fmt)
 Converts block-compressed format to a corresponding uncompressed format.
 
TEXTURE_FORMAT Diligent::TypelessFormatToUnorm (TEXTURE_FORMAT Fmt)
 Converts typeless format to a corresponding UNORM format.
 
TEXTURE_FORMAT Diligent::TypelessFormatToSRGB (TEXTURE_FORMAT Fmt)
 Converts typeless format to a corresponding SRGB format.
 
bool Diligent::IsSRGBFormat (TEXTURE_FORMAT Fmt)
 Checks if the format is an SRGB format.
 
String Diligent::GetTextureComponentMappingString (const TextureComponentMapping &Mapping)
 Converts texture component mapping to a string.
 
bool Diligent::TextureComponentMappingFromString (const String &MappingStr, TextureComponentMapping &Mapping)
 Converts texture component mapping string to the mapping.
 
SparseTextureProperties Diligent::GetStandardSparseTextureProperties (const TextureDesc &TexDesc)
 Returns the sparse texture properties assuming the standard tile shapes.
 
uint3 Diligent::GetNumSparseTilesInBox (const Box &Region, const Uint32 TileSize[3])
 Returns the number of sparse memory tiles in the given box region.
 
uint3 Diligent::GetNumSparseTilesInMipLevel (const TextureDesc &Desc, const Uint32 TileSize[3], Uint32 MipLevel)
 Returns the number of sparse memory tiles in the given texture mip level.
 
bool Diligent::IsIdentityComponentMapping (const TextureComponentMapping &Mapping)
 Returns true if the Mapping defines an identity texture component swizzle.
 
std::vector< Uint32Diligent::ResolveInputLayoutAutoOffsetsAndStrides (LayoutElement *pLayoutElements, Uint32 NumElements)
 
template<typename FeaturesType>
std::string Diligent::GetDeviceFeaturesString (const FeaturesType &Features, size_t NumColumns, int Indent=4, int Spacing=4, Uint32 Flags=~0u)
 

Detailed Description

Defines graphics engine utilities