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

Function ReadBit

cmp_core/shaders/bc7_encode_kernel.cpp:3063–3077  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3061//
3062
3063CGU_UINT32 ReadBit(const CGU_UINT8 base[], CGU_UINT32& m_bitPosition)
3064{
3065 int byteLocation;
3066 int remainder;
3067 CGU_UINT32 bit = 0;
3068 byteLocation = m_bitPosition / 8;
3069 remainder = m_bitPosition % 8;
3070
3071 bit = base[byteLocation];
3072 bit >>= remainder;
3073 bit &= 0x1;
3074 // Increment bit position
3075 m_bitPosition++;
3076 return (bit);
3077}
3078
3079void DecompressDualIndexBlock(CGU_UINT8 out[MAX_SUBSET_SIZE][MAX_DIMENSION_BIG],
3080 const CGU_UINT8 in[COMPRESSED_BLOCK_SIZE],

Callers 4

DecompressDualIndexBlockFunction · 0.85
DecompressBC7_internalFunction · 0.85
DecompressBlockMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected