Haio 0.2.X
Homebrew Asset IO/CDN
Loading...
Searching...
No Matches
Haio::Util::GPU Namespace Reference

Classes

struct  Profile

Functions

constexpr uint64_t pvrRaw (char a, char b, char c, char d, uint8_t ba, uint8_t bb, uint8_t bc, uint8_t bd)
constexpr size_t etc1Size (Size size)
Result< size_t > payloadSize (Color color, Size size)
Result< Profile > profileFor (Color color, Size size)
uint32_t typeSize (const Profile &profile)
Result< Color > colorFromGL (uint32_t glType, uint32_t glFormat, uint32_t glInternal)
Result< Color > colorFromVK (uint32_t format)
Result< Color > colorFromPVR (uint64_t format)

Variables

constexpr uint32_t GL_UNSIGNED_BYTE = 0x1401
constexpr uint32_t GL_UNSIGNED_SHORT_5_6_5 = 0x8363
constexpr uint32_t GL_RGB = 0x1907
constexpr uint32_t GL_RGBA = 0x1908
constexpr uint32_t GL_RGBA8 = 0x8058
constexpr uint32_t GL_RGB565 = 0x8d62
constexpr uint32_t GL_ETC1_RGB8_OES = 0x8d64
constexpr uint32_t VK_FORMAT_R5G6B5_UNORM_PACK16 = 4
constexpr uint32_t VK_FORMAT_R8G8B8A8_UNORM = 37
constexpr uint32_t VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147

Class Documentation

◆ Haio::Util::GPU::Profile

struct Haio::Util::GPU::Profile

Definition at line 105 of file haio_util.hpp.

Class Members
uint32_t glBase
uint32_t glFormat
uint32_t glInternal
uint32_t glType
uint64_t pvrFormat
size_t size
uint32_t vkFormat

Function Documentation

◆ colorFromGL()

Result< Color > Haio::Util::GPU::colorFromGL ( uint32_t glType,
uint32_t glFormat,
uint32_t glInternal )

what colour a container header is describing

Definition at line 38 of file gpu.cpp.

Here is the call graph for this function:

◆ colorFromPVR()

Result< Color > Haio::Util::GPU::colorFromPVR ( uint64_t format)

Definition at line 52 of file gpu.cpp.

Here is the call graph for this function:

◆ colorFromVK()

Result< Color > Haio::Util::GPU::colorFromVK ( uint32_t format)

Definition at line 45 of file gpu.cpp.

Here is the call graph for this function:

◆ etc1Size()

size_t Haio::Util::GPU::etc1Size ( Size size)
constexpr

etc1 rounds up to whole 4x4 blocks, so the stored size is not width times height

Definition at line 122 of file haio_util.hpp.

Here is the call graph for this function:

◆ payloadSize()

Result< size_t > Haio::Util::GPU::payloadSize ( Color color,
Size size )

Definition at line 5 of file gpu.cpp.

Here is the call graph for this function:

◆ profileFor()

Result< Profile > Haio::Util::GPU::profileFor ( Color color,
Size size )

Definition at line 20 of file gpu.cpp.

Here is the call graph for this function:

◆ pvrRaw()

uint64_t Haio::Util::GPU::pvrRaw ( char a,
char b,
char c,
char d,
uint8_t ba,
uint8_t bb,
uint8_t bc,
uint8_t bd )
constexpr

Definition at line 115 of file haio_util.hpp.

Here is the call graph for this function:

◆ typeSize()

uint32_t Haio::Util::GPU::typeSize ( const Profile & profile)

Definition at line 34 of file gpu.cpp.

Here is the call graph for this function:

Variable Documentation

◆ GL_ETC1_RGB8_OES

uint32_t Haio::Util::GPU::GL_ETC1_RGB8_OES = 0x8d64
inlineconstexpr

Definition at line 100 of file haio_util.hpp.

◆ GL_RGB

uint32_t Haio::Util::GPU::GL_RGB = 0x1907
inlineconstexpr

Definition at line 96 of file haio_util.hpp.

◆ GL_RGB565

uint32_t Haio::Util::GPU::GL_RGB565 = 0x8d62
inlineconstexpr

Definition at line 99 of file haio_util.hpp.

◆ GL_RGBA

uint32_t Haio::Util::GPU::GL_RGBA = 0x1908
inlineconstexpr

Definition at line 97 of file haio_util.hpp.

◆ GL_RGBA8

uint32_t Haio::Util::GPU::GL_RGBA8 = 0x8058
inlineconstexpr

Definition at line 98 of file haio_util.hpp.

◆ GL_UNSIGNED_BYTE

uint32_t Haio::Util::GPU::GL_UNSIGNED_BYTE = 0x1401
inlineconstexpr

Definition at line 94 of file haio_util.hpp.

◆ GL_UNSIGNED_SHORT_5_6_5

uint32_t Haio::Util::GPU::GL_UNSIGNED_SHORT_5_6_5 = 0x8363
inlineconstexpr

Definition at line 95 of file haio_util.hpp.

◆ VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK

uint32_t Haio::Util::GPU::VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147
inlineconstexpr

Definition at line 103 of file haio_util.hpp.

◆ VK_FORMAT_R5G6B5_UNORM_PACK16

uint32_t Haio::Util::GPU::VK_FORMAT_R5G6B5_UNORM_PACK16 = 4
inlineconstexpr

Definition at line 101 of file haio_util.hpp.

◆ VK_FORMAT_R8G8B8A8_UNORM

uint32_t Haio::Util::GPU::VK_FORMAT_R8G8B8A8_UNORM = 37
inlineconstexpr

Definition at line 102 of file haio_util.hpp.