HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
types.h File Reference
#include "pxr/pxr.h"
#include "pxr/imaging/hgi/api.h"
#include <stdlib.h>
+ Include dependency graph for types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  HgiFormat {
  HgiFormatInvalid = -1, HgiFormatUNorm8 = 0, HgiFormatUNorm8Vec2, HgiFormatUNorm8Vec4,
  HgiFormatSNorm8, HgiFormatSNorm8Vec2, HgiFormatSNorm8Vec4, HgiFormatFloat16,
  HgiFormatFloat16Vec2, HgiFormatFloat16Vec3, HgiFormatFloat16Vec4, HgiFormatFloat32,
  HgiFormatFloat32Vec2, HgiFormatFloat32Vec3, HgiFormatFloat32Vec4, HgiFormatInt32,
  HgiFormatInt32Vec2, HgiFormatInt32Vec3, HgiFormatInt32Vec4, HgiFormatUNorm8Vec4srgb,
  HgiFormatBC6FloatVec3, HgiFormatBC6UFloatVec3, HgiFormatFloat32UInt8, HgiFormatCount
}
 

Functions

HGI_API size_t HgiGetComponentCount (HgiFormat f)
 Return the count of components in the given format. More...
 
HGI_API size_t HgiDataSizeOfFormat (HgiFormat f)
 
HGI_API bool HgiIsCompressed (HgiFormat f)
 Return whether the given format uses compression. More...
 

Enumeration Type Documentation

enum HgiFormat

HgiFormat describes the memory format of image buffers used in Hgi. These formats are closely aligned with HdFormat and allow us to keep Hgi independent of Hd.

For reference, see: https://www.khronos.org/registry/vulkan/specs/1.1/html/vkspec.html#VkFormat

Enumerator
HgiFormatInvalid 
HgiFormatUNorm8 
HgiFormatUNorm8Vec2 
HgiFormatUNorm8Vec4 
HgiFormatSNorm8 
HgiFormatSNorm8Vec2 
HgiFormatSNorm8Vec4 
HgiFormatFloat16 
HgiFormatFloat16Vec2 
HgiFormatFloat16Vec3 
HgiFormatFloat16Vec4 
HgiFormatFloat32 
HgiFormatFloat32Vec2 
HgiFormatFloat32Vec3 
HgiFormatFloat32Vec4 
HgiFormatInt32 
HgiFormatInt32Vec2 
HgiFormatInt32Vec3 
HgiFormatInt32Vec4 
HgiFormatUNorm8Vec4srgb 
HgiFormatBC6FloatVec3 
HgiFormatBC6UFloatVec3 
HgiFormatFloat32UInt8 
HgiFormatCount 

Definition at line 42 of file types.h.

Function Documentation

HGI_API size_t HgiDataSizeOfFormat ( HgiFormat  f)

Return the size of a single element of the given format.

Returns the bytes-per-pixel even for blocked formats such as BC6 since - luckily - the number still happens to be integral for supported compression formats.

HGI_API size_t HgiGetComponentCount ( HgiFormat  f)

Return the count of components in the given format.

HGI_API bool HgiIsCompressed ( HgiFormat  f)

Return whether the given format uses compression.