MCPcopy Create free account
hub / github.com/GPUOpen-Tools/compressonator / GetChannelSize

Function GetChannelSize

applications/_plugins/common/texture.cpp:67–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65#define CONVERT_BYTE_TO_DWORD(b) ((b) | ((b) << 8) | ((b) << 16) | ((b) << 24))
66
67CMP_DWORD GetChannelSize(ChannelFormat channelFormat)
68{
69 switch (channelFormat)
70 {
71 case CF_8bit:
72 return 1;
73 case CF_Float16:
74 return 2;
75 case CF_Float32:
76 return 3;
77 case CF_16bit:
78 return 2;
79 case CF_2101010:
80 return 1;
81 case CF_32bit:
82 return 4;
83 default:
84 ASSERT(0);
85 return 0;
86 }
87}
88
89CMP_DWORD GetChannelCount(TextureDataType textureDataType)
90{

Callers 1

GetPixelSizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected